Ignition Rendering

API Reference

0.1.0
Light.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_LIGHT_HH_
18 #define IGNITION_RENDERING_LIGHT_HH_
19 
20 #include "ignition/math/Color.hh"
22 
23 namespace ignition
24 {
25  namespace rendering
26  {
29  class IGNITION_RENDERING_VISIBLE Light :
30  public virtual Node
31  {
33  public: virtual ~Light() { }
34 
37  public: virtual math::Color DiffuseColor() const = 0;
38 
44  public: virtual void SetDiffuseColor(double _r, double _g, double _b,
45  double _a = 1.0) = 0;
46 
49  public: virtual void SetDiffuseColor(const math::Color &_color) = 0;
50 
53  public: virtual math::Color SpecularColor() const = 0;
54 
60  public: virtual void SetSpecularColor(double _r, double _g, double _b,
61  double _a = 1.0) = 0;
62 
65  public: virtual void SetSpecularColor(const math::Color &_color) = 0;
66 
69  public: virtual double AttenuationConstant() const = 0;
70 
73  public: virtual void SetAttenuationConstant(double _value) = 0;
74 
77  public: virtual double AttenuationLinear() const = 0;
78 
81  public: virtual void SetAttenuationLinear(double _value) = 0;
82 
85  public: virtual double AttenuationQuadratic() const = 0;
86 
89  public: virtual void SetAttenuationQuadratic(double _value) = 0;
90 
93  public: virtual double AttenuationRange() const = 0;
94 
97  public: virtual void SetAttenuationRange(double _range) = 0;
98 
101  public: virtual bool CastShadows() const = 0;
102 
105  public: virtual void SetCastShadows(bool _castShadows) = 0;
106  };
107 
110  class IGNITION_RENDERING_VISIBLE DirectionalLight :
111  public virtual Light
112  {
114  public: virtual ~DirectionalLight() { }
115 
118  public: virtual math::Vector3d Direction() const = 0;
119 
124  public: virtual void SetDirection(double _x, double _y, double _z) = 0;
125 
128  public: virtual void SetDirection(const math::Vector3d &_dir) = 0;
129  };
130 
133  class IGNITION_RENDERING_VISIBLE PointLight :
134  public virtual Light
135  {
137  public: virtual ~PointLight() { }
138  };
139 
142  class IGNITION_RENDERING_VISIBLE SpotLight :
143  public virtual Light
144  {
146  public: virtual ~SpotLight() { }
147 
150  public: virtual math::Vector3d Direction() const = 0;
151 
156  public: virtual void SetDirection(double _x, double _y, double _z) = 0;
157 
160  public: virtual void SetDirection(const math::Vector3d &_dir) = 0;
161 
164  public: virtual math::Angle InnerAngle() const = 0;
165 
168  public: virtual void SetInnerAngle(double _radians) = 0;
169 
172  public: virtual void SetInnerAngle(const math::Angle &_angle) = 0;
173 
176  public: virtual math::Angle OuterAngle() const = 0;
177 
180  public: virtual void SetOuterAngle(double _radians) = 0;
181 
184  public: virtual void SetOuterAngle(const math::Angle &_angle) = 0;
185 
188  public: virtual double Falloff() const = 0;
189 
192  public: virtual void SetFalloff(double _falloff) = 0;
193  };
194  }
195 }
196 #endif
virtual ~Light()
Deconstructor.
Definition: Light.hh:33
virtual ~PointLight()
Deconstructor.
Definition: Light.hh:137
Represents a single posable node in the scene graph.
Definition: Node.hh:34
virtual ~SpotLight()
Deconstructor.
Definition: Light.hh:146
Represents a point light.
Definition: Light.hh:133
Represents a light source in the scene graph.
Definition: Light.hh:29
Represents a spotlight.
Definition: Light.hh:142
Represents a infinite directional light.
Definition: Light.hh:110
Definition: ArrowVisual.hh:22
virtual ~DirectionalLight()
Deconstructor.
Definition: Light.hh:114