Panda3D
Public Member Functions | Static Public Member Functions | List of all members
CharacterJointBundle Class Reference

The collection of all the joints and sliders in the character. More...

Inheritance diagram for CharacterJointBundle:
PartBundle PartGroup TypedWritableReferenceCount Namable TypedWritable ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase

Public Member Functions

 __init__ (str name)
 Normally, there is no need to create a CharacterJointBundle directly. The Character node will automatically create one for itself. More...
 
Character getNode (int n)
 Returns the nth Character associated with this PartBundle. More...
 
- Public Member Functions inherited from PartBundle
 __init__ (str name)
 Normally, a PartBundle constructor should not be called directly–it will get created when a PartBundleNode is created. More...
 
PartBundle applyTransform (const TransformState transform)
 Returns a PartBundle that is a duplicate of this one, but with the indicated transform applied. If this is called multiple times with the same TransformState pointer, it returns the same PartBundle each time. More...
 
AnimControl bindAnim (AnimBundle anim, int hierarchy_match_flags, const PartSubset subset)
 Binds the animation to the bundle, if possible, and returns a new AnimControl that can be used to start and stop the animation. If the anim hierarchy does not match the part hierarchy, returns NULL. More...
 
 clearAnimPreload ()
 Removes any AnimPreloadTable associated with the PartBundle. More...
 
 clearControlEffects ()
 Sets the control effect of all AnimControls to zero (but does not "stop" the AnimControls). The character will no longer be affected by any animation, and will return to its default pose (unless restore-initial-pose is false). More...
 
bool controlJoint (str joint_name, PandaNode node)
 Specifies that the joint with the indicated name should be animated with the transform on the indicated node. It will henceforth always follow the node's transform, regardless of any animations that may subsequently be bound to the joint. More...
 
bool forceUpdate ()
 Updates all the parts in the bundle to reflect the data for the current frame, whether we believe it needs it or not. More...
 
bool freezeJoint (str joint_name, const LVecBase3 pos, const LVecBase3 hpr, const LVecBase3 scale)
 Specifies that the joint with the indicated name should be frozen with the specified transform. It will henceforth always hold this fixed transform, regardless of any animations that may subsequently be bound to the joint. More...
 
bool freezeJoint (str joint_name, float value)
 Specifies that the joint with the indicated name should be frozen with the specified transform. It will henceforth always hold this fixed transform, regardless of any animations that may subsequently be bound to the joint. More...
 
bool freezeJoint (str joint_name, const TransformState transform)
 Specifies that the joint with the indicated name should be frozen with the specified transform. It will henceforth always hold this fixed transform, regardless of any animations that may subsequently be bound to the joint. More...
 
bool getAnimBlendFlag ()
 Returns whether the character allows multiple different animations to be bound simultaneously. See set_anim_blend_flag(). More...
 
const AnimPreloadTable getAnimPreload ()
 Returns the AnimPreloadTable associated with the PartBundle. This table, if present, can be used for the benefit of load_bind_anim() to allow asynchronous binding. More...
 
PartBundle::BlendType getBlendType ()
 Returns the algorithm that is used when blending multiple frames or multiple animations together, when either anim_blend_flag or frame_blend_flag is set to true. More...
 
float getControlEffect (AnimControl control)
 Returns the amount by which the character is affected by the indicated AnimControl and its associated animation. See set_control_effect(). More...
 
bool getFrameBlendFlag ()
 Returns whether the character interpolates (blends) between two sequential animation frames, or whether it holds the current frame until the next one is ready. See set_frame_blend_flag(). More...
 
PartBundleNode getNode (int n)
 Returns the nth PartBundleNode associated with this PartBundle. More...
 
list getNodes ()
 
int getNumNodes ()
 Returns the number of PartBundleNodes that contain a pointer to this PartBundle. More...
 
const LMatrix4 getRootXform ()
 Returns the transform matrix which is implicitly applied at the root of the animated hierarchy. More...
 
AnimControl loadBindAnim (Loader loader, const Filename filename, int hierarchy_match_flags, const PartSubset subset, bool allow_async)
 Binds an animation to the bundle. The animation is loaded from the disk via the indicated Loader object. In other respects, this behaves similarly to bind_anim(), with the addition of asynchronous support. More...
 
 mergeAnimPreloads (const PartBundle other)
 Copies the contents of the other PartBundle's preload table into this one. More...
 
AnimPreloadTable modifyAnimPreload ()
 Returns a modifiable pointer to the AnimPreloadTable associated with the PartBundle, if any. More...
 
 output (Ostream out)
 Writes a one-line description of the bundle. More...
 
bool releaseJoint (str joint_name)
 Releases the named joint from the effects of a previous call to freeze_joint() or control_joint(). It will henceforth once again follow whatever transforms are dictated by the animation. More...
 
 setAnimBlendFlag (bool anim_blend_flag)
 Defines the way the character responds to multiple calls to set_control_effect()). By default, this flag is set false, which disallows multiple animations. When this flag is false, it is not necessary to explicitly set the control_effect when starting an animation; starting the animation will implicitly remove the control_effect from the previous animation and set it on the current one. More...
 
 setAnimPreload (AnimPreloadTable table)
 Replaces the AnimPreloadTable associated with the PartBundle. More...
 
 setBlendType (PartBundle::BlendType bt)
 Defines the algorithm that is used when blending multiple frames or multiple animations together, when either anim_blend_flag or frame_blend_flag is set to true. More...
 
 setControlEffect (AnimControl control, float effect)
 Sets the amount by which the character is affected by the indicated AnimControl (and its associated animation). Normally, this will only be zero or one. Zero indicates the animation does not affect the character, and one means it does. More...
 
 setFrameBlendFlag (bool frame_blend_flag)
 Specifies whether the character interpolates (blends) between two sequential frames of an active animation, showing a smooth intra-frame motion, or whether it holds each frame until the next frame is ready, showing precisely the specified animation. More...
 
 setRootXform (const LMatrix4 root_xform)
 Specifies the transform matrix which is implicitly applied at the root of the animated hierarchy. More...
 
