##

physics/Light.hh
Go to the documentation of this file.
/*
* Copyright (C) 2015 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_PHYSICS_LIGHT_HH_
#define GAZEBO_PHYSICS_LIGHT_HH_
#include <memory>
#include "gazebo/physics/Entity.hh"
namespace gazebo
{
namespace physics
{
class LightPrivate;
class LightState;
class GZ_PHYSICS_VISIBLE Light : public Entity
{
public: explicit Light(BasePtr _parent);
public: virtual ~Light();
public: void Init();
public: void ProcessMsg(const msgs::Light &_msg);
public: void FillMsg(msgs::Light &_msg);
public: void SetState(const LightState &_state);
// Documentation inherited
public: void OnPoseChange();
private: void PublishPose();
public: void SetWorldPoseDirty();
// Documentation inherited.
public: virtual const ignition::math::Pose3d &WorldPose() const;
private: std::unique_ptr<LightPrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::physics::Light::Light
Light(BasePtr _parent)
Constructor.
Entity.hh
gazebo::physics::LightState
Store state information of a Light object.
Definition: LightState.hh:38
gazebo::physics::Light::FillMsg
void FillMsg(msgs::Light &_msg)
Fill a light message with this light's parameters.
gazebo::physics::BasePtr
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:77
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::physics::Entity
Base class for all physics objects in Gazebo.
Definition: Entity.hh:52
gazebo::physics::Light
A light entity.
Definition: physics/Light.hh:35
gazebo::physics::Light::ProcessMsg
void ProcessMsg(const msgs::Light &_msg)
Update this light's parameters from a message.
gazebo::physics::Light::SetWorldPoseDirty
void SetWorldPoseDirty()
Indicate that the world pose should be recalculated.
gazebo::physics::Light::WorldPose
virtual const ignition::math::Pose3d & WorldPose() const
Get the absolute pose of the entity.
gazebo::physics::Light::SetState
void SetState(const LightState &_state)
Set the current light state.
gazebo::physics::Light::~Light
virtual ~Light()
Destructor.
gazebo::physics::Light::OnPoseChange
void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
gazebo::physics::Light::Init
void Init()
Initialize the light.