espresso3d.engine.world.sector.actor.skeleton
Class E3DSkeleton

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.world.sector.actor.skeleton.E3DSkeleton

public class E3DSkeleton
extends E3DRenderable

Author:
Curt TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
E3DSkeleton(E3DEngine engine)
           
E3DSkeleton(E3DSkeleton toCopySkeleton)
           
 
Method Summary
 void addAnimation(E3DAnimation animation)
           
 void addBoneGroup(E3DBone rootBone, java.lang.String boneGroupID)
          A bone group specifies the root bone for a hierarchy of bones and a groupID for that hierarchy of bones.
 E3DActor getActor()
           
 java.util.HashMap getAnimations()
           
 E3DBone getBoneGroup(java.lang.String boneGroupID)
          Returns the root bone for a bone group named boneGroupID
 java.util.HashMap getBoneGroups()
           
 java.util.ArrayList getCurrentAnimations()
           
 void removeAnimation(java.lang.String animationID)
           
 void removeBoneGroup(java.lang.String boneGroupID)
          Removes a set of bones from the skeleton defined as boneGroupID
 void render()
           
 void resetAll()
          Resets all bones in the skeleton to their start position
 void resetBoneGroup(java.lang.String boneGroupID)
          Reset a given boneGroup to its startPosition
 void rotateBoneGroup(java.lang.String boneGroupID, double angle, E3DVector3F aroundVec)
           
 void rotateWithoutVertices(double angle, E3DVector3F aroundVec)
           
 void rotateWithVertices(double angle, E3DVector3F aroundVec)
           
 void setActor(E3DActor actor)
           
 void startAnimation(java.lang.String animationID)
           
 void translateWithoutVertices(E3DVector3F translationAmt)
           
 void translateWithVertices(E3DVector3F translationAmt)
           
 void update(double lastFrameTimeSeconds)
           
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
getBlendMode, getKey, getRenderMode, initCorrectGeometryRenderer, isKeyChanged, setBlendMode, setKeyChanged, setRenderMode
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

E3DSkeleton

public E3DSkeleton(E3DEngine engine)

E3DSkeleton

public E3DSkeleton(E3DSkeleton toCopySkeleton)
Method Detail

render

public void render()
Specified by:
render in class E3DRenderable

addBoneGroup

public void addBoneGroup(E3DBone rootBone,
                         java.lang.String boneGroupID)
A bone group specifies the root bone for a hierarchy of bones and a groupID for that hierarchy of bones. A skeleton should have at least one boneGroup for animation to be possible Bones must NOT be referenced by more than one other parent bone. This will cause animation and other functions to completely fail. IE: A bone can only be in 1 bone group and only have 1 parent.

Parameters:
rootBone - A bone that serves as the root bone for the group
boneGroupID - ID for the group

getBoneGroup

public E3DBone getBoneGroup(java.lang.String boneGroupID)
Returns the root bone for a bone group named boneGroupID

Parameters:
boneGroupID - Name of the bone group
Returns:
Root bone for boneGroupID

removeBoneGroup

public void removeBoneGroup(java.lang.String boneGroupID)
Removes a set of bones from the skeleton defined as boneGroupID

Parameters:
boneGroupID -

getActor

public E3DActor getActor()

rotateBoneGroup

public void rotateBoneGroup(java.lang.String boneGroupID,
                            double angle,
                            E3DVector3F aroundVec)

rotateWithVertices

public void rotateWithVertices(double angle,
                               E3DVector3F aroundVec)

rotateWithoutVertices

public void rotateWithoutVertices(double angle,
                                  E3DVector3F aroundVec)

translateWithVertices

public void translateWithVertices(E3DVector3F translationAmt)

translateWithoutVertices

public void translateWithoutVertices(E3DVector3F translationAmt)

resetBoneGroup

public void resetBoneGroup(java.lang.String boneGroupID)
Reset a given boneGroup to its startPosition

Parameters:
boneGroupID -

resetAll

public void resetAll()
Resets all bones in the skeleton to their start position


getAnimations

public java.util.HashMap getAnimations()

addAnimation

public void addAnimation(E3DAnimation animation)

removeAnimation

public void removeAnimation(java.lang.String animationID)

startAnimation

public void startAnimation(java.lang.String animationID)

getBoneGroups

public java.util.HashMap getBoneGroups()

getCurrentAnimations

public java.util.ArrayList getCurrentAnimations()

update

public void update(double lastFrameTimeSeconds)

setActor

public void setActor(E3DActor actor)