LightMaker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_GUI_LIGHTMAKER_HH_
19 #define GAZEBO_GUI_LIGHTMAKER_HH_
20 
21 #include <memory>
22 #include <string>
23 #include <ignition/math/Vector3.hh>
24 
25 #include "gazebo/msgs/light.pb.h"
27 
28 namespace gazebo
29 {
30  namespace gui
31  {
32  class LightMakerPrivate;
33 
35  class GZ_GUI_VISIBLE LightMaker : public EntityMaker
36  {
38  public: LightMaker();
39 
41  public: virtual ~LightMaker();
42 
43  // Documentation inherited
44  public: void Start();
45 
46  // Documentation inherited
47  public: void Stop();
48 
52  public: bool InitFromLight(const std::string &_lightName);
53 
54  // Documentation inherited
55  public: virtual ignition::math::Vector3d EntityPosition() const;
56 
57  // Documentation inherited
58  protected: virtual void SetEntityPosition(
59  const ignition::math::Vector3d &_pos);
60 
63  protected: virtual bool Init();
64 
65  // Documentation inherited
66  protected: virtual void CreateTheEntity();
67 
69  protected: msgs::Light msg;
70 
72  protected: std::string lightTypename;
73 
76  private: std::unique_ptr<LightMakerPrivate> dataPtr;
77  };
78 
80  class GZ_GUI_VISIBLE PointLightMaker : public LightMaker
81  {
83  public: PointLightMaker();
84  };
85 
87  class GZ_GUI_VISIBLE SpotLightMaker : public LightMaker
88  {
90  public: SpotLightMaker();
91  };
92 
94  class GZ_GUI_VISIBLE DirectionalLightMaker : public LightMaker
95  {
97  public: DirectionalLightMaker();
98  };
99  }
100 }
101 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Used to insert a new light into the scene.
Definition: LightMaker.hh:35
Used to insert a new spot light into the scene.
Definition: LightMaker.hh:87
std::string lightTypename
Type of the light being spawned.
Definition: LightMaker.hh:72
Used to insert a new point light into the scene.
Definition: LightMaker.hh:80
To make an entity, base class.
Definition: EntityMaker.hh:39
Used to insert a new directional light into the scene.
Definition: LightMaker.hh:94
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
msgs::Light msg
Message that holds all the light information.
Definition: LightMaker.hh:69