Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-20 18:22:55 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-20 18:27:06 +0300
commit482c4d099ae88bea018712b92b2990617ef006f8 (patch)
treecdc6dd9d345da7a6edb2106ecb63d314d14b7a61 /source/blender/blenlib/BLI_math_vector.h
parentb0dee09a6d5531fb3bc7bbb00069c75e18dfbd1d (diff)
Cleanup: remove all BLI_utiledefines' ugly vectorial macros.
Not only were those often making doublons with already existing BLI_math's stuff, but they were also used to hide implicit type conversions... As usual this adds some more exotic inlined vector functions (one of the rare cases where I really miss C++ and its templates... ;) ).
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index dc108a7c3ec..61f24bae269 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -83,6 +83,8 @@ MINLINE void zero_v3_db(double r[3]);
MINLINE void copy_v2_v2_db(double r[2], const double a[2]);
MINLINE void copy_v3_v3_db(double r[3], const double a[3]);
MINLINE void copy_v4_v4_db(double r[4], const double a[4]);
+/* short -> float */
+MINLINE void copy_v3fl_v3s(float r[3], const short a[3]);
/* int <-> float */
MINLINE void copy_v2fl_v2i(float r[2], const int a[2]);
MINLINE void round_v2i_v2fl(int r[2], const float a[2]);
@@ -112,14 +114,20 @@ MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3]);
MINLINE void add_v4_v4(float r[4], const float a[4]);
MINLINE void add_v4_v4v4(float r[4], const float a[4], const float b[4]);
+MINLINE void add_v3fl_v3fl_v3i(float r[3], const float a[3], const int b[3]);
+MINLINE void add_v3fl_v3fl_v3s(float r[3], const float a[3], const short b[3]);
+
MINLINE void sub_v2_v2(float r[2], const float a[2]);
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2]);
MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2]);
MINLINE void sub_v3_v3(float r[3], const float a[3]);
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3]);
+MINLINE void sub_v3_v3v3_int(int r[3], const int a[3], const int b[3]);
MINLINE void sub_v4_v4(float r[4], const float a[4]);
MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4]);
+MINLINE void sub_v3db_v3fl_v3fl(double r[3], const float a[3], const float b[3]);
+
MINLINE void mul_v2_fl(float r[2], float f);
MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f);
MINLINE void mul_v3_fl(float r[3], float f);
@@ -150,6 +158,8 @@ MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], cons
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f);
MINLINE void madd_v4_v4v4(float r[4], const float a[4], const float b[4]);
+MINLINE void madd_v3fl_v3fl_v3fl_v3i(float r[3], const float a[3], const float b[3], const int c[3]);
+
MINLINE void negate_v2(float r[2]);
MINLINE void negate_v2_v2(float r[2], const float a[2]);
MINLINE void negate_v3(float r[3]);