diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
commit | 37e4a311b0ad9da7177e50620efc3561e2dd7045 (patch) | |
tree | 8aea2cc851ab828ee040d601ed4c776283fd639a /source/blender/editors/transform/transform_input.c | |
parent | 4617bb68ba4b1c5ab459673fffd98bf7203bb4f2 (diff) |
Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r-- | source/blender/editors/transform/transform_input.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 83d4a314057..bccbfbc65f7 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -28,7 +28,7 @@ #include "DNA_screen_types.h" #include "DNA_windowmanager_types.h" -#include "BLI_arithb.h" +#include "BLI_math.h" #include "WM_types.h" @@ -45,9 +45,9 @@ void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { /* calculate the main translation and the precise one separate */ convertViewVec(t, dvec, (short)(mval[0] - mi->precision_mval[0]), (short)(mval[1] - mi->precision_mval[1])); - VecMulf(dvec, 0.1f); + mul_v3_fl(dvec, 0.1f); convertViewVec(t, vec, (short)(mi->precision_mval[0] - t->imval[0]), (short)(mi->precision_mval[1] - t->imval[1])); - VecAddf(output, vec, dvec); + add_v3_v3v3(output, vec, dvec); } else { @@ -133,9 +133,9 @@ void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float float vec[3]; InputVector(t, mi, mval, vec); - Projf(vec, vec, t->viewinv[0]); + project_v3_v3v3(vec, vec, t->viewinv[0]); - output[0] = Inpf(t->viewinv[0], vec) * 2.0f; + output[0] = dot_v3v3(t->viewinv[0], vec) * 2.0f; } void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { @@ -158,9 +158,9 @@ void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float ou float vec[3]; InputVector(t, mi, mval, vec); - Projf(vec, vec, t->viewinv[1]); + project_v3_v3v3(vec, vec, t->viewinv[1]); - output[0] = Inpf(t->viewinv[1], vec) * 2.0f; + output[0] = dot_v3v3(t->viewinv[1], vec) * 2.0f; } void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]) |