Class OrientedPoints


  • public final class OrientedPoints
    extends java.lang.Object
    Class containing factory methods for constructing OrientedPoint instances.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OrientedPoints()
      Utility class; no instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static OrientedPoint createNegativeFacing​(double location, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance at the given location, oriented so that it is facing negative infinity.
      static OrientedPoint createNegativeFacing​(Vector1D point, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance at the given point, oriented so that it is facing negative infinity.
      static OrientedPoint createPositiveFacing​(double location, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance at the given location, oriented so that it is facing positive infinity.
      static OrientedPoint createPositiveFacing​(Vector1D point, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance at the given point, oriented so that it is facing positive infinity.
      static OrientedPoint fromLocationAndDirection​(double location, boolean positiveFacing, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance from the given location and boolean direction value.
      static OrientedPoint fromPointAndDirection​(Vector1D point, boolean positiveFacing, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance from the given point and boolean direction value.
      static OrientedPoint fromPointAndDirection​(Vector1D point, Vector1D direction, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Create a new instance from the given point and direction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OrientedPoints

        private OrientedPoints()
        Utility class; no instantiation.
    • Method Detail

      • fromLocationAndDirection

        public static OrientedPoint fromLocationAndDirection​(double location,
                                                             boolean positiveFacing,
                                                             org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance from the given location and boolean direction value.
        Parameters:
        location - the location of the hyperplane
        positiveFacing - if true, the hyperplane will face toward positive infinity; otherwise, it will point toward negative infinity.
        precision - precision context used to compare floating point values
        Returns:
        a new instance
      • fromPointAndDirection

        public static OrientedPoint fromPointAndDirection​(Vector1D point,
                                                          boolean positiveFacing,
                                                          org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance from the given point and boolean direction value.
        Parameters:
        point - the location of the hyperplane
        positiveFacing - if true, the hyperplane will face toward positive infinity; otherwise, it will point toward negative infinity.
        precision - precision context used to compare floating point values
        Returns:
        a new instance
      • fromPointAndDirection

        public static OrientedPoint fromPointAndDirection​(Vector1D point,
                                                          Vector1D direction,
                                                          org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance from the given point and direction.
        Parameters:
        point - the location of the hyperplane
        direction - the direction of the plus side of the hyperplane
        precision - precision context used to compare floating point values
        Returns:
        a new instance oriented in the given direction
        Throws:
        java.lang.IllegalArgumentException - if the direction is zero as evaluated by the given precision context
      • createPositiveFacing

        public static OrientedPoint createPositiveFacing​(Vector1D point,
                                                         org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance at the given point, oriented so that it is facing positive infinity.
        Parameters:
        point - the location of the hyperplane
        precision - precision context used to compare floating point values
        Returns:
        a new instance oriented toward positive infinity
      • createPositiveFacing

        public static OrientedPoint createPositiveFacing​(double location,
                                                         org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance at the given location, oriented so that it is facing positive infinity.
        Parameters:
        location - the location of the hyperplane
        precision - precision context used to compare floating point values
        Returns:
        a new instance oriented toward positive infinity
      • createNegativeFacing

        public static OrientedPoint createNegativeFacing​(Vector1D point,
                                                         org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance at the given point, oriented so that it is facing negative infinity.
        Parameters:
        point - the location of the hyperplane
        precision - precision context used to compare floating point values
        Returns:
        a new instance oriented toward negative infinity
      • createNegativeFacing

        public static OrientedPoint createNegativeFacing​(double location,
                                                         org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Create a new instance at the given location, oriented so that it is facing negative infinity.
        Parameters:
        location - the location of the hyperplane
        precision - precision context used to compare floating point values
        Returns:
        a new instance oriented toward negative infinity