# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::GhostCameraManipulator Class Reference

The GhostCameraManipulator class is an UIEventListener that controls the position and orientation of a Camera. More...

`#include <GhostCameraManipulator.hpp>`

Inheritance diagram for vl::GhostCameraManipulator:

List of all members.

## Public Member Functions
| GhostCameraManipulator ()
virtual const char * | className ()
| Returns the name of the class.
virtual void | mouseMoveEvent (int x, int y)
virtual void | runEvent ()
void | setCamera (Camera *camera)
Camera * | camera ()
const Camera * | camera () const
void | setKeysForward (EKey key, EKey modifier=Key_None)
void | setKeysBackward (EKey key, EKey modifier=Key_None)
void | setKeysLeft (EKey key, EKey modifier=Key_None)
void | setKeysRight (EKey key, EKey modifier=Key_None)
void | setKeysUp (EKey key, EKey modifier=Key_None)
void | setKeysDown (EKey key, EKey modifier=Key_None)
void | prepareToReconnect ()
| Reimplement this in order to react to a setEnabled(true), see setEnabled() for more information.
void | setPosition (vec3 position)
const vec3 & | position () const
void | setXDegrees (Real degree)
Real | xDegrees ()
void | setYDegrees (Real degree)
Real | yDegrees ()
Real | rotationSpeed () const
Real | movementSpeed () const
void | setRotationSpeed (Real speed)
void | setMovementSpeed (Real speed)
## Protected Attributes
ref< Camera > | mCamera
vec3 | mPosition
Real | mLastTime
Real | mRotationSpeed
Real | mMovementSpeed
Real | mXDegrees
Real | mYDegrees
EKey | mKeysForward [2]
EKey | mKeysBackward [2]
EKey | mKeysUp [2]
EKey | mKeysDown [2]
EKey | mKeysLeft [2]
EKey | mKeysRight [2]

## Detailed Description

The GhostCameraManipulator class is an UIEventListener that controls the position and orientation of a Camera.

Using the GhostCameraManipulator class the user can freely fly around in the scene just like a ghost would do.

## Constructor & Destructor Documentation

GhostCameraManipulator::GhostCameraManipulator | ( |  | ) |

## Member Function Documentation

virtual const char* vl::GhostCameraManipulator::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::UIEventListener.

void GhostCameraManipulator::mouseMoveEvent | ( | int | x,
|  | int | y |
| ) |  |  | `[virtual]`

Reimplemented from vl::UIEventListener.

void GhostCameraManipulator::runEvent | ( |  | ) | `[virtual]`

Reimplemented from vl::UIEventListener.

void GhostCameraManipulator::setCamera | ( | Camera * | camera | ) |

Camera * GhostCameraManipulator::camera | ( |  | ) |

const Camera * GhostCameraManipulator::camera | ( |  | ) | const

void vl::GhostCameraManipulator::setKeysForward | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void vl::GhostCameraManipulator::setKeysBackward | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void vl::GhostCameraManipulator::setKeysLeft | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void vl::GhostCameraManipulator::setKeysRight | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void vl::GhostCameraManipulator::setKeysUp | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void vl::GhostCameraManipulator::setKeysDown | ( | EKey | key,
|  | EKey | modifier = `Key_None` |
| ) |  |  | `[inline]`

void GhostCameraManipulator::prepareToReconnect | ( |  | ) | `[virtual]`

Reimplement this in order to react to a setEnabled(true), see setEnabled() for more information.

Reimplemented from vl::UIEventListener.

void vl::GhostCameraManipulator::setPosition | ( | vec3 | position | ) | `[inline]`

const vec3& vl::GhostCameraManipulator::position | ( |  | ) | const`[inline]`

void vl::GhostCameraManipulator::setXDegrees | ( | Real | degree | ) | `[inline]`

Real vl::GhostCameraManipulator::xDegrees | ( |  | ) | `[inline]`

void vl::GhostCameraManipulator::setYDegrees | ( | Real | degree | ) | `[inline]`

Real vl::GhostCameraManipulator::yDegrees | ( |  | ) | `[inline]`

Real vl::GhostCameraManipulator::rotationSpeed | ( |  | ) | const`[inline]`

Real vl::GhostCameraManipulator::movementSpeed | ( |  | ) | const`[inline]`

void vl::GhostCameraManipulator::setRotationSpeed | ( | Real | speed | ) | `[inline]`

void vl::GhostCameraManipulator::setMovementSpeed | ( | Real | speed | ) | `[inline]`

## Member Data Documentation

ref<Camera> vl::GhostCameraManipulator::mCamera`[protected]`

vec3 vl::GhostCameraManipulator::mPosition`[protected]`

Real vl::GhostCameraManipulator::mLastTime`[protected]`

Real vl::GhostCameraManipulator::mRotationSpeed`[protected]`

Real vl::GhostCameraManipulator::mMovementSpeed`[protected]`

Real vl::GhostCameraManipulator::mXDegrees`[protected]`

Real vl::GhostCameraManipulator::mYDegrees`[protected]`

EKey vl::GhostCameraManipulator::mKeysForward[2]`[protected]`

EKey vl::GhostCameraManipulator::mKeysBackward[2]`[protected]`

EKey vl::GhostCameraManipulator::mKeysUp[2]`[protected]`

EKey vl::GhostCameraManipulator::mKeysDown[2]`[protected]`

EKey vl::GhostCameraManipulator::mKeysLeft[2]`[protected]`

EKey vl::GhostCameraManipulator::mKeysRight[2]`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/GhostCameraManipulator.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/GhostCameraManipulator.cpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:28:58 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.