CharacterJoint¶
-
class
CharacterJoint
¶ Bases:
MovingPartMatrix
This represents one joint of the character’s animation, containing an animating transform matrix.
Inheritance diagram
-
explicit
CharacterJoint
(Character *character, PartBundle *root, PartGroup *parent, std::string const &name, LMatrix4 const &default_value)¶ For internal use only.
-
bool
add_local_transform
(PandaNode *node)¶ Adds the indicated node to the list of nodes that will be updated each frame with the joint’s local transform from its parent. Returns true if the node is successfully added, false if it had already been added.
The Character pointer should be the Character object that owns this joint; this will be used to create a
CharacterJointEffect
for this node. If it is NULL, no such effect will be created.A
CharacterJointEffect
for this joint’s Character will automatically be added to the specified node.
-
bool
add_net_transform
(PandaNode *node)¶ Adds the indicated node to the list of nodes that will be updated each frame with the joint’s net transform from the root. Returns true if the node is successfully added, false if it had already been added.
A
CharacterJointEffect
for this joint’s Character will automatically be added to the specified node.
-
void
clear_local_transforms
(void)¶ Removes all nodes from the list of nodes that will be updated each frame with the joint’s local transform from its parent.
-
void
clear_net_transforms
(void)¶ Removes all nodes from the list of nodes that will be updated each frame with the joint’s net transform from the root.
-
static TypeHandle
get_class_type
(void)¶
-
NodePathCollection
get_local_transforms
(void)¶ Returns a list of the local transforms set for this node. Note that this returns a list of
NodePaths
, even though the local transforms are actually a list ofPandaNodes
.
-
void
get_net_transform
(LMatrix4 &transform) const¶ Copies the joint’s current net transform (composed from the root of the character joint hierarchy) into the indicated matrix.
-
NodePathCollection
get_net_transforms
(void)¶ Returns a list of the net transforms set for this node. Note that this returns a list of
NodePaths
, even though the net transforms are actually a list ofPandaNodes
.
-
LMatrix4 const &
get_transform
(void) const¶ Returns the transform matrix of the joint
Copies the joint’s current transform into the indicated matrix.
-
ConstPointerTo<TransformState>
get_transform_state
(void) const¶
-
bool
has_local_transform
(PandaNode *node) const¶ Returns true if the node is on the list of nodes that will be updated each frame with the joint’s local transform from its parent, false otherwise.
-
bool
has_net_transform
(PandaNode *node) const¶ Returns true if the node is on the list of nodes that will be updated each frame with the joint’s net transform from the root, false otherwise.
-
bool
remove_local_transform
(PandaNode *node)¶ Removes the indicated node from the list of nodes that will be updated each frame with the joint’s local transform from its parent. Returns true if the node is successfully removed, false if it was not on the list.
If the node has a
CharacterJointEffect
that matches this joint’s Character, it will be cleared.
-
bool
remove_net_transform
(PandaNode *node)¶ Removes the indicated node from the list of nodes that will be updated each frame with the joint’s net transform from the root. Returns true if the node is successfully removed, false if it was not on the list.
If the node has a
CharacterJointEffect
that matches this joint’s Character, it will be cleared.
-
explicit