HTouchManager Class Reference

The HTouchManager class stores and manages touch input. More...

#include <HEventInfo.h>

Public Member Functions

HTouchInfoAddTouch (float x, float y, float timestamp, int taps, MVO_POINTER_SIZED_UINT ident)
void ClearTouchActivity ()
void ClearTouches ()
int GetActiveTouchCount ()
HTouchInfoGetTouch (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 ()

Detailed Description

The HTouchManager class stores and manages touch input.

HTouchManager manages touch input usually coming from a multi-touch enabled device.

Constructor & Destructor Documentation

◆ HTouchManager()

HTouchManager::HTouchManager ( )

Constructs an HTouchManager object.

◆ ~HTouchManager()

HTouchManager::~HTouchManager ( )

Destructor for HTouchManager

Member Function Documentation

◆ AddTouch()

HTouchInfo* HTouchManager::AddTouch ( float  x,
float  y,
float  timestamp,
int  taps,

This method creates a HTouchInfo object and adds this object to the currently list of touch objects

xThe X coordinate of the touch event, in window space.
yThe Y coordinate of the touch event, in window space.
timestampThe time when the touch has occured
tapsNumber of "taps" (one or more consecutive touches interpreted as one touch)
identUnique identifier
A new or preexisting TouchInfo object constructed from the provided input

◆ ClearTouchActivity()

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.

◆ GetActiveTouchCount()

int HTouchManager::GetActiveTouchCount ( )
Numher of active touches.

◆ GetTouch()

HTouchInfo* HTouchManager::GetTouch ( int  index,
bool  activeOnly = false 

This method retrieves a single touch object

indexZero based index less than GetTouchCount() or GetActiveTouchCount()
activeOnlyOnly return active touches
HTouchInfo or NULL

◆ GetTouchCount()

int HTouchManager::GetTouchCount ( )
Numher of total touches.

◆ GetTouches()

int HTouchManager::GetTouches ( HTouchInfo touches[],
int  maxtouches,
bool  activeOnly = false 

This method retrieves an array of touches

touchesArray of pointers to HTouchInfo Objects. Returned to caller. Passed by reference always.
maxtouchesMaximum number of touches returned in "touches"
activeOnlyOnly return active touches
Number of touches

◆ RemoveTouch()

bool HTouchManager::RemoveTouch ( MVO_POINTER_SIZED_UINT  ident)

This method removes a touch object from the current list of touches.

identUnique identifier of touch
True if touch was found

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