![]() |
scg3
0.6
|
Base class for all camera controllers, acting on a Camera node (abstract). More...
#include "CameraController.h"
Public Member Functions | |
CameraController (CameraSP camera) | |
virtual | ~CameraController ()=0 |
void | setCamera (CameraSP camera) |
void | setMoveVelocity (GLfloat moveVelocity) |
void | setRotateVelocity (GLfloat rotateVelocity) |
void | setFlightVelocity (GLfloat flightVelocity) |
void | setFlightVelocityStep (GLfloat flightVelocityStep) |
virtual void | checkInput (ViewState *viewState)=0 |
![]() | |
Controller () | |
virtual | ~Controller ()=0 |
Protected Attributes | |
CameraSP | camera_ |
GLfloat | moveVelocity_ |
GLfloat | rotateVelocity_ |
GLfloat | flightVelocity_ |
GLfloat | flightVelocityStep_ |
bool | isFlyMode_ |
Base class for all camera controllers, acting on a Camera node (abstract).
A typical CameraController offers actions for camera movement and rotation, and potentially for continuous flight of camera. It may further be possible to toggle between fly mode (free camera movement in space) and examine mode (camera movement relative to center point).
Definition at line 43 of file CameraController.h.
scg::CameraController::CameraController | ( | CameraSP | camera | ) |
Constructor with given camera transformation.
|
pure virtual |
Destructor.
|
pure virtual |
Check input devices, called by Viewer::startMainLoop().
viewState | view state managed by Viewer, may be modified by controller |
Implements scg::Controller.
Implemented in scg::KeyboardController, and scg::MouseController.
void scg::CameraController::setCamera | ( | CameraSP | camera | ) |
Set camera transformation to act on.
void scg::CameraController::setFlightVelocity | ( | GLfloat | flightVelocity | ) |
Set velocity for continuous flight of camera.
void scg::CameraController::setFlightVelocityStep | ( | GLfloat | flightVelocityStep | ) |
Set step for changing flight velocity.
void scg::CameraController::setMoveVelocity | ( | GLfloat | moveVelocity | ) |
Set velocity for camera movement.
void scg::CameraController::setRotateVelocity | ( | GLfloat | rotateVelocity | ) |
Set velocity for camera rotation.
|
protected |
Definition at line 91 of file CameraController.h.
|
protected |
Definition at line 94 of file CameraController.h.
|
protected |
Definition at line 95 of file CameraController.h.
|
protected |
true: fly mode, false: examination mode
Definition at line 96 of file CameraController.h.
|
protected |
Definition at line 92 of file CameraController.h.
|
protected |
Definition at line 93 of file CameraController.h.