Class SimpleTriangleMesh.SimpleTriangleFace
java.lang.Object
org.apache.commons.geometry.euclidean.threed.mesh.SimpleTriangleMesh.SimpleTriangleFace
- All Implemented Interfaces:
Mesh.Face
,TriangleMesh.Face
- Enclosing class:
SimpleTriangleMesh
private final class SimpleTriangleMesh.SimpleTriangleFace
extends Object
implements TriangleMesh.Face
Internal implementation of
TriangleMesh.Face
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The index of the face in the mesh.private final int[]
Vertex indices for the face. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if the vertices for this face define a convex polygon with non-zero size.int
getIndex()
Get the 0-based index of the face in the mesh.Get the first vertex in the face.Get the second vertex in the face.Get the third vertex in the face.Get the 3D polygon defined by this face.int[]
Get an array containing the 0-based indices of the vertices defining this face.Get the vertices for the face.toString()
-
Field Details
-
index
private final int indexThe index of the face in the mesh. -
vertexIndices
private final int[] vertexIndicesVertex indices for the face.
-
-
Constructor Details
-
SimpleTriangleFace
SimpleTriangleFace(int index, int[] vertexIndices)
-
-
Method Details
-
getIndex
public int getIndex()Get the 0-based index of the face in the mesh. -
getVertexIndices
public int[] getVertexIndices()Get an array containing the 0-based indices of the vertices defining this face. The indices are references to the vertex positions in the mesh vertex list.- Specified by:
getVertexIndices
in interfaceMesh.Face
- Returns:
- an array containing the indices of the vertices defining this face
- See Also:
-
getVertices
Get the vertices for the face.- Specified by:
getVertices
in interfaceMesh.Face
- Returns:
- the vertices for the face
-
getPoint1
Get the first vertex in the face.- Specified by:
getPoint1
in interfaceTriangleMesh.Face
- Returns:
- the first vertex in the face
-
getPoint2
Get the second vertex in the face.- Specified by:
getPoint2
in interfaceTriangleMesh.Face
- Returns:
- the second vertex in the face
-
getPoint3
Get the third vertex in the face.- Specified by:
getPoint3
in interfaceTriangleMesh.Face
- Returns:
- the third vertex in the face
-
definesPolygon
public boolean definesPolygon()Return true if the vertices for this face define a convex polygon with non-zero size.- Specified by:
definesPolygon
in interfaceMesh.Face
- Returns:
- true if the vertices for this face define a convex polygon with non-zero size
-
getPolygon
Get the 3D polygon defined by this face.- Specified by:
getPolygon
in interfaceMesh.Face
- Specified by:
getPolygon
in interfaceTriangleMesh.Face
- Returns:
- the 3D polygon defined by this face
- See Also:
-
toString
-