Package georegression.struct.line
Class LineSegment2D_F64
java.lang.Object
georegression.struct.line.LineSegment2D_F64
- All Implemented Interfaces:
Serializable,MapFormattable
Defines a line segment by its two end points.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleaxisOnLineX(double fraction) Value of x-axis for a point on the line at this fractional location between 'a' and 'b'doubleaxisOnLineY(double fraction) Value of y-axis for a point on the line at this fractional location between 'a' and 'b'copy()booleanformatMap(MapPrintFormat format) doubledoubleinthashCode()booleanisEquivalent(LineSegment2D_F64 other, double tol) True if the two line segments are the same, ignoring the order of their end points.booleanisIdentical(double ax, double ay, double bx, double by, double tol) booleanisIdentical(LineSegment2D_F64 other, double tol) Returns true if the value of the two line segments is within tol of each otherpointOnLine(double fraction, @Nullable Point2D_F64 p) Computes a point on the line based on the fraction distance between 'a' and 'b'setTo(double x0, double y0, double x1, double y1) setTo(Point2D_F64 a, Point2D_F64 b) doubleslopeX()doubleslopeY()toString()static LineSegment2D_F64wrap(Point2D_F64 a, Point2D_F64 b) voidzero()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ejml.MapFormattable
formatMap
-
Field Details
-
a
-
b
-
-
Constructor Details
-
LineSegment2D_F64
public LineSegment2D_F64() -
LineSegment2D_F64
-
LineSegment2D_F64
public LineSegment2D_F64(double x0, double y0, double x1, double y1)
-
-
Method Details
-
wrap
-
setTo
-
setTo
-
setTo
-
zero
public void zero() -
pointOnLine
Computes a point on the line based on the fraction distance between 'a' and 'b' -
axisOnLineX
public double axisOnLineX(double fraction) Value of x-axis for a point on the line at this fractional location between 'a' and 'b' -
axisOnLineY
public double axisOnLineY(double fraction) Value of y-axis for a point on the line at this fractional location between 'a' and 'b' -
slopeX
public double slopeX() -
slopeY
public double slopeY() -
getLength
public double getLength() -
getLength2
public double getLength2() -
copy
-
isEquivalent
True if the two line segments are the same, ignoring the order of their end points. -
isIdentical
Returns true if the value of the two line segments is within tol of each other -
isIdentical
public boolean isIdentical(double ax, double ay, double bx, double by, double tol) -
formatMap
- Specified by:
formatMapin interfaceMapFormattable
-
toString
-
equals
-
hashCode
public int hashCode()
-