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