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:
authorCampbell Barton <ideasman42@gmail.com>2013-10-22 07:31:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-22 07:31:21 +0400
commitc80c1c6f5c90b446652cc866484b966bdcbc6b60 (patch)
treeb986b36f0f454abd8fe2b2f23d2fcd26a42b5c29 /source/blender/blenlib
parent6193963daae293e090779bcec361dfd81c67e32f (diff)
add copy_v4_fl4, replace QUATSET macro.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h3
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 7576fbe2b54..5a23e879b1a 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -82,8 +82,9 @@ MINLINE void copy_v4fl_v4db(float r[4], const double a[4]);
MINLINE void copy_v2db_v2fl(double r[2], const float a[2]);
MINLINE void copy_v3db_v3fl(double r[3], const float a[3]);
MINLINE void copy_v4db_v4fl(double r[4], const float a[4]);
-/* 3 float -> vec */
+/* float args -> vec */
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z);
+MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w);
/********************************* Arithmetic ********************************/
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index b479b06da3f..0ce5855b16a 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -235,7 +235,7 @@ MINLINE void swap_v4_v4(float a[4], float b[4])
SWAP(float, a[3], b[3]);
}
-/* 3 float -> vec */
+/* float args -> vec */
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
{
v[0] = x;
@@ -243,6 +243,14 @@ MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
v[2] = z;
}
+MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
+{
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ v[3] = w;
+}
+
/********************************* Arithmetic ********************************/
MINLINE void add_v2_fl(float r[2], float f)