SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::Finger Struct Reference

Data about a single finger in a multitouch event. More...

Inheritance diagram for SDL::Finger:
Inheritance graph
[legend]
Collaboration diagram for SDL::Finger:
Collaboration graph
[legend]

Public Member Functions

constexpr Finger (const FingerRaw &finger={})
 Wraps Finger. More...
 
constexpr Finger (SDL_FingerID id, float x, float y, float pressure)
 Constructs from its fields. More...
 
constexpr operator bool () const
 Check if valid. More...
 
constexpr SDL_FingerID GetId () const
 Get the id. More...
 
constexpr FingerSetId (SDL_FingerID newId)
 Set the id. More...
 
constexpr float GetX () const
 Get the x. More...
 
constexpr FingerSetX (float newX)
 Set the x. More...
 
constexpr float GetY () const
 Get the y. More...
 
constexpr FingerSetY (float newY)
 Set the y. More...
 
constexpr float GetPressure () const
 Get the pressure. More...
 
constexpr FingerSetPressure (float newPressure)
 Set the pressure. More...
 

Detailed Description

Each touch event is a collection of fingers that are simultaneously in contact with the touch device (so a "touch" can be a "multitouch," in reality), and this struct reports details of the specific fingers.

Since
This struct is available since SDL 3.2.0.
See also
GetTouchFingers

Constructor & Destructor Documentation

◆ Finger() [1/2]

constexpr SDL::Finger::Finger ( const FingerRaw finger = {})
inlineconstexpr
Parameters
fingerthe value to be wrapped

◆ Finger() [2/2]

constexpr SDL::Finger::Finger ( SDL_FingerID  id,
float  x,
float  y,
float  pressure 
)
inlineconstexpr
Parameters
idthe value for id.
xthe value for x.
ythe value for y.
pressurethe value for pressure.

Member Function Documentation

◆ GetId()

constexpr SDL_FingerID SDL::Finger::GetId ( ) const
inlineconstexpr
Returns
current id value.

◆ GetPressure()

constexpr float SDL::Finger::GetPressure ( ) const
inlineconstexpr
Returns
current pressure value.

◆ GetX()

constexpr float SDL::Finger::GetX ( ) const
inlineconstexpr
Returns
current x value.

◆ GetY()

constexpr float SDL::Finger::GetY ( ) const
inlineconstexpr
Returns
current y value.

◆ operator bool()

constexpr SDL::Finger::operator bool ( ) const
inlineexplicitconstexpr
Returns
True if valid state, false otherwise.

◆ SetId()

constexpr Finger & SDL::Finger::SetId ( SDL_FingerID  newId)
inlineconstexpr
Parameters
newIdthe new id value.
Returns
Reference to self.

◆ SetPressure()

constexpr Finger & SDL::Finger::SetPressure ( float  newPressure)
inlineconstexpr
Parameters
newPressurethe new pressure value.
Returns
Reference to self.

◆ SetX()

constexpr Finger & SDL::Finger::SetX ( float  newX)
inlineconstexpr
Parameters
newXthe new x value.
Returns
Reference to self.

◆ SetY()

constexpr Finger & SDL::Finger::SetY ( float  newY)
inlineconstexpr
Parameters
newYthe new y value.
Returns
Reference to self.

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