Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# PartGroup Class Reference

This is the base class for PartRoot and MovingPart. More...

Inheritance diagram for PartGroup:

List of all members.

## Public Member Functions
| PartGroup (PartGroup parent, string name)
| Creates the PartGroup, and adds it to the indicated parent.
bool | applyControl (PandaNode node)
| Specifies a node to influence this particular joint so that it will always hold the node's transform.
bool | applyFreeze (TransformState const transform)
| Freezes this particular joint so that it will always hold the specified transform.
bool | applyFreezeMatrix (VBase3 const pos, VBase3 const hpr, VBase3 const scale)
| Freezes this particular joint so that it will always hold the specified transform.
bool | applyFreezeScalar (float value)
| Freezes this particular joint so that it will always hold the specified transform.
bool | clearForcedChannel ()
| Undoes the effect of a previous call to apply_freeze() or apply_control().
PartGroup | copySubgraph ()
| Allocates and returns a new copy of this node and of all of its children.
PartGroup | findChild (string name)
| Returns the first descendant found with the indicated name, or NULL if no such descendant exists.
PartGroup | getChild (int n)
| Returns the nth child of the group.
PartGroup | getChildNamed (string name)
| Returns the first child found with the indicated name, or NULL if no such child exists.
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.
int | getNumChildren ()
| Returns the number of child nodes of the group.
bool | isCharacterJoint ()
| Returns true if this part is a CharacterJoint, false otherwise.
PartGroup | makeCopy ()
| Allocates and returns a new copy of the node.
| sortDescendants ()
| Sorts the children nodes at each level of the hierarchy into alphabetical order.
| write (ostream out, int indent_level)
| Writes a brief description of the group and all of its descendants.
| writeWithValue (ostream out, int indent_level)
| Writes a brief description of the group, showing its current value, and that of all of its descendants.
## Static Public Member Functions
static TypeHandle | getClassType ()

## Detailed Description

This is the base class for PartRoot and MovingPart.

It defines a hierarchy of MovingParts.

## Constructor & Destructor Documentation

PartGroup | ( | PartGroup | parent,
|  | string | name
| ) |  |

Creates the PartGroup, and adds it to the indicated parent.

The only way to delete it subsequently is to delete the entire hierarchy.

## Member Function Documentation

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.

This is normally only called internally by PartBundle.control_joint(), but you may also call it directly.

bool applyFreeze | ( | TransformState const | 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.

bool applyFreezeMatrix | ( | VBase3 const | pos,
|  | VBase3 const | hpr,
|  | VBase3 const | 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.

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.

This is normally only called internally by PartBundle.freeze_joint(), but you may also call it directly.

bool clearForcedChannel | ( |  | ) |

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.

PartGroup copySubgraph | ( |  | ) |

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

PartGroup findChild | ( | string | 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().

PartGroup getChild | ( | int | n | ) |

Returns the nth child of the group.

PartGroup getChildNamed | ( | string | 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().

list getChildren | ( |  | ) |

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from Namable.

Reimplemented in CharacterJoint, MovingPartMatrix, CharacterSlider, MovingPartScalar, CharacterJointBundle, PartBundle, MovingPartBase, MovingPartACMatrixSwitchType, and MovingPartACScalarSwitchType.

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.

int getNumChildren | ( |  | ) |

Returns the number of child nodes of the group.

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()).

PartGroup makeCopy | ( |  | ) |

Allocates and returns a new copy of the node.

Children are not copied, but see copy_subgraph().

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.

write | ( | ostream | out,
|  | int | indent_level
| ) |  |

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

writeWithValue | ( | ostream | out,
|  | int | indent_level
| ) |  |

Writes a brief description of the group, showing its current value, and that of all of its descendants.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties