- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# 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 // Includes                                                                   //
    00016 //****************************************************************************//
    00017
    00018 #include "cal3d/global.h"
    00019
    00020 //****************************************************************************//
    00021 // Class declaration                                                          //
    00022 //****************************************************************************//
    00023
    00024  /*****************************************************************************/
    00028 class CAL3D_API CalCoreMaterial
    00029 {
    00030 // misc
    00031 public:
    00033   typedef struct
    00034   {
    00035     unsigned char red;
    00036     unsigned char green;
    00037     unsigned char blue;
    00038     unsigned char alpha;
    00039   } Color;
    00040
    00042   typedef struct
    00043   {
    00044     std::string strFilename;
    00045     Cal::UserData userData;
    00046   } Map;
    00047
    00048 // member variables
    00049 protected:
    00050   Color m_ambientColor;
    00051   Color m_diffuseColor;
    00052   Color m_specularColor;
    00053   float m_shininess;
    00054   std::vector<Map> m_vectorMap;
    00055   Cal::UserData m_userData;
    00056
    00057 // constructors/destructor
    00058 public:
    00059   CalCoreMaterial();
    00060   virtual ~CalCoreMaterial();
    00061
    00062 // member functions
    00063 public:
    00064   bool create();
    00065   void destroy();
    00066   Color& getAmbientColor();
    00067   Color& getDiffuseColor();
    00068   int getMapCount();
    00069   const std::string& getMapFilename(int mapId);
    00070   Cal::UserData getMapUserData(int mapId);
    00071   float getShininess();
    00072   Color& getSpecularColor();
    00073   Cal::UserData getUserData();
    00074   std::vector<Map>& getVectorMap();
    00075   bool reserve(int mapCount);
    00076   void setAmbientColor(const Color& ambientColor);
    00077   void setDiffuseColor(const Color& diffuseColor);
    00078   bool setMap(int mapId, const Map& map);
    00079   bool setMapUserData(int mapId, Cal::UserData userData);
    00080   void setShininess(float shininess);
    00081   void setSpecularColor(const Color& specularColor);
    00082   void setUserData(Cal::UserData userData);
    00083 };
    00084
    00085 #endif
    00086
    00087 //****************************************************************************//

Generated at Wed Apr 7 16:57:16 2004 by The Cal3D Team with 1.3.6 © 1997-2001 Dimitri van Heesch