Jazz3D API


com.sygem.jazz3d3.loader
Class Model3d

java.lang.Object
  |
  +--com.sygem.jazz3d3.Object3d
        |
        +--com.sygem.jazz3d3.loader.Model3d
Direct Known Subclasses:
VRMLModel3d

public class Model3d
extends Object3d

Create an object from a 3D model file.

Version:
3.0a
Author:
SyGem Software
See Also:
Object3d, LoadFactory, Loader

Constructor Summary
Model3d(double x, double y, double z)
          Default constructor.
 
Method Summary
 void beginLoadingInThread(int del)
          Start the model loading.
 void finishLoadingInThread()
          Stop the model loading, and finish off any initialization of the object.
 int getLoadProgress()
          Return the percentage of the object that has loaded so far.
 boolean loading()
          Determine if the object is still loading.
 void loadModel(java.lang.String fn, LoadFactory ldr)
          Loads a 3D model.
 void loadModelInThread(java.lang.String fn, LoadFactory ldr)
          Sets the model to load in a thread.
 
Methods inherited from class com.sygem.jazz3d3.Object3d
addChild, addQuad, addTriangle, addVertex, applyFaceChanges, cleanUp, getCenter, getChildObjects, getCollidable, getCulling, getFace, getFaceColour, getID, getName, getNumberOfFaces, getNumberOfSubFaces, getNumberOfSubVertices, getNumberOfVertices, getRenderer, getShapeArray, getUseVertexUVCoords, getVertex, getVertexArray, getVisible, getWorldVertex, pick, pickClosest, pickFace, prepForDisplay, recreateVertexNormals, rotateLocal, rotateLocal, rotateWorld, rotateWorld, scaleObject, setAllTextures, setAmbientColour, setCollidable, setColour, setCulling, setFaceColour, setFaceColourQuick, setName, setPosition, setRenderer, setShapeArray, setTexture, setTexture, setUseVertexUVCoords, setVertexArray, setVertexTexture, setVisible, translateLocal, translateWorld
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model3d

public Model3d(double x,
               double y,
               double z)
Default constructor.
Parameters:
x - The x position of the center of the model
y - The y position of the center of the model
z - The z position of the center of the model
Method Detail

loadModel

public void loadModel(java.lang.String fn,
                      LoadFactory ldr)
Loads a 3D model. The filename can be relative to the applet or application, or it can be a full URL.
Parameters:
fn - The file to load.
ldr - A valid LoadFactory object.
See Also:
LoadFactory

loadModelInThread

public final void loadModelInThread(java.lang.String fn,
                                    LoadFactory ldr)
Sets the model to load in a thread. This doesn't actually start the loading - that is done using beginLoadingInThread().

Again, the filename can be relative to the applet or application, or it can be a full URL.

Parameters:
fn - The file to load.
ldr - A valid LoadFactory object.
See Also:
LoadFactory

beginLoadingInThread

public final void beginLoadingInThread(int del)
Start the model loading.
Parameters:
del - The time in milliseconds the thread should pause.

finishLoadingInThread

public final void finishLoadingInThread()
Stop the model loading, and finish off any initialization of the object.

loading

public final boolean loading()
Determine if the object is still loading.
Returns:
True if the object is still loading, false if not.

getLoadProgress

public final int getLoadProgress()
Return the percentage of the object that has loaded so far.
Returns:
The amount of the object that has loaded.

©2001 SyGem Software