ssmith.opengl
Class ModelData

java.lang.Object
  extended by ssmith.opengl.ModelData

public class ModelData
extends java.lang.Object

The data that has been read from the Wavefront .obj file. This is kept seperate from the actual rendering with the hope the data might be used for some other rendering engine in the future.

Author:
Kevin Glass

Constructor Summary
ModelData(java.io.InputStream in, float scale)
          Create a new set of OBJ data by reading it in from the specified input stream.
 
Method Summary
 ssmith.opengl.Face getFace(int grp, int index)
          Get the data for specific face
 int getFaceCount(int grp)
          Get the number of faces found in the model file
 int getGroupCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelData

public ModelData(java.io.InputStream in,
                 float scale)
          throws java.io.IOException
Create a new set of OBJ data by reading it in from the specified input stream.

Parameters:
in - The input stream from which to read the OBJ data
Throws:
java.io.IOException - Indicates a failure to read from the stream
Method Detail

getFaceCount

public int getFaceCount(int grp)
Get the number of faces found in the model file

Returns:
The number of faces found in the model file

getFace

public ssmith.opengl.Face getFace(int grp,
                                  int index)
Get the data for specific face

Parameters:
index - The index of the face whose data should be retrieved
Returns:
The face data requested

getGroupCount

public int getGroupCount()