Package com.jme3.scene.debug.custom
Class ArmatureDebugger
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.scene.debug.custom.ArmatureDebugger
- 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
ConstructorsConstructorDescriptionDefault constructor for `ArmatureDebugger`.ArmatureDebugger
(AssetManager assetManager, SkinningControl skControl) Convenience constructor that creates anArmatureDebugger
and immediately initializes its materials based on the providedAssetManager
andSkinningControl
.ArmatureDebugger
(String name, Armature armature, List<Joint> deformingJoints) Creates an `ArmatureDebugger` instance without explicit bone length data. -
Method Summary
Modifier and TypeMethodDescriptionint
collideWith
(Collidable other, CollisionResults results) Check collision with another Collidable.void
displayNonDeformingJoint
(boolean display) Sets the visibility of non-deforming joints and their associated outlines and wires.Returns theArmature
instance associated with this debugger.Returns theArmatureNode
which is responsible for generating and managing the visual mesh of the bones and wires.Returns theArmatureInterJointsWire
instance, which represents the dotted lines connecting a bone's tail to the head of its children.void
initialize
(AssetManager assetManager, Camera camera) Initializes the materials and camera for the debugger's visual components.protected Joint
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, cloneFields, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, 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
-
ArmatureDebugger
public ArmatureDebugger()Default constructor for `ArmatureDebugger`. UseArmatureDebugger(String, Armature, List)
for a functional instance. -
ArmatureDebugger
Convenience constructor that creates anArmatureDebugger
and immediately initializes its materials based on the providedAssetManager
andSkinningControl
.- Parameters:
assetManager
- TheAssetManager
used to load textures and materials for the debug visualization.skControl
- TheSkinningControl
from which to extract theArmature
and its associated joints.
-
ArmatureDebugger
Creates an `ArmatureDebugger` instance without explicit bone length data. In this configuration, the visual representation will consist of wires connecting the bone heads, and points representing the bone heads. No dotted lines for inter-bone connections will be visible.
-
-
Method Details
-
displayNonDeformingJoint
public void displayNonDeformingJoint(boolean display) Sets the visibility of non-deforming joints and their associated outlines and wires.- Parameters:
display
- `true` to make non-deforming joints visible, `false` to hide them.
-
initialize
Initializes the materials and camera for the debugger's visual components. This method should be called after the `ArmatureDebugger` is added to a scene graph and anAssetManager
andCamera
are available.- Parameters:
assetManager
- TheAssetManager
to load textures and materials.camera
- The scene's primaryCamera
, used by the `ArmatureNode` for billboard rendering of joint points.
-
getArmature
Returns theArmature
instance associated with this debugger.- Returns:
- The
Armature
being debugged.
-
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:
-
collideWith
Description copied from interface:Collidable
Check collision with another Collidable.- Specified by:
collideWith
in interfaceCollidable
- Overrides:
collideWith
in classNode
- Parameters:
other
- The object to check collision againstresults
- Will contain the list ofCollisionResult
s.- Returns:
- how many collisions were found between this and other
-
select
-
getBoneShapes
Returns theArmatureNode
which is responsible for generating and managing the visual mesh of the bones and wires.- Returns:
- The
ArmatureNode
instance.
-
getInterJointWires
Returns theArmatureInterJointsWire
instance, which represents the dotted lines connecting a bone's tail to the head of its children. This will be `null` if the debugger was created without bone length data.- Returns:
- The
ArmatureInterJointsWire
instance, or `null` if not present.
-