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

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 
00017 
00018 class Material : public X3DMaterialNode
00019 {
00020 public:
00022   Material();
00024   Material(SFFloat ambientIntensity, 
00025            SFColor diffuseColor, 
00026        SFColor emissiveColor, 
00027        SFFloat shininess, 
00028        SFColor specularColor, 
00029        SFFloat transparency);
00031   virtual SFNode clone() const;
00033   ~Material();
00034   
00036   void setAmbientIntensity(SFFloat ambientIntensity);
00038   void setDiffuseColor(SFColor diffuseColor);
00040   void setEmissiveColor(SFColor emissiveColor);
00042   void setShininess(SFFloat shininess);  
00044   void setSpecularColor(SFColor specularColor);  
00046   void setTransparency(SFFloat transparency);  
00047   
00049   inline SFFloat getAmbientIntensity() const {return ambientIntensity_;};       
00051   inline SFColor getDiffuseColor() const {return diffuseColor_;};     
00053   inline SFColor getEmissiveColor() const {return emissiveColor_; };    
00055   inline SFFloat getShininess() const {return shininess_;};        
00057   inline SFColor getSpecularColor() const {return specularColor_;};    
00059   inline SFFloat getTransparency() const {return transparency_;};   
00060   
00062   virtual void loadAttributes(const X3DFileElement *element);
00064   virtual SFString writeAttributes() const;
00065 
00066 protected:
00068   Material(const Material &M);
00069     
00070 private:
00071   SFFloat ambientIntensity_;       
00072   SFColor diffuseColor_;     
00073   SFColor emissiveColor_;    
00074   SFFloat shininess_;        
00075   SFColor specularColor_;    
00076   SFFloat transparency_;     
00077 };
00078 
00079 }
00080 
00081 #endif

Generated on Wed May 14 10:38:09 2003 for X3DToolKit by doxygen1.3