##

RenderEvents.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 _RENDER_EVENTS_HH_
#define _RENDER_EVENTS_HH_
#include <string>
#include "gazebo/common/Event.hh"
#include "gazebo/msgs/msgs.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class GZ_RENDERING_VISIBLE Events
{
public: template<typename T>
static event::ConnectionPtr ConnectCreateScene(T _subscriber)
{ return createScene.Connect(_subscriber); }
public: template<typename T>
static event::ConnectionPtr ConnectRemoveScene(T _subscriber)
{return removeScene.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectToggleLayer(T _subscriber)
{return toggleLayer.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectNewLayer(T _subscriber)
{return newLayer.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectCameraPreRender(T _subscriber)
{return cameraPreRender.Connect(_subscriber);}
public: template<typename T>
static event::ConnectionPtr ConnectCameraPostRender(T _subscriber)
{return cameraPostRender.Connect(_subscriber);}
public: static event::EventT<void (const std::string &)> createScene;
public: static event::EventT<void (const std::string &)> removeScene;
public: static event::EventT<void (const int32_t)> toggleLayer;
public: static event::EventT<void (const int32_t)> newLayer;
public: static event::EventT<void (const std::string &)> cameraPreRender;
public: static event::EventT<void (const std::string &)> cameraPostRender;
};
}
}
#endif
gazebo::rendering::Events::ConnectCreateScene
static event::ConnectionPtr ConnectCreateScene(T _subscriber)
Connect to a scene created event.
Definition: RenderEvents.hh:40
gazebo::rendering::Events::newLayer
static event::EventT< void(const int32_t)> newLayer
The event used to indicate that a new layer is present.
Definition: RenderEvents.hh:88
gazebo::rendering::Events::cameraPostRender
static event::EventT< void(const std::string &)> cameraPostRender
The event used to indicate a camera post-render update event.
Definition: RenderEvents.hh:94
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::Events::toggleLayer
static event::EventT< void(const int32_t)> toggleLayer
The event used to turn on/off a layer.
Definition: RenderEvents.hh:85
gazebo::rendering::Events::ConnectCameraPostRender
static event::ConnectionPtr ConnectCameraPostRender(T _subscriber)
Connect to a camera post-render update event.
Definition: RenderEvents.hh:75
gazebo::rendering::Events::removeScene
static event::EventT< void(const std::string &)> removeScene
The event used to trigger a remove scene event.
Definition: RenderEvents.hh:82
system.hh
msgs.hh
gazebo::event::EventT
A class for event processing.
Definition: Event.hh:97
gazebo::rendering::Events::cameraPreRender
static event::EventT< void(const std::string &)> cameraPreRender
The event used to indicate a camera pre-render update event.
Definition: RenderEvents.hh:91
gazebo::rendering::Events::ConnectCameraPreRender
static event::ConnectionPtr ConnectCameraPreRender(T _subscriber)
Connect to a camera pre-render update event.
Definition: RenderEvents.hh:68
gazebo::rendering::Events
Base class for rendering events.
Definition: RenderEvents.hh:34
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::Events::ConnectRemoveScene
static event::ConnectionPtr ConnectRemoveScene(T _subscriber)
Connect to a scene removed event.
Definition: RenderEvents.hh:47
gazebo::event::EventT::Connect
ConnectionPtr Connect(const std::function< T > &_subscriber)
Connect a callback to this event.
Definition: Event.hh:558
gazebo::rendering::Events::createScene
static event::EventT< void(const std::string &)> createScene
The event used to trigger a create scene event.
Definition: RenderEvents.hh:79
gazebo::rendering::Events::ConnectToggleLayer
static event::ConnectionPtr ConnectToggleLayer(T _subscriber)
Connect to a layer toggle event.
Definition: RenderEvents.hh:54
gazebo::event::ConnectionPtr
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
Event.hh
gazebo::rendering::Events::ConnectNewLayer
static event::ConnectionPtr ConnectNewLayer(T _subscriber)
Connect to a new layer event.
Definition: RenderEvents.hh:61