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

Material.h

Go to the documentation of this file.
00001 
00002 //                            Material.h                                      //
00004 
00005 #ifndef MATERIAL_H
00006 #define MATERIAL_H
00007 
00008 #include "X3DTypes.h"
00009 #include "X3DMaterialNode.h"
00010 
00011 namespace X3DTK {
00012 namespace X3D {
00013 
00018 
00019 class Material : public X3DMaterialNode
00020 {
00021 public:
00023   Material();
00025   Material(SFFloat ambientIntensity, 
00026            const SFColor &diffuseColor, 
00027            const SFColor &emissiveColor, 
00028            SFFloat shininess, 
00029            const SFColor &specularColor, 
00030            SFFloat transparency);
00032   virtual SFNode clone() const;
00034   virtual ~Material();
00035   
00037   void setAmbientIntensity(SFFloat ambientIntensity);
00039   void setDiffuseColor(const SFColor &diffuseColor);
00041   void setEmissiveColor(const SFColor &emissiveColor);
00043   void setShininess(SFFloat shininess);  
00045   void setSpecularColor(const SFColor &specularColor);  
00047   void setTransparency(SFFloat transparency);  
00048   
00050   inline SFFloat getAmbientIntensity() const {return _ambientIntensity;};       
00052   inline SFColor getDiffuseColor() const {return _diffuseColor;};     
00054   inline SFColor getEmissiveColor() const {return _emissiveColor; };    
00056   inline SFFloat getShininess() const {return _shininess;};        
00058   inline SFColor getSpecularColor() const {return _specularColor;};    
00060   inline SFFloat getTransparency() const {return _transparency;};   
00061   
00063   virtual void load(const X3DFileElement *element);
00065   virtual SFString write() const;
00066 
00067 protected:
00069   Material(const Material &M);
00070 
00071 private:    
00073   SFFloat _ambientIntensity;       
00075   SFColor _diffuseColor;     
00077   SFColor _emissiveColor;    
00079   SFFloat _shininess;        
00081   SFColor _specularColor;    
00083   SFFloat _transparency;     
00084 };
00085 
00086 }
00087 }
00088 
00089 #endif

Generated on Thu Oct 9 13:50:54 2003 for X3DToolKit by doxygen1.2.18