Package com.jme3.scene.debug
Class SkeletonDebugger
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.scene.debug.SkeletonDebugger
- All Implemented Interfaces:
HasLocalTransform
,CloneableSmartAsset
,Collidable
,Savable
,JmeCloneable
,Cloneable
The class that creates a mesh to display how bones behave.
If it is supplied with the bones' lengths it will show exactly how the bones look like on the scene.
If not then only connections between each bone heads will be shown.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSMode
-
Field Summary
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform
-
Constructor Summary
ConstructorDescriptionSkeletonDebugger
(String name, Skeleton skeleton) Creates a debugger with no length data.Creates a debugger with bone lengths data. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cloneFields
(Cloner cloner, Object original) Called internally by com.jme3.util.clone.Cloner.getWires()
void
read
(JmeImporter importer) void
updateLogicalState
(float tpf) updateLogicalState
calls theupdate()
method for all controls attached to this Spatial.Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, setLightListRefresh, setLodLevel, setMaterial, setMatParamOverrideRefresh, setModelBound, setParent, setTransformRefresh, swapChildren, updateGeometricState, updateModelBound, updateWorldBound, write
Methods inherited from class com.jme3.scene.Spatial
addControl, addControlAt, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, depthFirstTraversal, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, toString, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocal
-
Constructor Details
-
SkeletonDebugger
public SkeletonDebugger() -
SkeletonDebugger
Creates a debugger with no length data. The wires will be a connection between the bones' heads only. The points will show the bones' heads only and no dotted line of inter bones connection will be visible.- Parameters:
name
- the name of the debugger's nodeskeleton
- the skeleton that will be shown
-
SkeletonDebugger
Creates a debugger with bone lengths data. If the data is supplied then the wires will show each full bone (from head to tail), the points will display both heads and tails of the bones and dotted lines between bones will be seen.- Parameters:
name
- the name of the debugger's nodeskeleton
- the skeleton that will be shownboneLengths
- a map between the bone's index and the bone's length
-
-
Method Details
-
updateLogicalState
public void updateLogicalState(float tpf) Description copied from class:Spatial
updateLogicalState
calls theupdate()
method for all controls attached to this Spatial.- Overrides:
updateLogicalState
in classNode
- Parameters:
tpf
- Time per frame.- See Also:
-
getPoints
- Returns:
- the skeleton points
-
getWires
- Returns:
- the skeleton wires
-
getInterBoneWires
- Returns:
- the dotted line between bones (can be null)
-
cloneFields
Description copied from class:Node
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
cloneFields
in interfaceJmeCloneable
- Overrides:
cloneFields
in classNode
- Parameters:
cloner
- The cloner that is performing the cloning operation. The cloneFields method can call back into the cloner to make clones of its subordinate fields.original
- The original object from which this object was cloned. This is provided for the very rare case that this object needs to refer to its original for some reason. In general, all of the relevant values should have been transferred during the shallow clone, and this object need only clone what it wants.
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classNode
- Throws:
IOException
-