Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Material.h

Go to the documentation of this file.
00001 
00002 #ifndef __MATERIAL_H
00003 #define __MATERIAL_H
00004 
00005 #include <string>
00006 
00007 #include "MS3D.h"
00008 
00009 #include "Arrays.h"
00010 
00011 #include "Color.h"
00012 
00025 class Material {
00026 private:
00028     Color m_ambient;
00030     Color m_diffuse;
00032     Color m_specular;
00034     Color m_emissive;
00036     float m_shininess;
00038     std::string m_detailFileName;
00040     std::string m_bumpmapFileName;
00041 
00043     bool m_hasDetail;
00045     bool m_hasBumpmap;
00046 
00048     unsigned int m_detailHandle;
00049 
00061     unsigned int m_bumpmapHandle;
00062 
00075     unsigned int m_invertedBumpmapHandle;
00076 
00100     unsigned int m_normalmapHandle;
00101 
00102 private:
00104     Material(const Material& copy);
00106     Material& operator=(const Material& rhs);
00107 
00109     void initializeDetail(const Array3<unsigned char>& detailData);
00111     void initializeBumpmap(const Array3<unsigned char>& bumpmapData);
00113     void initializeNormalmap(const Array3<unsigned char>& bumpmapData);
00114 
00115 public:
00120     Material(const MS3DMaterial* material);
00121 
00123     const Color& getAmbientColor() const;
00125     const Color& getDiffuseColor() const;
00127     const Color& getSpecularColor() const;
00129     const Color& getEmissiveColor() const;
00131     float getSpecularShininess() const;
00132 
00134     bool hasDetail() const;
00136     bool hasBumpmap() const;
00137 
00139     unsigned int getDetailHandle() const;
00141     unsigned int getBumpmapHandle() const;
00143     unsigned int getInvertedBumpmapHandle() const;
00145     unsigned int getNormalmapHandle() const;
00146 };
00147 
00148 #endif // __MATERIAL_H

Generated on Mon Aug 25 23:40:57 2003 for Shadow by doxygen 1.3.2