SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::HapticBase Struct Reference

Base class to Haptic. More...

Inheritance diagram for SDL::HapticBase:
[legend]

Public Member Functions

void Close ()
 Close a haptic device previously opened with OpenHaptic().
HapticID GetID ()
 Get the instance ID of an opened haptic device.
const char * GetName ()
 Get the implementation dependent name of a haptic device.
int GetMaxEffects ()
 Get the number of effects a haptic device can store.
int GetMaxEffectsPlaying ()
 Get the number of effects a haptic device can play at the same time.
Uint32 GetFeatures ()
 Get the haptic device's supported features in bitwise manner.
int GetNumAxes ()
 Get the number of haptic axes the device has.
bool EffectSupported (const HapticEffect &effect)
 Check to see if an effect is supported by a haptic device.
HapticEffectID CreateEffect (const HapticEffect &effect)
 Create a new haptic effect on a specified device.
void UpdateEffect (HapticEffectID effect, const HapticEffect &data)
 Update the properties of an effect.
void RunEffect (HapticEffectID effect, Uint32 iterations)
 Run the haptic effect on its associated haptic device.
void StopEffect (HapticEffectID effect)
 Stop the haptic effect on its associated haptic device.
void DestroyEffect (HapticEffectID effect)
 Destroy a haptic effect on the device.
bool GetEffectStatus (HapticEffectID effect)
 Get the status of the current effect on the specified haptic device.
void SetGain (int gain)
 Set the global gain of the specified haptic device.
void SetAutocenter (int autocenter)
 Set the global autocenter of the device.
void Pause ()
 Pause a haptic device.
void Resume ()
 Resume a haptic device.
void StopEffects ()
 Stop all the currently playing effects on a haptic device.
bool RumbleSupported ()
 Check whether rumble is supported on a haptic device.
void InitRumble ()
 Initialize a haptic device for simple rumble playback.
void PlayRumble (float strength, Uint32 length)
 Run a simple rumble effect on a haptic device.
void StopRumble ()
 Stop the simple rumble on a haptic device.
constexpr ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr ResourceBaseT (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBaseT (std::nullptr_t)
 Constructs null/invalid.
constexpr ResourceBaseT (const ResourceBaseT &)=default
 Copy constructor.
constexpr ResourceBaseT (ResourceBaseT &&) noexcept=default
 Move constructor.
Public Member Functions inherited from SDL::ResourceBaseT< HapticRaw >
constexpr ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBaseT &other) const=default
 Comparison.
constexpr RawConstPointer operator-> () const noexcept
 member access to underlying resource pointer.
constexpr RawPointer get () const noexcept
 Retrieves underlying resource pointer.
constexpr RawPointer release () noexcept
 Retrieves underlying resource pointer and clear this.

Additional Inherited Members

Public Types inherited from SDL::ResourceBaseT< HapticRaw >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.
Protected Member Functions inherited from SDL::ResourceBaseT< HapticRaw >
constexpr ~ResourceBaseT ()=default
 Destructor.
constexpr ResourceBaseToperator= (const ResourceBaseT &)=default
 Assignment operator.

Detailed Description

Base class to Haptic.

See also
Haptic

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