Go to the documentation of this file.
17 #ifndef IGNITION_RENDERING_BASE_BASELIGHT_HH_
18 #define IGNITION_RENDERING_BASE_BASELIGHT_HH_
26 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
38 public:
virtual void SetDiffuseColor(
double _r,
double _g,
double _b,
42 public:
virtual void SetDiffuseColor(
const math::Color &_color) = 0;
45 public:
virtual void SetSpecularColor(
double _r,
double _g,
double _b,
49 public:
virtual void SetSpecularColor(
const math::Color &_color) = 0;
52 public:
virtual void SetAttenuationConstant(
double _value) = 0;
55 public:
virtual void SetAttenuationLinear(
double _value) = 0;
58 public:
virtual void SetAttenuationQuadratic(
double _value) = 0;
61 public:
virtual void SetAttenuationRange(
double _range) = 0;
64 public:
virtual void SetCastShadows(
bool _castShadows) = 0;
67 protected:
virtual void Reset();
79 public:
virtual void SetDirection(
double _x,
double _y,
double _z);
83 protected:
virtual void Reset();
105 public:
virtual void SetDirection(
double _x,
double _y,
double _z);
107 public:
virtual void SetDirection(
const math::Vector3d &_dir) = 0;
109 public:
virtual void SetInnerAngle(
double _radians);
111 public:
virtual void SetInnerAngle(
const math::Angle &_angle) = 0;
113 public:
virtual void SetOuterAngle(
double _radians);
115 public:
virtual void SetOuterAngle(
const math::Angle &_angle) = 0;
117 public:
virtual void SetFalloff(
double _falloff) = 0;
119 protected:
virtual void Reset();
139 this->SetDiffuseColor(
math::Color(_r, _g, _b, _a));
147 this->SetSpecularColor(
math::Color(_r, _g, _b, _a));
156 this->SetAttenuationConstant(1);
157 this->SetAttenuationLinear(0);
158 this->SetAttenuationQuadratic(0);
159 this->SetAttenuationRange(100);
160 this->SetCastShadows(
true);
187 this->SetDirection(0, 0, -1);
240 this->SetDirection(0, 0, -1);
241 this->SetInnerAngle(
IGN_PI / 4.5);
242 this->SetOuterAngle(
IGN_PI / 4.0);
243 this->SetFalloff(1.0);
virtual void Reset()
Definition: BaseLight.hh:184
Definition: BaseLight.hh:97
BaseDirectionalLight()
Definition: BaseLight.hh:165
virtual void SetDiffuseColor(double _r, double _g, double _b, double _a=1.0)
Set the diffuse color.
Definition: BaseLight.hh:136
virtual void Reset()
Definition: BaseLight.hh:152
Definition: BaseLight.hh:71
virtual void SetFalloff(double _falloff)=0
Set the falloff of the spotlight.
Represents a spotlight.
Definition: Light.hh:145
Definition: BaseLight.hh:87
virtual ~BaseSpotLight()
Definition: BaseLight.hh:210
BaseLight()
Definition: BaseLight.hh:124
virtual void SetAttenuationRange(double _range)=0
Set the attenuation range.
BaseSpotLight()
Definition: BaseLight.hh:204
virtual void SetDirection(double _x, double _y, double _z)
Set the direction of the light.
Definition: BaseLight.hh:216
Definition: BaseLight.hh:29
BasePointLight()
Definition: BaseLight.hh:192
virtual void SetAttenuationQuadratic(double _value)=0
Set the attenuation quadratic value.
virtual ~BaseLight()
Definition: BaseLight.hh:130
virtual ~BaseDirectionalLight()
Definition: BaseLight.hh:171
virtual void Reset()
Definition: BaseLight.hh:237
virtual ~BasePointLight()
Definition: BaseLight.hh:198
Represents a infinite directional light.
Definition: Light.hh:113
virtual void SetSpecularColor(double _r, double _g, double _b, double _a=1.0)
Set the specular color.
Definition: BaseLight.hh:144
virtual void SetAttenuationLinear(double _value)=0
Set the attenuation linear value.
virtual void SetCastShadows(bool _castShadows)=0
Specify if this light should cast shadows.
Represents a point light.
Definition: Light.hh:136
virtual void SetOuterAngle(double _radians)
Set the outer angle of the spotlight.
Definition: BaseLight.hh:230
Represents a light source in the scene graph.
Definition: Light.hh:32
virtual void SetInnerAngle(double _radians)
Set the inner angle of the spotlight.
Definition: BaseLight.hh:223
virtual void SetAttenuationConstant(double _value)=0
Set the attenuation constant value.
virtual void SetDirection(double _x, double _y, double _z)
Set the direction of the light.
Definition: BaseLight.hh:177