From edc6512ba6528fce4442f9b20875d1a301a0ceef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Tue, 12 Jun 2007 20:01:28 +0000 Subject: first workable version on Os X work only in non camera mode in 3D view need the external plug-in to be compiled separately line 894 of ghostwinlay.c must be replaced with values adapted at your system see mailing list for features planned and how to use --- intern/ghost/GHOST_Types.h | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'intern/ghost/GHOST_Types.h') diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f8f9a8d4735..9b8a402a195 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -338,19 +338,38 @@ typedef struct { GHOST_TInt32 z; } GHOST_TEventWheelData; -typedef int (*GHOST_NDOFLibraryInit_fp)(); -typedef void (*GHOST_NDOFLibraryShutdown_fp)(void* deviceHandle); -typedef void* (*GHOST_NDOFDeviceOpen_fp)(void* platformData); -typedef int (*GHOST_NDOFEventHandler_fp)(float* result7, void* deviceHandle, unsigned int message, unsigned int* wParam, unsigned long* lParam); /* original patch used floats, but the driver return ints and uns. We will calibrate in view, no sense on doing conversions twice */ +/* as all USB device controls are likely to use ints, this is also more future proof */ +//typedef struct { +// /** N-degree of freedom device data */ +// float tx, ty, tz; /** -x left, +y up, +z forward */ +// float rx, ry, rz; +// float dt; +//} GHOST_TEventNDOFData; + typedef struct { - /** N-degree of freedom device data */ - float tx, ty, tz; /** -x left, +y up, +z forward */ - float rx, ry, rz; - float dt; + /** N-degree of freedom device data v2*/ + int changed; + GHOST_TUns64 client; + GHOST_TUns64 address; + GHOST_TInt16 tx, ty, tz; /** -x left, +y up, +z forward */ + GHOST_TInt16 rx, ry, rz; + GHOST_TInt16 buttons; + GHOST_TUns64 time; + GHOST_TUns64 delta; } GHOST_TEventNDOFData; +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; -- cgit v1.2.3