public class LinecastPoint2D extends AbstractLinecastPoint<Vector2D,Vector2D.Unit,Line>
Linecastable2D
Modifier and Type | Field and Description |
---|---|
static Comparator<LinecastPoint2D> |
ABSCISSA_ORDER
Comparator that sorts intersection instances by increasing abscissa order.
|
Constructor and Description |
---|
LinecastPoint2D(Vector2D point,
Vector2D normal,
Line line)
Construct a new instance from its components.
|
Modifier and Type | Method and Description |
---|---|
boolean |
eq(LinecastPoint2D other,
Precision.DoubleEquivalence precision)
Return true if this instance should be considered equivalent to the argument, using the
given precision context for comparison.
|
static void |
sortAndFilter(List<LinecastPoint2D> pts)
Sort the given list of linecast points by increasing abscissa value and filter to remove
duplicate entries (as determined by the
eq(LinecastPoint2D, Precision.DoubleEquivalence) method). |
equals, getAbscissa, getLine, getNormal, getPoint, hashCode, toString
public static final Comparator<LinecastPoint2D> ABSCISSA_ORDER
Vector2D.COORDINATE_ASCENDING_ORDER
with the
intersection normals.public LinecastPoint2D(Vector2D point, Vector2D normal, Line line)
point
- the linecast intersection pointnormal
- the surface of the linecast target at the intersection pointline
- intersecting linepublic boolean eq(LinecastPoint2D other, Precision.DoubleEquivalence precision)
other
- point to compare withprecision
- precision context to use for the comparisonpublic static void sortAndFilter(List<LinecastPoint2D> pts)
eq(LinecastPoint2D, Precision.DoubleEquivalence)
method).
The argument is modified.pts
- list of points to sort and filterCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.