TDME2 1.9.121
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CameraInputHandler Class Referencefinal

Camera Input Handler. More...

#include <tdme/tools/editor/misc/CameraInputHandler.h>

Inheritance diagram for CameraInputHandler:
Inheritance graph
Collaboration diagram for CameraInputHandler:
Collaboration graph

Public Member Functions

 CameraInputHandler (Engine *engine, CameraInputHandlerEventHandler *eventHandler=nullptr)
 Public constructor. More...
 
 ~CameraInputHandler ()
 Destructor. More...
 
const Vector3getSceneCenter ()
 
void setSceneCenter (const Vector3 &sceneCenter)
 Set scene center. More...
 
void reset ()
 Reset. More...
 
void handleInputEvents () override
 Handle input events that have not yet been processed. More...
 
- Public Member Functions inherited from GUIInputEventHandler
virtual void handleInputEvents ()=0
 Handle input events that have not yet been processed. More...
 
virtual ~GUIInputEventHandler ()
 Destructor. More...
 

Private Attributes

Engineengine { nullptr }
 
CameraInputHandlerEventHandlereventHandler { nullptr }
 
bool keyLeft { false }
 
bool keyRight { false }
 
bool keyUp { false }
 
bool keyDown { false }
 
bool keyA { false }
 
bool keyD { false }
 
bool keyW { false }
 
bool keyS { false }
 
bool keyPlus { false }
 
bool keyMinus { false }
 
bool keyR { false }
 
int mouseRotationX { 0 }
 
int mouseRotationY { 0 }
 
int mouseDownLastX { MOUSE_DOWN_LAST_POSITION_NONE }
 
int mouseDownLastY { MOUSE_DOWN_LAST_POSITION_NONE }
 
bool mouseDragging { false }
 
float camScale { 1.0f }
 
float camScaleMax { 15.0f }
 
float camScaleMin { 0.05f }
 
Rotation camLookRotationX
 
Rotation camLookRotationY
 
Vector3 sceneCenter
 
bool resetRequested { false }
 

Static Private Attributes

static constexpr int MOUSE_DOWN_LAST_POSITION_NONE { -1 }
 
static constexpr int MOUSE_PANNING_NONE { 0 }
 
static constexpr int MOUSE_ROTATION_NONE { 0 }
 

Detailed Description

Camera Input Handler.

Author
Andreas Drewke
Version
$Id$

Definition at line 21 of file CameraInputHandler.h.

Constructor & Destructor Documentation

◆ CameraInputHandler()

CameraInputHandler ( Engine engine,
CameraInputHandlerEventHandler eventHandler = nullptr 
)

Public constructor.

Parameters
engineengine
eventHandlerevent handler

Definition at line 29 of file CameraInputHandler.cpp.

◆ ~CameraInputHandler()

Destructor.

Definition at line 38 of file CameraInputHandler.cpp.

Member Function Documentation

◆ getSceneCenter()

const Vector3 & getSceneCenter ( )
inline
Returns
scene center

Definition at line 77 of file CameraInputHandler.h.

◆ handleInputEvents()

void handleInputEvents ( )
overridevirtual

Handle input events that have not yet been processed.

Implements GUIInputEventHandler.

Definition at line 51 of file CameraInputHandler.cpp.

◆ reset()

void reset ( )

Reset.

Definition at line 42 of file CameraInputHandler.cpp.

◆ setSceneCenter()

void setSceneCenter ( const Vector3 sceneCenter)
inline

Set scene center.

Parameters
sceneCenterscene center

Definition at line 85 of file CameraInputHandler.h.

Member Data Documentation

◆ camLookRotationX

Rotation camLookRotationX
private

Definition at line 54 of file CameraInputHandler.h.

◆ camLookRotationY

Rotation camLookRotationY
private

Definition at line 55 of file CameraInputHandler.h.

◆ camScale

float camScale { 1.0f }
private

Definition at line 50 of file CameraInputHandler.h.

◆ camScaleMax

float camScaleMax { 15.0f }
private

Definition at line 51 of file CameraInputHandler.h.

◆ camScaleMin

float camScaleMin { 0.05f }
private

Definition at line 52 of file CameraInputHandler.h.

◆ engine

Engine* engine { nullptr }
private

Definition at line 25 of file CameraInputHandler.h.

◆ eventHandler

CameraInputHandlerEventHandler* eventHandler { nullptr }
private

Definition at line 26 of file CameraInputHandler.h.

◆ keyA

bool keyA { false }
private

Definition at line 32 of file CameraInputHandler.h.

◆ keyD

bool keyD { false }
private

Definition at line 33 of file CameraInputHandler.h.

◆ keyDown

bool keyDown { false }
private

Definition at line 31 of file CameraInputHandler.h.

◆ keyLeft

bool keyLeft { false }
private

Definition at line 28 of file CameraInputHandler.h.

◆ keyMinus

bool keyMinus { false }
private

Definition at line 37 of file CameraInputHandler.h.

◆ keyPlus

bool keyPlus { false }
private

Definition at line 36 of file CameraInputHandler.h.

◆ keyR

bool keyR { false }
private

Definition at line 38 of file CameraInputHandler.h.

◆ keyRight

bool keyRight { false }
private

Definition at line 29 of file CameraInputHandler.h.

◆ keyS

bool keyS { false }
private

Definition at line 35 of file CameraInputHandler.h.

◆ keyUp

bool keyUp { false }
private

Definition at line 30 of file CameraInputHandler.h.

◆ keyW

bool keyW { false }
private

Definition at line 34 of file CameraInputHandler.h.

◆ MOUSE_DOWN_LAST_POSITION_NONE

constexpr int MOUSE_DOWN_LAST_POSITION_NONE { -1 }
staticconstexprprivate

Definition at line 40 of file CameraInputHandler.h.

◆ MOUSE_PANNING_NONE

constexpr int MOUSE_PANNING_NONE { 0 }
staticconstexprprivate

Definition at line 41 of file CameraInputHandler.h.

◆ MOUSE_ROTATION_NONE

constexpr int MOUSE_ROTATION_NONE { 0 }
staticconstexprprivate

Definition at line 42 of file CameraInputHandler.h.

◆ mouseDownLastX

int mouseDownLastX { MOUSE_DOWN_LAST_POSITION_NONE }
private

Definition at line 46 of file CameraInputHandler.h.

◆ mouseDownLastY

int mouseDownLastY { MOUSE_DOWN_LAST_POSITION_NONE }
private

Definition at line 47 of file CameraInputHandler.h.

◆ mouseDragging

bool mouseDragging { false }
private

Definition at line 48 of file CameraInputHandler.h.

◆ mouseRotationX

int mouseRotationX { 0 }
private

Definition at line 44 of file CameraInputHandler.h.

◆ mouseRotationY

int mouseRotationY { 0 }
private

Definition at line 45 of file CameraInputHandler.h.

◆ resetRequested

bool resetRequested { false }
private

Definition at line 59 of file CameraInputHandler.h.

◆ sceneCenter

Vector3 sceneCenter
private

Definition at line 57 of file CameraInputHandler.h.


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