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={}) noexcept
 Wraps Finger. More...
 
constexpr Finger (FingerID id, float x, float y, float pressure) noexcept
 Constructs from its fields. More...
 
constexpr operator bool () const noexcept
 Check if valid. More...
 
constexpr FingerID GetId () const noexcept
 Get the id. More...
 
constexpr FingerSetId (FingerID newId) noexcept
 Set the id. More...
 
constexpr float GetX () const noexcept
 Get the x. More...
 
constexpr FingerSetX (float newX) noexcept
 Set the x. More...
 
constexpr float GetY () const noexcept
 Get the y. More...
 
constexpr FingerSetY (float newY) noexcept
 Set the y. More...
 
constexpr float GetPressure () const noexcept
 Get the pressure. More...
 
constexpr FingerSetPressure (float newPressure) noexcept
 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 = {})
inlineconstexprnoexcept
Parameters
fingerthe value to be wrapped

◆ Finger() [2/2]

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

Member Function Documentation

◆ GetId()

constexpr FingerID SDL::Finger::GetId ( ) const
inlineconstexprnoexcept
Returns
current id value.

◆ GetPressure()

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

◆ GetX()

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

◆ GetY()

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

◆ operator bool()

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

◆ SetId()

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

◆ SetPressure()

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

◆ SetX()

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

◆ SetY()

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

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