17 #ifndef _LIGHTMAKER_HH_
18 #define _LIGHTMAKER_HH_
41 public:
virtual bool IsActive()
const;
52 public:
bool InitFromLight(
const std::string & _lightName);
56 protected:
virtual bool Init();
58 protected:
virtual void CreateTheEntity();
61 protected: msgs::Light
msg;
63 private:
static unsigned int counter;
74 this->msg.set_type(msgs::Light::POINT);
75 this->msg.set_cast_shadows(
false);
76 this->lightTypename =
"point";
84 this->msg.set_type(msgs::Light::SPOT);
86 ignition::math::Vector3d(0, 0, -1));
87 this->msg.set_cast_shadows(
false);
89 this->msg.set_spot_inner_angle(0.6);
90 this->msg.set_spot_outer_angle(1.0);
91 this->msg.set_spot_falloff(1.0);
92 this->lightTypename =
"spot";
100 this->msg.set_type(msgs::Light::DIRECTIONAL);
102 ignition::math::Vector3d(.1, .1, -0.9));
103 this->msg.set_cast_shadows(
true);
105 this->lightTypename =
"directional";
Generic description of a mouse event.
Definition: MouseEvent.hh:35
Definition: LightMaker.hh:35
virtual void OnMouseDrag(const common::MouseEvent &)
Callback for dragging with mouse.
Definition: LightMaker.hh:47
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:83
Definition: LightMaker.hh:80
msgs::Light msg
Definition: LightMaker.hh:61
PointLightMaker()
Definition: LightMaker.hh:72
DirectionalLightMaker()
Definition: LightMaker.hh:98
Definition: LightMaker.hh:70
std::string lightTypename
Definition: LightMaker.hh:64
to make an entity base class
Definition: EntityMaker.hh:41
Definition: LightMaker.hh:96
int state
Definition: LightMaker.hh:60
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
A light source.
Definition: Light.hh:52
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:91
SpotLightMaker()
Definition: LightMaker.hh:82
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
transport::PublisherPtr lightPub
Definition: LightMaker.hh:62
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66