#include <WalkCamManip.h>
Inheritance diagram for nvui::WalkCamManip:
Public Types | |
enum | { _W_KEY = 0x0400, _S_KEY = 0x0800 } |
Additional keys for walking. More... | |
Public Methods | |
NVSG_API | WalkCamManip (void) |
Default Constructor. More... | |
NVSG_API | ~WalkCamManip (void) |
Default Destructor. More... | |
virtual NVSG_API void | keyRepeat () |
Handle key repeats. More... | |
virtual NVSG_API void | apply () |
Apply the states to the camera. More... | |
bool | isWalk (void) |
Signals if the manipulator is in walk mode. More... | |
bool | isTranslate (void) |
Signals if the manipulator is in translation mode. More... | |
bool | isTilt (void) |
Signals if the manipulator is in tilting 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 | 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... | |
bool | isWalkForward (void) |
Signals if the manipulator is in forward walking mode. More... | |
bool | isWalkBackward (void) |
Signals if the manipulator is in backward walking mode. More... | |
virtual NVSG_API void | walk (void) |
Do the camera walk. More... | |
virtual NVSG_API void | translate (void) |
Do the camera translate. More... | |
virtual NVSG_API void | tilt (void) |
Do the camera tilt. 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_speed |
Walk speed. Controlled via key or button input. Default: 1.0. More... | |
Static Protected Attributes | |
NVSG_API const UINT | WALKFORWARD |
Key/button configuration walking. More... | |
NVSG_API const UINT | WALKBACKWARD |
Key/button configuration walking. More... | |
NVSG_API const UINT | TRANSLATE |
Key/button configuration for translating up, down, left and right. More... | |
NVSG_API const UINT | TILT |
Key/button configuration looking left, right, up and down. More... | |
NVSG_API const UINT | INCREASESPEED |
Key/button configuration speed up. More... | |
NVSG_API const UINT | DECREASESPEED |
Key/button configuration slow down. More... | |
NVSG_API const UINT | AREAOFPEACE |
Size of the area where the mouse does not trigger the manipulator. More... |
This manipulator is a special CameraManipulator that interprets/converts mouse movement into walk-through camera movements.
Keys & Buttons
Left mouse button : Walk forward.
Middle mouse button : Walk backward.
W-key : Increase speed.
S-key : Decrease speed.
Ctrl + Left mouse button : Tilt.
Ctrl + Middle mouse button : Pan.
|
Additional keys for walking.
|
|
Default Constructor.
|
|
Default Destructor.
|
|
Handle key repeats. Adapt key repeats. Reimplemented from nvui::CameraManipulator. |
|
Apply the states to the camera. Recalculate the camera with respect to the manipulator states. Implements nvui::CameraManipulator. |
|
Signals if the manipulator is in walk mode. This method compares the current button or key state with the configured button states of this object. e.g. TRANSLATE1
|
|
Signals if the manipulator is in translation mode. This method compares the current button or key state with the configured button states of this object. e.g. TRANSLATE1
|
|
Signals if the manipulator is in tilting mode. This method compares the current button or key state with the configured button states of this object. e.g. TRANSLATE1
|
|
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.
|
|
Set the speed. This parameter controls the speed of the camera movement
|
|
Get the movement speed.
|
|
Map your keys.
Reimplemented from nvui::CameraManipulator. |
|
Signals if the manipulator is in forward walking mode. This method compares the current button or key state with the configured button states of this object. e.g. TRANSLATE1
|
|
Signals if the manipulator is in backward walking mode. This method compares the current button or key state with the configured button states of this object. e.g. TRANSLATE1
|
|
Do the camera walk. Walk forward or backward. You can simply replace it with your own way to handle this. |
|
Do the camera translate. Translate the camera perpendicular to the movement plane. (up, down, left and right) You can simply replace it with your own way to handle this. |
|
Do the camera tilt. Tilt the camera. You rotate the camera in place so you can look at your feet, up into the sky, or rotate left and right. You can simply replace it with your own way to handle this. |
|
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.
|
|
Walk speed. Controlled via key or button input. Default: 1.0.
|
|
Key/button configuration walking.
|
|
Key/button configuration walking.
|
|
Key/button configuration for translating up, down, left and right.
|
|
Key/button configuration looking left, right, up and down.
|
|
Key/button configuration speed up.
|
|
Key/button configuration slow down.
|
|
Size of the area where the mouse does not trigger the manipulator.
|