Panda3D

colladaBindMaterial.h

00001 // Filename: colladaBindMaterial.h
00002 // Created by:  rdb (25May11)
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 COLLADABINDMATERIAL_H
00016 #define COLLADABINDMATERIAL_H
00017 
00018 #include "config_collada.h"
00019 #include "renderState.h"
00020 #include "pmap.h"
00021 
00022 class ColladaPrimitive;
00023 
00024 class domBind_material;
00025 class domInstance_material;
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : ColladaBindMaterial
00029 // Description : Class that deals with binding materials to
00030 //               COLLADA geometry.
00031 ////////////////////////////////////////////////////////////////////
00032 class ColladaBindMaterial {
00033 public:
00034   CPT(RenderState) get_material(const ColladaPrimitive *prim) const;
00035   CPT(RenderState) get_material(const string &symbol) const;
00036 
00037   void load_bind_material(domBind_material &bind_mat);
00038   void load_instance_material(domInstance_material &inst);
00039 
00040 private:
00041   pmap<string, CPT(RenderState)> _states;
00042 };
00043 
00044 #endif
 All Classes Functions Variables Enumerations