Panda3D
accumulatedAttribs.h
1 // Filename: accumulatedAttribs.h
2 // Created by: drose (30Jan03)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef ACCUMULATEDATTRIBS_H
16 #define ACCUMULATEDATTRIBS_H
17 
18 #include "pandabase.h"
19 #include "transformState.h"
20 #include "renderAttrib.h"
21 #include "renderState.h"
22 #include "pointerTo.h"
23 
24 class PandaNode;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : AccumulatedAttribs
28 // Description : This class is used by the SceneGraphReducer to
29 // maintain and accumulate the set of attributes we have
30 // encountered on each node that might eventually be
31 // applied to the vertices at the leaves.
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDA_PGRAPH AccumulatedAttribs {
34 public:
37  void operator = (const AccumulatedAttribs &copy);
38 
39  void write(ostream &out, int attrib_types, int indent_level) const;
40 
41  void collect(PandaNode *node, int attrib_types);
42  CPT(RenderState) collect(const RenderState *state, int attrib_types);
43  void apply_to_node(PandaNode *node, int attrib_types);
44 
45  CPT(TransformState) _transform;
46  CPT(RenderAttrib) _color;
47  int _color_override;
48  CPT(RenderAttrib) _color_scale;
49  int _color_scale_override;
50  CPT(RenderAttrib) _tex_matrix;
51  int _tex_matrix_override;
52  CPT(RenderAttrib) _texture;
53  int _texture_override;
54  CPT(RenderAttrib) _clip_plane;
55  int _clip_plane_override;
56  CPT(RenderAttrib) _cull_face;
57  int _cull_face_override;
58  CPT(RenderState) _other;
59 };
60 
61 #include "accumulatedAttribs.I"
62 
63 #endif
64 
65 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
This is the base class for a number of render attributes (other than transform) that may be set on sc...
Definition: renderAttrib.h:60
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
Definition: renderState.h:53