Panda3D
|
This effect will be added automatically to a node by CharacterJoint::add_net_transform() and CharacterJoint::add_local_transform(). More...
#include "characterJointEffect.h"
Public Member Functions | |
virtual void | adjust_transform (CPT(TransformState)&net_transform, CPT(TransformState)&node_transform, PandaNode *node) const |
Performs some operation on the node's apparent net and/or local transforms. | |
virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
virtual void | cull_callback (CullTraverser *trav, CullTraverserData &data, CPT(TransformState)&node_transform, CPT(RenderState)&node_state) const |
If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time. | |
virtual TypeHandle | force_init_type () |
Character * | get_character () const |
Returns the Character that will get update() called on it when this node's relative transform is queried, or NULL if there is no such character. | |
virtual TypeHandle | get_type () const |
virtual bool | has_adjust_transform () const |
Should be overridden by derived classes to return true if adjust_transform() has been defined, and therefore the RenderEffect has some effect on the node's apparent local and net transforms. | |
virtual bool | has_cull_callback () const |
Should be overridden by derived classes to return true if cull_callback() has been defined. | |
virtual void | output (ostream &out) const |
virtual bool | safe_to_combine () const |
Returns true if this kind of effect can safely be combined with sibling nodes that share the exact same effect, or false if this is not a good idea. | |
virtual bool | safe_to_transform () const |
Returns true if it is generally safe to transform this particular kind of RenderEffect by calling the xform() method, false otherwise. | |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
Static Public Member Functions | |
static | CPT (RenderEffect) make(Character *character) |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type CharacterJointEffect. | |
Protected Member Functions | |
virtual int | compare_to_impl (const RenderEffect *other) const |
Intended to be overridden by derived CharacterJointEffect types to return a unique number indicating whether this CharacterJointEffect is equivalent to the other one. | |
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 CharacterJointEffect. | |
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 type CharacterJointEffect is encountered in the Bam file. |
This effect will be added automatically to a node by CharacterJoint::add_net_transform() and CharacterJoint::add_local_transform().
The effect binds the node back to the character, so that querying the relative transform of the affected node will automatically force the indicated character to be updated first.
Definition at line 37 of file characterJointEffect.h.
void CharacterJointEffect::adjust_transform | ( | CPT(TransformState)& | net_transform, |
CPT(TransformState)& | node_transform, | ||
PandaNode * | node | ||
) | const [virtual] |
Performs some operation on the node's apparent net and/or local transforms.
This will only be called if has_adjust_transform() is redefined to return true.
Both parameters are in/out. The original transforms will be passed in, and they may (or may not) be modified in-place by the RenderEffect.
Reimplemented from RenderEffect.
Definition at line 175 of file characterJointEffect.cxx.
References PandaNode::get_transform().
Referenced by cull_callback().
int CharacterJointEffect::compare_to_impl | ( | const RenderEffect * | other | ) | const [protected, virtual] |
Intended to be overridden by derived CharacterJointEffect types to return a unique number indicating whether this CharacterJointEffect is equivalent to the other one.
This should return 0 if the two CharacterJointEffect objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two CharacterJointEffect objects whose get_type() functions return the same.
Reimplemented from RenderEffect.
Definition at line 201 of file characterJointEffect.cxx.
int CharacterJointEffect::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 254 of file characterJointEffect.cxx.
void CharacterJointEffect::cull_callback | ( | CullTraverser * | trav, |
CullTraverserData & | data, | ||
CPT(TransformState)& | node_transform, | ||
CPT(RenderState)& | node_state | ||
) | const [virtual] |
If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
This may include additional manipulation of render state or additional visible/invisible decisions, or any other arbitrary operation.
At the time this function is called, the current node's transform and state have not yet been applied to the net_transform and net_state. This callback may modify the node_transform and node_state to apply an effective change to the render state at this level.
Reimplemented from RenderEffect.
Definition at line 143 of file characterJointEffect.cxx.
References adjust_transform(), and CullTraverserData::node().
void CharacterJointEffect::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 CharacterJointEffect.
Reimplemented from RenderEffect.
Definition at line 290 of file characterJointEffect.cxx.
References BamReader::read_pointer().
Referenced by make_from_bam().
Character * CharacterJointEffect::get_character | ( | ) | const [inline] |
Returns the Character that will get update() called on it when this node's relative transform is queried, or NULL if there is no such character.
Definition at line 34 of file characterJointEffect.I.
bool CharacterJointEffect::has_adjust_transform | ( | ) | const [virtual] |
Should be overridden by derived classes to return true if adjust_transform() has been defined, and therefore the RenderEffect has some effect on the node's apparent local and net transforms.
Reimplemented from RenderEffect.
Definition at line 159 of file characterJointEffect.cxx.
bool CharacterJointEffect::has_cull_callback | ( | ) | const [virtual] |
Should be overridden by derived classes to return true if cull_callback() has been defined.
Otherwise, returns false to indicate cull_callback() does not need to be called for this effect during the cull traversal.
Reimplemented from RenderEffect.
Definition at line 121 of file characterJointEffect.cxx.
TypedWritable * CharacterJointEffect::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type CharacterJointEffect is encountered in the Bam file.
It should create the CharacterJointEffect and extract its information from the file.
Definition at line 271 of file characterJointEffect.cxx.
References fillin().
Referenced by register_with_read_factory().
void CharacterJointEffect::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type CharacterJointEffect.
Definition at line 225 of file characterJointEffect.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
bool CharacterJointEffect::safe_to_combine | ( | ) | const [virtual] |
Returns true if this kind of effect can safely be combined with sibling nodes that share the exact same effect, or false if this is not a good idea.
Reimplemented from RenderEffect.
Definition at line 92 of file characterJointEffect.cxx.
bool CharacterJointEffect::safe_to_transform | ( | ) | const [virtual] |
Returns true if it is generally safe to transform this particular kind of RenderEffect by calling the xform() method, false otherwise.
Reimplemented from RenderEffect.
Definition at line 77 of file characterJointEffect.cxx.
void CharacterJointEffect::write_datagram | ( | BamWriter * | manager, |
Datagram & | dg | ||
) | [virtual] |
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from RenderEffect.
Definition at line 236 of file characterJointEffect.cxx.
References BamWriter::write_pointer().