Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

GL_Material.h

Go to the documentation of this file.
00001 #ifndef X3DTK_GL_MATERIAL_H
00002 #define X3DTK_GL_MATERIAL_H
00003 
00004 #include "GL_X3DMaterialNode.h"
00005 
00006 #include <vector>
00007 
00008 namespace X3DTK {
00009 namespace GL {
00010 
00017 class Material : public X3DMaterialNode
00018 {
00019 public:
00021   Material();
00023   virtual SFNode clone() const;
00025   virtual ~Material();
00026   
00028   void setDiffuseColor(const MFFloat &diffuseColor);
00030   void setAmbientColor(const MFFloat &ambientColor);
00032   void setEmissiveColor(const MFFloat &emissiveColor);
00034   void setShininess(const SFFloat &shininess);
00036   void setSpecularColor(const MFFloat &specularColor);
00037 
00039   inline const MFFloat &getDiffuseColor() const {return _diffuseColor;};
00041   inline const MFFloat &getAmbientColor() const {return _ambientColor;};
00043   inline const MFFloat &getEmissiveColor() const {return _emissiveColor;};
00045   inline const SFFloat &getShininess() const {return _shininess;};
00047   inline const MFFloat &getSpecularColor() const {return _specularColor;};
00048 
00050   virtual void update();
00051 
00052 protected:    
00054   Material(const Material &M);
00055 
00056 private:  
00058   MFFloat _diffuseColor;
00060   MFFloat _ambientColor;
00062   MFFloat _emissiveColor;
00064   SFFloat _shininess;
00066   MFFloat _specularColor;
00067 };
00068 
00069 }
00070 }
00071 
00072 #endif

Generated on Wed Apr 7 12:15:19 2004 for X3DToolKit by doxygen 1.3.3