##

FPSViewController.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_RENDERING_FPSVIEWCONTROLLER_HH_
#define GAZEBO_RENDERING_FPSVIEWCONTROLLER_HH_
#include <string>
#include <ignition/math/Vector3.hh>
#include "gazebo/rendering/ViewController.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class GZ_RENDERING_VISIBLE FPSViewController : public ViewController
{
public: explicit FPSViewController(UserCameraPtr _camera);
public: virtual ~FPSViewController();
public: virtual void Init();
using ViewController::Init;
public: virtual void Update();
public: static std::string GetTypeString();
// Documentation inherited from parent
public: virtual void HandleMouseEvent(const common::MouseEvent &_event);
// Documentation inherited from parent
public: void HandleKeyReleaseEvent(const std::string &_key);
// Documentation inherited from parent
public: void HandleKeyPressEvent(const std::string &_key);
private: float xVelocityFactor;
private: float yVelocityFactor;
private: ignition::math::Vector3d xVelocity;
private: ignition::math::Vector3d yVelocity;
};
}
}
#endif
gazebo::rendering::UserCameraPtr
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:94
gazebo::rendering::FPSViewController::FPSViewController
FPSViewController(UserCameraPtr _camera)
Constructor.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::FPSViewController::~FPSViewController
virtual ~FPSViewController()
Destructor.
gazebo::rendering::FPSViewController::Init
virtual void Init()
Initialize the controller.
system.hh
gazebo::rendering::FPSViewController
First Person Shooter style view controller.
Definition: FPSViewController.hh:35
gazebo::rendering::ViewController::Init
virtual void Init()=0
Initialize the view controller.
ViewController.hh
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::rendering::FPSViewController::HandleKeyReleaseEvent
void HandleKeyReleaseEvent(const std::string &_key)
Handle a key release event.
gazebo::rendering::ViewController
Base class for view controllers.
Definition: ViewController.hh:41
gazebo::rendering::FPSViewController::HandleMouseEvent
virtual void HandleMouseEvent(const common::MouseEvent &_event)
Handle a mouse event.
gazebo::rendering::FPSViewController::Update
virtual void Update()
Update the camera position.
gazebo::rendering::FPSViewController::GetTypeString
static std::string GetTypeString()
Get the type name of this view controller.
gazebo::common::MouseEvent
Generic description of a mouse event.
Definition: MouseEvent.hh:35
gazebo::rendering::FPSViewController::HandleKeyPressEvent
void HandleKeyPressEvent(const std::string &_key)
Handle a key press event.