glmodel
Class GL_OBJ_Importer
java.lang.Object
glmodel.GL_OBJ_Importer
public class GL_OBJ_Importer
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GL_OBJ_Importer
public GL_OBJ_Importer()
load
public GL_Mesh load(java.lang.String filename)
importFromStream
public GL_Mesh importFromStream(java.io.InputStream inStream)
makeMeshObject
public GL_Mesh makeMeshObject(GL_OBJ_Reader objData)
- create a GL_Mesh (mesh object) from the data read by a GL_OBJ_Reader
addTriangle
public GL_Triangle addTriangle(GL_Mesh obj,
int groupNum,
int triNum,
glmodel.Face face,
java.util.ArrayList txtrs,
java.util.ArrayList norms,
int v1,
int v2,
int v3,
int mtlID)
- Add a new triangle to the GL_Mesh. This assumes that the
vertices have already been added to the GL_Mesh, in the same
order that they were in the OBJ. Also the mesh has groups allocated
with triangle arrays.
- Parameters:
obj
- GL_MeshgroupNum
- the group to add the triangles totriNum
- the index of the triangle in the groupface
- a face from the OBJ filetxtrs
- ArrayList of texture coords from the OBJ filenorms
- ArrayList of normals from the OBJ filev1
- vertices to use for the triangle (face may have >3 verts)v2
- v3
-
- Returns: