00001
00002
00004
00005 #ifndef X3DLIGHTNODE
00006 #define X3DLIGHTNODE
00007
00008 #include "X3DTypes.h"
00009 #include "X3DChildNode.h"
00010
00011 namespace X3DTK {
00012 namespace X3D {
00013
00018
00019 class X3DLightNode : public X3DChildNode
00020 {
00021 public:
00023 X3DLightNode();
00025 X3DLightNode(SFFloat ambientIntensity,
00026 const SFColor &color,
00027 SFFloat intensity,
00028 SFBool on);
00030 virtual SFNode clone() const;
00032 virtual ~X3DLightNode();
00033
00035 void setAmbientIntensity(SFFloat ambientIntensity);
00037 void setColor(const SFColor &color);
00039 void setIntensity(SFFloat intensity);
00041 void setOn(SFBool on);
00042
00044 inline SFFloat getAmbientIntensity() const {return _ambientIntensity;};
00046 inline const SFColor &getColor() const {return _color;};
00048 inline SFFloat getIntensity() const {return _intensity;};
00050 inline SFBool getOn() const {return _on;};
00051
00053 virtual void load(const X3DFileElement *element);
00055 virtual SFString write() const;
00056
00057 protected:
00059 X3DLightNode(const X3DLightNode &N);
00060
00061 private:
00063 SFFloat _ambientIntensity;
00065 SFColor _color;
00067 SFFloat _intensity;
00069 SFBool _on;
00070 };
00071
00072 }
00073 }
00074
00075 #endif