Panda3D
Loading...
Searching...
No Matches
AccumulatedAttribs Class Reference

This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have encountered on each node that might eventually be applied to the vertices at the leaves. More...

#include "accumulatedAttribs.h"

Public Member Functions

 AccumulatedAttribs (const AccumulatedAttribs &copy)
 
void apply_to_node (PandaNode *node, int attrib_types)
 Stores the indicated attributes in the node's transform and state information; does not attempt to apply the properties to the vertices.
 
ConstPointerTo< RenderStatecollect (const RenderState *state, int attrib_types)
 Collects the state and transform from the indicated node and adds it to the accumulator, removing it from the state (and returning a new state).
 
void collect (PandaNode *node, int attrib_types)
 Collects the state and transform from the indicated node and adds it to the accumulator, removing it from the node.
 
void operator= (const AccumulatedAttribs &copy)
 
void write (std::ostream &out, int attrib_types, int indent_level) const
 

Public Attributes

ConstPointerTo< RenderAttrib_clip_plane
 
int _clip_plane_override
 
ConstPointerTo< RenderAttrib_color
 
int _color_override
 
ConstPointerTo< RenderAttrib_color_scale
 
int _color_scale_override
 
ConstPointerTo< RenderAttrib_cull_face
 
int _cull_face_override
 
ConstPointerTo< RenderState_other
 
ConstPointerTo< RenderAttrib_tex_matrix
 
int _tex_matrix_override
 
ConstPointerTo< RenderAttrib_texture
 
int _texture_override
 
ConstPointerTo< TransformState_transform
 

Detailed Description

This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have encountered on each node that might eventually be applied to the vertices at the leaves.

Definition at line 30 of file accumulatedAttribs.h.

Constructor & Destructor Documentation

◆ AccumulatedAttribs() [1/2]

AccumulatedAttribs::AccumulatedAttribs ( )

Definition at line 29 of file accumulatedAttribs.cxx.

◆ AccumulatedAttribs() [2/2]

AccumulatedAttribs::AccumulatedAttribs ( const AccumulatedAttribs & copy)

Definition at line 44 of file accumulatedAttribs.cxx.

Member Function Documentation

◆ apply_to_node()

void AccumulatedAttribs::apply_to_node ( PandaNode * node,
int attrib_types )

Stores the indicated attributes in the node's transform and state information; does not attempt to apply the properties to the vertices.

Clears the attributes from the accumulator for future traversals.

Definition at line 285 of file accumulatedAttribs.cxx.

References PandaNode::reset_prev_transform(), PandaNode::set_attrib(), PandaNode::set_state, and PandaNode::set_transform.

◆ collect() [1/2]

ConstPointerTo< RenderState > AccumulatedAttribs::collect ( const RenderState * state,
int attrib_types )

Collects the state and transform from the indicated node and adds it to the accumulator, removing it from the state (and returning a new state).

Definition at line 154 of file accumulatedAttribs.cxx.

◆ collect() [2/2]

void AccumulatedAttribs::collect ( PandaNode * node,
int attrib_types )

Collects the state and transform from the indicated node and adds it to the accumulator, removing it from the node.

Definition at line 136 of file accumulatedAttribs.cxx.

References collect(), PandaNode::set_prev_transform(), PandaNode::set_state, and PandaNode::set_transform.

Referenced by GeomNode::apply_attribs_to_vertices(), and collect().

◆ operator=()

void AccumulatedAttribs::operator= ( const AccumulatedAttribs & copy)

Definition at line 66 of file accumulatedAttribs.cxx.

◆ write()

void AccumulatedAttribs::write ( std::ostream & out,
int attrib_types,
int indent_level ) const

Definition at line 87 of file accumulatedAttribs.cxx.

Member Data Documentation

◆ _clip_plane

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_clip_plane

Definition at line 51 of file accumulatedAttribs.h.

◆ _clip_plane_override

int AccumulatedAttribs::_clip_plane_override

Definition at line 52 of file accumulatedAttribs.h.

◆ _color

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_color

Definition at line 43 of file accumulatedAttribs.h.

◆ _color_override

int AccumulatedAttribs::_color_override

Definition at line 44 of file accumulatedAttribs.h.

◆ _color_scale

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_color_scale

Definition at line 45 of file accumulatedAttribs.h.

◆ _color_scale_override

int AccumulatedAttribs::_color_scale_override

Definition at line 46 of file accumulatedAttribs.h.

◆ _cull_face

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_cull_face

Definition at line 53 of file accumulatedAttribs.h.

◆ _cull_face_override

int AccumulatedAttribs::_cull_face_override

Definition at line 54 of file accumulatedAttribs.h.

◆ _other

ConstPointerTo< RenderState > AccumulatedAttribs::_other

Definition at line 55 of file accumulatedAttribs.h.

◆ _tex_matrix

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_tex_matrix

Definition at line 47 of file accumulatedAttribs.h.

◆ _tex_matrix_override

int AccumulatedAttribs::_tex_matrix_override

Definition at line 48 of file accumulatedAttribs.h.

◆ _texture

ConstPointerTo< RenderAttrib > AccumulatedAttribs::_texture

Definition at line 49 of file accumulatedAttribs.h.

◆ _texture_override

int AccumulatedAttribs::_texture_override

Definition at line 50 of file accumulatedAttribs.h.

◆ _transform

ConstPointerTo< TransformState > AccumulatedAttribs::_transform

Definition at line 42 of file accumulatedAttribs.h.


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