Package georegression.struct.line
Class LineGeneral2D_F32
java.lang.Object
georegression.struct.line.LineGeneral2D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.line.LineGeneral2D_F64")
public class LineGeneral2D_F32
extends Object
implements Serializable
Represents the line using three parameters such that any point on the line obeys the following formula, A*x + B*y + C = 0. Any 2D line can be represented using this notation. This formulation is also known as standard and implicit. The slope is -A/B.
If it is said the line is normalized that refers to it being scaled such that A*A + B*B = 1. To
normalize a line call normalize()
. After normalization several operations become less expensive.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
boolean
float
evaluate
(float x, float y) Returns the result of A*x + B*y + C.float
evaluate
(float x, float y, float z) int
hashCode()
void
Ensures that A*A + B*B == 1setTo
(float a, float b, float c) A*x + B*y + C = 0setTo
(LineGeneral2D_F32 original) toString()
void
zero()
-
Field Details
-
A
public float ACoefficients which define the line. -
B
public float BCoefficients which define the line. -
C
public float CCoefficients which define the line.
-
-
Constructor Details
-
LineGeneral2D_F32
public LineGeneral2D_F32(float a, float b, float c) A*x + B*y + C = 0- Parameters:
a
- parameter Ab
- parameter Bc
- parameter C
-
LineGeneral2D_F32
-
LineGeneral2D_F32
public LineGeneral2D_F32()
-
-
Method Details
-
setTo
-
setTo
A*x + B*y + C = 0- Parameters:
a
- parameter Ab
- parameter Bc
- parameter C
-
zero
public void zero() -
normalize
public void normalize()Ensures that A*A + B*B == 1 -
evaluate
public float evaluate(float x, float y) Returns the result of A*x + B*y + C. If the line is normalized then this is also the signed distance away from the line.- Parameters:
x
- x-coordinate of a pointy
- y-coordinate of a point- Returns:
- result of line equation
-
evaluate
public float evaluate(float x, float y, float z) -
copy
-
toString
-
equals
-
hashCode
public int hashCode()
-