Class OrientedPoints

java.lang.Object
org.apache.commons.geometry.euclidean.oned.OrientedPoints

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

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

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    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.
    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.
    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 Details

    • OrientedPoints

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

    • 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:
      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