diff options
author | Mike Erwin <significant.bit@gmail.com> | 2010-07-03 10:58:29 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2010-07-03 10:58:29 +0400 |
commit | 09f6604241982dfbd852ff3e38ce7ccdf24b43ed (patch) | |
tree | 29be096a21dd0da30450203209361c7e6cfefcab /intern/ghost/GHOST_Types.h | |
parent | 905fcc7b74f9d38a5449023d372b3d8fe34ee588 (diff) |
preparing for NDOF overhaul
Diffstat (limited to 'intern/ghost/GHOST_Types.h')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f7d0425aec8..4ec8e22a960 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -444,16 +444,24 @@ typedef struct { GHOST_TUns64 delta; } GHOST_TEventNDOFData; +typedef struct { + /** N-degree of freedom device data v3 [GSoC 2010]*/ + + // Fairly close to raw device data. + // Each component normally ranges from -1 to +1, but can exceed that. + // rot axis = (rx,ry,rz).normalized + // rot amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] + + float tx, ty, tz; /** -x left, +y forward, -z up */ + float rx, ry, rz; + GHOST_TInt16 buttons; +} GHOST_TEventNDOFData_3; + +// [mce] consider scrapping these, in favor of built-in SpaceNav handling. typedef int (*GHOST_NDOFLibraryInit_fp)(); typedef void (*GHOST_NDOFLibraryShutdown_fp)(void* deviceHandle); typedef void* (*GHOST_NDOFDeviceOpen_fp)(void* platformData); -// original patch windows callback. In mac os X version the callback is internal to the plug-in and post an event to main thead. -// not necessary faster, but better integration with other events. - -//typedef int (*GHOST_NDOFEventHandler_fp)(float* result7, void* deviceHandle, unsigned int message, unsigned int* wParam, unsigned long* lParam); -//typedef void (*GHOST_NDOFCallBack_fp)(GHOST_TEventNDOFDataV2 *VolDatas); - typedef struct { /** The key code. */ GHOST_TKey key; |