diff options
author | Mike Erwin <significant.bit@gmail.com> | 2011-08-07 21:22:47 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2011-08-07 21:22:47 +0400 |
commit | f12df1e3863ca2043947c64786e0f3c7f0fccca0 (patch) | |
tree | 093b248ff2067bc51e3d00ae588fb8588467c12b /source/blender/windowmanager/WM_types.h | |
parent | 3a55da7616fa5613b8a95a591059bb55102dbfb4 (diff) |
ndof data change: operators can access values as vectors or components, as both are handy
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 7fd52e89a5f..697133bb163 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -389,8 +389,14 @@ typedef struct wmNDOFMotionData { /* awfully similar to GHOST_TEventNDOFMotionData... */ // 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 tvec[3]; // translation - float rvec[3]; // rotation: + union { + float tvec[3]; // translation + struct { float tx, ty, tz; }; + }; + union { + float rvec[3]; // rotation: + struct { float rx, ry, rz; }; + }; // axis = (rx,ry,rz).normalized // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] float dt; // time since previous NDOF Motion event |