bool update ()
 Updates all the parts in the bundle to reflect the data for the current frame (as set in each of the AnimControls). More...
 
 waitPending ()
 Blocks the current thread until all currently-pending AnimControls, with a nonzero control effect, have been loaded and are properly bound. More...
 
 xform (const LMatrix4 mat)
 Applies the indicated transform to the root of the animated hierarchy. More...
 
- Public Member Functions inherited from PartGroup
 __init__ (PartGroup parent, str name)
 Creates the PartGroup, and adds it to the indicated parent. The only way to delete it subsequently is to delete the entire hierarchy. More...
 
bool applyControl (PandaNode node)
 Specifies a node to influence this particular joint so that it will always hold the node's transform. Returns true if this is a joint that can be so controlled, false otherwise. More...
 
bool applyFreeze (const TransformState transform)
 Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise. More...
 
bool applyFreezeMatrix (const LVecBase3 pos, const LVecBase3 hpr, const LVecBase3 scale)
 Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise. More...
 
bool applyFreezeScalar (float value)
 Freezes this particular joint so that it will always hold the specified transform. Returns true if this is a joint that can be so frozen, false otherwise. More...
 
bool clearForcedChannel ()
 Undoes the effect of a previous call to apply_freeze() or apply_control(). Returns true if the joint was modified, false otherwise. More...
 
PartGroup copySubgraph ()
 Allocates and returns a new copy of this node and of all of its children. More...
 
PartGroup findChild (str name)
 Returns the first descendant found with the indicated name, or NULL if no such descendant exists. This method searches the entire graph beginning at this PartGroup; see also get_child_named(). More...
 
PartGroup getChild (int n)
 Returns the nth child of the group. More...
 
PartGroup getChildNamed (str name)
 Returns the first child found with the indicated name, or NULL if no such child exists. This method searches only the children of this particular PartGroup; it does not recursively search the entire graph. See also find_child(). More...
 
list getChildren ()
 
AnimChannelBase getForcedChannel ()
 Returns the AnimChannelBase that has been forced to this joint by a previous call to apply_freeze() or apply_control(), or NULL if no such channel has been applied. More...
 
int getNumChildren ()
 Returns the number of child nodes of the group. More...
 
bool isCharacterJoint ()
 Returns true if this part is a CharacterJoint, false otherwise. This is a tiny optimization over is_of_type(CharacterType::get_class_type()). More...
 
PartGroup makeCopy ()
 Allocates and returns a new copy of the node. Children are not copied, but see copy_subgraph(). More...
 
 sortDescendants ()
 Sorts the children nodes at each level of the hierarchy into alphabetical order. This should be done after creating the hierarchy, to guarantee that the correct names will match up together when the AnimBundle is later bound to a PlayerRoot. More...
 
 write (Ostream out, int indent_level)
 Writes a brief description of the group and all of its descendants. More...
 
 writeWithValue (Ostream out, int indent_level)
 Writes a brief description of the group, showing its current value, and that of all of its descendants. More...
 
- Public Member Functions inherited from TypedWritable
object __reduce__ ()
 
object __reduce_persist__ (object pickler)
 
str encodeToBamStream ()
 Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. Returns empty string on failure. More...
 
bool encodeToBamStream (String data, BamWriter writer)
 Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. Returns true on success, false on failure. More...
 
UpdateSeq getBamModified ()
 Returns the current bam_modified counter. This counter is normally incremented automatically whenever the object is modified. More...
 
 markBamModified ()
 Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 Derived classes should override this function to return get_class_type(). More...
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
 
bool unref ()
 Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More...
 
- Public Member Functions inherited from Namable
 __init__ (const Namable copy)
 
 __init__ (str initial_name)
 
 clearName ()
 Resets the Namable's name to empty. More...
 
str getName ()
 
bool hasName ()
 Returns true if the Namable has a nonempty name set, false if the name is empty. More...
 
Namable operator= (const Namable other)
 
 output (Ostream out)
 Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. More...
 
 setName (str name)
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from PartBundle
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from PartGroup
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedWritableReferenceCount
static TypedWritableReferenceCount decodeFromBamStream (str data, BamReader reader)
 Reads the string created by a previous call to encode_to_bam_stream(), and extracts and returns the single object on that string. Returns NULL on error. More...
 
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedWritable
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from Namable
static TypeHandle getClassType ()
 

Additional Inherited Members

- Public Types inherited from PartBundle
enum  BlendType { BT_linear = 0, BT_normalized_linear = 1, BT_componentwise = 2, BT_componentwise_quat = 3 }
 This is the parameter to set_blend_type() and specifies the kind of blending operation to be performed when multiple controls are in effect simultaneously (see set_control_effect()) or between sequential frames of the animation. More...
 
- Public Types inherited from PartGroup
enum  HierarchyMatchFlags { HMF_ok_part_extra = 1, HMF_ok_anim_extra = 2, HMF_ok_wrong_root_name = 4 }
 This enum defines bits which may be passed into check_hierarchy() and PartBundle::bind_anim() to allow an inexact match of channel hierarchies. This specifies conditions that we don't care about enforcing. More...
 

Detailed Description

The collection of all the joints and sliders in the character.

Member Function Documentation

◆ __init__()

__init__ ( str  name)

Normally, there is no need to create a CharacterJointBundle directly. The Character node will automatically create one for itself.

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getNode()

Character getNode ( int  n)

Returns the nth Character associated with this PartBundle.