omegalib  13.1
omega::CameraController Class Reference

#include <CameraController.h>

Public Types

enum  MoveFlags {
  MoveLeft = Event::ButtonLeft, MoveRight = Event::ButtonRight, MoveUp = Event::Button5, MoveDown = Event::Button6,
  MoveForward = Event::ButtonUp, MoveBackward = Event::ButtonDown
}
 
- Public Types inherited from omega::EngineModule
enum  Priority {
  PriorityLowest = 0, PriorityLow = 1, PriorityNormal = 2, PriorityHigh = 3,
  PriorityHighest = 4
}
 
enum  OpenGLProfile { CoreProfile, CompatibilityProfile, UnspecifiedProfile }
 

Public Member Functions

 CameraController (const String &name="CameraController")
 
bool isEnabled ()
 
virtual void setup (Setting &s)
 
virtual void update (const UpdateContext &context)
 
virtual void handleEvent (const Event &evt)
 
virtual bool handleCommand (const String &cmd)
 
virtual void reset ()
 
void setCamera (Camera *value)
 
CameragetCamera ()
 
float getSpeed ()
 
void setSpeed (float value)
 
void setFreeFlyEnabled (bool value)
 
bool isFreeFlyEnabled ()
 
Vector3f computeSpeedVector (uint moveFlags, float speed, float strafeMultiplier=1.0f)
 Utility method: updates the camera position using speed, yaw pich roll, and a time step. More...
 
- Public Member Functions inherited from omega::EngineModule
 EngineModule (const String &name)
 
 EngineModule ()
 
virtual ~EngineModule ()
 
void requestOpenGLProfile (OpenGLProfile profile)
 This method can be used within an engine module ctor or initialization to test for module compatibility. More...
 
void enableSharedData ()
 
void disableSharedData ()
 
virtual void initialize ()
 
virtual void dispose ()
 
virtual void commitSharedData (SharedOStream &out)
 
virtual void updateSharedData (SharedIStream &in)
 
virtual void initializeRenderer (Renderer *)
 
void doInitialize (Engine *server)
 
void doDispose ()
 
virtual bool isInitialized ()
 
EnginegetEngine ()
 
Priority getPriority ()
 
void setPriority (Priority value)
 
const StringgetName ()
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Protected Attributes

float mySpeed
 
bool myFreeFlyEnabled
 

Additional Inherited Members

- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 
+ Inheritance diagram for omega::CameraController:

Member Enumeration Documentation

Enumerator
MoveLeft 
MoveRight 
MoveUp 
MoveDown 
MoveForward 
MoveBackward 

Constructor & Destructor Documentation

omega::CameraController::CameraController ( const String name = "CameraController")

Member Function Documentation

Vector3f omega::CameraController::computeSpeedVector ( uint  moveFlags,
float  speed,
float  strafeMultiplier = 1.0f 
)

Utility method: updates the camera position using speed, yaw pich roll, and a time step.

Utility method: return a speed vector depeding on move flags and speed multipliers. Useful for turning digital input from keyboards / gamepads into speed information.

Camera* omega::CameraController::getCamera ( )
inline
float omega::CameraController::getSpeed ( )
inline
virtual bool omega::CameraController::handleCommand ( const String cmd)
virtual

Reimplemented from omega::EngineModule.

virtual void omega::CameraController::handleEvent ( const Event evt)
inlinevirtual
bool omega::CameraController::isEnabled ( )
bool omega::CameraController::isFreeFlyEnabled ( )
inline
virtual void omega::CameraController::reset ( )
virtual
void omega::CameraController::setCamera ( Camera value)
inline
void omega::CameraController::setFreeFlyEnabled ( bool  value)
inline
void omega::CameraController::setSpeed ( float  value)
inline
virtual void omega::CameraController::setup ( Setting s)
inlinevirtual

Reimplemented in omega::WandCameraController.

virtual void omega::CameraController::update ( const UpdateContext context)
inlinevirtual

Member Data Documentation

bool omega::CameraController::myFreeFlyEnabled
protected
float omega::CameraController::mySpeed
protected

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