public class EuclideanLine2DImpl extends java.lang.Object implements EuclideanLine2D
Constructor and Description |
---|
EuclideanLine2DImpl(double m,
double b)
If m parameter m is infinite, preferably use the constructor EuclideanLine2DImpl(double coefA, double coefB, double coefC)
|
EuclideanLine2DImpl(double coefA,
double coefB,
double coefC) |
EuclideanLine2DImpl(double x0,
double y0,
double x1,
double y1) |
EuclideanLine2DImpl(java.awt.geom.Point2D p0,
java.awt.geom.Point2D p1) |
Modifier and Type | Method and Description |
---|---|
double |
getA()
Return coeficient A of general equation (Ax + By + C=0).
|
double |
getAngle()
Returns the angle in radians between this line and x-axis
|
double |
getAngle(EuclideanLine2D line)
Returns the minor angle in radians between this line and the line parameter
|
double |
getAngle(EuclideanLine2D line,
java.awt.geom.Point2D quadrant)
Returns the angle in radians between this line and the line parameter in the quadrant containing the point parameter
|
double |
getB()
Return coeficient B of general equation (Ax + By + C=0).
|
EuclideanLine2D[] |
getBisectors(EuclideanLine2D line)
Returns the bisectors between this line and the line passed as parameter
|
double |
getC()
Return coeficient C of general equation (Ax + By + C=0).
|
double |
getDegreesAngle()
Returns the angle in degrees between this line and x-axis
|
double |
getDegreesAngle(EuclideanLine2D line)
Returns the minor angle in degrees between this line and the line parameter
|
double |
getDegreesAngle(EuclideanLine2D line,
java.awt.geom.Point2D quadrant)
Returns the angle in degrees between this line and the line parameter in the quadrant containing the point parameter
|
double |
getDistance(double pointX,
double pointY)
Returns the distance between this line and the point whose coordinates are the parameters
|
double |
getDistance(EuclideanLine2D line)
Return the distance between this line and the parameter line
|
double |
getDistance(java.awt.geom.Point2D point)
Returns the distance between this line and the point
|
java.awt.geom.Point2D |
getIntersection(EuclideanLine2D line)
Returns the intersection between this line and the line passed as parameter
|
java.awt.geom.Point2D |
getNearestPoint(double pointX,
double pointY)
Returns the nearest point of this line to the point whose coordinates are pointx, pointy
|
java.awt.geom.Point2D |
getNearestPoint(java.awt.geom.Point2D point)
Returns the nearest point of this line to the point
|
EuclideanLine2D |
getParallel(double pointX,
double pointY)
Returns a parallel line that passes through the point whose coordinates are pointx, pointy
|
EuclideanLine2D |
getParallel(java.awt.geom.Point2D point)
Returns a parallel line that passes through a point
|
EuclideanLine2D |
getPerpendicular(double pointX,
double pointY)
Returns a perpendicular line that passes through the point whose coordinates are pointx, pointy
|
EuclideanLine2D |
getPerpendicular(java.awt.geom.Point2D point)
Returns a perpendicular line that passes through a point
|
double |
getSlope()
Return de slope (m in explicit equation of the line y=m+x+b)
|
java.awt.geom.Point2D |
getSymmetricalPoint(java.awt.geom.Point2D point)
Returns the point symmetrical to the given point with respect to the line
|
double |
getX(double y)
Returns the x coordinate of a point on the line whose y coordinate is the value of the parameter
|
double |
getY(double x)
Returns the y coordinate of a point on the line whose x coordinate is the value of the parameter
|
double |
getYIntercept()
Return de Y-intercept (b in explicit equation of the line y=m+x+b)
|
boolean |
isParallel(EuclideanLine2D line)
Returns true if this line and the line passed as parameter are parallel
|
boolean |
isPerpendicularl(EuclideanLine2D line)
Returns true if this line and the line passed as parameter are perpendicular
|
public EuclideanLine2DImpl(double coefA, double coefB, double coefC)
public EuclideanLine2DImpl(double m, double b)
m
- b
- public EuclideanLine2DImpl(double x0, double y0, double x1, double y1)
public EuclideanLine2DImpl(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
public double getA()
EuclideanLine2D
getA
in interface EuclideanLine2D
public double getB()
EuclideanLine2D
getB
in interface EuclideanLine2D
public double getC()
EuclideanLine2D
getC
in interface EuclideanLine2D
public double getSlope()
EuclideanLine2D
getSlope
in interface EuclideanLine2D
public double getYIntercept()
EuclideanLine2D
getYIntercept
in interface EuclideanLine2D
public double getY(double x)
EuclideanLine2D
getY
in interface EuclideanLine2D
public double getX(double y)
EuclideanLine2D
getX
in interface EuclideanLine2D
public double getAngle()
EuclideanLine2D
getAngle
in interface EuclideanLine2D
public double getDegreesAngle()
EuclideanLine2D
getDegreesAngle
in interface EuclideanLine2D
public double getAngle(EuclideanLine2D line)
EuclideanLine2D
getAngle
in interface EuclideanLine2D
public double getAngle(EuclideanLine2D line, java.awt.geom.Point2D quadrant)
EuclideanLine2D
getAngle
in interface EuclideanLine2D
public double getDegreesAngle(EuclideanLine2D line)
EuclideanLine2D
getDegreesAngle
in interface EuclideanLine2D
public double getDegreesAngle(EuclideanLine2D line, java.awt.geom.Point2D quadrant)
EuclideanLine2D
getDegreesAngle
in interface EuclideanLine2D
public double getDistance(double pointX, double pointY)
EuclideanLine2D
getDistance
in interface EuclideanLine2D
public double getDistance(java.awt.geom.Point2D point)
EuclideanLine2D
getDistance
in interface EuclideanLine2D
public double getDistance(EuclideanLine2D line)
EuclideanLine2D
getDistance
in interface EuclideanLine2D
public boolean isParallel(EuclideanLine2D line)
EuclideanLine2D
isParallel
in interface EuclideanLine2D
public boolean isPerpendicularl(EuclideanLine2D line)
EuclideanLine2D
isPerpendicularl
in interface EuclideanLine2D
public java.awt.geom.Point2D getIntersection(EuclideanLine2D line)
EuclideanLine2D
getIntersection
in interface EuclideanLine2D
public EuclideanLine2D getPerpendicular(double pointX, double pointY)
EuclideanLine2D
getPerpendicular
in interface EuclideanLine2D
public EuclideanLine2D getPerpendicular(java.awt.geom.Point2D point)
EuclideanLine2D
getPerpendicular
in interface EuclideanLine2D
public EuclideanLine2D getParallel(double pointX, double pointY)
EuclideanLine2D
getParallel
in interface EuclideanLine2D
public EuclideanLine2D getParallel(java.awt.geom.Point2D point)
EuclideanLine2D
getParallel
in interface EuclideanLine2D
public java.awt.geom.Point2D getNearestPoint(double pointX, double pointY)
EuclideanLine2D
getNearestPoint
in interface EuclideanLine2D
public java.awt.geom.Point2D getNearestPoint(java.awt.geom.Point2D point)
EuclideanLine2D
getNearestPoint
in interface EuclideanLine2D
public EuclideanLine2D[] getBisectors(EuclideanLine2D line)
EuclideanLine2D
getBisectors
in interface EuclideanLine2D
public java.awt.geom.Point2D getSymmetricalPoint(java.awt.geom.Point2D point)
EuclideanLine2D
getSymmetricalPoint
in interface EuclideanLine2D