Package georegression.struct.line
Class LineParametric2D_F32
java.lang.Object
georegression.struct.line.LineParametric2D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.line.LineParametric2D_F64")
public class LineParametric2D_F32
extends Object
implements Serializable
2D 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionA point on the lineThe line's slope -
Constructor Summary
ConstructorsConstructorDescriptionLineParametric2D_F32(float x_0, float y_0, float slopeX, float slopeY) Creates a line defined from two points.LineParametric2D_F32(Point2D_F32 p, Vector2D_F32 slope) -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanfloatgetAngle()getPoint()getPointOnLine(float t) Returns a point along the line.voidgetPointOnLine(float t, Point2D_F32 x) final floatfinal floatfinal floatgetX()final floatgetY()inthashCode()voidsetAngle(float angle) Sets the slope to the unit vector specified by the provided angle.voidsetPoint(float x, float y) voidsetPoint(Point2D_F32 pt) voidsetSlope(float slopeX, float slopeY) voidsetSlope(Vector2D_F32 slope) setTo(LineParametric2D_F32 line) toString()voidzero()
-
Field Details
-
p
A point on the line -
slope
The line's slope
-
-
Constructor Details
-
LineParametric2D_F32
public LineParametric2D_F32(float x_0, float y_0, float slopeX, float slopeY) -
LineParametric2D_F32
-
LineParametric2D_F32
Creates a line defined from two points. The slope will be in the direction from a to b.- Parameters:
a- point on lineb- point on line which isn't a- See Also:
-
LineParametric2D_F32
public LineParametric2D_F32()
-
-
Method Details
-
setTo
-
zero
public void zero() -
setPoint
-
setPoint
public void setPoint(float x, float y) -
setSlope
-
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
Returns a point along the line. See parametric equation in class description.- Parameters:
t- Location along the line.- Returns:
- Point on the line.
-
getPointOnLine
-
getPoint
-
getSlopeX
public final float getSlopeX() -
getSlopeY
public final float getSlopeY() -
getX
public final float getX() -
getY
public final float getY() -
copy
-
toString
-
equals
-
hashCode
public int hashCode()
-