diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-12 07:42:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-12 07:42:06 +0400 |
commit | 7998b2f6a7a78cd8d7af135460a50b972cbc2b2d (patch) | |
tree | d25affa30373923d32e5c79c9ec26f4e1e7f6ac9 /source/blender/editors/transform/transform.h | |
parent | b6db417ee466c6aec5d412a259a6dc7c0b4c1750 (diff) |
transform - use 2d float's for the viewport center (allows for vector math functions to be used more easily).
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index a4828317604..9355773c47b 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -271,7 +271,7 @@ typedef struct MouseInput { int imval[2]; /* initial mouse position */ char precision; int precision_mval[2]; /* mouse position when precision key was pressed */ - int center[2]; + float center[2]; float factor; void *data; /* additional data, if needed by the particular function */ } MouseInput; @@ -300,7 +300,7 @@ typedef struct TransInfo { float prop_size; /* proportional circle radius */ char proptext[20]; /* proportional falloff text */ float center[3]; /* center of transformation */ - int center2d[2]; /* center in screen coordinates */ + float center2d[2]; /* center in screen coordinates */ int imval[2]; /* initial mouse position */ short event_type; /* event->type used to invoke transform */ short idx_max; /* maximum index on the input vector */ @@ -687,7 +687,7 @@ typedef enum { INPUT_CUSTOM_RATIO_FLIP } MouseInputMode; -void initMouseInput(TransInfo *t, MouseInput *mi, const int center[2], const int mval[2]); +void initMouseInput(TransInfo *t, MouseInput *mi, const float center[2], const int mval[2]); void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode); int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, const struct wmEvent *event); void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, const int mval[2], float output[3]); |