Interface Mesh<F extends Mesh.Face>
-
- Type Parameters:
F
- Mesh face implementation type
- All Superinterfaces:
BoundarySource<PlaneConvexSubset>
,BoundarySource3D
,Linecastable3D
- All Known Subinterfaces:
TriangleMesh
- All Known Implementing Classes:
SimpleTriangleMesh
public interface Mesh<F extends Mesh.Face> extends BoundarySource3D
Interface representing a 3D mesh data structure.- See Also:
- Polygon Mesh
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Mesh.Face
Interface representing a single face in a mesh.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Iterable<F>
faces()
Get an iterable containing all faces in the mesh.F
getFace(int index)
Get a face from the mesh by its index.int
getFaceCount()
Get the number of faces in the mesh.java.util.List<F>
getFaces()
Get a list containing all faces in the mesh.int
getVertexCount()
Get the number of vertices in the mesh.java.util.List<Vector3D>
getVertices()
Get a list containing all vertices in the mesh.Mesh<F>
transform(Transform<Vector3D> transform)
Return a new, transformed mesh by applying the given transform to all vertices.java.lang.Iterable<Vector3D>
vertices()
Get an iterable containing the vertices in the mesh.-
Methods inherited from interface org.apache.commons.geometry.core.partitioning.BoundarySource
boundaryStream
-
Methods inherited from interface org.apache.commons.geometry.euclidean.threed.BoundarySource3D
getBounds, linecast, linecastFirst, toList, toTree, toTriangleMesh, triangleStream
-
Methods inherited from interface org.apache.commons.geometry.euclidean.threed.line.Linecastable3D
linecast, linecastFirst
-
-
-
-
Method Detail
-
vertices
java.lang.Iterable<Vector3D> vertices()
Get an iterable containing the vertices in the mesh.- Returns:
- an iterable containing the vertices in the mesh
-
getVertices
java.util.List<Vector3D> getVertices()
Get a list containing all vertices in the mesh.- Returns:
- a list containing all vertices in the mesh
-
getVertexCount
int getVertexCount()
Get the number of vertices in the mesh.- Returns:
- the number of vertices in the mesh
-
faces
java.lang.Iterable<F> faces()
Get an iterable containing all faces in the mesh.- Returns:
- an iterable containing all faces in the mesh
-
getFaces
java.util.List<F> getFaces()
Get a list containing all faces in the mesh.- Returns:
- a list containing all faces in the mesh
-
getFaceCount
int getFaceCount()
Get the number of faces in the mesh.- Returns:
- the number of faces in the mesh
-
getFace
F getFace(int index)
Get a face from the mesh by its index.- Parameters:
index
- the index of the mesh to retrieve- Returns:
- the face at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index is out of bounds
-
-