Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Touch Class Reference

A class representing a touch consisting of an x and y coordinate and a time. More...

#include <TouchTypes.h>

Inheritance diagram for Touch:
CVector

Public Member Functions

bool valid () const
 Checks if the touch is valid i.e. if the x/y coordinates and the time are >= 0.
 
void copy (const Touch &other)
 Copies the x/y coordinates and the time from the given touch.
 
- Public Member Functions inherited from CVector
 CVector ()=default
 
constexpr CVector (float xCoord, float yCoord)
 
constexpr CVector operator+ (const CVector &other) const
 
constexpr CVector operator- (const CVector &other) const
 
CVectoroperator+= (const CVector &other)
 
CVectoroperator-= (const CVector &other)
 
constexpr float scalar (const CVector &other) const
 
float length () const
 

Public Attributes

int64_t time = -1
 
- Public Attributes inherited from CVector
float x = 0
 
float y = 0
 

Detailed Description

A class representing a touch consisting of an x and y coordinate and a time.

Member Function Documentation

◆ copy()

void Touch::copy ( const Touch & other)
inline

Copies the x/y coordinates and the time from the given touch.

Parameters
otherTouch to copy x/y coordinates and time from

◆ valid()

bool Touch::valid ( ) const
inline

Checks if the touch is valid i.e. if the x/y coordinates and the time are >= 0.

Returns
True if the touch is valid otherwise false

Member Data Documentation

◆ time

int64_t Touch::time = -1

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