Panda3D
Public Member Functions | Static Public Member Functions
PandaNodePipelineReader Class Reference

Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline. More...

#include "pandaNode.h"

List of all members.

Public Member Functions

 PandaNodePipelineReader (const PandaNode *object, Thread *current_thread)
 PandaNodePipelineReader (const PandaNodePipelineReader &copy)
void check_bounds () const
 Ensures that the bounding volume is properly computed on this node.
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.
 CPT (RenderAttrib) get_off_clip_planes() const
 CPT (BoundingVolume) get_bounds() const
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.
PandaNodeget_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.
Threadget_current_thread () const
const RenderEffectsget_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.
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.
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 PandaNodeget_object () const
PandaNodeget_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 TransformStateget_prev_transform () const
 Returns the transform that has been set as this node's "previous" position.
PandaNodeget_stashed (int n) const
 Returns the nth stashed child of this node.
PandaNode::Stashed get_stashed () const
 Returns an object that can be used to walk through the list of children of the 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 RenderStateget_state () const
 Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node.
string get_tag (const string &key) const
 Retrieves the user-defined value that was previously set on this node for the particular key, if any.
const TransformStateget_transform () const
 Returns the transform that has been set on this particular node.
bool has_tag (const 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 &copy)
void release ()
 Releases the lock on this object.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Detailed Description

Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline.

Definition at line 790 of file pandaNode.h.


Member Function Documentation

Ensures that the bounding volume is properly computed on this node.

Definition at line 4936 of file pandaNode.cxx.

Referenced by CullTraverserData::CullTraverserData().

bool PandaNodePipelineReader::compare_draw_mask ( DrawMask  running_draw_mask,
DrawMask  camera_mask 
) const [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 1472 of file pandaNode.I.

Referenced by CullTraverserData::is_in_view().

void PandaNodePipelineReader::compose_draw_mask ( DrawMask running_draw_mask) const [inline]

Computes the result of applying this node's draw masks to a running draw mask, as during a traversal.

Definition at line 1456 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state().

int PandaNodePipelineReader::find_child ( PandaNode node) const [inline]

Returns the index of the indicated child node, if it is a child, or -1 if it is not.

Definition at line 1594 of file pandaNode.I.

int PandaNodePipelineReader::find_parent ( PandaNode node) const [inline]

Returns the index of the indicated parent node, if it is a parent, or -1 if it is not.

Definition at line 1541 of file pandaNode.I.

int PandaNodePipelineReader::find_stashed ( PandaNode node) const [inline]

Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not.

Definition at line 1647 of file pandaNode.I.

References PandaNode::get_stashed().

PandaNode * PandaNodePipelineReader::get_child ( int  n) const [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 1567 of file pandaNode.I.

int PandaNodePipelineReader::get_child_sort ( int  n) const [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 1581 of file pandaNode.I.

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 1838 of file pandaNode.I.

Referenced by CullTraverser::traverse_below().

Returns the complete RenderEffects that will be applied to this node.

Definition at line 1672 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state(), PipeOcclusionCullTraverser::is_in_view(), CullTraverser::traverse(), and CullTraverser::traverse_below().

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 1816 of file pandaNode.I.

Referenced by CullTraverser::traverse().

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 1786 of file pandaNode.I.

Referenced by PipeOcclusionCullTraverser::is_in_view().

Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below.

Definition at line 1740 of file pandaNode.I.

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 1554 of file pandaNode.I.

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 1515 of file pandaNode.I.

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 1606 of file pandaNode.I.

PandaNode * PandaNodePipelineReader::get_parent ( int  n) const [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 1528 of file pandaNode.I.

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 1872 of file pandaNode.I.

Returns the transform that has been set as this node's "previous" position.

See set_prev_transform().

Definition at line 1697 of file pandaNode.I.

PandaNode * PandaNodePipelineReader::get_stashed ( int  n) const [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 1620 of file pandaNode.I.

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 1860 of file pandaNode.I.

int PandaNodePipelineReader::get_stashed_sort ( int  n) const [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 1634 of file pandaNode.I.

const RenderState * PandaNodePipelineReader::get_state ( ) const [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 1661 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state(), and CullTraverser::traverse().

string PandaNodePipelineReader::get_tag ( const string &  key) const [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 1710 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state().

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 1685 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state(), and CullTraverserData::is_in_view().

bool PandaNodePipelineReader::has_tag ( const string &  key) const [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 1727 of file pandaNode.I.

Referenced by CullTraverserData::apply_transform_and_state().

bool PandaNodePipelineReader::is_final ( ) const [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 1800 of file pandaNode.I.

Referenced by PipeOcclusionCullTraverser::is_in_view().

Releases the lock on this object.

No future calls will be valid on this object.

Definition at line 1440 of file pandaNode.I.

Referenced by CullTraverser::traverse_below().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations