scg3  0.6
scg::CameraController Class Referenceabstract

Base class for all camera controllers, acting on a Camera node (abstract). More...

#include "CameraController.h"

Inheritance diagram for scg::CameraController:
[legend]
Collaboration diagram for scg::CameraController:
[legend]

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
 
- Public Member Functions inherited from scg::Controller
 Controller ()
 
virtual ~Controller ()=0
 

Protected Attributes

CameraSP camera_
 
GLfloat moveVelocity_
 
GLfloat rotateVelocity_
 
GLfloat flightVelocity_
 
GLfloat flightVelocityStep_
 
bool isFlyMode_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CameraController()

scg::CameraController::CameraController ( CameraSP  camera)

Constructor with given camera transformation.

◆ ~CameraController()

virtual scg::CameraController::~CameraController ( )
pure virtual

Destructor.

Member Function Documentation

◆ checkInput()

virtual void scg::CameraController::checkInput ( ViewState viewState)
pure virtual

Check input devices, called by Viewer::startMainLoop().

Parameters
viewStateview state managed by Viewer, may be modified by controller

Implements scg::Controller.

Implemented in scg::KeyboardController, and scg::MouseController.

◆ setCamera()

void scg::CameraController::setCamera ( CameraSP  camera)

Set camera transformation to act on.

◆ setFlightVelocity()

void scg::CameraController::setFlightVelocity ( GLfloat  flightVelocity)

Set velocity for continuous flight of camera.

◆ setFlightVelocityStep()

void scg::CameraController::setFlightVelocityStep ( GLfloat  flightVelocityStep)

Set step for changing flight velocity.

◆ setMoveVelocity()

void scg::CameraController::setMoveVelocity ( GLfloat  moveVelocity)

Set velocity for camera movement.

◆ setRotateVelocity()

void scg::CameraController::setRotateVelocity ( GLfloat  rotateVelocity)

Set velocity for camera rotation.

Member Data Documentation

◆ camera_

CameraSP scg::CameraController::camera_
protected

Definition at line 91 of file CameraController.h.

◆ flightVelocity_

GLfloat scg::CameraController::flightVelocity_
protected

Definition at line 94 of file CameraController.h.

◆ flightVelocityStep_

GLfloat scg::CameraController::flightVelocityStep_
protected

Definition at line 95 of file CameraController.h.

◆ isFlyMode_

bool scg::CameraController::isFlyMode_
protected

true: fly mode, false: examination mode

Definition at line 96 of file CameraController.h.

◆ moveVelocity_

GLfloat scg::CameraController::moveVelocity_
protected

Definition at line 92 of file CameraController.h.

◆ rotateVelocity_

GLfloat scg::CameraController::rotateVelocity_
protected

Definition at line 93 of file CameraController.h.


The documentation for this class was generated from the following file: