Class SharedVertexRepresentation
java.lang.Object
Jcg.mesh.SharedVertexRepresentation
A vertex shared representation of a mesh.
For each face we store the indices of the incident vertices
- Author:
- Luca Castelli Aleardi (INF562-INF555, 2012-2025)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSharedVertexRepresentation(int n, int f, int he, int[][] faces, int[] faceDegrees, Point_3[] points) Create a shared vertex representationSharedVertexRepresentation(String filename) Create a mesh representation from an OFF file (using TC library)SharedVertexRepresentation(String filename, boolean minimal) Create a minimal triangle mesh representation from an OFF file (using TC library): no colors, no vertex coordinatesCreate a shared vertex representation from a collection of 3D trianglesSharedVertexRepresentation(Polyhedron_3<Point_3> polyhedron) Create a shared vertex representation from a polyhedron (half-edge data structure)Create a mesh representation from a polyhedron (half-edge data structure) -
Method Summary
Modifier and TypeMethodDescriptionstatic SharedVertexRepresentationCreate a shared vertex representation from an OBJ file (using TC library)voidwriteOffFile(String filename) Store the representation in OFF format
-
Field Details
-
sizeVertices
public int sizeVertices -
sizeFaces
public int sizeFaces -
sizeHalfedges
public int sizeHalfedges -
faces
public int[][] faces -
faceDegrees
public int[] faceDegrees -
points
-
faceColors
-
-
Constructor Details
-
SharedVertexRepresentation
public SharedVertexRepresentation(int n, int f, int he, int[][] faces, int[] faceDegrees, Point_3[] points) Create a shared vertex representation- Parameters:
n- number of verticesf- number of faceshe- number of half-edgespoints- vertex coordinates (3D)
-
SharedVertexRepresentation
Create a shared vertex representation from a collection of 3D triangles -
SharedVertexRepresentation
Create a mesh representation from an OFF file (using TC library) -
SharedVertexRepresentation
Create a minimal triangle mesh representation from an OFF file (using TC library): no colors, no vertex coordinates -
SharedVertexRepresentation
Create a mesh representation from a polyhedron (half-edge data structure) -
SharedVertexRepresentation
Create a shared vertex representation from a polyhedron (half-edge data structure)
-
-
Method Details
-
readOBJ
Create a shared vertex representation from an OBJ file (using TC library) -
writeOffFile
Store the representation in OFF format- Throws:
IOException
-