diff options
author | Mike Erwin <significant.bit@gmail.com> | 2011-07-15 01:20:45 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2011-07-15 01:20:45 +0400 |
commit | cc1ba4569ccdb77a9371140def316caecac71da5 (patch) | |
tree | cc1329237f33e5c586177f60e46000943ebc99f6 /source/blender/windowmanager/WM_types.h | |
parent | 44d2e6eb109889f49fb9935d05ef201127d15805 (diff) |
more consistent and modal-friendly ndof events, fly mode v1
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 26c394a2ad3..7476410ec19 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -377,17 +377,24 @@ typedef struct wmTabletData { float Ytilt; /* as above */ } wmTabletData; -typedef struct { +typedef enum { // motion progress, for modal handlers + P_NOT_STARTED, + P_STARTING, // <-- + P_IN_PROGRESS, // <-- only these are sent for NDOF motion + P_FINISHING, // <-- + P_FINISHED + } wmProgress; + +typedef struct wmNDOFMotionData { /* awfully similar to GHOST_TEventNDOFMotionData... */ - - /* Each component normally ranges from -1 to +1, but can exceed that. */ - - float tx, ty, tz; /* translation: -x left, +y forward, -z up */ - float rx, ry, rz; /* rotation: - axis = (rx,ry,rz).normalized - amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] */ - - float dt; // time since previous NDOF Motion event (or zero if this is the first) + // Each component normally ranges from -1 to +1, but can exceed that. + // These use blender standard view coordinates, with positive rotations being CCW about the axis. + float tx, ty, tz; // translation + float rx, ry, rz; // rotation: + // axis = (rx,ry,rz).normalized + // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] + float dt; // time since previous NDOF Motion event + wmProgress progress; // is this the first event, the last, or one of many in between? } wmNDOFMotionData; typedef struct wmTimer { |