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