|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.loaders.models.Model
public class 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 | |
|---|---|
Model()
|
|
| Method Summary | |
|---|---|
void |
addAnimationListener(AnimationListener l)
|
protected void |
addNamedObject(java.lang.String name,
org.jagatoo.datatypes.NamedObject object)
Adds the given String/Object pair to the table of named objects. |
void |
dumpAnimations()
Dumps all animations contained in the model. |
void |
dumpNamedObjects(boolean printValues)
|
protected void |
fireOnAnimationFinished(ModelAnimation anim)
|
protected void |
fireOnAnimationStarted(ModelAnimation anim)
|
ModelAnimation |
getAnimation(int index)
|
ModelAnimation |
getAnimation(java.lang.String name)
|
ModelAnimation[] |
getAnimations()
|
int |
getAnimationsCount()
|
View |
getCamera(int index)
|
View[] |
getCameras()
|
int |
getCamerasCount()
|
ModelAnimation |
getCurrentAnimation()
|
static boolean |
getDefaultPickHost()
|
Fog |
getFog(int index)
|
Fog[] |
getFogs()
|
int |
getFogsCount()
|
Light |
getLight(int index)
|
Light[] |
getLights()
|
int |
getLightsCount()
|
GroupNode |
getMainGroup()
|
ModelMetaData |
getMetaData()
|
TransformGroup |
getMountTransform(int index)
|
TransformGroup |
getMountTransform(java.lang.String name)
|
TransformGroup[] |
getMountTransforms()
|
int |
getMountTransformsCount()
|
org.jagatoo.datatypes.NamedObject |
getNamedObject(java.lang.String name)
|
java.util.Map<java.lang.String,org.jagatoo.datatypes.NamedObject> |
getNamedObjects()
|
int |
getNamedObjectsCount()
|
TransformGroup |
getNestedTransform(int index)
|
TransformGroup[] |
getNestedTransforms()
|
Shape3D |
getShape(int index)
|
Shape3D[] |
getShapes()
|
int |
getShapesCount()
|
Model |
getSharedInstance()
|
SkyBox |
getSkyBox()
|
Sound |
getSound(int index)
|
Sound[] |
getSounds()
|
int |
getSoundsCount()
|
org.openmali.vecmath2.Matrix4f |
getSpawnTransform(int index)
|
org.openmali.vecmath2.Matrix4f[] |
getSpawnTransforms()
|
int |
getSpawnTransformsCount()
|
boolean |
hasAnimations()
|
void |
interpolateAnimation(float animStartTime,
float absAnimTime)
Interpolates the animations towards the next frame. |
void |
removeAnimationListener(AnimationListener l)
|
void |
setAnimations(ModelAnimation[] anims)
|
protected void |
setCameras(View[] cameras)
|
void |
setCurrentAnimation(int index)
Sets the current animation being used. |
void |
setCurrentAnimation(ModelAnimation anim)
Sets the current animation being used. |
void |
setCurrentAnimation(java.lang.String name)
Sets the current animation being used. |
static void |
setDefaultPickHost(boolean value)
Sets the initial (default) value for a new Model's pick-host flag. |
protected void |
setFogs(Fog[] fogs)
|
protected void |
setLights(Light[] lights)
|
protected void |
setMainGroup(GroupNode mainGroup)
|
void |
setMetaData(ModelMetaData metaData)
Sets the meta data for this object. |
void |
setMountTransforms(TransformGroup[] mountTransforms)
|
protected void |
setNestedTransforms(TransformGroup[] nestedTransforms)
|
protected void |
setShapes(Shape3D[] shapes)
|
protected void |
setSkyBox(SkyBox skyBox)
|
protected void |
setSounds(Sound[] sounds)
|
protected void |
setSpawnTransforms(org.openmali.vecmath2.Matrix4f[] spawnTransforms)
|
boolean |
update(View view,
org.openmali.spatial.bodies.Frustum frustum,
long nanoTime,
long nanoStep)
|
| Methods inherited from class org.xith3d.scenegraph.Group |
|---|
moveTo, newInstance, traverse |
| 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 |
|---|
public Model()
| Method Detail |
|---|
public static void setDefaultPickHost(boolean value)
value - public static boolean getDefaultPickHost()
protected void setNestedTransforms(TransformGroup[] nestedTransforms)
public final TransformGroup getNestedTransform(int index)
index -
public final TransformGroup[] getNestedTransforms()
protected void setShapes(Shape3D[] shapes)
public final int getShapesCount()
public final Shape3D getShape(int index)
index -
public final Shape3D[] getShapes()
protected void setLights(Light[] lights)
public final int getLightsCount()
public final Light getLight(int index)
public final Light[] getLights()
protected void setFogs(Fog[] fogs)
public final int getFogsCount()
public final Fog getFog(int index)
public final Fog[] getFogs()
protected void setSounds(Sound[] sounds)
public final int getSoundsCount()
public final Sound getSound(int index)
public final Sound[] getSounds()
protected void setCameras(View[] cameras)
public final int getCamerasCount()
public final View getCamera(int index)
public final View[] getCameras()
protected void setSpawnTransforms(org.openmali.vecmath2.Matrix4f[] spawnTransforms)
public final int getSpawnTransformsCount()
public final org.openmali.vecmath2.Matrix4f getSpawnTransform(int index)
public final org.openmali.vecmath2.Matrix4f[] getSpawnTransforms()
protected void setMainGroup(GroupNode mainGroup)
public final GroupNode getMainGroup()
protected void setSkyBox(SkyBox skyBox)
public final SkyBox getSkyBox()
protected void addNamedObject(java.lang.String name,
org.jagatoo.datatypes.NamedObject object)
public final int getNamedObjectsCount()
public final java.util.Map<java.lang.String,org.jagatoo.datatypes.NamedObject> getNamedObjects()
public final org.jagatoo.datatypes.NamedObject getNamedObject(java.lang.String name)
name - the name of the named object to retrieve
public void dumpNamedObjects(boolean printValues)
public void setMetaData(ModelMetaData metaData)
public final ModelMetaData getMetaData()
public void setMountTransforms(TransformGroup[] mountTransforms)
public final int getMountTransformsCount()
public final TransformGroup[] getMountTransforms()
public final TransformGroup getMountTransform(int index)
public final TransformGroup getMountTransform(java.lang.String name)
public void addAnimationListener(AnimationListener l)
public void removeAnimationListener(AnimationListener l)
protected final void fireOnAnimationStarted(ModelAnimation anim)
protected final void fireOnAnimationFinished(ModelAnimation anim)
public void setAnimations(ModelAnimation[] anims)
public final boolean hasAnimations()
public final int getAnimationsCount()
public ModelAnimation[] getAnimations()
public ModelAnimation getAnimation(int index)
public ModelAnimation getAnimation(java.lang.String name)
public final void dumpAnimations()
public void setCurrentAnimation(ModelAnimation anim)
anim - the animation to usepublic final void setCurrentAnimation(java.lang.String name)
name - the animation to usepublic final void setCurrentAnimation(int index)
index - the animation to usepublic final ModelAnimation getCurrentAnimation()
public void interpolateAnimation(float animStartTime,
float absAnimTime)
animStartTime - the game-time, at which the current loop of the animation startedabsAnimTime - the amount of game-time, the current loop of the current animation runs
public boolean update(View view,
org.openmali.spatial.bodies.Frustum frustum,
long nanoTime,
long nanoStep)
update in interface UpdatableNodeview - the view that's currently used for renderingfrustum - view frustum
public Model getSharedInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||