Panda3D

accumulatedAttribs.h

00001 // Filename: accumulatedAttribs.h
00002 // Created by:  drose (30Jan03)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef ACCUMULATEDATTRIBS_H
00016 #define ACCUMULATEDATTRIBS_H
00017 
00018 #include "pandabase.h"
00019 #include "transformState.h"
00020 #include "renderAttrib.h"
00021 #include "renderState.h"
00022 #include "pointerTo.h"
00023 
00024 class PandaNode;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : AccumulatedAttribs
00028 // Description : This class is used by the SceneGraphReducer to
00029 //               maintain and accumulate the set of attributes we have
00030 //               encountered on each node that might eventually be
00031 //               applied to the vertices at the leaves.
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDA_PGRAPH AccumulatedAttribs {
00034 public:
00035   AccumulatedAttribs();
00036   AccumulatedAttribs(const AccumulatedAttribs &copy);
00037   void operator = (const AccumulatedAttribs &copy);
00038   
00039   void write(ostream &out, int attrib_types, int indent_level) const;
00040   
00041   void collect(PandaNode *node, int attrib_types);
00042   CPT(RenderState) collect(const RenderState *state, int attrib_types);
00043   void apply_to_node(PandaNode *node, int attrib_types);
00044 
00045   CPT(TransformState) _transform;
00046   CPT(RenderAttrib) _color;
00047   int _color_override;
00048   CPT(RenderAttrib) _color_scale;
00049   int _color_scale_override;
00050   CPT(RenderAttrib) _tex_matrix;
00051   int _tex_matrix_override;
00052   CPT(RenderAttrib) _texture;
00053   int _texture_override;
00054   CPT(RenderAttrib) _clip_plane;
00055   int _clip_plane_override;
00056   CPT(RenderAttrib) _cull_face;
00057   int _cull_face_override;
00058   CPT(RenderState) _other;
00059 };
00060 
00061 #include "accumulatedAttribs.I"
00062 
00063 #endif
00064 
00065 
 All Classes Functions Variables Enumerations