org.xith3d.loaders.models.impl.cal3d
Class Cal3dModel

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.GroupNode
              extended by org.xith3d.scenegraph.Group
                  extended by org.xith3d.loaders.models.Model
                      extended by org.xith3d.loaders.models.impl.cal3d.Cal3dModel
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, UpdatableNode

public class Cal3dModel
extends Model

This class represents a Model loaded from some model file formats. This class is responsible for both the storage and retrieval of data from the Model. The storage methods (used only by Loader writers) are all of the add*() routines. The retrieval methods (used primarily by Loader users) are all of the get*() routines.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.GroupNode
children, hostGroup, numChildren, totalNumChildren, totalNumShapes
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
protected Cal3dModel()
           
 
Method Summary
 Appearance getAppearance()
           
 org.jagatoo.loaders.models.cal3d.Cal3dController getCalController()
           
 float getFps()
           
 org.jagatoo.loaders.models.cal3d.core.CalModel getInternalModel()
           
 Cal3dModel getSharedInstance()
          
protected  void init(org.jagatoo.loaders.models.cal3d.core.CalModel calModel)
           
 void interpolateAnimation(float animStartTime, float absAnimTime)
          Interpolates the animations towards the next frame.
 void setFps(float fps)
          Set the number of frames per second.
 void updateController(float time)
           
 
Methods inherited from class org.xith3d.loaders.models.Model
addAnimationListener, addNamedObject, dumpAnimations, dumpNamedObjects, fireOnAnimationFinished, fireOnAnimationStarted, getAnimation, getAnimation, getAnimations, getAnimationsCount, getCamera, getCameras, getCamerasCount, getCurrentAnimation, getDefaultPickHost, getFog, getFogs, getFogsCount, getLight, getLights, getLightsCount, getMainGroup, getMetaData, getMountTransform, getMountTransform, getMountTransforms, getMountTransformsCount, getNamedObject, getNamedObjects, getNamedObjectsCount, getNestedTransform, getNestedTransforms, getShape, getShapes, getShapesCount, getSkyBox, getSound, getSounds, getSoundsCount, getSpawnTransform, getSpawnTransforms, getSpawnTransformsCount, hasAnimations, removeAnimationListener, setAnimations, setCameras, setCurrentAnimation, setCurrentAnimation, setCurrentAnimation, setDefaultPickHost, setFogs, setLights, setMainGroup, setMetaData, setMountTransforms, setNestedTransforms, setShapes, setSkyBox, setSounds, setSpawnTransforms, update
 
Methods inherited from class org.xith3d.scenegraph.Group
moveTo, newInstance, traverse
 
Methods inherited from class org.xith3d.scenegraph.GroupNode
absorbDetails, addChild, addChild, checkChild, dump, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setLive, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cal3dModel

protected Cal3dModel()
Method Detail

getInternalModel

public org.jagatoo.loaders.models.cal3d.core.CalModel getInternalModel()

getCalController

public org.jagatoo.loaders.models.cal3d.Cal3dController getCalController()

getFps

public float getFps()
Returns:
The number of frames per second. It is used for time computations.

setFps

public void setFps(float fps)
Set the number of frames per second. It is used for time computations.

Parameters:
fps -

updateController

public void updateController(float time)

interpolateAnimation

public void interpolateAnimation(float animStartTime,
                                 float absAnimTime)
Interpolates the animations towards the next frame.

Overrides:
interpolateAnimation in class Model
Parameters:
animStartTime - the game-time, at which the current loop of the animation started
absAnimTime - the amount of game-time, the current loop of the current animation runs

getAppearance

public Appearance getAppearance()
Returns:
the appearance of this model, or the last one if it has several meshes

init

protected void init(org.jagatoo.loaders.models.cal3d.core.CalModel calModel)

getSharedInstance

public Cal3dModel getSharedInstance()

Overrides:
getSharedInstance in class Model
Returns:
a new Instance of this Model. It will at least share it's Geometry and animation data with this one.