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

X3D_Material.h

Go to the documentation of this file.
00001 
00002 //                            X3D_Material.h                                  //
00004 
00005 #ifndef MATERIAL_H
00006 #define MATERIAL_H
00007 
00008 #include "X3DTypes.h"
00009 #include "X3D_X3DMaterialNode.h"
00010 
00011 namespace X3DTK {
00012 namespace X3D {
00013 
00018 
00019 class Material : public X3DMaterialNode
00020 {
00021 public:
00023   Material();
00025   Material(const SFFloat &ambientIntensity, 
00026            const SFColor &diffuseColor, 
00027            const SFColor &emissiveColor, 
00028            const SFFloat &shininess, 
00029            const SFColor &specularColor, 
00030            const SFFloat &transparency);
00032   virtual SFAbstractNode clone() const;
00034   virtual ~Material();
00035   
00037   void setAmbientIntensity(const SFFloat &ambientIntensity);
00039   void setDiffuseColor(const SFColor &diffuseColor);
00041   void setEmissiveColor(const SFColor &emissiveColor);
00043   void setShininess(const SFFloat &shininess);  
00045   void setSpecularColor(const SFColor &specularColor);  
00047   void setTransparency(const SFFloat &transparency);  
00048   
00050   inline const SFFloat &getAmbientIntensity() const {return _ambientIntensity;};       
00052   inline const SFColor &getDiffuseColor() const {return _diffuseColor;};     
00054   inline const SFColor &getEmissiveColor() const {return _emissiveColor; };    
00056   inline const SFFloat &getShininess() const {return _shininess;};        
00058   inline const SFColor &getSpecularColor() const {return _specularColor;};    
00060   inline const SFFloat &getTransparency() const {return _transparency;};   
00061   
00063   virtual void load(const X3DFileElement *element);
00065   virtual SFString &write(SFString &output) 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 Mon Jan 19 10:32:06 2004 for X3DToolKit by doxygen1.2.18