com.sygem.jazz3d3.loader
Class Model3d

java.lang.Object
  extended bycom.sygem.jazz3d3.Object3d
      extended bycom.sygem.jazz3d3.loader.Model3d

public class Model3d
extends Object3d

Create an object from a 3D model file.

Version:
3.0a
See Also:
Object3d, LoadFactory, Loader

Field Summary
 boolean loading
           
 
Fields inherited from class com.sygem.jazz3d3.Object3d
USE_ONE_RENDERER, WRAP_FRONT, WRAP_TOP
 
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, culled, getCenter, getChildObjects, getCollidable, getCulling, getFace, getFaceColour, getID, getName, getNumberOfFaces, getNumberOfSubFaces, getNumberOfSubVertices, getNumberOfVertices, getOrientationMatrix, getRenderer, getRotationMatrix, getShapeArray, getUseVertexUVCoords, getVertex, getVertexArray, getVisible, getWorldVertex, init, pick, pickClosest, pickFace, prepForDisplay, recreateVertexNormals, rotateLocal, rotateLocal, rotateWorld, rotateWorld, scaleObject, setAllTextures, setAmbientColour, setCollidable, setColour, setCulling, setFaceColour, setFaceColourQuick, setID, setName, setPosition, setRenderer, setShapeArray, setTexture, setTexture, setUseVertexUVCoords, setVertexArray, setVertexTexture, setVisible, toString, translateLocal, translateWorld, visible, wrapUV
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

loading

public boolean loading
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

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.


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.

loading

public final boolean loading()
Determine if the object is still loading.

Returns:
True if the object is still loading, false if not.

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


Copyright © 1999-2006 SyGem Software. All Rights Reserved.