com.threed.jpct.skeleton
Class SkeletalObject3D

java.lang.Object
  extended by com.threed.jpct.Object3D
      extended by com.threed.jpct.skeleton.SkeletalObject3D
All Implemented Interfaces:
java.io.Serializable

public class SkeletalObject3D
extends com.threed.jpct.Object3D

An implementation of an object3D that supports a skeleton.

Author:
mcgreevyj
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.threed.jpct.Object3D
BILLBOARDING_DISABLED, BILLBOARDING_ENABLED, BLENDING_DISABLED, BLENDING_ENABLED, BUMPMAPPING_DISABLED, BUMPMAPPING_ENABLED, COLLISION_CHECK_NONE, COLLISION_CHECK_OTHERS, COLLISION_CHECK_SELF, COLLISION_DETECTION_NOT_OPTIMIZED, COLLISION_DETECTION_OPTIMIZED, COLLISION_NONE, CULLING_DISABLED, CULLING_ENABLED, ELLIPSOID_ALIGNED, ELLIPSOID_TRANSFORMED, ENVMAP_CAMERASPACE, ENVMAP_DISABLED, ENVMAP_ENABLED, ENVMAP_WORLDSPACE, ENVMAP_XY, ENVMAP_XZ, ENVMAP_YZ, FILTERING_DISABLED, FILTERING_ENABLED, FINALIZE_DEFAULT, FINALIZE_PRESORTX, FINALIZE_PRESORTY, FINALIZE_PRESORTZ, LIGHTING_ALL_ENABLED, LIGHTING_NO_LIGHTS, MOUSE_SELECTABLE, MOUSE_UNSELECTABLE, NO_OBJECT, OBJ_INVISIBLE, OBJ_VISIBLE, RAY_MISSES_BOX, SECTOR_AUTODETECT, SECTOR_PRECALCULATED, SHADING_FAKED_FLAT, SHADING_GOURAUD, SPECULAR_DISABLED, SPECULAR_ENABLED, UNKNOWN_OBJECTSIZE
 
Constructor Summary
SkeletalObject3D(int arg0)
           
 
Method Summary
 void advanceAnimation()
          Advances the animation of the model.
 void applyBoneInverseMatrices()
          Undo's the "rest position" of the vertices, to remove the requirement of doing it every keyframe.
 void createAnimations()
          Creates mesh-keyframe animations from the attached skeleton.
 SimpleSkeleton getSkeleton()
          Returns the skeleton this object is connected to.
 void restartAnimation()
          Restarts the current skeletal animation sequence.
 void setSkeleton(SimpleSkeleton skeleton)
          Sets the skeleton of the object.
 void setVertexAssignments(VertexAssignment[] vertexAssignments)
          Sets the vertex assignments of this object.
 
Methods inherited from class com.threed.jpct.Object3D
addChild, addCollisionListener, addParent, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, align, align, animate, animate, build, calcBoundingBox, calcCenter, calcMinDistance, calcMinDistance, calcNormals, calcTextureWrap, calcTextureWrapSpherical, checkForCollision, checkForCollisionEllipsoid, checkForCollisionSpherical, clearAdditionalColor, clearAnimation, clearObject, cloneObject, createDummyObj, createTriangleStrips, createTriangleStrips, decoupleMesh, disableCollisionListeners, disableLazyTransformations, disableVertexSharing, ellipsoidIntersectsAABB, enableCollisionListeners, enableLazyTransformations, getAdditionalColor, getAnimationSequence, getCenter, getCollisionListeners, getEllipsoidMode, getEnvmapMode, getID, getLighting, getMesh, getName, getNextID, getOcTree, getOrigin, getOriginMatrix, getParents, getPolygonManager, getRotationMatrix, getRotationPivot, getScale, getTransformedCenter, getTranslation, getTranslationMatrix, getUserObject, getVisibility, getWorldTransformation, getXAxis, getYAxis, getZAxis, hasChild, hasParent, invert, isBumpmapped, isEnvmapped, isSelectable, mergeObjects, rayIntersectsAABB, rayIntersectsAABB, rebuild, recreateTextureCoords, removeChild, removeCollisionListener, removeMultiTexturing, removeParent, reorderSectors, resetCollisionStatus, resetNextID, rotateAxis, rotateMesh, rotateX, rotateY, rotateZ, scale, setAdditionalColor, setAllTextures, setAllTextures, setAnimationSequence, setAsMultiSectored, setBaseTexture, setBillboarding, setBlending, setBoundingBox, setBumpmapped, setBumpmapTexture, setCenter, setCollisionMode, setCollisionOptimization, setCulling, setEllipsoidMode, setEnvmapDirection, setEnvmapMode, setEnvmapped, setFiltering, setLighting, setMesh, setName, setNextID, setOcTree, setOrigin, setRotationMatrix, setRotationPivot, setScale, setSector, setSectorDetectionMode, setSelectable, setShadingMode, setSortOffset, setSpecularLighting, setTexture, setTexture, setTranslationMatrix, setTransparency, setUserObject, setVisibility, sphereIntersectsAABB, translate, translate, translateMesh, wasTargetOfLastCollision, wasVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkeletalObject3D

public SkeletalObject3D(int arg0)
Method Detail

setSkeleton

public void setSkeleton(SimpleSkeleton skeleton)
Sets the skeleton of the object. This cannot be changed easily, and should only really be called from a 3d file loader.

Parameters:
skeleton -

createAnimations

public void createAnimations()
Creates mesh-keyframe animations from the attached skeleton. Animation can be used as with all mesh animations in jPCT. TODO: Make this work again. Doesn't work!


setVertexAssignments

public void setVertexAssignments(VertexAssignment[] vertexAssignments)
Sets the vertex assignments of this object. These assignments are used by the skeleton to warp in response to movements to the bones they are bound to.

Parameters:
vertexAssignments - Array of vertex assignments.

getSkeleton

public SimpleSkeleton getSkeleton()
Returns the skeleton this object is connected to.

Returns:
Skeleton connected to object.

applyBoneInverseMatrices

public void applyBoneInverseMatrices()
Undo's the "rest position" of the vertices, to remove the requirement of doing it every keyframe.


restartAnimation

public void restartAnimation()
Restarts the current skeletal animation sequence.


advanceAnimation

public void advanceAnimation()
Advances the animation of the model.

See Also:
SimpleSkeleton.advanceAnimation();