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:
authorSergej Reich <sergej.reich@googlemail.com>2013-01-23 09:56:05 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-01-23 09:56:05 +0400
commite83e3b0cf74c7150d2ee047c4a0b84e7b0de8951 (patch)
tree8fa42f2e4b6e6670acbac46bb899413047a14f7b /source/blender/blenlib/BLI_math_matrix.h
parent281e094e16b49bd1c3aa211d5d000c4a211c97ef (diff)
math: Add functions to decompose transformation matrices
mat4_decompose() is similar to mat4_to_loc_rot_size() but returns rotation as quaternion. mat4_to_loc_quat() just returns location and rotation without size.
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index c12ec62ca1b..415c503146c 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -173,6 +173,8 @@ void rotate_m4(float mat[4][4], const char axis, const float angle);
void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[3][3]);
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[4][4]);
+void mat4_to_loc_quat(float loc[3], float quat[4], float wmat[4][4]);
+void mat4_decompose(float loc[3], float quat[4], float size[3], float wmat[4][4]);
void loc_eul_size_to_mat4(float R[4][4],
const float loc[3], const float eul[3], const float size[3]);