##

LightMaker.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_LIGHTMAKER_HH_
#define GAZEBO_GUI_LIGHTMAKER_HH_
#include <memory>
#include <string>
#include <ignition/math/Vector3.hh>
#include "gazebo/msgs/light.pb.h"
#include "gazebo/gui/EntityMaker.hh"
namespace gazebo
{
namespace gui
{
class LightMakerPrivate;
class GZ_GUI_VISIBLE LightMaker : public EntityMaker
{
public: LightMaker();
public: virtual ~LightMaker();
// Documentation inherited
public: void Start();
// Documentation inherited
public: void Stop();
public: bool InitFromLight(const std::string &_lightName);
// Documentation inherited
public: virtual ignition::math::Vector3d EntityPosition() const;
// Documentation inherited
protected: virtual void SetEntityPosition(
const ignition::math::Vector3d &_pos);
protected: virtual bool Init();
// Documentation inherited
protected: virtual void CreateTheEntity();
protected: msgs::Light msg;
protected: std::string lightTypename;
private: std::unique_ptr<LightMakerPrivate> dataPtr;
};
class GZ_GUI_VISIBLE PointLightMaker : public LightMaker
{
public: PointLightMaker();
};
class GZ_GUI_VISIBLE SpotLightMaker : public LightMaker
{
public: SpotLightMaker();
};
class GZ_GUI_VISIBLE DirectionalLightMaker : public LightMaker
{
public: DirectionalLightMaker();
};
}
}
#endif
gazebo::gui::LightMaker::lightTypename
std::string lightTypename
Type of the light being spawned.
Definition: LightMaker.hh:72
EntityMaker.hh
gazebo::gui::LightMaker::Init
virtual bool Init()
Initialize the light maker.
gazebo::gui::EntityMaker
To make an entity, base class.
Definition: EntityMaker.hh:39
gazebo::gui::LightMaker
Used to insert a new light into the scene.
Definition: LightMaker.hh:35
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::gui::LightMaker::CreateTheEntity
virtual void CreateTheEntity()
Creates the entity.
gazebo::gui::LightMaker::Start
void Start()
Start the maker.
gazebo::gui::SpotLightMaker::SpotLightMaker
SpotLightMaker()
Constructor.
gazebo::gui::LightMaker::EntityPosition
virtual ignition::math::Vector3d EntityPosition() const
Returns the entity world position.
gazebo::gui::DirectionalLightMaker
Used to insert a new directional light into the scene.
Definition: LightMaker.hh:94
gazebo::gui::SpotLightMaker
Used to insert a new spot light into the scene.
Definition: LightMaker.hh:87
gazebo::gui::LightMaker::Stop
void Stop()
Stop the maker.
gazebo::gui::DirectionalLightMaker::DirectionalLightMaker
DirectionalLightMaker()
Constructor.
gazebo::gui::PointLightMaker
Used to insert a new point light into the scene.
Definition: LightMaker.hh:80
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::gui::LightMaker::SetEntityPosition
virtual void SetEntityPosition(const ignition::math::Vector3d &_pos)
Sets the entity world position.
gazebo::gui::LightMaker::InitFromLight
bool InitFromLight(const std::string &_lightName)
Initialize the light maker from an existing light in the scene.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::LightMaker::~LightMaker
virtual ~LightMaker()
Destructor.
gazebo::gui::LightMaker::msg
msgs::Light msg
Message that holds all the light information.
Definition: LightMaker.hh:69
gazebo::gui::LightMaker::LightMaker
LightMaker()
Constructor.
gazebo::gui::PointLightMaker::PointLightMaker
PointLightMaker()
Constructor.