#include <FlightCamManip.h>
Inheritance diagram for nvui::FlightCamManip:
Public Types | |
enum | { _W_KEY = 0x0400, _S_KEY = 0x0800 } |
Additional keys for flying. More... | |
Public Methods | |
NVSG_API | FlightCamManip (void) |
Default constructor. More... | |
NVSG_API | ~FlightCamManip (void) |
Default destructor. More... | |
virtual NVSG_API void | apply (void) |
Apply the states to the camera. More... | |
virtual NVSG_API void | keyRepeat () |
Handle key repeats. More... | |
bool | isFly (void) |
Signals if the manipulator is in fly mode. More... | |
void | setScreenSize (UINT x, UINT y) |
Set the screen size. More... | |
void | setWorldUpVector (nvmath::Vec3f up) |
Set the world up-vector. More... | |
const nvmath::Vec3f & | getWorldUpVector () |
Get the world up-vector. More... | |
void | setSpeedIncreaseFactor (float factor) |
Define speed increase factor. More... | |
float | getSpeedIncreaseFactor () |
Get the speed increase factor. More... | |
void | setHSensitivity (float sensitivity) |
Define horizontal sensitivity. More... | |
float | getHSensitivity () |
Get the horizontal sensitivity. More... | |
void | setVSensitivity (float sensitivity) |
Define vertical sensitivity. More... | |
float | getVSensitivity () |
Get the vertical sensitivity. More... | |
void | setSpeed (float speed) |
Set the speed. More... | |
float | getSpeed () |
Get the movement speed. More... | |
Protected Methods | |
virtual NVSG_API UINT | convertKey (UINT key) |
Map your keys. More... | |
void | fly (void) |
Do the camera fly. More... | |
bool | isFlyForward (void) |
Signals if the manipulator is in forward flying mode. More... | |
bool | isFlyBackward (void) |
Signals if the manipulator is in backward flying mode. More... | |
Protected Attributes | |
UINT | m_ScreenSizeX |
Width of the screen (pixels). More... | |
UINT | m_ScreenSizeY |
Height of the screen (pixels). More... | |
nvmath::Vec3f | m_worldUpVector |
Up-vector of the world. More... | |
float | m_speedIncreaseFactor |
Factor that influences the stepping. Default: 2.0 NOTE: This factor must not be 0! More... | |
float | m_hSensitivity |
Factor that influences the horizontal rotation. Default: 1.0. More... | |
float | m_vSensitivity |
Factor that influences the vertical rotation. Default: 1.0. More... | |
float | m_speed |
Flight speed. Controlled via key or button input. Default: 1.0. More... | |
Static Protected Attributes | |
NVSG_API const UINT | FLYFORWARD |
Key/button configuration flying. More... | |
NVSG_API const UINT | FLYBACKWARD |
Key/button configuration flying. More... | |
NVSG_API const UINT | INCREASESPEED |
Key/button configuration flying. More... | |
NVSG_API const UINT | DECREASESPEED |
Key/button configuration flying. More... | |
NVSG_API const float | AREAOFPEACE |
Size if the area where the mouse does not trigger the manipulator. More... |
This manipulator is a special CameraManipulator that interpretes/converts mouse movement into fly-through camera movements.
Keys & Buttons
Left mouse button : Fly forward.
Middle mouse button : Fly backward.
W-key : Increase speed.
S-key : Decrease speed.
|
Additional keys for flying.
|
|
Default constructor.
|
|
Default destructor.
|
|
Apply the states to the camera. Recalculate the camera regarding the manipulator states. Implements nvui::CameraManipulator. |
|
Handle key repeats. Adapt key repeats. Reimplemented from nvui::CameraManipulator. |
|
Signals if the manipulator is in fly mode. This method compares the current button/key state with the configured button states of this object. e.g. FLYFORWARD
|
|
Set the screen size. Set the screen resolution. The resolution is needed for the sensitivity of the manipulator. Default is 1280x1024.
|
|
Set the world up-vector. Define where the 'sky' is.
|
|
Get the world up-vector.
|
|
Define speed increase factor. The current speed will be multiplied or divided by this factor
|
|
Get the speed increase factor.
|
|
Define horizontal sensitivity. The horizontal sensitivity is a factor that influences how sensitive the manipulator reacts to horizontal rotation changes
|
|
Get the horizontal sensitivity.
|
|
Define vertical sensitivity. The vertical sensitivity is a factor that influences how sensitive the manipulator reacts to vertical rotation changes
|
|
Get the vertical sensitivity.
|
|
Set the speed. This parameter controls the speed of the camera movement
|
|
Get the movement speed.
|
|
Map your keys.
Reimplemented from nvui::CameraManipulator. |
|
Do the camera fly. Fly forward or backward. You can simply replace it with your own way to handle this. |
|
Signals if the manipulator is in forward flying mode. This method compares the current button or key state with the configured button states of this object. e.g. FLYFORWARD
|
|
Signals if the manipulator is in backward flying mode. This method compares the current button or key state with the configured button states of this object. e.g. FLYFORWARD
|
|
Width of the screen (pixels).
|
|
Height of the screen (pixels).
|
|
Up-vector of the world.
|
|
Factor that influences the stepping. Default: 2.0 NOTE: This factor must not be 0!
|
|
Factor that influences the horizontal rotation. Default: 1.0.
|
|
Factor that influences the vertical rotation. Default: 1.0.
|
|
Flight speed. Controlled via key or button input. Default: 1.0.
|
|
Key/button configuration flying.
|
|
Key/button configuration flying.
|
|
Key/button configuration flying.
|
|
Key/button configuration flying.
|
|
Size if the area where the mouse does not trigger the manipulator.
|