17 #ifndef GAZEBO_RENDERING_LIGHT_HH_
18 #define GAZEBO_RENDERING_LIGHT_HH_
23 #include <ignition/math/Quaternion.hh>
24 #include <ignition/math/Vector3.hh>
53 class GZ_RENDERING_VISIBLE
Light :
54 public boost::enable_shared_from_this<Light>
61 public:
virtual ~
Light();
66 public:
void Load(sdf::ElementPtr _sdf);
73 public:
void LoadFromMsg(ConstLightPtr &_msg);
77 public:
void LoadFromMsg(
const msgs::Light &_msg);
81 public:
void SetName(
const std::string &_name);
85 public: std::string Name()
const;
89 public: std::string Type()
const;
93 public:
void SetPosition(
const ignition::math::Vector3d &_p);
97 public: ignition::math::Vector3d Position()
const;
101 public:
void SetRotation(
const ignition::math::Quaterniond &_q);
105 public: ignition::math::Quaterniond Rotation()
const;
110 public:
virtual bool SetSelected(
const bool _s);
113 public:
void ToggleShowVisual();
117 public:
void ShowVisual(
const bool _s);
121 public:
bool Visible()
const;
125 public:
void SetLightType(
const std::string &_type);
129 public: std::string LightType()
const;
150 public:
void SetDirection(
const ignition::math::Vector3d &_dir);
154 public: ignition::math::Vector3d Direction()
const;
160 public:
void SetAttenuation(
double _constant,
double _linear,
165 public:
void SetSpotInnerAngle(
const double _angle);
169 public:
void SetSpotOuterAngle(
const double _angle);
173 public:
void SetSpotFalloff(
const double _value);
177 public:
void SetRange(
const double _range);
181 public:
void SetCastShadows(
const bool _cast);
185 public:
bool CastShadows()
const;
189 public:
void FillMsg(msgs::Light &_msg)
const;
193 public:
void UpdateFromMsg(ConstLightPtr &_msg);
205 private:
void CreateVisual();
208 private:
void Update();
212 private:
void UpdateSDFFromMsg(
const msgs::Light &_msg);
216 private: std::unique_ptr<LightPrivate> dataPtr;
virtual void OnPoseChange()
On pose change callback.
Definition: rendering/Light.hh:202
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:81
Defines a color.
Definition: Color.hh:36
A light source.
Definition: rendering/Light.hh:53
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:85