public final class FacetDefinitions extends Object
FacetDefinition
instances.Modifier and Type | Method and Description |
---|---|
static ConvexPolygon3D |
toPolygon(Collection<Vector3D> vertices,
Vector3D normal,
Precision.DoubleEquivalence precision)
Construct a
ConvexPolygon3D from the given facet vertices and optional normal. |
static ConvexPolygon3D |
toPolygon(FacetDefinition facet,
Precision.DoubleEquivalence precision)
Construct a
ConvexPolygon3D from the vertices of the given facet. |
public static ConvexPolygon3D toPolygon(Collection<Vector3D> vertices, Vector3D normal, Precision.DoubleEquivalence precision)
ConvexPolygon3D
from the given facet vertices and optional normal.
If the normal is non-null, this method attempts to honor it by making the
polygon point in a similar (but not necessarily equal) direction, reversing the
order of vertices if needed.vertices
- facet verticesnormal
- facet normal; may be nullprecision
- precision context used for floating point comparisonsIllegalArgumentException
- if a valid convex polygon cannot be constructedpublic static ConvexPolygon3D toPolygon(FacetDefinition facet, Precision.DoubleEquivalence precision)
ConvexPolygon3D
from the vertices of the given facet. This method
attempts to honor any normal defined for the facet by making the polygon point in a similar
(but not necessarily equal) direction by reversing the order of vertices if needed.facet
- facet to convert to a polygon instanceprecision
- precision context used for floating point comparisonsNullPointerException
- if either argument is nullIllegalArgumentException
- if a valid convex polygon cannot be constructedCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.