Panda3D
|
Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline. More...
#include "pandaNode.h"
Public Member Functions | |
PandaNodePipelineReader (const PandaNode *object, Thread *current_thread) | |
PandaNodePipelineReader (const PandaNodePipelineReader ©) | |
void | check_cached (bool update_bounds) const |
Ensures that the draw masks etc. | |
bool | compare_draw_mask (DrawMask running_draw_mask, DrawMask camera_mask) const |
Compares the running draw mask computed during a traversal with this node's net draw masks. | |
void | compose_draw_mask (DrawMask &running_draw_mask) const |
Computes the result of applying this node's draw masks to a running draw mask, as during a traversal. | |
int | find_child (PandaNode *node) const |
Returns the index of the indicated child node, if it is a child, or -1 if it is not. | |
int | find_parent (PandaNode *node) const |
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not. | |
int | find_stashed (PandaNode *node) const |
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not. | |
const BoundingVolume * | get_bounds () const |
Returns the external bounding volume of this node: a bounding volume that contains the user bounding volume, the internal bounding volume, and all of the children's bounding volumes. | |
PandaNode * | get_child (int n) const |
Returns the nth child node of this node. | |
int | get_child_sort (int n) const |
Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()). | |
PandaNode::Children | get_children () const |
Returns an object that can be used to walk through the list of children of the node. | |
Thread * | get_current_thread () const |
const RenderEffects * | get_effects () const |
Returns the complete RenderEffects that will be applied to this node. | |
int | get_fancy_bits () const |
Returns the union of all of the enum FancyBits values corresponding to the various "fancy" attributes that are set on the node. | |
CollideMask | get_into_collide_mask () const |
Returns the "into" collide mask for this node. | |
int | get_nested_vertices () const |
Returns the total number of vertices that will be rendered by this node and all of its descendents. | |
CollideMask | get_net_collide_mask () const |
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below. | |
const PandaNode * | get_node () const |
int | get_num_children () const |
Returns the number of child nodes this node has. | |
int | get_num_parents () const |
Returns the number of parent nodes this node has. | |
int | get_num_stashed () const |
Returns the number of stashed nodes this node has. | |
const RenderAttrib * | get_off_clip_planes () const |
Returns a ClipPlaneAttrib which represents the union of all of the clip planes that have been turned *off* at this level and below. | |
PandaNode * | get_parent (int n) const |
Returns the nth parent node of this node. | |
PandaNode::Parents | get_parents () const |
Returns an object that can be used to walk through the list of parents of the node, similar to get_children() and get_stashed(). | |
const TransformState * | get_prev_transform () const |
Returns the transform that has been set as this node's "previous" position. | |
PandaNode::Stashed | get_stashed () const |
Returns an object that can be used to walk through the list of children of the node. | |
PandaNode * | get_stashed (int n) const |
Returns the nth stashed child of this node. | |
int | get_stashed_sort (int n) const |
Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()). | |
const RenderState * | get_state () const |
Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node. | |
std::string | get_tag (const std::string &key) const |
Retrieves the user-defined value that was previously set on this node for the particular key, if any. | |
const TransformState * | get_transform () const |
Returns the transform that has been set on this particular node. | |
bool | has_tag (const std::string &key) const |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set. | |
bool | is_final () const |
Returns the current state of the "final" flag. | |
void | operator= (const PandaNodePipelineReader ©) |
void | release () |
Releases the lock on this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline.
Definition at line 840 of file pandaNode.h.
|
inline |
Definition at line 1131 of file pandaNode.I.
|
inline |
Definition at line 1152 of file pandaNode.I.
|
inline |
Definition at line 1203 of file pandaNode.I.
void PandaNodePipelineReader::check_cached | ( | bool | update_bounds | ) | const |
Ensures that the draw masks etc.
are properly computed on this node. If update_bounds is true, also checks the bounding volume.
Definition at line 4118 of file pandaNode.cxx.
References node_unref_delete().
Referenced by CullTraverserData::CullTraverserData(), and CullTraverserData::apply_transform_and_state().
|
inline |
Compares the running draw mask computed during a traversal with this node's net draw masks.
Returns true if the node should be traversed into, or false if there is nothing at this level or below that will be visible to the indicated camera_mask.
Definition at line 1268 of file pandaNode.I.
|
inline |
Computes the result of applying this node's draw masks to a running draw mask, as during a traversal.
Definition at line 1255 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inline |
Returns the index of the indicated child node, if it is a child, or -1 if it is not.
Definition at line 1369 of file pandaNode.I.
|
inline |
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not.
Definition at line 1327 of file pandaNode.I.
|
inline |
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not.
Definition at line 1411 of file pandaNode.I.
References PandaNode::get_stashed.
|
inline |
Returns the external bounding volume of this node: a bounding volume that contains the user bounding volume, the internal bounding volume, and all of the children's bounding volumes.
Definition at line 1512 of file pandaNode.I.
|
inline |
Returns the nth child node of this node.
See get_num_children(). Also see get_children(), if your intention is to iterate through the complete list of children; get_children() is preferable in this case.
Definition at line 1347 of file pandaNode.I.
|
inline |
Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()).
See get_num_children().
Definition at line 1358 of file pandaNode.I.
|
inline |
Returns an object that can be used to walk through the list of children of the node.
When you intend to visit multiple children, using this is slightly faster than calling get_child() directly on the PandaNode, since this object avoids reopening the PipelineCycler each time.
This object also protects you from self-modifying loops (e.g. adding or removing children during traversal), since a virtual copy of the children is made ahead of time. The virtual copy is fast–it is a form of copy-on- write, so the list is not actually copied unless it is modified during the traversal.
Definition at line 1568 of file pandaNode.I.
Referenced by CullTraverser::traverse_below(), and NodeCullCallbackData::upcall().
|
inlinestatic |
Definition at line 902 of file pandaNode.h.
|
inline |
Definition at line 1232 of file pandaNode.I.
|
inline |
Returns the complete RenderEffects that will be applied to this node.
Definition at line 1430 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state(), and CullTraverser::traverse_below().
|
inline |
Returns the union of all of the enum FancyBits values corresponding to the various "fancy" attributes that are set on the node.
If this returns 0, the node has nothing interesting about it. This is intended to speed traversal by quickly skipping past nodes that don't particularly affect the render state.
Definition at line 1551 of file pandaNode.I.
|
inline |
Returns the "into" collide mask for this node.
Definition at line 1482 of file pandaNode.I.
|
inline |
Returns the total number of vertices that will be rendered by this node and all of its descendents.
This is not necessarily an accurate count of vertices that will actually be rendered, since this will include all vertices of all LOD's, and it will also include hidden nodes. It may also omit or only approximate certain kinds of dynamic geometry. However, it will not include stashed nodes.
Definition at line 1527 of file pandaNode.I.
|
inline |
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below.
Definition at line 1491 of file pandaNode.I.
|
inline |
Definition at line 1224 of file pandaNode.I.
|
inline |
Returns the number of child nodes this node has.
The order of the child nodes *is* meaningful and is based on the sort number that was passed to add_child(), and also on the order in which the nodes were added.
Definition at line 1337 of file pandaNode.I.
|
inline |
Returns the number of parent nodes this node has.
If this number is greater than 1, the node has been multiply instanced. The order of the parent nodes is not meaningful and is not related to the order in which the node was instanced to them.
Definition at line 1306 of file pandaNode.I.
|
inline |
Returns the number of stashed nodes this node has.
These are former children of the node that have been moved to the special stashed list via stash_child().
Definition at line 1379 of file pandaNode.I.
|
inline |
Returns a ClipPlaneAttrib which represents the union of all of the clip planes that have been turned *off* at this level and below.
Definition at line 1501 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inline |
Returns the nth parent node of this node.
See get_num_parents(). Also see get_parents(), if your intention is to iterate through the complete list of parents; get_parents() is preferable in this case.
Definition at line 1316 of file pandaNode.I.
|
inline |
Returns an object that can be used to walk through the list of parents of the node, similar to get_children() and get_stashed().
Definition at line 1594 of file pandaNode.I.
|
inline |
Returns the transform that has been set as this node's "previous" position.
See set_prev_transform().
Definition at line 1449 of file pandaNode.I.
|
inline |
Returns an object that can be used to walk through the list of children of the node.
When you intend to visit multiple children, using this is slightly faster than calling get_stashed() directly on the PandaNode, since this object avoids reopening the PipelineCycler each time.
This object also protects you from self-modifying loops (e.g. adding or removing children during traversal), since a virtual copy of the children is made ahead of time. The virtual copy is fast–it is a form of copy-on- write, so the list is not actually copied unless it is modified during the traversal.
Definition at line 1585 of file pandaNode.I.
|
inline |
Returns the nth stashed child of this node.
See get_num_stashed(). Also see get_stashed(), if your intention is to iterate through the complete list of stashed children; get_stashed() is preferable in this case.
Definition at line 1389 of file pandaNode.I.
|
inline |
Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()).
See get_num_stashed().
Definition at line 1400 of file pandaNode.I.
|
inline |
Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node.
This returns only the RenderState set on this particular node, and has nothing to do with state that might be inherited from above.
Definition at line 1422 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inline |
Retrieves the user-defined value that was previously set on this node for the particular key, if any.
If no value has been previously set, returns the empty string.
Definition at line 1459 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inline |
Returns the transform that has been set on this particular node.
This is not the net transform from the root, but simply the transform on this particular node.
Definition at line 1440 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inline |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.
Definition at line 1474 of file pandaNode.I.
Referenced by CullTraverserData::apply_transform_and_state().
|
inlinestatic |
Definition at line 905 of file pandaNode.h.
|
inline |
Returns the current state of the "final" flag.
Initially, this flag is off (false), but it may be changed by an explicit call to set_final(). See set_final().
Definition at line 1538 of file pandaNode.I.
|
inline |
Definition at line 1172 of file pandaNode.I.
|
inline |
Releases the lock on this object.
No future calls will be valid on this object.
Definition at line 1241 of file pandaNode.I.
Referenced by CullTraverser::traverse_below(), and NodeCullCallbackData::upcall().