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 java.lang.Object implements TriangleMesh.Face
Internal implementation ofTriangleMesh.Face.
-
-
Field Summary
Fields Modifier and Type Field Description private intindexThe index of the face in the mesh.private int[]vertexIndicesVertex indices for the face.
-
Constructor Summary
Constructors Constructor Description SimpleTriangleFace(int index, int[] vertexIndices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandefinesPolygon()Return true if the vertices for this face define a convex polygon with non-zero size.intgetIndex()Get the 0-based index of the face in the mesh.Vector3DgetPoint1()Get the first vertex in the face.Vector3DgetPoint2()Get the second vertex in the face.Vector3DgetPoint3()Get the third vertex in the face.Triangle3DgetPolygon()Get the 3D polygon defined by this face.int[]getVertexIndices()Get an array containing the 0-based indices of the vertices defining this face.java.util.List<Vector3D>getVertices()Get the vertices for the face.java.lang.StringtoString()
-
-
-
Method Detail
-
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:
getVertexIndicesin interfaceMesh.Face- Returns:
- an array containing the indices of the vertices defining this face
- See Also:
Mesh.getVertices()
-
getVertices
public java.util.List<Vector3D> getVertices()
Get the vertices for the face.- Specified by:
getVerticesin interfaceMesh.Face- Returns:
- the vertices for the face
-
getPoint1
public Vector3D getPoint1()
Get the first vertex in the face.- Specified by:
getPoint1in interfaceTriangleMesh.Face- Returns:
- the first vertex in the face
-
getPoint2
public Vector3D getPoint2()
Get the second vertex in the face.- Specified by:
getPoint2in interfaceTriangleMesh.Face- Returns:
- the second vertex in the face
-
getPoint3
public Vector3D getPoint3()
Get the third vertex in the face.- Specified by:
getPoint3in 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:
definesPolygonin interfaceMesh.Face- Returns:
- true if the vertices for this face define a convex polygon with non-zero size
-
getPolygon
public Triangle3D getPolygon()
Get the 3D polygon defined by this face.- Specified by:
getPolygonin interfaceMesh.Face- Specified by:
getPolygonin interfaceTriangleMesh.Face- Returns:
- the 3D polygon defined by this face
- See Also:
Mesh.Face.definesPolygon()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-