Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Maps touch events (e.g. More...
#include <TouchInput.h>
Public Member Functions | |
CTouchInput () | |
~CTouchInput () | |
bool | IsEnabled () |
Returns whether the touch input mode is enabled for this device. More... | |
InReaction | HandleEvent (const SDL_Event_ *ev) |
void | Frame () |
Should be called once per frame to perform updates. More... | |
Private Types | |
enum | { MOUSE_INACTIVE , MOUSE_ACTIVATING , MOUSE_ACTIVE_UP , MOUSE_ACTIVE_DOWN } |
enum | { STATE_INACTIVE , STATE_FIRST_TOUCH , STATE_PANNING , STATE_ZOOMING } |
Private Member Functions | |
void | OnFingerDown (int id, int x, int y) |
void | OnFingerUp (int id, int x, int y) |
void | OnFingerMotion (int id, int x, int y) |
Private Attributes | |
int | m_MouseEmulateState [MAX_MOUSE] |
CVector2D | m_MouseEmulateDownPos [MAX_MOUSE] |
bool | m_Down [MAX_FINGERS] |
CVector2D | m_Pos [MAX_FINGERS] |
CVector2D | m_Prev [MAX_FINGERS] |
int | m_State |
double | m_FirstTouchTime |
CVector2D | m_FirstTouchPos |
CVector3D | m_PanFocus |
float | m_PanDist |
Static Private Attributes | |
static const size_t | MAX_MOUSE = 2 |
static const size_t | MAX_FINGERS = 2 |
Maps touch events (e.g.
on Android touchscreen devices) onto mouse events and camera movement.
CTouchInput::CTouchInput | ( | ) |
CTouchInput::~CTouchInput | ( | ) |
void CTouchInput::Frame | ( | ) |
Should be called once per frame to perform updates.
InReaction CTouchInput::HandleEvent | ( | const SDL_Event_ * | ev | ) |
bool CTouchInput::IsEnabled | ( | ) |
Returns whether the touch input mode is enabled for this device.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |