FreeformCameraController Class Reference
#include <FreeformCameraController.h>
List of all members.
Public Member Functions |
| | FreeformCameraController (ICameraManipulator *cameraManipulator, OSGCanvas *canvas) |
| ICameraManipulator * | getCameraManipulator () |
| void | setCameraManipulator (ICameraManipulator *cameraManipulator) |
| void | enable (int x, int y) |
| void | disable () |
| bool | isEnabled () |
| void | onMouseLeftUp (int x, int y) |
| void | onMouseLeftDown (int x, int y) |
| void | onMouseMiddleUp (int x, int y) |
| void | onMouseMiddleDown (int x, int y) |
| void | onMouseRightUp (int x, int y) |
| void | onMouseRightDown (int x, int y) |
| void | onMouseMove (int x, int y) |
| void | onMouseWheel (int x, int y, int d) |
| void | onKeyDown (int key) |
| void | onKeyUp (int key) |
Protected Attributes |
| bool | _isForward |
| bool | _isLeft |
| bool | _isBackward |
| bool | _isRight |
| int | _mouseX |
| int | _mouseY |
| bool | _enabled |
| ICameraManipulator * | _cameraManipulator |
| OSGCanvas * | _canvas |
Detailed Description
Klasa koja realizira kontroler kamere za pogled iz prvog lica, i slobodno gibanje u svim dimenzijama - "letenje" po sceni.
Manipulator posjeduje dva stanja - aktivno i neaktivno. Početno stanje je neaktivno. Prijelaz iz jednog stanja u drugo se vrši pritiskom na srednju tipku miša.
U neaktivnom stanju, manipulator ne utječe na kameru, a kursor je vidljiv.
U aktivnom stanju, kursor je nevidljiv, a tipke WASD translatiraju kameru naprijed-nazad, lijevo-desno (strafing), dok pomaci miša rotiraju kameru (mijenjaju orijentaciju oko x i z osi - gore/dolje, lijevo/desno).
Dakle, u neaktivnom stanju je moguće vršiti selekciju i manipulaciju objektima, dodavati / brisati objekte itd, dok je u aktivnom stanju to nemoguće.
Constructor & Destructor Documentation
Member Function Documentation
| void FreeformCameraController::disable |
( |
|
) |
[virtual] |
| void FreeformCameraController::enable |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| bool FreeformCameraController::isEnabled |
( |
|
) |
[virtual] |
| void FreeformCameraController::onKeyDown |
( |
int |
key |
) |
[virtual] |
| void FreeformCameraController::onKeyUp |
( |
int |
key |
) |
[virtual] |
| void FreeformCameraController::onMouseLeftDown |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseLeftUp |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseMiddleDown |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseMiddleUp |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseMove |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseRightDown |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseRightUp |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [virtual] |
| void FreeformCameraController::onMouseWheel |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
d | |
|
) |
| | [virtual] |
| void FreeformCameraController::setCameraManipulator |
( |
ICameraManipulator * |
cameraManipulator |
) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: