43class EXPCL_PANDA_CHAN PartGroup :
public TypedWritableReferenceCount,
public Namable {
48 enum HierarchyMatchFlags {
49 HMF_ok_part_extra = 0x01,
50 HMF_ok_anim_extra = 0x02,
51 HMF_ok_wrong_root_name = 0x04,
58 INLINE PartGroup(
const std::string &name =
"");
59 INLINE PartGroup(
const PartGroup ©);
63 explicit PartGroup(PartGroup *parent,
const std::string &name);
75 PartGroup *
find_child(
const std::string &name)
const;
81 virtual bool apply_freeze_matrix(
const LVecBase3 &pos,
const LVecBase3 &hpr,
const LVecBase3 &scale);
87 virtual void write(std::ostream &out,
int indent_level)
const;
94 const PartGroup *parent,
95 int hierarchy_match_flags = 0)
const;
98 PartGroup *parent,
bool parent_changed,
99 bool anim_changed,
Thread *current_thread);
100 virtual void do_xform(
const LMatrix4 &mat,
const LMatrix4 &inv_mat);
104 void write_descendants(std::ostream &out,
int indent_level)
const;
105 void write_descendants_with_value(std::ostream &out,
int indent_level)
const;
107 virtual void pick_channel_index(
plist<int> &holes,
int &next)
const;
108 virtual void bind_hierarchy(
AnimGroup *anim,
int channel_index,
109 int &joint_index,
bool is_included,
112 virtual void find_bound_joints(
int &joint_index,
bool is_included,
116 typedef pvector< PT(PartGroup) > Children;
132 return get_class_type();
134 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
135 static TypeHandle get_class_type() {
140 static void init_type() {
141 TypedWritableReferenceCount::init_type();
143 TypedWritableReferenceCount::get_class_type());
147 static TypeHandle _type_handle;
149 friend class Character;
150 friend class CharacterJointBundle;
151 friend class PartBundle;
Parent class for all animation channels.
Controls the timing of a character animation.
This is the base class for AnimChannel and AnimBundle.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A dynamic array with an unlimited number of bits.
A single page of data maintained by a PipelineCycler.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A basic node of the scene graph or data graph.
This is the root of a MovingPart hierarchy.
get_num_children
Returns the number of child nodes of the group.
void sort_descendants()
Sorts the children nodes at each level of the hierarchy into alphabetical order.
PartGroup * get_child_named(const std::string &name) const
Returns the first child found with the indicated name, or NULL if no such child exists.
PartGroup * copy_subgraph() const
Allocates and returns a new copy of this node and of all of its children.
virtual void write(std::ostream &out, int indent_level) const
Writes a brief description of the group and all of its descendants.
virtual PartGroup * make_copy() const
Allocates and returns a new copy of the node.
PartGroup * find_child(const std::string &name) const
Returns the first descendant found with the indicated name, or NULL if no such descendant exists.
virtual bool apply_freeze_scalar(PN_stdfloat value)
Freezes this particular joint so that it will always hold the specified transform.
bool apply_freeze(const TransformState *transform)
Freezes this particular joint so that it will always hold the specified transform.
virtual bool apply_control(PandaNode *node)
Specifies a node to influence this particular joint so that it will always hold the node's transform.
virtual bool clear_forced_channel()
Undoes the effect of a previous call to apply_freeze() or apply_control().
get_child
Returns the nth child of the group.
static void register_with_read_factory()
Factory method to generate a PartGroup object.
bool check_hierarchy(const AnimGroup *anim, const PartGroup *parent, int hierarchy_match_flags=0) const
Walks the part hierarchy in tandem with the indicated anim hierarchy, and returns true if the hierarc...
static TypedWritable * make_PartGroup(const FactoryParams ¶ms)
Factory method to generate a PartGroup object.
virtual AnimChannelBase * get_forced_channel() const
Returns the AnimChannelBase that has been forced to this joint by a previous call to apply_freeze() o...
virtual bool is_character_joint() const
Returns true if this part is a CharacterJoint, false otherwise.
virtual void write_with_value(std::ostream &out, int indent_level) const
Writes a brief description of the group, showing its current value, and that of all of its descendant...
virtual void determine_effective_channels(const CycleData *root_cdata)
Should be called whenever the ChannelBlend values have changed, this recursively updates the _effecti...
virtual void do_xform(const LMatrix4 &mat, const LMatrix4 &inv_mat)
Called by PartBundle::xform(), this indicates the indicated transform is being applied to the root jo...
virtual TypeHandle get_value_type() const
Returns the TypeHandle associated with the ValueType we are concerned with.
virtual bool apply_freeze_matrix(const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale)
Freezes this particular joint so that it will always hold the specified transform.
virtual bool do_update(PartBundle *root, const CycleData *root_cdata, PartGroup *parent, bool parent_changed, bool anim_changed, Thread *current_thread)
Recursively update this particular part and all of its descendents for the current frame.
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.