kodi
Public Member Functions | Public Attributes | List of all members
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>

Collaboration diagram for Pointer:
Collaboration graph
[legend]

Public Member Functions

void reset ()
 Resets the pointer and all its touches.
 
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.

Member Function Documentation

◆ 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

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