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> 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);
122 public:
void SetVisible(
const bool _s);
126 public:
bool Visible()
const;
130 public:
void SetLightType(
const std::string &_type);
134 public: std::string LightType()
const;
138 public:
void SetDiffuseColor(
const ignition::math::Color &_color);
142 public: ignition::math::Color DiffuseColor()
const;
146 public:
void SetSpecularColor(
const ignition::math::Color &_color);
150 public: ignition::math::Color SpecularColor()
const;
155 public:
void SetDirection(
const ignition::math::Vector3d &_dir);
159 public: ignition::math::Vector3d Direction()
const;
165 public:
void SetAttenuation(
double _constant,
double _linear,
170 public:
void SetSpotInnerAngle(
const double _angle);
174 public:
void SetSpotOuterAngle(
const double _angle);
178 public:
void SetSpotFalloff(
const double _value);
182 public:
void SetRange(
const double _range);
186 public:
void SetCastShadows(
const bool _cast);
190 public:
bool CastShadows()
const;
194 public:
void FillMsg(msgs::Light &_msg)
const;
198 public:
void UpdateFromMsg(ConstLightPtr &_msg);
208 public: uint32_t Id()
const;
214 private:
void CreateVisual();
217 private:
void Update();
221 private:
void UpdateSDFFromMsg(
const msgs::Light &_msg);
225 private: std::unique_ptr<LightPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual void OnPoseChange()
On pose change callback.
Definition: rendering/Light.hh:211
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
Definition: JointMaker.hh:39
A light source.
Definition: rendering/Light.hh:53
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:86