Class: SDL2::Haptic

Inherits:
Struct
  • Object
show all
Includes:
DIRECTION, FEATURES
Defined in:
lib/sdl2/haptic.rb

Defined Under Namespace

Modules: DIRECTION, FEATURES Classes: Condition, Constant, Custom, Direction, Effect, LeftRight, Periodic, Ramp

Constant Summary collapse

INFINITY =

Used to play a device an infinite number of times. TODO: Review if this works.

4294967295
COMMON_LAYOUT =

Identical starting elements shared between structures. You can ignore this constant.

[:type, :uint16,
  :direction, Direction,

  :length, :uint32,
  :delay, :uint16,

  :button, :uint16,
  :interval, :uint16
]
COMMON_ENVELOPE =

Identical ending elements shared between structures. You can ignore this constant.

[
  :attack_length, :uint16,
  :attack_level, :uint16,
  :fade_length, :uint16,
  :fade_level, :uint16
]

Constants included from DIRECTION

DIRECTION::CARTESIAN, DIRECTION::POLAR, DIRECTION::SPHERICAL

Constants included from FEATURES

FEATURES::AUTOCENTER, FEATURES::CONSTANT, FEATURES::CUSTOM, FEATURES::DAMPER, FEATURES::FRICTION, FEATURES::GAIN, FEATURES::INERTIA, FEATURES::LEFTRIGHT, FEATURES::PAUSE, FEATURES::RAMP, FEATURES::SAWTOOTHDOWN, FEATURES::SAWTOOTHUP, FEATURES::SINE, FEATURES::SPRING, FEATURES::STATUS, FEATURES::TRIANGLE

Class Method Summary collapse

Methods included from EnumerableConstants

included

Methods inherited from Struct

#==, cast, #initialize

Methods included from StructHelper

#member_readers, #member_writers

Constructor Details

This class inherits a constructor from SDL2::Struct

Class Method Details

.release(pointer) ⇒ Object

Free pointer associated with a haptic structure



431
432
433
# File 'lib/sdl2/haptic.rb', line 431

def self.release(pointer)
  SDL2.haptic_close(pointer)
end