mirror of
https://github.com/yawut/SDL.git
synced 2026-06-24 21:41:04 -05:00
If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
367 * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN
uses
368 * the first three \c dir parameters. The cardinal directions would
be:
369 * - North: 0,-1, 0
370 * - East: -1, 0, 0
371 * - South: 0, 1, 0
372 * - West: 1, 0, 0
typedef struct SDL_HapticDirection
{
Uint8 type; /**< The type of encoding. */
Uint16 dir[3]; /**< The encoded direction. */
} SDL_HapticDirection;
An unsigned int can't store negative values and I don't see an alternate way to
encode them in the docs or source. The best I have been able to come up with is
using a negative magnitude for the effect but this will only get me 2 of the 4
quadrants in the plane for 2d effects. I looked at the win32 and linux
implementations and I believe is is safe to use signed ints in the direction
struct. I am unfamiliar with the darwin haptics API so I don't know if it is
safe.
|
||
|---|---|---|
| .. | ||
| begin_code.h | ||
| close_code.h | ||
| doxyfile | ||
| SDL_atomic.h | ||
| SDL_audio.h | ||
| SDL_compat.h | ||
| SDL_config_iphoneos.h | ||
| SDL_config_macosx.h | ||
| SDL_config_minimal.h | ||
| SDL_config_nintendods.h | ||
| SDL_config_pandora.h | ||
| SDL_config_win32.h | ||
| SDL_config_wiz.h | ||
| SDL_config.h.default | ||
| SDL_config.h.in | ||
| SDL_copying.h | ||
| SDL_cpuinfo.h | ||
| SDL_endian.h | ||
| SDL_error.h | ||
| SDL_events.h | ||
| SDL_haptic.h | ||
| SDL_joystick.h | ||
| SDL_keyboard.h | ||
| SDL_keysym.h | ||
| SDL_loadso.h | ||
| SDL_main.h | ||
| SDL_mouse.h | ||
| SDL_mutex.h | ||
| SDL_name.h | ||
| SDL_opengl.h | ||
| SDL_opengles.h | ||
| SDL_pixels.h | ||
| SDL_platform.h | ||
| SDL_power.h | ||
| SDL_quit.h | ||
| SDL_rect.h | ||
| SDL_rwops.h | ||
| SDL_scancode.h | ||
| SDL_stdinc.h | ||
| SDL_surface.h | ||
| SDL_syswm.h | ||
| SDL_thread.h | ||
| SDL_timer.h | ||
| SDL_types.h | ||
| SDL_version.h | ||
| SDL_video.h | ||
| SDL.h | ||