Haptic class
A haptic device.
Properties
- autocenter ← int
-
Set the global autocenter of the device.
no getter
-
features
→ List<
HapticFeature> -
Get the features supported by this device.
no setter
- gain ← int
-
Set the global gain of the specified haptic device.
no getter
-
handle
→ Pointer<
SDL_Haptic> -
The pointer for this object.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Get the index of a haptic device.
no setter
- name → String
-
Get the implementation dependent name of a haptic device.
no setter
- numAxes → int
-
Get the number of haptic axes the device has.
no setter
- numEffects → int
-
Get the number of effects a haptic device can store.
no setter
- numEffectsPlaying → int
-
Get the number of effects a haptic device can play at the same time.
no setter
- rumbleSupported → bool
-
Check whether rumble is supported on a haptic device.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdl → Sdl
-
The SDL bindings to use.
finalinherited
Methods
-
close(
) → void - Close this device.
-
destroy(
) → void -
How this object should be destroyed.
inherited
-
destroyEffect(
int effectId) → void -
Destroy the effect referenced by the given
effectId
. -
getEffectPlaying(
int effectId) → bool -
Return
true
if the effect represented byeffectId
is currently playing. -
init(
) → void - Initialize a haptic device for simple rumble playback.
-
isSupported(
HapticEffect effect) → bool -
Returns
true
if the giveneffect
is supported by this device. -
newEffect(
HapticEffect effect) → int -
Upload the given
effect
to this device. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pause a haptic device.
-
rumblePlay(
double strength, int length) → void - Run a simple rumble effect on a haptic device.
-
rumbleStop(
) → void - Stop the simple rumble on a haptic device.
-
runEffect(
int effectId, {int? iterations}) → void -
Run the effect referenced by the given
effectId
. -
stopAll(
) → void - Stop all the currently playing effects on a haptic device.
-
stopEffect(
int effectId) → void -
Stop the effect referenced by
effectId
. -
toString(
) → String -
A string representation of this object.
inherited
-
unpause(
) → void - Unpause a haptic device.
-
updateEffect(
int effectId, HapticEffect effect) → void -
Update the effect referenced by
effectId
witheffect
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited