#include "X3D_SpotLight.h" #include using namespace std; namespace X3DTK { namespace X3D { SpotLight::SpotLight() : X3DLightNode() { define(Recorder::getTypeName("SpotLight", "Lighting")); define(Recorder::getAttribute("attenuation", &SpotLight::_attenuation, SFVec3f(1.0f,0.0f,0.0f))); define(Recorder::getAttribute("beamWidth", &SpotLight::_beamWidth, 1.570796f)); define(Recorder::getAttribute("cutOffAngle", &SpotLight::_cutOffAngle, 0.785398f)); define(Recorder::getAttribute("direction", &SpotLight::_direction, SFVec3f(0.0f,0.0f,-1.0f))); define(Recorder::getAttribute("location", &SpotLight::_location, SFVec3f(0.0f,0.0f,0.0f))); define(Recorder::getAttribute("radius", &SpotLight::_radius, 100.0f)); } SpotLight::~SpotLight() { } void SpotLight::setAttenuation(const SFVec3f &attenuation) { _attenuation = attenuation; } void SpotLight::setBeamWidth(const SFFloat &beamWidth) { _beamWidth = beamWidth; } void SpotLight::setCutOffAngle(const SFFloat &cutOffAngle) { _cutOffAngle = cutOffAngle; } void SpotLight::setDirection(const SFVec3f &direction) { _direction = direction; } void SpotLight::setLocation(const SFVec3f &location) { _location = location; } void SpotLight::setRadius(const SFFloat &radius) { _radius = radius; } } }