SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for Haptic.
Public Member Functions | |
HapticRef (HapticParam resource) | |
Constructs from HapticParam. More... | |
HapticRef (const HapticRef &other) | |
Copy constructor. | |
~HapticRef () | |
Destructor. | |
![]() | |
constexpr | Haptic ()=default |
Default ctor. | |
constexpr | Haptic (const HapticRaw resource) |
Constructs from HapticParam. More... | |
constexpr | Haptic (const Haptic &other)=delete |
Copy constructor. | |
constexpr | Haptic (Haptic &&other) |
Move constructor. | |
constexpr | Haptic (const HapticRef &other)=delete |
constexpr | Haptic (HapticRef &&other)=delete |
Haptic (HapticID instance_id) | |
Open a haptic device for use. More... | |
Haptic (JoystickParam joystick) | |
Open a haptic device for use from a joystick device. More... | |
~Haptic () | |
Destructor. | |
Haptic & | operator= (Haptic other) |
Assignment operator. | |
constexpr HapticRaw | get () const |
Retrieves underlying HapticRaw. | |
constexpr HapticRaw | release () |
Retrieves underlying HapticRaw and clear this. | |
constexpr auto | operator<=> (const Haptic &other) const =default |
Comparison. | |
constexpr bool | operator== (std::nullptr_t _) const |
Comparison. | |
constexpr | operator bool () const |
Converts to bool. | |
constexpr | operator HapticParam () const |
Converts to HapticParam. | |
void | Close () |
Close a haptic device previously opened with Haptic.Haptic(). More... | |
HapticID | GetID () |
Get the instance ID of an opened haptic device. More... | |
const char * | GetName () |
Get the implementation dependent name of a haptic device. More... | |
int | GetMaxEffects () |
Get the number of effects a haptic device can store. More... | |
int | GetMaxEffectsPlaying () |
Get the number of effects a haptic device can play at the same time. More... | |
Uint32 | GetFeatures () |
Get the haptic device's supported features in bitwise manner. More... | |
int | GetNumAxes () |
Get the number of haptic axes the device has. More... | |
bool | EffectSupported (const HapticEffect &effect) |
Check to see if an effect is supported by a haptic device. More... | |
int | CreateEffect (const HapticEffect &effect) |
Create a new haptic effect on a specified device. More... | |
void | UpdateEffect (int effect, const HapticEffect &data) |
Update the properties of an effect. More... | |
void | RunEffect (int effect, Uint32 iterations) |
Run the haptic effect on its associated haptic device. More... | |
void | StopEffect (int effect) |
Stop the haptic effect on its associated haptic device. More... | |
void | DestroyEffect (int effect) |
Destroy a haptic effect on the device. More... | |
bool | GetEffectStatus (int effect) |
Get the status of the current effect on the specified haptic device. More... | |
void | SetGain (int gain) |
Set the global gain of the specified haptic device. More... | |
void | SetAutocenter (int autocenter) |
Set the global autocenter of the device. More... | |
void | Pause () |
Pause a haptic device. More... | |
void | Resume () |
Resume a haptic device. More... | |
void | StopEffects () |
Stop all the currently playing effects on a haptic device. More... | |
bool | RumbleSupported () |
Check whether rumble is supported on a haptic device. More... | |
void | InitRumble () |
Initialize a haptic device for simple rumble playback. More... | |
void | PlayRumble (float strength, Uint32 length) |
Run a simple rumble effect on a haptic device. More... | |
void | StopRumble () |
Stop the simple rumble on a haptic device. More... | |
Additional Inherited Members | |
![]() | |
static Haptic | OpenFromMouse () |
Try to open a haptic device from the current mouse. More... | |
|
inline |
resource | a HapticRaw or Haptic. |
This does not takes ownership!