physics/Light.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 
18 #ifndef GAZEBO_PHYSICS_LIGHT_HH_
19 #define GAZEBO_PHYSICS_LIGHT_HH_
20 
21 #include <memory>
22 #include "gazebo/physics/Entity.hh"
23 
24 namespace gazebo
25 {
26  namespace physics
27  {
28  class LightPrivate;
29  class LightState;
30 
33 
35  class GZ_PHYSICS_VISIBLE Light : public Entity
36  {
39  public: explicit Light(BasePtr _parent);
40 
42  public: virtual ~Light();
43 
46  public: void Load(sdf::ElementPtr _sdf) override;
47 
49  public: void Init() override;
50 
53  public: void ProcessMsg(const msgs::Light &_msg);
54 
57  public: void FillMsg(msgs::Light &_msg);
58 
61  public: void SetState(const LightState &_state);
62 
63  // Documentation inherited
64  public: void OnPoseChange() override;
65 
67  private: void PublishPose() override;
68 
72  public: void SetWorldPoseDirty();
73 
74  // Documentation inherited.
75  public: virtual const ignition::math::Pose3d &WorldPose() const override;
76 
77  // Documentation inherited.
78  public: std::optional<sdf::SemanticPose> SDFSemanticPose() const override;
79 
81  private: std::unique_ptr<LightPrivate> dataPtr;
82  };
84  }
85 }
86 #endif
87 
A light entity.
Definition: physics/Light.hh:35
Forward declarations for the common classes.
Definition: Animation.hh:26
Store state information of a Light object.
Definition: LightState.hh:38
Base class for all physics objects in Gazebo.
Definition: Entity.hh:52
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:78