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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-09-11 14:06:54 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-09-11 14:06:54 +0400
commit9b09af0dca5619c9dfc95f5012d3f684f59b39a9 (patch)
tree65e88948e953f5f00c7b62c6705ac37464c52abe /source/blender/blenlib/intern/math_matrix.c
parent441bb19357a840fa9ba93565d0f3dc42a054ddbd (diff)
Fix #36701: Mask pivioting doesnt honor parenting
Made mask transformation aware of parent matrix.
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 611b3298c38..d24200fc0b7 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -322,6 +322,24 @@ void mul_serie_m4(float answ[4][4], float m1[4][4],
}
}
+void mul_v2_m3v2(float r[2], float m[3][3], float v[2])
+{
+ float temp[3], warped[3];
+
+ copy_v2_v2(temp, v);
+ temp[2] = 1.0f;
+
+ mul_v3_m3v3(warped, m, temp);
+
+ r[0] = warped[0] / warped[2];
+ r[1] = warped[1] / warped[2];
+}
+
+void mul_m3_v2(float m[3][3], float r[2])
+{
+ mul_v2_m3v2(r, m, r);
+}
+
void mul_m4_v3(float mat[4][4], float vec[3])
{
float x, y;