|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.javagl.simplemesh.utils.MeshPrimitivesArrays
public class MeshPrimitivesArrays
Utility methods for computing primitive type arrays containing information from mesh primitives.
Method Summary | |
---|---|
static int |
computeMaxVertexFaces(int[] vertexFaceCounters)
Computes the maximum number of faces a vertex belongs to (i.e. simply the maximum of the given array) |
static int[] |
computeVertexFaceIndices(java.lang.Iterable<? extends Face> faces,
int numVertices,
int maxVertexFaces)
Computes for each vertex the indices of all faces that it belongs to |
static int[] |
createEdgeVertexIndices(java.util.Collection<? extends Edge> edges)
Create an array containing the vertex indices of the given set of edges. |
static int[] |
createFaceVertexIndices(java.util.Collection<? extends Face> faces)
Create an array containing the vertex indices of the given set of faces. |
static int[] |
createVertexFaceCounters(java.lang.Iterable<? extends Face> faces,
int numVertices)
Computes an array containing for each vertex the number of faces that it belongs to |
static float[] |
createVerticesArray(java.util.Collection<? extends Vertex> vertices,
int stride)
Creates an array containing the coordinates of the given vertices, with the given stride. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float[] createVerticesArray(java.util.Collection<? extends Vertex> vertices, int stride)
vertices
- The verticesstride
- The stride
public static int[] createEdgeVertexIndices(java.util.Collection<? extends Edge> edges)
edges
- The edges
public static int[] createFaceVertexIndices(java.util.Collection<? extends Face> faces)
faces
- The faces
public static int[] createVertexFaceCounters(java.lang.Iterable<? extends Face> faces, int numVertices)
faces
- The facesnumVertices
- The number of vertices
public static int computeMaxVertexFaces(int[] vertexFaceCounters)
vertexFaceCounters
- The vertex face counters
public static int[] computeVertexFaceIndices(java.lang.Iterable<? extends Face> faces, int numVertices, int maxVertexFaces)
faces
- The facesnumVertices
- The number of verticesmaxVertexFaces
- The maximum number of faces that a vertex
belongs to
vertexFaceIndices[vertexIndex*maxVertexFaces+0] = faceIndex0 vertexFaceIndices[vertexIndex*maxVertexFaces+1] = faceIndex1 ... vertexFaceIndices[vertexIndex*maxVertexFaces+N] = faceIndexN where vertexIndex = 0...numVertices-1 N = maxVertexFaces-1
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |