|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.javagl.utils.obj.impl.ObjUtils
public class ObjUtils
This class offers utility methods for handling Objs.
| Method Summary | |
|---|---|
static void |
assertUniqueTextureCoords(Obj input,
ObjTarget output,
List<Integer> indexMapping,
float epsilon)
Two faces may reference the same vertex in the OBJ file. |
static float[] |
getFaceTexCoordsOf(Obj obj,
int stride)
Returns an array containing the texture coordinates of the vertices of the faces in the given Obj. |
static float[] |
getVertexCoordsOf(Obj obj)
Returns all vertex coordinates of the given Obj as an array. |
static int[] |
getVertexIndicesOf(Obj obj)
Returns the vertex indices of the given Obj as an array. |
static void |
groupToObj(Obj input,
ObjGroup inputGroup,
ObjTarget output,
List<Integer> vertexIndexMapping)
This method will store the given group of the given Obj in the given output. |
static void |
storeFaceTexCoordsOf(Obj obj,
int stride,
float[] texCoords,
int offset)
Stores the texture coordinates of the vertices of the faces in the given Obj in the given array. |
static void |
storeVertexCoordsOf(Obj obj,
float[] vertexCoords,
int offset)
Stores the vertex coordinates of the given Obj in the given array at the given offset |
static void |
storeVertexIndicesOf(Obj obj,
int[] vertexIndices,
int offset,
int[] faceVertices)
Stores the vertex indices of the given Obj in the given array at the given offset. |
static void |
triangulate(Obj input,
ObjTarget output)
Triangulates the given input, and stores the result in the given output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void triangulate(Obj input,
ObjTarget output)
public static void groupToObj(Obj input,
ObjGroup inputGroup,
ObjTarget output,
List<Integer> vertexIndexMapping)
input - The input ObjinputGroup - The group of the input Objoutput - The output ObjvertexIndexMapping - The optional index mapping
public static void assertUniqueTextureCoords(Obj input,
ObjTarget output,
List<Integer> indexMapping,
float epsilon)
input - The input objoutput - The output objindexMapping - The optional index mappingepsilon - The epsilon defining when two texture coordinates should
be considered as equalpublic static int[] getVertexIndicesOf(Obj obj)
obj - The obj
public static void storeVertexIndicesOf(Obj obj,
int[] vertexIndices,
int offset,
int[] faceVertices)
obj - The objvertexIndices - The array that will store the vertex indicesoffset - The offset in the arrayfaceVertices - The number of vertices in each facepublic static float[] getVertexCoordsOf(Obj obj)
obj - The obj
public static void storeVertexCoordsOf(Obj obj,
float[] vertexCoords,
int offset)
obj - The objvertexCoords - The array that will store the vertex coordinatesoffset - The offset in the array
public static float[] getFaceTexCoordsOf(Obj obj,
int stride)
obj - The objstride - The number of elements each texture coordinate
consists of
public static void storeFaceTexCoordsOf(Obj obj,
int stride,
float[] texCoords,
int offset)
obj - The objstride - The number of elements each texture coordinate
consists oftexCoords - The array that will store the texture coordinatesoffset - The offset in the array.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||