Jazz3D API


com.sygem.jazz3d3.vrml
Class VRMLModel3d

java.lang.Object
  |
  +--com.sygem.jazz3d3.Object3d
        |
        +--com.sygem.jazz3d3.loader.Model3d
              |
              +--com.sygem.jazz3d3.vrml.VRMLModel3d

public class VRMLModel3d
extends Model3d

Create an object from a VRML 3D model file.

Version:
3.0a
Author:
SyGem Software
See Also:
Model3d, LoadFactory, LoaderVRML

Constructor Summary
VRMLModel3d(double x, double y, double z)
          Default constructor.
 
Method Summary
 void addCamera(Camera3d c)
          Add a camera to this object.
 void addLight(Light l)
          Add a light to this object.
 void centerScene()
          Centers the scene around the origin.
 Camera3d[] getCameras()
          Returns an array full of all the cameras associated with this scene.
 Fog getFogNode()
          Returns the Fog node of this object (null by default)
 Light[] getLights()
          Returns an array full of all the lights associated with this scene.
 WorldInfo getWorldInfo()
          Returns the WorldInfo node of this object (null by default)
 void scaleScene(double s)
          Scale the entire VRML scene.
 void scaleScene(double x, double y, double z)
          Scale the entire VRML scene.
 void setFogNode(Fog f)
          Sets the fog of this object
 void setWorldInfo(WorldInfo nwi)
          Sets the WorldInfo node of this object
 
Methods inherited from class com.sygem.jazz3d3.loader.Model3d
beginLoadingInThread, finishLoadingInThread, getLoadProgress, loading, loadModel, loadModelInThread
 
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

VRMLModel3d

public VRMLModel3d(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

scaleScene

public void scaleScene(double x,
                       double y,
                       double z)
Scale the entire VRML scene. After the operation has completed, the scene will be x units across the x-axis, y units along the y-axis and z units along the z-axis.

NOTE: The lights and cameras associated with this scene arenot affected by this operation.


scaleScene

public void scaleScene(double s)
Scale the entire VRML scene. This version keeps the aspect ration of the scene intact.

NOTE: The lights and cameras associated with this scene arenot affected by this operation.

Parameters:
s - The size of the scene after the operation

centerScene

public void centerScene()
Centers the scene around the origin. This can be very useful for bringing your objects under your control, because they may have been designed around a different center point.

NOTE: The lights and cameras associated with this scene arenot affected by this operation.


addLight

public final void addLight(Light l)
Add a light to this object. Note that these are not VRML Light nodes, but ordinary Jazz3D lights.
Parameters:
l - A Light
See Also:
Light

getLights

public final Light[] getLights()
Returns an array full of all the lights associated with this scene.

addCamera

public final void addCamera(Camera3d c)
Add a camera to this object. Note that these are not VRML Viewpoint nodes, but ordinary Jazz3D cameras.
Parameters:
c - A Camera
See Also:
Camera3d

getCameras

public final Camera3d[] getCameras()
Returns an array full of all the cameras associated with this scene.

setFogNode

public final void setFogNode(Fog f)
Sets the fog of this object
Parameters:
f - A Fog Node
See Also:
Fog

getFogNode

public final Fog getFogNode()
Returns the Fog node of this object (null by default)

setWorldInfo

public final void setWorldInfo(WorldInfo nwi)
Sets the WorldInfo node of this object
Parameters:
nwi - A WorldInfo Node
See Also:
WorldInfo

getWorldInfo

public final WorldInfo getWorldInfo()
Returns the WorldInfo node of this object (null by default)

©2001 SyGem Software