Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre/OgreLight.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 GZ_RENDERING_OGRE_OGRELIGHT_HH_
18 #define GZ_RENDERING_OGRE_OGRELIGHT_HH_
19 
23 
24 namespace Ogre
25 {
26  class Light;
27 }
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
35  class IGNITION_RENDERING_OGRE_VISIBLE OgreLight :
36  public BaseLight<OgreNode>
37  {
38  protected: OgreLight();
39 
40  public: virtual ~OgreLight();
41 
42  public: virtual math::Color DiffuseColor() const;
43 
44  public: virtual void SetDiffuseColor(const math::Color &_color);
45 
46  public: virtual math::Color SpecularColor() const;
47 
48  public: virtual void SetSpecularColor(const math::Color &_color);
49 
50  public: virtual double AttenuationConstant() const;
51 
52  public: virtual void SetAttenuationConstant(double _value);
53 
54  public: virtual double AttenuationLinear() const;
55 
56  public: virtual void SetAttenuationLinear(double _value);
57 
58  public: virtual double AttenuationQuadratic() const;
59 
60  public: virtual void SetAttenuationQuadratic(double _value);
61 
62  public: virtual double AttenuationRange() const;
63 
64  public: virtual void SetAttenuationRange(double _range);
65 
66  public: virtual bool CastShadows() const;
67 
68  public: virtual void SetCastShadows(bool _castShadows);
69 
70  public: virtual Ogre::Light *Light() const;
71 
72  public: virtual void Destroy();
73 
74  protected: virtual void Init();
75 
76  private: void CreateLight();
77 
78  private: void UpdateAttenuation();
79 
80  protected: double attenConstant;
81 
82  protected: double attenLinear;
83 
84  protected: double attenQuadratic;
85 
86  protected: double attenRange;
87 
88  protected: Ogre::Light *ogreLight;
89 
90  protected: Ogre::Light::LightTypes ogreLightType;
91  };
92 
93  class IGNITION_RENDERING_OGRE_VISIBLE OgreDirectionalLight :
94  public BaseDirectionalLight<OgreLight>
95  {
96  protected: OgreDirectionalLight();
97 
98  public: virtual ~OgreDirectionalLight();
99 
100  public: virtual math::Vector3d Direction() const;
101 
102  public: virtual void SetDirection(const math::Vector3d &_dir);
103 
104  private: friend class OgreScene;
105  };
106 
107  class IGNITION_RENDERING_OGRE_VISIBLE OgrePointLight :
108  public BasePointLight<OgreLight>
109  {
110  protected: OgrePointLight();
111 
112  public: virtual ~OgrePointLight();
113 
114  private: friend class OgreScene;
115  };
116 
117  class IGNITION_RENDERING_OGRE_VISIBLE OgreSpotLight :
118  public BaseSpotLight<OgreLight>
119  {
120  protected: OgreSpotLight();
121 
122  public: virtual ~OgreSpotLight();
123 
124  public: virtual math::Vector3d Direction() const;
125 
126  public: virtual void SetDirection(const math::Vector3d &_dir);
127 
128  public: virtual math::Angle InnerAngle() const;
129 
130  public: virtual void SetInnerAngle(const math::Angle &_angle);
131 
132  public: virtual math::Angle OuterAngle() const;
133 
134  public: virtual void SetOuterAngle(const math::Angle &_angle);
135 
136  public: virtual double Falloff() const;
137 
138  public: virtual void SetFalloff(double _falloff);
139 
140  private: friend class OgreScene;
141  };
142  }
143  }
144 }
145 #endif
Ogre::Light::LightTypes ogreLightType
Definition: gz/rendering/ogre/OgreLight.hh:90
Definition: gz/rendering/ogre/OgreLight.hh:93
Definition: gz/rendering/base/BaseLight.hh:97
Definition: gz/rendering/ogre/OgreCamera.hh:27
Definition: gz/rendering/ogre/OgreScene.hh:39
Definition: gz/rendering/base/BaseLight.hh:71
Definition: gz/rendering/base/BaseLight.hh:87
double attenConstant
Definition: gz/rendering/ogre/OgreLight.hh:80
Definition: gz/rendering/base/BaseLight.hh:29
Definition: gz/rendering/ogre/OgreLight.hh:117
double attenLinear
Definition: gz/rendering/ogre/OgreLight.hh:82
Definition: gz/rendering/ogre/OgreLight.hh:107
double attenQuadratic
Definition: gz/rendering/ogre/OgreLight.hh:84
Represents a light source in the scene graph.
Definition: gz/rendering/Light.hh:32
Definition: gz/rendering/ogre/OgreLight.hh:35
Ogre::Light * ogreLight
Definition: gz/rendering/ogre/OgreLight.hh:88
double attenRange
Definition: gz/rendering/ogre/OgreLight.hh:86