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

SpotLight.h

Go to the documentation of this file.
00001 
00002 //                            SpotLight.h                              //
00004 
00005 #ifndef SPOTLIGHT
00006 #define SPOTLIGHT
00007 
00008 #include "X3DTypes.h"
00009 #include "X3DLightNode.h"
00010 
00011 namespace X3DTK {
00012 namespace X3D {
00013 
00018 
00019 class SpotLight : public X3DLightNode
00020 {
00021 public:
00023   SpotLight();
00025   SpotLight(SFFloat       ambientIntensity,
00026             const SFVec3f &attenuation,
00027             SFFloat       beamWidth,
00028             const SFColor &color,
00029             SFFloat       cutOffAngle,
00030             const SFVec3f &direction,
00031             SFFloat       intensity,
00032             const SFVec3f &location,
00033             SFBool        on,
00034             SFFloat       radius);
00036   virtual SFNode clone() const;
00038   virtual ~SpotLight();
00039 
00041   void setAttenuation(const SFVec3f &attenuation);
00043   void setBeamWidth(SFFloat beamWidth);
00045   void setCutOffAngle(SFFloat cutOffAngle);
00047   void setDirection(const SFVec3f &direction);
00049   void setLocation(const SFVec3f &location);
00051   void setRadius(SFFloat radius);
00052 
00054   inline const SFVec3f &getAttenuation() const {return _attenuation;};
00056   inline SFFloat getBeamWidth() const {return _beamWidth;};
00058   inline SFFloat getCutOffAngle() const {return _cutOffAngle;};
00060   inline const SFVec3f &getDirection() const {return _direction;};
00062   inline const SFVec3f &getLocation() const {return _location;};
00064   inline SFFloat getRadius() const {return _radius;};
00065 
00067   virtual void load(const X3DFileElement *element);
00069   virtual SFString write() const;
00070 
00071 protected:
00073   SpotLight(const SpotLight &N);
00074 
00075 private:
00077   SFVec3f _attenuation;
00079   SFFloat _beamWidth;
00081   SFFloat _cutOffAngle;
00083   SFVec3f _direction;
00085   SFVec3f _location;
00087   SFFloat _radius;
00088 };
00089 
00090 }
00091 }
00092 
00093 #endif

Generated on Thu Oct 9 13:50:54 2003 for X3DToolKit by doxygen1.2.18