| Modifier and Type | Interface and Description |
|---|---|
interface |
Obj
An in-memory representation of an OBJ file.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
ObjUtils.add(ReadableObj input,
Obj output)
Add all vertices, texture coordinates, normals and faces of the given
ReadableObj to the given output Obj. |
static Obj |
ObjUtils.convertToRenderable(ReadableObj input)
Convert the given
ReadableObj into an Obj that has
a structure appropriate for rendering it with OpenGL:
Triangulate it
Make the texture coordinates unique
Make the normals unique
Make the result vertex-indexed
|
static <T extends WritableObj> |
ObjUtils.convertToRenderable(ReadableObj input,
T output)
Convert the given
ReadableObj into an Obj that has
a structure appropriate for rendering it with OpenGL:
Triangulate it
Make the texture coordinates unique
Make the normals unique
Make the result vertex-indexed
|
static String |
ObjUtils.createInfoString(ReadableObj obj)
Create a multi-line, formatted string containing information about
the given
ReadableObj. |
static IntBuffer |
ObjData.getFaceNormalIndices(ReadableObj obj)
Returns the normal indices from the faces of the given
ReadableObj as a direct IntBuffer. |
static IntBuffer |
ObjData.getFaceNormalIndices(ReadableObj obj,
int numVerticesPerFace)
Returns the normal indices from the faces of the given
ReadableObj as a direct IntBuffer. |
static void |
ObjData.getFaceNormalIndices(ReadableObj obj,
IntBuffer target)
Stores the normal indices of the faces of the given
ReadableObj in the given buffer. |
static int[] |
ObjData.getFaceNormalIndicesArray(ReadableObj obj)
Returns the normal indices from the faces of the given
ReadableObj as an array. |
static int[] |
ObjData.getFaceNormalIndicesArray(ReadableObj obj,
int numVerticesPerFace)
Returns the normal indices from the faces of the given
ReadableObj as an array. |
static IntBuffer |
ObjData.getFaceTexCoordIndices(ReadableObj obj)
Returns the texCoord indices from the faces of the given
ReadableObj as a direct IntBuffer. |
static IntBuffer |
ObjData.getFaceTexCoordIndices(ReadableObj obj,
int numVerticesPerFace)
Returns the texCoord indices from the faces of the given
ReadableObj as a direct IntBuffer. |
static void |
ObjData.getFaceTexCoordIndices(ReadableObj obj,
IntBuffer target)
Stores the texCoord indices of the faces of the given
ReadableObj in the given buffer. |
static int[] |
ObjData.getFaceTexCoordIndicesArray(ReadableObj obj)
Returns the texCoord indices from the faces of the given
ReadableObj as an array. |
static int[] |
ObjData.getFaceTexCoordIndicesArray(ReadableObj obj,
int numVerticesPerFace)
Returns the texCoord indices from the faces of the given
ReadableObj as an array. |
static IntBuffer |
ObjData.getFaceVertexIndices(ReadableObj obj)
Returns the vertex indices from the faces of the given
ReadableObj as direct IntBuffer. |
static IntBuffer |
ObjData.getFaceVertexIndices(ReadableObj obj,
int numVerticesPerFace)
Returns the vertex indices from the faces of the given
ReadableObj as direct IntBuffer. |
static void |
ObjData.getFaceVertexIndices(ReadableObj obj,
IntBuffer target)
Stores the vertex indices of the faces of the given
ReadableObj in the given buffer. |
static int[] |
ObjData.getFaceVertexIndicesArray(ReadableObj obj)
Returns the vertex indices from the faces of the given
ReadableObj as an array. |
static int[] |
ObjData.getFaceVertexIndicesArray(ReadableObj obj,
int numVerticesPerFace)
Returns the vertex indices from the faces of the given
ReadableObj as an array. |
static FloatBuffer |
ObjData.getNormals(ReadableObj obj)
Returns all normals of the given
ReadableObj as an array. |
static void |
ObjData.getNormals(ReadableObj obj,
FloatBuffer target)
Stores the normals of the given
ReadableObj in the given
buffer. |
static float[] |
ObjData.getNormalsArray(ReadableObj obj)
Returns all normals of the given
ReadableObj as an array. |
static void |
ObjData.getTexCoords(ReadableObj obj,
FloatBuffer target,
int dimensions)
Stores the texture coordinates of the given
ReadableObj
in the given buffer. |
static void |
ObjData.getTexCoords(ReadableObj obj,
FloatBuffer target,
int dimensions,
boolean flipY)
Stores the texture coordinates of the given
ReadableObj
in the given buffer. |
static FloatBuffer |
ObjData.getTexCoords(ReadableObj obj,
int dimensions)
Returns all texture coordinates of the given
ReadableObj as direct FloatBuffer. |
static FloatBuffer |
ObjData.getTexCoords(ReadableObj obj,
int dimensions,
boolean flipY)
Returns all texture coordinates of the given
ReadableObj as direct FloatBuffer. |
static float[] |
ObjData.getTexCoordsArray(ReadableObj obj,
int dimensions)
Returns all texture coordinates of the given
ReadableObj as an array. |
static float[] |
ObjData.getTexCoordsArray(ReadableObj obj,
int dimensions,
boolean flipY)
Returns all texture coordinates of the given
ReadableObj as an array. |
static int |
ObjData.getTotalNumFaceVertices(ReadableObj obj)
Returns the sum of all numbers of vertices of all faces in the given
ReadableObj. |
static FloatBuffer |
ObjData.getVertices(ReadableObj obj)
Returns all vertices of the given
ReadableObj as a direct
FloatBuffer. |
static void |
ObjData.getVertices(ReadableObj obj,
FloatBuffer target)
Stores the vertices of the given
ReadableObj in the given
buffer. |
static float[] |
ObjData.getVerticesArray(ReadableObj obj)
Returns all vertices of the given
ReadableObj as an array. |
static Obj |
ObjUtils.groupToObj(ReadableObj input,
ObjGroup inputGroup,
List<Integer> vertexIndexMapping)
Returns the given group of the given
ReadableObj as a new
Obj. |
static <T extends WritableObj> |
ObjUtils.groupToObj(ReadableObj input,
ObjGroup inputGroup,
List<Integer> vertexIndexMapping,
T output)
Stores the given group of the given
ReadableObj
in the given output WritableObj. |
static Obj |
ObjUtils.makeNormalsUnique(ReadableObj input)
Ensures that two vertices with different normals are
actually two different vertices with different indices.
|
static <T extends WritableObj> |
ObjUtils.makeNormalsUnique(ReadableObj input,
List<Integer> indexMapping,
T output)
Ensures that two vertices with different normals are
actually two different vertices with different indices.
|
static Obj |
ObjUtils.makeTexCoordsUnique(ReadableObj input)
Ensures that two vertices with different texture coordinates are
actually two different vertices with different indices.
|
static <T extends WritableObj> |
ObjUtils.makeTexCoordsUnique(ReadableObj input,
List<Integer> indexMapping,
T output)
Ensures that two vertices with different texture coordinates are
actually two different vertices with different indices.
|
static Obj |
ObjUtils.makeVertexIndexed(ReadableObj input)
Converts the given
ReadableObj data into data that uses the
same indices for vertices, texture coordinates and normals, and
returns the result. |
static <T extends WritableObj> |
ObjUtils.makeVertexIndexed(ReadableObj input,
T output)
Converts the given
ReadableObj data into data that uses the
same indices for vertices, texture coordinates and normals, and
stores the result in the given WritableObj. |
static Map<String,Obj> |
ObjSplitting.splitByGroups(ReadableObj obj)
Split the given
ReadableObj based on its groups. |
static Map<String,Obj> |
ObjSplitting.splitByMaterialGroups(ReadableObj obj)
Split the given
ReadableObj based on its material groups. |
static List<Obj> |
ObjSplitting.splitByMaxNumVertices(ReadableObj obj,
int maxNumVertices)
Split the given
ReadableObj into Obj instances based
on the given maximum number of vertices. |
static Obj |
ObjUtils.triangulate(ReadableObj input)
Triangulates the given input
ReadableObj and returns the
result. |
static <T extends WritableObj> |
ObjUtils.triangulate(ReadableObj input,
T output)
Triangulates the given input
ReadableObj and stores the result
in the given WritableObj. |
static void |
ObjWriter.write(ReadableObj input,
OutputStream outputStream)
Writes the given
ReadableObj to the given stream. |
static void |
ObjWriter.write(ReadableObj input,
Writer writer)
Writes the given
ReadableObj to the given writer. |
Copyright © 2018. All rights reserved.