georegression.geometry
Class UtilLine2D_F32
- java.lang.Object
-
- georegression.geometry.UtilLine2D_F32
-
public class UtilLine2D_F32 extends java.lang.ObjectVarious functions related to lines
-
-
Constructor Summary
Constructors Constructor and Description UtilLine2D_F32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static floatacuteAngle(LineGeneral2D_F32 a, LineGeneral2D_F32 b)Returns the acute angle between the slope of two lines.static floatacuteAngleN(LineGeneral2D_F32 a, LineGeneral2D_F32 b)Returns the acute angle between the slope of two lines and assumes that the lines have been normalized such that A*A + B*B = 1.static LineParametric2D_F32convert(LineGeneral2D_F32 src, LineParametric2D_F32 ret)Converts a line from general to parametricstatic LinePolar2D_F32convert(LineGeneral2D_F32 src, LinePolar2D_F32 ret)Converts a line from general to polar.static LineGeneral2D_F32convert(LineParametric2D_F32 src, LineGeneral2D_F32 ret)Converts a line from parametric to generalstatic LinePolar2D_F32convert(LineParametric2D_F32 src, LinePolar2D_F32 ret)Converts a line from parametric to polar.static LineGeneral2D_F32convert(LinePolar2D_F32 src, LineGeneral2D_F32 ret)Converts a line from polar form to general.static LineParametric2D_F32convert(LinePolar2D_F32 src, LineParametric2D_F32 ret)Converts a line from polar form to parametric.static LineGeneral2D_F32convert(LineSegment2D_F32 src, LineGeneral2D_F32 ret)Converts a line segment into a general line.static LineParametric2D_F32convert(LineSegment2D_F32 src, LineParametric2D_F32 ret)Converts a line segment into a parametric line.static LineGeneral2D_F32convert(Point2D_F32 a, Point2D_F32 b, LineGeneral2D_F32 ret)Converts a line segment into a general line.
-
-
-
Method Detail
-
acuteAngle
public static float acuteAngle(LineGeneral2D_F32 a, LineGeneral2D_F32 b)
Returns the acute angle between the slope of two lines. Lines do not need to ever intersect. Found using the dot product.- Parameters:
a- (input) lineb- (input) line- Returns:
- acute angle in radians
-
acuteAngleN
public static float acuteAngleN(LineGeneral2D_F32 a, LineGeneral2D_F32 b)
Returns the acute angle between the slope of two lines and assumes that the lines have been normalized such that A*A + B*B = 1. This avoids the need to compute the square root twice. Lines do not need to ever intersect. Found using the dot product.- Parameters:
a- (input) normalized lineb- (input) normalized line- Returns:
- acute angle in radians
-
convert
public static LineParametric2D_F32 convert(LinePolar2D_F32 src, LineParametric2D_F32 ret)
Converts a line from polar form to parametric.- Parameters:
src- (input) line is polar notationret- (output) line in parametric notation. If null a new instance will be created.- Returns:
- Converted line in parametric notation
-
convert
public static LineGeneral2D_F32 convert(LinePolar2D_F32 src, LineGeneral2D_F32 ret)
Converts a line from polar form to general. After conversion the line will be normalized, e.g. A*A + B*B == 1.- Parameters:
src- (input) line is polar notationret- (output) line in general notation. If null a new instance will be created.- Returns:
- Converted line in general notation
-
convert
public static LinePolar2D_F32 convert(LineGeneral2D_F32 src, LinePolar2D_F32 ret)
Converts a line from general to polar.- Parameters:
src- (input) line is general notationret- (output) line in polar notation. If null a new instance will be created.- Returns:
- Converted line in polar notation
-
convert
public static LineParametric2D_F32 convert(LineSegment2D_F32 src, LineParametric2D_F32 ret)
Converts a line segment into a parametric line. The start point will be 'src.a' and the direction will be in the direction of 'src.b-src.a'- Parameters:
src- (input) line segmentret- (output) line in parametric notation. If null a new instance will be created.- Returns:
- Converted line in parametric notation
-
convert
public static LineGeneral2D_F32 convert(LineSegment2D_F32 src, LineGeneral2D_F32 ret)
Converts a line segment into a general line.- Parameters:
src- (Input) line segmentret- (output) line in general notation. If null a new instance will be created.- Returns:
- Line in general notation
-
convert
public static LineGeneral2D_F32 convert(Point2D_F32 a, Point2D_F32 b, LineGeneral2D_F32 ret)
Converts a line segment into a general line. Line segment is defined by two points.- Parameters:
a- (Input) End point of line segmentb- (Input) End point of line segmentret- (output) line in general notation. If null a new instance will be created.- Returns:
- Line in general notation
-
convert
public static LinePolar2D_F32 convert(LineParametric2D_F32 src, LinePolar2D_F32 ret)
Converts a line from parametric to polar.- Parameters:
src- (Input) line in parametric notationret- (output) line in polar notation. If null a new instance will be created.- Returns:
- Line in polar notation
-
convert
public static LineGeneral2D_F32 convert(LineParametric2D_F32 src, LineGeneral2D_F32 ret)
Converts a line from parametric to general- Parameters:
src- (input) line in parametric notation.ret- (output) line in general notation. If null a new instance will be created.- Returns:
- Converted line in general notation
-
convert
public static LineParametric2D_F32 convert(LineGeneral2D_F32 src, LineParametric2D_F32 ret)
Converts a line from general to parametric- Parameters:
src- (input) line in general notation.ret- (output) line in parametric notation. If null a new instance will be created.- Returns:
- Converted line in parametric notation
-
-
DataMelt 3.0 © DataMelt by jWork.ORG