Panda3D
|
Applied to a GeomNode to cause a visible bounding volume to be drawn for this node. More...
#include "showBoundsEffect.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
bool | get_tight () const |
Returns true if the "tight" flag was set, meaning the effect should compute and draw the tight bounding-box of the node's vertices every frame. | |
virtual TypeHandle | get_type () const |
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(bool tight |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type ShowBoundsEffect. | |
Protected Member Functions | |
virtual int | compare_to_impl (const RenderEffect *other) const |
Intended to be overridden by derived ShowBoundsEffect types to return a unique number indicating whether this ShowBoundsEffect 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 ShowBoundsEffect. | |
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. | |
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 ShowBoundsEffect is encountered in the Bam file. |
Applied to a GeomNode to cause a visible bounding volume to be drawn for this node.
This is generally used only during development to help identify bounding volume issues.
Definition at line 31 of file showBoundsEffect.h.
int ShowBoundsEffect::compare_to_impl | ( | const RenderEffect * | other | ) | const [protected, virtual] |
Intended to be overridden by derived ShowBoundsEffect types to return a unique number indicating whether this ShowBoundsEffect is equivalent to the other one.
This should return 0 if the two ShowBoundsEffect 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 ShowBoundsEffect objects whose get_type() functions return the same.
Reimplemented from RenderEffect.
Definition at line 63 of file showBoundsEffect.cxx.
void ShowBoundsEffect::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 ShowBoundsEffect.
Reimplemented from RenderEffect.
Definition at line 121 of file showBoundsEffect.cxx.
References DatagramIterator::get_bool().
Referenced by make_from_bam().
bool ShowBoundsEffect::get_tight | ( | ) | const [inline] |
Returns true if the "tight" flag was set, meaning the effect should compute and draw the tight bounding-box of the node's vertices every frame.
Definition at line 36 of file showBoundsEffect.I.
TypedWritable * ShowBoundsEffect::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type ShowBoundsEffect is encountered in the Bam file.
It should create the ShowBoundsEffect and extract its information from the file.
Definition at line 102 of file showBoundsEffect.cxx.
References fillin().
Referenced by register_with_read_factory().
void ShowBoundsEffect::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type ShowBoundsEffect.
Definition at line 77 of file showBoundsEffect.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
bool ShowBoundsEffect::safe_to_combine | ( | ) | const [protected, 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 43 of file showBoundsEffect.cxx.
void ShowBoundsEffect::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 88 of file showBoundsEffect.cxx.
References Datagram::add_bool().