gestalt.model
Class ModelData

java.lang.Object
  extended by gestalt.model.ModelData
All Implemented Interfaces:
java.io.Serializable

public class ModelData
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 java.util.Vector<ModelAnimation> animations
           
 int[] faces
           
 java.lang.String name
           
 float[] normals
           
 int numberOfObjects
           
 int numberOfVertexComponents
           
 int numberOfVerticesPerFrame
           
 int primitive
           
 float[] texCoordinates
           
 float[] unsortedvertices
           
static boolean VERBOSE
           
 float[] vertexColors
           
 float[] vertices
           
 
Constructor Summary
ModelData(float[] theVertices, float[] theUnsortedVertices, float[] theTexCoordinates, float[] theNormals, float[] theVertexColors, int[] theFaces, int thePrimitiv, int theNumberOfVertexComponents, int theNumberOfObjects, java.lang.String theName)
           
 
Method Summary
 void averageNormals()
           
static ModelData getSerializedModelData(java.lang.String theFileName)
           
 void scale(Vector3f theScale)
           
 void serialize(java.lang.String theFileName)
          writes this modeldata to a file.
 java.lang.String toString()
           
 void translate(Vector3f theTranslation)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERBOSE

public static boolean VERBOSE

vertices

public float[] vertices

unsortedvertices

public float[] unsortedvertices

texCoordinates

public float[] texCoordinates

normals

public float[] normals

vertexColors

public float[] vertexColors

faces

public int[] faces

primitive

public int primitive

numberOfObjects

public int numberOfObjects

numberOfVerticesPerFrame

public int numberOfVerticesPerFrame

animations

public java.util.Vector<ModelAnimation> animations

numberOfVertexComponents

public int numberOfVertexComponents

name

public java.lang.String name
Constructor Detail

ModelData

public ModelData(float[] theVertices,
                 float[] theUnsortedVertices,
                 float[] theTexCoordinates,
                 float[] theNormals,
                 float[] theVertexColors,
                 int[] theFaces,
                 int thePrimitiv,
                 int theNumberOfVertexComponents,
                 int theNumberOfObjects,
                 java.lang.String theName)
Method Detail

averageNormals

public void averageNormals()

translate

public void translate(Vector3f theTranslation)

scale

public void scale(Vector3f theScale)

serialize

public void serialize(java.lang.String theFileName)
writes this modeldata to a file. this way, you can reload modeldata from a file and skip time consuming tasks like averaging normals.

Parameters:
theFileName - InputStream

getSerializedModelData

public static ModelData getSerializedModelData(java.lang.String theFileName)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009