Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
Pointer Class Reference

A class representing a touch pointer interaction consisting of an down touch, the last touch and the current touch. More...

#include <TouchTypes.h>

Public Member Functions

 Pointer ()
 
void reset ()
 Resets the pointer and all its touches. More...
 
bool valid () const
 Checks if the "down" touch is valid. More...
 
bool velocity (float &velocityX, float &velocityY, bool fromLast=true) const
 Calculates the velocity in x/y direction using the "down" and either the "last" or "current" touch. More...
 

Public Attributes

Touch down
 
Touch last
 
Touch current
 
bool moving
 
float size
 

Detailed Description

A class representing a touch pointer interaction consisting of an down touch, the last touch and the current touch.

Constructor & Destructor Documentation

◆ Pointer()

Pointer::Pointer ( )
inline

Member Function Documentation

◆ reset()

void Pointer::reset ( void  )
inline

Resets the pointer and all its touches.

◆ valid()

bool Pointer::valid ( ) const
inline

Checks if the "down" touch is valid.

Returns
True if the "down" touch is valid otherwise false

◆ velocity()

bool Pointer::velocity ( float &  velocityX,
float &  velocityY,
bool  fromLast = true 
) const
inline

Calculates the velocity in x/y direction using the "down" and either the "last" or "current" touch.

Parameters
velocityXPlaceholder for velocity in x direction
velocityYPlaceholder for velocity in y direction
fromLastWhether to calculate the velocity with the "last" or the "current" touch
Returns
True if the velocity is valid otherwise false

Member Data Documentation

◆ current

Touch Pointer::current

◆ down

Touch Pointer::down

◆ last

Touch Pointer::last

◆ moving

bool Pointer::moving

◆ size

float Pointer::size

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