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

GLMaterial.h

Go to the documentation of this file.
00001 
00002 
00003 
00005 
00006 
00011 
00016 
00021 //                            GLMaterial.h                                    //
00023 
00024 #ifndef GLMATERIAL_H
00025 #define GLMATERIAL_H
00026 
00027 #include "X3DGLMaterialNode.h"
00028 
00029 #include <vector>
00030 
00031 namespace X3DTK {
00032 namespace GL {
00033 
00036 
00037 class Material : public X3DMaterialNode
00038 {
00039 public:
00041   Material();
00043   virtual SFNode clone() const;
00045   virtual ~Material();
00046   
00048   void setDiffuseColor(const MFFloat &diffuseColor);
00050   void setAmbientColor(const MFFloat &ambientColor);
00052   void setEmissiveColor(const MFFloat &emissiveColor);
00054   void setShininess(SFFloat shininess);
00056   void setSpecularColor(const MFFloat &specularColor);
00057 
00059   inline const MFFloat &getDiffuseColor() const {return _diffuseColor;};
00061   inline const MFFloat &getAmbientColor() const {return _ambientColor;};
00063   inline const MFFloat &getEmissiveColor() const {return _emissiveColor;};
00065   inline SFFloat getShininess() const {return _shininess;};
00067   inline const MFFloat &getSpecularColor() const {return _specularColor;};
00068 
00070   virtual void update();
00072   virtual void render() const;  
00073 
00074 protected:    
00076   Material(const Material &M);
00077 
00078 private:  
00080   MFFloat _diffuseColor;
00082   MFFloat _ambientColor;
00084   MFFloat _emissiveColor;
00086   SFFloat _shininess;
00088   MFFloat _specularColor;
00089 };
00090 
00091 }
00092 }
00093 
00094 #endif

Generated on Wed Sep 10 11:25:13 2003 for X3DToolKit by doxygen1.3