georegression.struct.line
Class LineParametric2D_F32
- java.lang.Object
-
- georegression.struct.line.LineParametric2D_F32
-
- All Implemented Interfaces:
- java.io.Serializable
public class LineParametric2D_F32 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_F32pA point on the lineVector2D_F32slopeThe line's slope
-
Constructor Summary
Constructors Constructor and Description LineParametric2D_F32()LineParametric2D_F32(float x_0, float y_0, float slopeX, float slopeY)LineParametric2D_F32(Point2D_F32 p, Vector2D_F32 slope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description LineParametric2D_F32copy()floatgetAngle()Point2D_F32getP()Point2D_F32getPoint()Point2D_F32getPointOnLine(float t)Returns a point along the line.Vector2D_F32getSlope()floatgetSlopeX()floatgetSlopeY()floatgetX()floatgetY()voidset(LineParametric2D_F32 line)voidsetAngle(float angle)Sets the slope to the unit vector specified by the provided angle.voidsetP(Point2D_F32 p)voidsetPoint(float x, float y)voidsetPoint(Point2D_F32 pt)voidsetSlope(float slopeX, float slopeY)voidsetSlope(Vector2D_F32 slope)java.lang.StringtoString()
-
-
-
Field Detail
-
p
public Point2D_F32 p
A point on the line
-
slope
public Vector2D_F32 slope
The line's slope
-
-
Constructor Detail
-
LineParametric2D_F32
public LineParametric2D_F32(float x_0, float y_0, float slopeX, float slopeY)
-
LineParametric2D_F32
public LineParametric2D_F32(Point2D_F32 p, Vector2D_F32 slope)
-
LineParametric2D_F32
public LineParametric2D_F32()
-
-
Method Detail
-
set
public void set(LineParametric2D_F32 line)
-
setPoint
public void setPoint(Point2D_F32 pt)
-
setPoint
public void setPoint(float x, float y)
-
setSlope
public void setSlope(Vector2D_F32 slope)
-
setSlope
public void setSlope(float slopeX, float slopeY)
-
setAngle
public void setAngle(float angle)
Sets the slope to the unit vector specified by the provided angle.- Parameters:
angle- Angle of the line specified in radians.
-
getAngle
public float getAngle()
-
getPointOnLine
public Point2D_F32 getPointOnLine(float 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_F32 getPoint()
-
getSlopeX
public final float getSlopeX()
-
getSlopeY
public final float getSlopeY()
-
getX
public final float getX()
-
getY
public final float getY()
-
getP
public Point2D_F32 getP()
-
setP
public void setP(Point2D_F32 p)
-
getSlope
public Vector2D_F32 getSlope()
-
copy
public LineParametric2D_F32 copy()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG