Class OutlineExtractor
java.lang.Object
org.apache.commons.math3.geometry.euclidean.threed.OutlineExtractor
Extractor for
polyhedrons sets outlines.
This class extracts the 2D outlines from {polyhedrons sets in a specified projection plane.
- Since:
- 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classVisitor projecting the boundary facets on a plane. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOutlineExtractor(Vector3D u, Vector3D v) Build an extractor for a specific projection plane. -
Method Summary
Modifier and TypeMethodDescriptionVector2D[][]getOutline(PolyhedronsSet polyhedronsSet) Extract the outline of a polyhedrons set.private booleanpointIsBetween(Vector2D[] loop, int n, int i) Check if a point is geometrically between its neighbor in an array.
-
Field Details
-
u
Abscissa axis of the projection plane. -
v
Ordinate axis of the projection plane. -
w
Normal of the projection plane (viewing direction).
-
-
Constructor Details
-
OutlineExtractor
-
-
Method Details
-
getOutline
Extract the outline of a polyhedrons set.- Parameters:
polyhedronsSet- polyhedrons set whose outline must be extracted- Returns:
- an outline, as an array of loops.
-
pointIsBetween
Check if a point is geometrically between its neighbor in an array.The neighbors are computed considering the array is a loop (i.e. point at index (n-1) is before point at index 0)
- Parameters:
loop- points arrayn- number of points to consider in the arrayi- index of the point to check (must be between 0 and n-1)- Returns:
- true if the point is exactly between its neighbors
-