PartGroup

from panda3d.core import PartGroup
class PartGroup

Bases: TypedWritableReferenceCount, Namable

This is the base class for PartRoot and MovingPart. It defines a hierarchy of MovingParts.

Inheritance diagram

Inheritance diagram of PartGroup

HMFOkAnimExtra = 2
HMFOkPartExtra = 1
HMFOkWrongRootName = 4
HMF_ok_anim_extra = 2
HMF_ok_part_extra = 1
HMF_ok_wrong_root_name = 4
__init__(*args, **kwargs)
applyControl()

C++ Interface: apply_control(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::control_joint(), but

  • you may also call it directly.

*/

applyFreeze()

C++ Interface: apply_freeze(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

applyFreezeMatrix()

C++ Interface: apply_freeze_matrix(const PartGroup self, const LVecBase3f pos, const LVecBase3f hpr, const LVecBase3f 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

applyFreezeScalar()

C++ Interface: apply_freeze_scalar(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

apply_control()

C++ Interface: apply_control(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::control_joint(), but

  • you may also call it directly.

*/

apply_freeze()

C++ Interface: apply_freeze(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

apply_freeze_matrix()

C++ Interface: apply_freeze_matrix(const PartGroup self, const LVecBase3f pos, const LVecBase3f hpr, const LVecBase3f 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

apply_freeze_scalar()

C++ Interface: apply_freeze_scalar(const PartGroup self, 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.

  • This is normally only called internally by PartBundle::freeze_joint(), but

  • you may also call it directly.

*/

children
clearForcedChannel()

C++ Interface: clear_forced_channel(const PartGroup self)

/**
  • Undoes the effect of a previous call to apply_freeze() or apply_control().

  • Returns true if the joint was modified, false otherwise.

  • This is normally only called internally by PartBundle::release_joint(), but

  • you may also call it directly.

*/

clear_forced_channel()

C++ Interface: clear_forced_channel(const PartGroup self)

/**
  • Undoes the effect of a previous call to apply_freeze() or apply_control().

  • Returns true if the joint was modified, false otherwise.

  • This is normally only called internally by PartBundle::release_joint(), but

  • you may also call it directly.

*/

copySubgraph()

C++ Interface: copy_subgraph(PartGroup self)

/**
  • Allocates and returns a new copy of this node and of all of its children.

*/

copy_subgraph()

C++ Interface: copy_subgraph(PartGroup self)

/**
  • Allocates and returns a new copy of this node and of all of its children.

*/

findChild()

C++ Interface: find_child(PartGroup self, 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().

*/

find_child()

C++ Interface: find_child(PartGroup self, 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().

*/

getChild()

C++ Interface: get_child(PartGroup self, int n)

/**
  • Returns the nth child of the group.

*/

getChildNamed()

C++ Interface: get_child_named(PartGroup self, 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().

*/

getChildren()
getClassType()

C++ Interface: get_class_type()

getForcedChannel()

C++ Interface: get_forced_channel(PartGroup self)

/**
  • 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.

*/

getNumChildren()

C++ Interface: get_num_children(PartGroup self)

/**
  • Returns the number of child nodes of the group.

*/

get_child()

C++ Interface: get_child(PartGroup self, int n)

/**
  • Returns the nth child of the group.

*/

get_child_named()

C++ Interface: get_child_named(PartGroup self, 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().

*/

get_children()
get_class_type()

C++ Interface: get_class_type()

get_forced_channel()

C++ Interface: get_forced_channel(PartGroup self)

/**
  • 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.

*/

get_num_children()

C++ Interface: get_num_children(PartGroup self)

/**
  • Returns the number of child nodes of the group.

*/

isCharacterJoint()

C++ Interface: is_character_joint(PartGroup self)

/**
  • Returns true if this part is a CharacterJoint, false otherwise. This is a

  • tiny optimization over is_of_type(CharacterType::get_class_type()).

*/

is_character_joint()

C++ Interface: is_character_joint(PartGroup self)

/**
  • Returns true if this part is a CharacterJoint, false otherwise. This is a

  • tiny optimization over is_of_type(CharacterType::get_class_type()).

*/

makeCopy()

C++ Interface: make_copy(PartGroup self)

/**
  • Allocates and returns a new copy of the node. Children are not copied, but

  • see copy_subgraph().

*/

make_copy()

C++ Interface: make_copy(PartGroup self)

/**
  • Allocates and returns a new copy of the node. Children are not copied, but

  • see copy_subgraph().

*/

sortDescendants()

C++ Interface: sort_descendants(const PartGroup self)

/**
  • 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.

*/

sort_descendants()

C++ Interface: sort_descendants(const PartGroup self)

/**
  • 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.

*/

upcastToNamable()

C++ Interface: upcast_to_Namable(const PartGroup self)

upcast from PartGroup to Namable

upcastToTypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const PartGroup self)

upcast from PartGroup to TypedWritableReferenceCount

upcast_to_Namable()

C++ Interface: upcast_to_Namable(const PartGroup self)

upcast from PartGroup to Namable

upcast_to_TypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const PartGroup self)

upcast from PartGroup to TypedWritableReferenceCount

write()

C++ Interface: write(PartGroup self, ostream out, int indent_level)

/**
  • Writes a brief description of the group and all of its descendants.

*/

writeWithValue()

C++ Interface: write_with_value(PartGroup self, ostream out, int indent_level)

/**
  • Writes a brief description of the group, showing its current value, and

  • that of all of its descendants.

*/

write_with_value()

C++ Interface: write_with_value(PartGroup self, ostream out, int indent_level)

/**
  • Writes a brief description of the group, showing its current value, and

  • that of all of its descendants.

*/