#include <HEventInfo.h>
Public Member Functions | |
HTouchInfo * | AddTouch (float x, float y, float timestamp, int taps, MVO_POINTER_SIZED_UINT ident) |
void | ClearTouchActivity () |
void | ClearTouches () |
int | GetActiveTouchCount () |
HTouchInfo * | GetTouch (int index, bool activeOnly=false) |
int | GetTouchCount () |
int | GetTouches (HTouchInfo **touches, int maxtouches, bool activeOnly=false) |
HTouchManager () | |
bool | RemoveTouch (MVO_POINTER_SIZED_UINT ident) |
~HTouchManager () |
HTouchManager manages touch input usually coming from a multi-touch enabled device.
HTouchManager::HTouchManager | ( | ) |
Constructs an HTouchManager object.
HTouchManager::~HTouchManager | ( | ) |
Destructor for HTouchManager
HTouchInfo* HTouchManager::AddTouch | ( | float | x, | |
float | y, | |||
float | timestamp, | |||
int | taps, | |||
MVO_POINTER_SIZED_UINT | ident | |||
) |
This method creates a HTouchInfo object and adds this object to the currently list of touch objects
x | The X coordinate of the touch event, in window space. | |
y | The Y coordinate of the touch event, in window space. | |
timestamp | The time when the touch has occured | |
taps | Number of "taps" (one or more consecutive touches interpreted as one touch) | |
ident | Unique identifier |
void HTouchManager::ClearTouchActivity | ( | ) |
Clears the activity flag on all touches. Depending on the platform touches might be marked as "active" if they are referenced as part of a touch event. As an example a touch sequnce might start and end with 3 simultaneous touches but might consist of only one or two touches in between.
int HTouchManager::GetActiveTouchCount | ( | ) | [inline] |
HTouchInfo* HTouchManager::GetTouch | ( | int | index, | |
bool | activeOnly = false | |||
) |
This method retrieves a single touch object
index | Zero based index less than GetTouchCount() or GetActiveTouchCount() | |
activeOnly | Only return active touches |
int HTouchManager::GetTouchCount | ( | ) |
int HTouchManager::GetTouches | ( | HTouchInfo ** | touches, | |
int | maxtouches, | |||
bool | activeOnly = false | |||
) |
This method retrieves an array of touches
touches | Array of pointers to HTouchInfo Objects. Returned to caller. Passed by reference always. | |
maxtouches | Maximum number of touches returned in "touches" | |
activeOnly | Only return active touches |
bool HTouchManager::RemoveTouch | ( | MVO_POINTER_SIZED_UINT | ident | ) |
This method removes a touch object from the current list of touches.
ident | Unique identifier of touch |