AI-generated Key Takeaways
-
SkeletonNodeprovides mappings between a skinnedModelRenderable's bones and a set ofNodes, enabling animation and manipulation. -
During animation playback, attached
Nodetransforms are set to bone poses inonUpdate(FrameTime), allowing for real-time skeletal animation. -
Manipulating attached
Nodes will also transform corresponding bones, facilitating interactive control of the skeletal structure. -
Calling
setRenderable(Renderable)on aSkeletonNodeupdates attachedNodetransforms to match the newModelRenderable's bone poses without altering the existing mappings. -
Nodes attached to non-existent bone names or withisActive()set to false will not be transformed and won't affect bone transformations.
A Node that provides mappings between the bones of a skinned ModelRenderable and
a set of Nodes.
When an animation is playing, the transform of the attached Nodes will be set during
onUpdate(FrameTime).
Manipulating attached Nodes will also transform corresponding bones. Child bones will
not automatically be transformed. To change the transformations of child bones, the child bones
will need to be attached to child nodes. If an animation is playing, the node and bone will be
set to the animation state each frame during onUpdate(FrameTime). However,
attached Nodes can be manipulated after onUpdate(FrameTime) each
frame to manipulate bones while an animation is playing.
When the attached Node's isActive() is false, they are not transformed
and don't transform bones.
The attached Nodes are also not transformed if they are bound to a boneName that
doesn't match any bones in the ModelRenderable.
Calling setRenderable(Renderable) will not change the Node mappings. The
attached Nodes' transforms will immediately be set to the pose of matching bones in the
new ModelRenderable.
Public Constructors
Public Methods
| Node | |
| void | |
| void | |
| void |
Inherited Methods
Public Constructors
public SkeletonNode ()
Public Methods
public void onUpdate (FrameTime frameTime)
Handles when this node is updated. A node is updated before rendering each frame. This is only called when the node is active.
Override to perform any updates that need to occur each frame.
Parameters
| frameTime | provides time information for the current frame |
|---|
public void setBoneAttachment (String boneName, Node node)
Attaches a Node to the specified boneName. This will immediately set the transform of
the Node to the pose of the bone named boneName in getRenderable() if it
exists.
If the Node is null, then any previously attached Node will be detached.
Only one Node may be attached to a boneName at a time.
Parameters
| boneName | |
|---|---|
| node |
public void setRenderable (Renderable renderable)
Sets the Renderable to display for this node. If setCollisionShape(CollisionShape) is not set, then getCollisionShape()
is used to detect collisions for this Node.
Parameters
| renderable | Usually a 3D model. If null, this node's current renderable will be removed. |
|---|