georegression.struct.line
Class LineParametric2D_F64
- java.lang.Object
-
- georegression.struct.line.LineParametric2D_F64
-
- All Implemented Interfaces:
- java.io.Serializable
public class LineParametric2D_F64 extends java.lang.Object implements java.io.Serializable2D line parameterized using parametric equation:
[x, y] = [x_0, y_0] + t·[slopeX, slopeY]
where t specifies the location along the line, (x_0,y_0) is an arbitrary point on the line, and (slopeX,slopeY).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description Point2D_F64pA point on the lineVector2D_F64slopeThe line's slope
-
Constructor Summary
Constructors Constructor and Description LineParametric2D_F64()LineParametric2D_F64(double x_0, double y_0, double slopeX, double slopeY)LineParametric2D_F64(Point2D_F64 p, Vector2D_F64 slope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description LineParametric2D_F64copy()doublegetAngle()Point2D_F64getP()Point2D_F64getPoint()Point2D_F64getPointOnLine(double t)Returns a point along the line.Vector2D_F64getSlope()doublegetSlopeX()doublegetSlopeY()doublegetX()doublegetY()voidset(LineParametric2D_F64 line)voidsetAngle(double angle)Sets the slope to the unit vector specified by the provided angle.voidsetP(Point2D_F64 p)voidsetPoint(double x, double y)voidsetPoint(Point2D_F64 pt)voidsetSlope(double slopeX, double slopeY)voidsetSlope(Vector2D_F64 slope)java.lang.StringtoString()
-
-
-
Field Detail
-
p
public Point2D_F64 p
A point on the line
-
slope
public Vector2D_F64 slope
The line's slope
-
-
Constructor Detail
-
LineParametric2D_F64
public LineParametric2D_F64(double x_0, double y_0, double slopeX, double slopeY)
-
LineParametric2D_F64
public LineParametric2D_F64(Point2D_F64 p, Vector2D_F64 slope)
-
LineParametric2D_F64
public LineParametric2D_F64()
-
-
Method Detail
-
set
public void set(LineParametric2D_F64 line)
-
setPoint
public void setPoint(Point2D_F64 pt)
-
setPoint
public void setPoint(double x, double y)
-
setSlope
public void setSlope(Vector2D_F64 slope)
-
setSlope
public void setSlope(double slopeX, double slopeY)
-
setAngle
public void setAngle(double angle)
Sets the slope to the unit vector specified by the provided angle.- Parameters:
angle- Angle of the line specified in radians.
-
getAngle
public double getAngle()
-
getPointOnLine
public Point2D_F64 getPointOnLine(double t)
Returns a point along the line. See parametric equation in class description.- Parameters:
t- Location along the line.- Returns:
- Point on the line.
-
getPoint
public Point2D_F64 getPoint()
-
getSlopeX
public final double getSlopeX()
-
getSlopeY
public final double getSlopeY()
-
getX
public final double getX()
-
getY
public final double getY()
-
getP
public Point2D_F64 getP()
-
setP
public void setP(Point2D_F64 p)
-
getSlope
public Vector2D_F64 getSlope()
-
copy
public LineParametric2D_F64 copy()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG