17 #ifndef GAZEBO_RENDERING_LIGHT_HH_
18 #define GAZEBO_RENDERING_LIGHT_HH_
23 #include <ignition/math/Color.hh>
24 #include <ignition/math/Quaternion.hh>
25 #include <ignition/math/Vector3.hh>
54 class GZ_RENDERING_VISIBLE
Light :
55 public boost::enable_shared_from_this<Light>
62 public:
virtual ~
Light();
67 public:
void Load(sdf::ElementPtr _sdf);
74 public:
void LoadFromMsg(ConstLightPtr &_msg);
78 public:
void LoadFromMsg(
const msgs::Light &_msg);
82 public:
void SetName(
const std::string &_name);
86 public: std::string Name()
const;
90 public: std::string Type()
const;
94 public:
void SetPosition(
const ignition::math::Vector3d &_p);
98 public: ignition::math::Vector3d Position()
const;
102 public:
void SetRotation(
const ignition::math::Quaterniond &_q);
106 public: ignition::math::Quaterniond Rotation()
const;
111 public:
virtual bool SetSelected(
const bool _s);
114 public:
void ToggleShowVisual();
118 public:
void ShowVisual(
const bool _s);
122 public:
bool Visible()
const;
126 public:
void SetLightType(
const std::string &_type);
130 public: std::string LightType()
const;
140 public:
void SetDiffuseColor(
const ignition::math::Color &_color);
144 public: ignition::math::Color DiffuseColor()
const;
154 public:
void SetSpecularColor(
const ignition::math::Color &_color);
158 public: ignition::math::Color SpecularColor()
const;
163 public:
void SetDirection(
const ignition::math::Vector3d &_dir);
167 public: ignition::math::Vector3d Direction()
const;
173 public:
void SetAttenuation(
double _constant,
double _linear,
178 public:
void SetSpotInnerAngle(
const double _angle);
182 public:
void SetSpotOuterAngle(
const double _angle);
186 public:
void SetSpotFalloff(
const double _value);
190 public:
void SetRange(
const double _range);
194 public:
void SetCastShadows(
const bool _cast);
198 public:
bool CastShadows()
const;
202 public:
void FillMsg(msgs::Light &_msg)
const;
206 public:
void UpdateFromMsg(ConstLightPtr &_msg);
218 private:
void CreateVisual();
221 private:
void Update();
225 private:
void UpdateSDFFromMsg(
const msgs::Light &_msg);
229 private: std::unique_ptr<LightPrivate> dataPtr;
virtual void OnPoseChange()
On pose change callback.
Definition: rendering/Light.hh:215
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
Defines a color.
Definition: Color.hh:36
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
A light source.
Definition: rendering/Light.hh:54
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:86