- Cal3D 0.11 API Reference -

corematerial.h

00001 //****************************************************************************//
00002 // corematerial.h                                                             //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_COREMATERIAL_H
00012 #define CAL_COREMATERIAL_H
00013 
00014 
00015 #include "cal3d/global.h"
00016 #include "cal3d/refcounted.h"
00017 #include "cal3d/refptr.h"
00018 
00019 
00020 class CAL3D_API CalCoreMaterial : public cal3d::RefCounted
00021 {
00022 public:
00023   struct Color
00024   {
00025     unsigned char red;
00026     unsigned char green;
00027     unsigned char blue;
00028     unsigned char alpha;
00029   };
00030 
00031   struct Map
00032   {
00033     std::string strFilename;
00034     Cal::UserData userData;
00035   };
00036 
00037   CalCoreMaterial();
00038 
00039 protected:
00040   ~CalCoreMaterial() { }
00041 
00042 public:
00043   Color& getAmbientColor();
00044   Color& getDiffuseColor();
00045   int getMapCount();
00046   const std::string& getMapFilename(int mapId);
00047   Cal::UserData getMapUserData(int mapId);
00048   float getShininess();
00049   Color& getSpecularColor();
00050   Cal::UserData getUserData();
00051   std::vector<Map>& getVectorMap();
00052   bool reserve(int mapCount);
00053   void setAmbientColor(const Color& ambientColor);
00054   void setDiffuseColor(const Color& diffuseColor);
00055   bool setMap(int mapId, const Map& map);
00056   bool setMapUserData(int mapId, Cal::UserData userData);
00057   void setShininess(float shininess);
00058   void setSpecularColor(const Color& specularColor);
00059   void setFilename(const std::string& filename);
00060   const std::string& getFilename(void);
00061   void setName(const std::string& name);
00062   const std::string& getName(void);
00063   void setUserData(Cal::UserData userData);
00064 
00065 private:
00066   Color m_ambientColor;
00067   Color m_diffuseColor;
00068   Color m_specularColor;
00069   float m_shininess;
00070   std::vector<Map> m_vectorMap;
00071   Cal::UserData m_userData;
00072   std::string m_name;
00073   std::string m_filename;
00074 };
00075 typedef cal3d::RefPtr<CalCoreMaterial> CalCoreMaterialPtr;
00076 
00077 #endif
00078 
00079 //****************************************************************************//

Generated at Thu Jun 29 19:03:59 2006 by The Cal3D Team with Doxygen 1.4.6