glmodel
Class GL_3DS_Importer

java.lang.Object
  extended by glmodel.GL_3DS_Importer

public class GL_3DS_Importer
extends java.lang.Object

Import a 3DS file into a GL_Model object.


Constructor Summary
GL_3DS_Importer()
           
 
Method Summary
 GL_Triangle addTriangle(GL_Mesh obj, glmodel.Face face, java.util.ArrayList txtrs, java.util.ArrayList norms)
          Add a new triangle to the GL_Object.
 GL_Mesh importFromStream(java.io.InputStream inStream)
          Load the 3DS file and store into a mesh.
 GL_Mesh load(java.lang.String filename)
           
 GL_Mesh makeMeshObject(java.util.ArrayList verts, java.util.ArrayList txtrs, java.util.ArrayList norms, java.util.ArrayList faces)
          create a GL_Object (mesh object) from the data read by a 3DS_Reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GL_3DS_Importer

public GL_3DS_Importer()
Method Detail

load

public GL_Mesh load(java.lang.String filename)

importFromStream

public GL_Mesh importFromStream(java.io.InputStream inStream)
Load the 3DS file and store into a mesh.


makeMeshObject

public GL_Mesh makeMeshObject(java.util.ArrayList verts,
                              java.util.ArrayList txtrs,
                              java.util.ArrayList norms,
                              java.util.ArrayList faces)
create a GL_Object (mesh object) from the data read by a 3DS_Reader

Parameters:
verts - ArrayList of vertices
txtrs - ArrayList of texture coordinates
norms - ArrayList of normal
faces - ArrayList of Face objects (triangles)
Returns:

addTriangle

public GL_Triangle addTriangle(GL_Mesh obj,
                               glmodel.Face face,
                               java.util.ArrayList txtrs,
                               java.util.ArrayList norms)
Add a new triangle to the GL_Object. This assumes that the vertices have already been added to the GL_Object, in the same order that they were in the 3DS.

Parameters:
obj - GL_Object
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: