First Person Shooter style view controller.
More...
#include <rendering/rendering.hh>
Inherits ViewController.
|
| FPSViewController (UserCameraPtr _camera) |
| Constructor.
|
|
virtual | ~FPSViewController () |
| Destructor.
|
|
std::string | GetTypeString () const |
| Get the type of view controller.
|
|
void | HandleKeyPressEvent (const std::string &_key) |
| Handle a key press event.
|
|
void | HandleKeyReleaseEvent (const std::string &_key) |
| Handle a key release event.
|
|
virtual void | HandleMouseEvent (const common::MouseEvent &_event) |
| Handle a mouse event.
|
|
virtual void | Init () |
| Initialize the controller.
|
|
virtual void | Init ()=0 |
| Initialize the view controller.
|
|
virtual void | Init (const ignition::math::Vector3d &_focalPoint, const double _yaw=0, const double _pitch=0) |
| Initialize with a focus point.
|
|
virtual void | Resize (const unsigned int _width, const unsigned int _height) |
| Called by the UserCamera when a resize event occurs.
|
|
void | SetEnabled (bool _value) |
| Set whether the controller is enabled.
|
|
virtual void | Update () |
| Update the camera position.
|
|
|
static std::string | GetTypeString () |
| Get the type name of this view controller.
|
|
First Person Shooter style view controller.
◆ FPSViewController()
◆ ~FPSViewController()
◆ GetTypeString() [1/2]
static std::string GetTypeString |
( |
| ) |
|
|
static |
Get the type name of this view controller.
- Returns
- The name of the controller type: "fps"
◆ GetTypeString() [2/2]
std::string GetTypeString |
( |
| ) |
const |
|
inherited |
Get the type of view controller.
- Returns
- The view controller type string.
◆ HandleKeyPressEvent()
void HandleKeyPressEvent |
( |
const std::string & | _key | ) |
|
|
virtual |
Handle a key press event.
- Parameters
-
[in] | _key | The key that was pressed. |
Implements ViewController.
◆ HandleKeyReleaseEvent()
void HandleKeyReleaseEvent |
( |
const std::string & | _key | ) |
|
|
virtual |
Handle a key release event.
- Parameters
-
[in] | _key | The key that was released. |
Implements ViewController.
◆ HandleMouseEvent()
Handle a mouse event.
- Parameters
-
[in] | _event | The mouse position. |
Implements ViewController.
◆ Init() [1/3]
◆ Init() [2/3]
◆ Init() [3/3]
virtual void Init |
( |
const ignition::math::Vector3d & | _focalPoint, |
|
|
const double | _yaw = 0, |
|
|
const double | _pitch = 0 ) |
|
virtual |
Initialize with a focus point.
- Parameters
-
[in] | _focalPoint | The point to look at. |
[in] | _yaw | Initial yaw angle. |
[in] | _pitch | Initial pitch angle. |
Reimplemented from ViewController.
◆ Resize()
virtual void Resize |
( |
const unsigned int | _width, |
|
|
const unsigned int | _height ) |
|
virtualinherited |
◆ SetEnabled()
void SetEnabled |
( |
bool | _value | ) |
|
|
inherited |
Set whether the controller is enabled.
- Parameters
-
[in] | _value | True if the controller is enabled. |
◆ Update()
◆ camera
Pointer to the camera to control.
◆ enabled
◆ typeString
The documentation for this class was generated from the following file: