LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::TouchPoint Struct Reference

Touch point that results from a user touch interaction. More...

#include <luciad/input/touch/TouchPoint.h>

Public Member Functions

constexpr TouchPoint (Coordinate location, TouchPointState state, size_t id)
 Creates a touch point. More...
 
constexpr bool operator!= (const TouchPoint &rhs) const
 Inequality comparison operator. More...
 
constexpr bool operator== (const TouchPoint &rhs) const
 Equality comparison operator. More...
 

Public Attributes

size_t id
 The unique identifier of this touch point, valid until this touch point is released. More...
 
Coordinate location
 The screen location of the touch point, expressed in device independent pixels. More...
 
TouchPointState state
 The current TouchPointState for this touch point. More...
 

Detailed Description

Touch point that results from a user touch interaction.

Since
2022.0

Constructor & Destructor Documentation

◆ TouchPoint()

constexpr luciad::TouchPoint::TouchPoint ( Coordinate  location,
TouchPointState  state,
size_t  id 
)
inlineconstexpr

Creates a touch point.

Parameters
locationThe location of the touch point, defined in device independent pixels.
stateThe status of the touch point.
idThe touch device ID, such as an index assigned for each finger for example.

Member Function Documentation

◆ operator!=()

constexpr bool luciad::TouchPoint::operator!= ( const TouchPoint rhs) const
inlineconstexpr

Inequality comparison operator.

Two touch points are not equal if either their id, state or location differ.

Parameters
rhsThe TouchPoint that this instance is being compared to.
Returns
true if the touch points are not equal.

◆ operator==()

constexpr bool luciad::TouchPoint::operator== ( const TouchPoint rhs) const
inlineconstexpr

Equality comparison operator.

Two touch points are equal if their id, state and location are the same.

Parameters
rhsThe TouchPoint that this instance is being compared to.
Returns
true if the touch points are equal.

Member Data Documentation

◆ id

size_t luciad::TouchPoint::id

The unique identifier of this touch point, valid until this touch point is released.

◆ location

Coordinate luciad::TouchPoint::location

The screen location of the touch point, expressed in device independent pixels.

◆ state

TouchPointState luciad::TouchPoint::state

The current TouchPointState for this touch point.