| Modifier and Type | Method and Description |
|---|---|
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 Obj |
Objs.create()
Creates a new default
Obj |
static Obj |
Objs.createFromIndexedTriangleData(IntBuffer indices,
FloatBuffer vertices,
FloatBuffer texCoords,
FloatBuffer normals)
Create an
Obj from the given (single-) indexed triangle data. |
static Obj |
ObjUtils.groupToObj(ReadableObj input,
ObjGroup inputGroup,
List<Integer> vertexIndexMapping)
Returns the given group of the given
ReadableObj as a new
Obj. |
static Obj |
ObjUtils.makeNormalsUnique(ReadableObj input)
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 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 Obj |
ObjReader.read(InputStream inputStream)
Read the OBJ data from the given stream and return it as an
Obj. |
static Obj |
ObjReader.read(Reader reader)
Read the OBJ data from the given reader and return it as an
Obj. |
static Obj |
ObjUtils.triangulate(ReadableObj input)
Triangulates the given input
ReadableObj and returns the
result. |
| Modifier and Type | Method and Description |
|---|---|
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. |
| 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. |
Copyright © 2018. All rights reserved.