Documentation of 'georegression.geometry.UtilLine2D_F64' Java class
UtilLine2D_F64
georegression.geometry

Class UtilLine2D_F64



  • public class UtilLine2D_F64
    extends java.lang.Object
    Various functions related to lines
    • Constructor Detail

      • UtilLine2D_F64

        public UtilLine2D_F64()
    • Method Detail

      • acuteAngle

        public static double acuteAngle(LineGeneral2D_F64 a,
                                        LineGeneral2D_F64 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) line
        b - (input) line
        Returns:
        acute angle in radians
      • acuteAngleN

        public static double acuteAngleN(LineGeneral2D_F64 a,
                                         LineGeneral2D_F64 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 line
        b - (input) normalized line
        Returns:
        acute angle in radians
      • convert

        public static LineParametric2D_F64 convert(LinePolar2D_F64 src,
                                                   LineParametric2D_F64 ret)
        Converts a line from polar form to parametric.
        Parameters:
        src - (input) line is polar notation
        ret - (output) line in parametric notation. If null a new instance will be created.
        Returns:
        Converted line in parametric notation
      • convert

        public static LineGeneral2D_F64 convert(LinePolar2D_F64 src,
                                                LineGeneral2D_F64 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 notation
        ret - (output) line in general notation. If null a new instance will be created.
        Returns:
        Converted line in general notation
      • convert

        public static LinePolar2D_F64 convert(LineGeneral2D_F64 src,
                                              LinePolar2D_F64 ret)
        Converts a line from general to polar.
        Parameters:
        src - (input) line is general notation
        ret - (output) line in polar notation. If null a new instance will be created.
        Returns:
        Converted line in polar notation
      • convert

        public static LineParametric2D_F64 convert(LineSegment2D_F64 src,
                                                   LineParametric2D_F64 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 segment
        ret - (output) line in parametric notation. If null a new instance will be created.
        Returns:
        Converted line in parametric notation
      • convert

        public static LineGeneral2D_F64 convert(LineSegment2D_F64 src,
                                                LineGeneral2D_F64 ret)
        Converts a line segment into a general line.
        Parameters:
        src - (Input) line segment
        ret - (output) line in general notation. If null a new instance will be created.
        Returns:
        Line in general notation
      • convert

        public static LineGeneral2D_F64 convert(Point2D_F64 a,
                                                Point2D_F64 b,
                                                LineGeneral2D_F64 ret)
        Converts a line segment into a general line. Line segment is defined by two points.
        Parameters:
        a - (Input) End point of line segment
        b - (Input) End point of line segment
        ret - (output) line in general notation. If null a new instance will be created.
        Returns:
        Line in general notation
      • convert

        public static LinePolar2D_F64 convert(LineParametric2D_F64 src,
                                              LinePolar2D_F64 ret)
        Converts a line from parametric to polar.
        Parameters:
        src - (Input) line in parametric notation
        ret - (output) line in polar notation. If null a new instance will be created.
        Returns:
        Line in polar notation
      • convert

        public static LineGeneral2D_F64 convert(LineParametric2D_F64 src,
                                                LineGeneral2D_F64 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_F64 convert(LineGeneral2D_F64 src,
                                                   LineParametric2D_F64 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

You see the box below because you did not login.