glmodel
Class GL_OBJ_Importer

java.lang.Object
  extended by glmodel.GL_OBJ_Importer

public class GL_OBJ_Importer
extends java.lang.Object


Constructor Summary
GL_OBJ_Importer()
           
 
Method Summary
 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.
 GL_Mesh importFromStream(java.io.InputStream inStream)
           
 GL_Mesh load(java.lang.String filename)
           
 GL_Mesh makeMeshObject(GL_OBJ_Reader objData)
          create a GL_Mesh (mesh object) from the data read by a GL_OBJ_Reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GL_OBJ_Importer

public GL_OBJ_Importer()
Method Detail

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_Mesh
groupNum - the group to add the triangles to
triNum - the index of the triangle in the group
face - a face from the OBJ file
txtrs - ArrayList of texture coords from the OBJ file
norms - ArrayList of normals from the OBJ file
v1 - vertices to use for the triangle (face may have >3 verts)
v2 -
v3 -
Returns: