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>2010-11-12 14:16:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-12 14:16:04 +0300
commitee7bf4dab58131923906108013316826b8669ca2 (patch)
treefa7094b121aa9496334674c9c18d5c8b56df273d /source/blender/blenlib/intern/math_vector_inline.c
parent73a91bc5488fd1d26c2d819024e7356fa537560a (diff)
take delta's into account when applying the objects matrix (dloc, drot, dsize).
Now object_apply_mat4() can be used as the reverse of object_to_mat4(). Noticeable result is fly mode and 'Apply Visual Transform' dont jump when deltas are used, also means setting matrix from python works as expected.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index a45356f0bde..6bccb0045fa 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -149,6 +149,23 @@ MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
r[2]= a[2] - b[2];
}
+MINLINE void sub_v4_v4(float r[4], const float a[4])
+{
+ r[0] -= a[0];
+ r[1] -= a[1];
+ r[2] -= a[2];
+ r[3] -= a[3];
+}
+
+MINLINE void sub_v4_v4v4(float r[3], const float a[3], const float b[3])
+{
+ r[0]= a[0] - b[0];
+ r[1]= a[1] - b[1];
+ r[2]= a[2] - b[2];
+ r[3]= a[3] - b[3];
+}
+
+
MINLINE void mul_v2_fl(float *v1, float f)
{
v1[0]*= f;