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>
23
24namespace 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
45 public: void Init();
46
49 public: void ProcessMsg(const msgs::Light &_msg);
50
53 public: void FillMsg(msgs::Light &_msg);
54
57 public: void SetState(const LightState &_state);
58
59 // Documentation inherited
60 public: void OnPoseChange();
61
63 private: void PublishPose();
64
68 public: void SetWorldPoseDirty();
69
70 // Documentation inherited.
71 public: virtual const ignition::math::Pose3d &WorldPose() const;
72
74 private: std::unique_ptr<LightPrivate> dataPtr;
75 };
77 }
78}
79#endif
80
Base class for all physics objects in Gazebo.
Definition Entity.hh:53
Store state information of a Light object.
Definition LightState.hh:39
A light entity.
Definition physics/Light.hh:36
void Init()
Initialize the light.
void ProcessMsg(const msgs::Light &_msg)
Update this light's parameters from a message.
void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
virtual ~Light()
Destructor.
void FillMsg(msgs::Light &_msg)
Fill a light message with this light's parameters.
virtual const ignition::math::Pose3d & WorldPose() const
Get the absolute pose of the entity.
Light(BasePtr _parent)
Constructor.
void SetState(const LightState &_state)
Set the current light state.
void SetWorldPoseDirty()
Indicate that the world pose should be recalculated.
boost::shared_ptr< Base > BasePtr
Definition PhysicsTypes.hh:77
Forward declarations for the common classes.
Definition Animation.hh:27