SLProject 4.0.000
SLEventHandler Class Reference

Virtual Eventhandler class. More...

#include <SLEventHandler.h>

Inheritance diagram for SLEventHandler:
[legend]

Public Member Functions

 SLEventHandler ()
 
virtual ~SLEventHandler ()
 
virtual SLbool onMouseDown (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseUp (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseMove (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onDoubleClick (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseWheel (const SLint delta, const SLKey mod)
 
virtual SLbool onTouch2Down (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch2Move (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch2Up (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch3Down (const SLint x1, const SLint y1)
 
virtual SLbool onTouch3Move (const SLint x1, const SLint y1)
 
virtual SLbool onTouch3Up (const SLint x1, const SLint y1)
 
virtual SLbool onKeyPress (const SLKey key, const SLKey mod)
 
virtual SLbool onKeyRelease (const SLKey key, const SLKey mod)
 
virtual SLbool onRotationPYR (const SLfloat pitchRAD, const SLfloat yawRAD, const SLfloat rollRAD)
 
void mouseRotationFactor (SLfloat rf)
 
SLfloat mouseRotationFactor ()
 

Protected Attributes

SLfloat _mouseRotationFactor
 Mouse rotation sensibility. More...
 
SLfloat _keyboardDeltaPos
 Delta dist. for keyboard translation. More...
 

Detailed Description

Virtual Eventhandler class.

SLEventHandler provides virtual methods for basic mouse and keyboard events. The SLNode class is derived from the SLEventhandler class and therefore all nodes can act as a eventhandler. For the moment only the camera class handles the events and implements this way the trackball camera. The scene instance has a pointer to the active eventhandler and forwards the events that it gets from the user interface. See also: SLSceneView and SLCamera classes.

Constructor & Destructor Documentation

◆ SLEventHandler()

SLEventHandler::SLEventHandler ( )
inline

◆ ~SLEventHandler()

virtual SLEventHandler::~SLEventHandler ( )
inlinevirtual

Member Function Documentation

◆ mouseRotationFactor() [1/2]

SLfloat SLEventHandler::mouseRotationFactor ( )
inline

◆ mouseRotationFactor() [2/2]

void SLEventHandler::mouseRotationFactor ( SLfloat  rf)
inline

◆ onDoubleClick()

virtual SLbool SLEventHandler::onDoubleClick ( const SLMouseButton  button,
const SLint  x,
const SLint  y,
const SLKey  mod 
)
inlinevirtual

◆ onKeyPress()

virtual SLbool SLEventHandler::onKeyPress ( const SLKey  key,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLGLUniform< T >, and SLCamera.

◆ onKeyRelease()

virtual SLbool SLEventHandler::onKeyRelease ( const SLKey  key,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLCamera.

◆ onMouseDown()

virtual SLbool SLEventHandler::onMouseDown ( const SLMouseButton  button,
const SLint  x,
const SLint  y,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLCamera, and SLTransformNode.

◆ onMouseMove()

virtual SLbool SLEventHandler::onMouseMove ( const SLMouseButton  button,
const SLint  x,
const SLint  y,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLCamera, and SLTransformNode.

◆ onMouseUp()

virtual SLbool SLEventHandler::onMouseUp ( const SLMouseButton  button,
const SLint  x,
const SLint  y,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLCamera, and SLTransformNode.

◆ onMouseWheel()

virtual SLbool SLEventHandler::onMouseWheel ( const SLint  delta,
const SLKey  mod 
)
inlinevirtual

Reimplemented in SLCamera.

◆ onRotationPYR()

virtual SLbool SLEventHandler::onRotationPYR ( const SLfloat  pitchRAD,
const SLfloat  yawRAD,
const SLfloat  rollRAD 
)
inlinevirtual

◆ onTouch2Down()

virtual SLbool SLEventHandler::onTouch2Down ( const SLint  x1,
const SLint  y1,
const SLint  x2,
const SLint  y2 
)
inlinevirtual

Reimplemented in SLCamera.

◆ onTouch2Move()

virtual SLbool SLEventHandler::onTouch2Move ( const SLint  x1,
const SLint  y1,
const SLint  x2,
const SLint  y2 
)
inlinevirtual

Reimplemented in SLCamera.

◆ onTouch2Up()

virtual SLbool SLEventHandler::onTouch2Up ( const SLint  x1,
const SLint  y1,
const SLint  x2,
const SLint  y2 
)
inlinevirtual

Reimplemented in SLCamera.

◆ onTouch3Down()

virtual SLbool SLEventHandler::onTouch3Down ( const SLint  x1,
const SLint  y1 
)
inlinevirtual

◆ onTouch3Move()

virtual SLbool SLEventHandler::onTouch3Move ( const SLint  x1,
const SLint  y1 
)
inlinevirtual

◆ onTouch3Up()

virtual SLbool SLEventHandler::onTouch3Up ( const SLint  x1,
const SLint  y1 
)
inlinevirtual

Member Data Documentation

◆ _keyboardDeltaPos

SLfloat SLEventHandler::_keyboardDeltaPos
protected

Delta dist. for keyboard translation.

◆ _mouseRotationFactor

SLfloat SLEventHandler::_mouseRotationFactor
protected

Mouse rotation sensibility.


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