Class OrientedPoints
- java.lang.Object
-
- org.apache.commons.geometry.euclidean.oned.OrientedPoints
-
public final class OrientedPoints extends java.lang.ObjectClass containing factory methods for constructingOrientedPointinstances.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateOrientedPoints()Utility class; no instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OrientedPointcreateNegativeFacing(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 OrientedPointcreateNegativeFacing(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 OrientedPointcreatePositiveFacing(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 OrientedPointcreatePositiveFacing(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 OrientedPointfromLocationAndDirection(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 OrientedPointfromPointAndDirection(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 OrientedPointfromPointAndDirection(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
-
-