00001 00002 // DirectionalLight.h // 00004 00005 #ifndef DIRECTIONALLIGHT 00006 #define DIRECTIONALLIGHT 00007 00008 #include "X3DTypes.h" 00009 #include "X3DLightNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00018 00019 class DirectionalLight : public X3DLightNode 00020 { 00021 public: 00023 DirectionalLight(); 00025 DirectionalLight(SFFloat ambientIntensity, 00026 const SFColor &color, 00027 const SFVec3f &direction, 00028 SFFloat intensity, 00029 SFBool on); 00031 virtual SFNode clone() const; 00033 virtual ~DirectionalLight(); 00034 00036 void setDirection(const SFVec3f &direction); 00037 00039 inline const SFVec3f &getDirection() const {return _direction;}; 00040 00042 virtual void load(const X3DFileElement *element); 00044 virtual SFString write() const; 00045 00046 protected: 00048 DirectionalLight(const DirectionalLight &N); 00049 00050 private: 00052 SFVec3f _direction; 00053 }; 00054 00055 } 00056 } 00057 00058 #endif