The HTouchManager class stores and manages touch input.
More...
#include <HEventInfo.h>
The HTouchManager class stores and manages touch input.
HTouchManager manages touch input usually coming from a multi-touch enabled device.
HTouchManager::HTouchManager |
( |
| ) |
|
HTouchManager::~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
- Parameters
-
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 |
- Returns
- A new or preexisting TouchInfo object constructed from the provided input
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 |
- Returns
- Numher of active touches.
HTouchInfo* HTouchManager::GetTouch |
( |
int |
index, |
|
|
bool |
activeOnly = false |
|
) |
| |
This method retrieves a single touch object
- Parameters
-
- Returns
- HTouchInfo or NULL
int HTouchManager::GetTouchCount |
( |
| ) |
|
- Returns
- Numher of total touches.
int HTouchManager::GetTouches |
( |
HTouchInfo ** |
touches, |
|
|
int |
maxtouches, |
|
|
bool |
activeOnly = false |
|
) |
| |
This method retrieves an array of touches
- Parameters
-
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 |
- Returns
- Number of touches
bool HTouchManager::RemoveTouch |
( |
MVO_POINTER_SIZED_UINT |
ident | ) |
|
This method removes a touch object from the current list of touches.
- Parameters
-
ident | Unique identifier of touch |
- Returns
- True if touch was found
The documentation for this class was generated from the following file: