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 anArmatureDebuggerand immediately initializes its materials based on the providedAssetManagerandSkinningControl.ArmatureDebugger(String name, Armature armature, List<Joint> deformingJoints) Creates an `ArmatureDebugger` instance without explicit bone length data. -
Method Summary
Modifier and TypeMethodDescriptionintcollideWith(Collidable other, CollisionResults results) Check collision with another Collidable.voiddisplayNonDeformingJoint(boolean display) Sets the visibility of non-deforming joints and their associated outlines and wires.Returns theArmatureinstance associated with this debugger.Returns theArmatureNodewhich is responsible for generating and managing the visual mesh of the bones and wires.Returns theArmatureInterJointsWireinstance, which represents the dotted lines connecting a bone's tail to the head of its children.voidinitialize(AssetManager assetManager, Camera camera) Initializes the materials and camera for the debugger's visual components.protected JointvoidupdateLogicalState(float tpf) updateLogicalStatecalls 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, writeMethods 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 anArmatureDebuggerand immediately initializes its materials based on the providedAssetManagerandSkinningControl.- Parameters:
assetManager- TheAssetManagerused to load textures and materials for the debug visualization.skControl- TheSkinningControlfrom which to extract theArmatureand 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 anAssetManagerandCameraare available.- Parameters:
assetManager- TheAssetManagerto load textures and materials.camera- The scene's primaryCamera, used by the `ArmatureNode` for billboard rendering of joint points.
-
getArmature
Returns theArmatureinstance associated with this debugger.- Returns:
- The
Armaturebeing debugged.
-
updateLogicalState
public void updateLogicalState(float tpf) Description copied from class:SpatialupdateLogicalStatecalls theupdate()method for all controls attached to this Spatial.- Overrides:
updateLogicalStatein classNode- Parameters:
tpf- Time per frame.- See Also:
-
collideWith
Description copied from interface:CollidableCheck collision with another Collidable.- Specified by:
collideWithin interfaceCollidable- Overrides:
collideWithin classNode- Parameters:
other- The object to check collision againstresults- Will contain the list ofCollisionResults.- Returns:
- how many collisions were found between this and other
-
select
-
getBoneShapes
Returns theArmatureNodewhich is responsible for generating and managing the visual mesh of the bones and wires.- Returns:
- The
ArmatureNodeinstance.
-
getInterJointWires
Returns theArmatureInterJointsWireinstance, 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
ArmatureInterJointsWireinstance, or `null` if not present.
-