Panda3D
|
This is a node that contains a pointer to an AnimBundle. More...
#include "animBundleNode.h"
Public Member Functions | |
AnimBundleNode (const string &name, AnimBundle *bundle) | |
The AnimBundle and its node should be constructed together. | |
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(). | |
virtual TypeHandle | force_init_type () |
AnimBundle * | get_bundle () const |
virtual TypeHandle | get_type () const |
virtual PandaNode * | make_copy () const |
Returns a newly-allocated PandaNode that is a shallow copy of this one. | |
virtual bool | safe_to_flatten () const |
Returns true if it is generally safe to flatten out this particular kind of Node by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful). | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
Static Public Member Functions | |
static AnimBundle * | find_anim_bundle (PandaNode *root) |
Recursively walks the scene graph beginning at the indicated node (which need not be an AnimBundleNode), and returns the first AnimBundle found. | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type AnimBundleNode. | |
Protected Member Functions | |
AnimBundleNode () | |
For internal use only. | |
AnimBundleNode (const AnimBundleNode ©) | |
Use make_copy() or copy_subgraph() to copy one of these. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PandaNode. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of this type is encountered in the Bam file. |
This is a node that contains a pointer to an AnimBundle.
Like PartBundleNode, it exists solely to make it easy to store AnimBundles in the scene graph.
Definition at line 31 of file animBundleNode.h.
AnimBundleNode::AnimBundleNode | ( | const string & | name, |
AnimBundle * | bundle | ||
) | [inline] |
The AnimBundle and its node should be constructed together.
Generally, the derived classes of AnimBundleNode will automatically create a AnimBundle of the appropriate type, and pass it up to this constructor.
Definition at line 26 of file animBundleNode.I.
AnimBundleNode::AnimBundleNode | ( | ) | [inline, protected] |
For internal use only.
Definition at line 38 of file animBundleNode.I.
Referenced by make_copy(), and make_from_bam().
AnimBundleNode::AnimBundleNode | ( | const AnimBundleNode & | copy | ) | [inline, protected] |
Use make_copy() or copy_subgraph() to copy one of these.
Definition at line 48 of file animBundleNode.I.
int AnimBundleNode::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager | ||
) | [virtual] |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 111 of file animBundleNode.cxx.
void AnimBundleNode::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PandaNode.
Reimplemented from PandaNode.
Definition at line 145 of file animBundleNode.cxx.
References BamReader::read_pointer().
Referenced by make_from_bam().
AnimBundle * AnimBundleNode::find_anim_bundle | ( | PandaNode * | root | ) | [static] |
Recursively walks the scene graph beginning at the indicated node (which need not be an AnimBundleNode), and returns the first AnimBundle found.
Returns NULL if no AnimBundle can be found.
Definition at line 57 of file animBundleNode.cxx.
References PandaNode::Children::get_child(), PandaNode::get_children(), PandaNode::Children::get_num_children(), and TypedObject::is_of_type().
Referenced by BindAnimRequest::do_task().
PandaNode * AnimBundleNode::make_copy | ( | ) | const [virtual] |
Returns a newly-allocated PandaNode that is a shallow copy of this one.
It will be a different pointer, but its internal data may or may not be shared with that of the original PandaNode. No children will be copied.
Reimplemented from PandaNode.
Definition at line 30 of file animBundleNode.cxx.
References AnimBundleNode().
TypedWritable * AnimBundleNode::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of this type is encountered in the Bam file.
It should create the object and extract its information from the file.
Reimplemented from PandaNode.
Definition at line 126 of file animBundleNode.cxx.
References AnimBundleNode(), and fillin().
Referenced by register_with_read_factory().
void AnimBundleNode::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type AnimBundleNode.
Reimplemented from PandaNode.
Definition at line 87 of file animBundleNode.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
bool AnimBundleNode::safe_to_flatten | ( | ) | const [virtual] |
Returns true if it is generally safe to flatten out this particular kind of Node by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
Reimplemented from PandaNode.
Definition at line 44 of file animBundleNode.cxx.
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from PandaNode.
Definition at line 98 of file animBundleNode.cxx.
References BamWriter::write_pointer().