Class OrientedPoints
- java.lang.Object
-
- org.apache.commons.geometry.euclidean.oned.OrientedPoints
-
public final class OrientedPoints extends java.lang.Object
Class containing factory methods for constructingOrientedPoint
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.
-
-
-
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 hyperplanepositiveFacing
- 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 hyperplanepositiveFacing
- 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 hyperplanedirection
- the direction of the plus side of the hyperplaneprecision
- 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 hyperplaneprecision
- 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 hyperplaneprecision
- 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 hyperplaneprecision
- 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 hyperplaneprecision
- precision context used to compare floating point values- Returns:
- a new instance oriented toward negative infinity
-
-