HTouchManager
-
class
HTouchManager The
HTouchManagerclass stores and manages touch input.HTouchManagermanages touch input usually coming from a multi-touch enabled device.
Methods
-
HTouchManager::HTouchManager() Constructs an
HTouchManagerobject.
-
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
HTouchInfoobject and adds this object to the currently list of touch objectsParameters
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.
-
void
HTouchManager::ClearTouches()
-
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 touchReturns
True if touch was found
-
int
HTouchManager::GetActiveTouchCount() Returns
Numher of active touches.
-
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
HTouchInfoObjects. Returned to caller. Passed by reference always.maxtouches: Maximum number of touches returned in “touches”
activeOnly: Only return active touches
Returns
Number of touches
-
HTouchInfo *
HTouchManager::GetTouch(int index, bool activeOnly = false) This method retrieves a single touch object
Parameters
index: Zero based index less than
GetTouchCount()orGetActiveTouchCount()activeOnly: Only return active touches
Returns
HTouchInfoor NULL
Variables
-
unsigned int
HTouchManager::m_ActiveTouches private
unsigned int
-
vlist_s *
HTouchManager::m_TouchList private
vlist_s