diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-02 11:08:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-02 11:08:22 +0400 |
commit | 70b4758ff8756a55a1c88156a852b80a0d3c2ef9 (patch) | |
tree | 7fae0201d91cae49b5ade454f41ea17624038456 /source/blender/editors/space_image | |
parent | 2e860a3e85d1f1045d15b525e3a88d3e8fbb6adf (diff) |
Made wmNDOFMotionData use a vector rather then xyz members, makes it nicer to use with math functions.
ndof_to_angle_axis and ndof_to_quat now use math functions.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index a7c90bb0aed..6e84c1a7f0c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -461,8 +461,8 @@ static int view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) const float zoom_sensitivity = 0.5f; const float pan_sensitivity = 300.f; - float pan_x = pan_sensitivity * dt * ndof->tx / sima->zoom; - float pan_y = pan_sensitivity * dt * ndof->ty / sima->zoom; + float pan_x = pan_sensitivity * dt * ndof->tvec[0] / sima->zoom; + float pan_y = pan_sensitivity * dt * ndof->tvec[1] / sima->zoom; /* "mouse zoom" factor = 1 + (dx + dy) / 300 * what about "ndof zoom" factor? should behave like this: @@ -470,7 +470,7 @@ static int view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) * move forward -> factor > 1 * move backward -> factor < 1 */ - float zoom_factor = 1.f + zoom_sensitivity * dt * -ndof->tz; + float zoom_factor = 1.f + zoom_sensitivity * dt * -ndof->tvec[2]; sima_zoom_set_factor(sima, ar, zoom_factor); sima->xof += pan_x; |