Panda3D
Public Member Functions | Static Public Member Functions | List of all members
PandaNodePipelineReader Class Reference

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 &copy)
 
void check_cached (bool update_bounds) const
 Ensures that the draw masks etc. More...
 
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. More...
 
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. More...
 
 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. More...
 
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. More...
 
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. More...
 
PandaNodeget_child (int n) const
 Returns the nth child node of this node. More...
 
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()). More...
 
PandaNode::Children get_children () const
 
Threadget_current_thread () const
 
const RenderEffectsget_effects () const
 Returns the complete RenderEffects that will be applied to this node. More...
 
int get_fancy_bits () const
 
int get_nested_vertices () const
 
CollideMask get_net_collide_mask () const
 Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below. More...
 
const PandaNodeget_node () const
 
int get_num_children () const
 Returns the number of child nodes this node has. More...
 
int get_num_parents () const
 Returns the number of parent nodes this node has. More...
 
int get_num_stashed () const
 Returns the number of stashed nodes this node has. More...
 
PandaNodeget_parent (int n) const
 Returns the nth parent node of this node. More...
 
PandaNode::Parents get_parents () const
 
const TransformState * get_prev_transform () const
 Returns the transform that has been set as this node's "previous" position. More...
 
PandaNodeget_stashed (int n) const
 Returns the nth stashed child of this node. More...
 
PandaNode::Stashed get_stashed () const
 
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()). More...
 
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. More...
 
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. More...
 
const TransformState * get_transform () const
 Returns the transform that has been set on this particular node. More...
 
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. More...
 
bool is_final () const
 
void operator= (const PandaNodePipelineReader &copy)
 
void release ()
 Releases the lock on this object. More...
 

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 815 of file pandaNode.h.

Member Function Documentation

◆ check_cached()

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 4812 of file pandaNode.cxx.

Referenced by CullTraverserData::CullTraverserData(), and PandaNode::write_recorder().

◆ compare_draw_mask()

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

References get_num_parents().

Referenced by compose_draw_mask(), and CullTraverserData::node_reader().

◆ compose_draw_mask()

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

References compare_draw_mask().

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

◆ find_child()

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

References get_num_stashed().

Referenced by get_child_sort().

◆ find_parent()

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

References get_num_children().

Referenced by get_parent().

◆ find_stashed()

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

References PandaNode::get_stashed(), and get_state().

Referenced by get_stashed_sort().

◆ get_child()

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

References get_child_sort().

Referenced by get_num_children().

◆ get_child_sort()

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

References find_child().

Referenced by get_child().

◆ get_effects()

const RenderEffects * PandaNodePipelineReader::get_effects ( ) const
inline

◆ get_net_collide_mask()

CollideMask PandaNodePipelineReader::get_net_collide_mask ( ) const
inline

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

Definition at line 1810 of file pandaNode.I.

Referenced by has_tag().

◆ get_num_children()

int PandaNodePipelineReader::get_num_children ( ) const
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 1624 of file pandaNode.I.

References get_child().

Referenced by find_parent().

◆ get_num_parents()

int PandaNodePipelineReader::get_num_parents ( ) const
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 1585 of file pandaNode.I.

References get_parent().

Referenced by compare_draw_mask().

◆ get_num_stashed()

int PandaNodePipelineReader::get_num_stashed ( ) const
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 1676 of file pandaNode.I.

Referenced by find_child().

◆ get_parent()

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

References find_parent().

Referenced by get_num_parents().

◆ get_prev_transform()

const TransformState * PandaNodePipelineReader::get_prev_transform ( ) const
inline

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

See set_prev_transform().

Definition at line 1767 of file pandaNode.I.

References get_tag().

Referenced by get_transform().

◆ get_stashed()

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

References get_stashed_sort().

◆ get_stashed_sort()

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

References find_stashed().

Referenced by get_stashed().

◆ get_state()

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

References get_effects().

Referenced by CullTraverserData::apply_transform_and_state(), find_stashed(), and CullTraverser::flush_level().

◆ get_tag()

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

References has_tag().

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

◆ get_transform()

const TransformState * PandaNodePipelineReader::get_transform ( ) const
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 1755 of file pandaNode.I.

References get_prev_transform().

Referenced by CullTraverserData::apply_transform_and_state(), get_effects(), and CullTraverserData::node_reader().

◆ has_tag()

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

References get_net_collide_mask().

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

◆ release()

void PandaNodePipelineReader::release ( )
inline

Releases the lock on this object.

No future calls will be valid on this object.

Definition at line 1510 of file pandaNode.I.

References compose_draw_mask().

Referenced by PandaNode::Parents::get_parent(), and CullTraverser::traverse_below().


The documentation for this class was generated from the following files: