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:
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 77ebcb24975..475bbe8b4b7 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -25,8 +25,8 @@
* ***** END GPL LICENSE BLOCK *****
* */
-#ifndef BLI_MATH_MATRIX
-#define BLI_MATH_MATRIX
+#ifndef BLI_MATH_MATRIX_H
+#define BLI_MATH_MATRIX_H
#ifdef __cplusplus
extern "C" {
@@ -102,7 +102,9 @@ void transpose_m3(float R[3][3]);
void transpose_m4(float R[4][4]);
void normalize_m3(float R[3][3]);
+void normalize_m3_m3(float R[3][3], float A[3][3]);
void normalize_m4(float R[4][4]);
+void normalize_m4_m4(float R[4][4], float A[4][4]);
void orthogonalize_m3(float R[3][3], int axis);
void orthogonalize_m4(float R[4][4], int axis);
@@ -133,36 +135,42 @@ void scale_m4_fl(float R[4][4], float scale);
float mat3_to_scale(float M[3][3]);
float mat4_to_scale(float M[4][4]);
-void size_to_mat3(float R[3][3], float size[3]);
-void size_to_mat4(float R[4][4], float size[3]);
+void size_to_mat3(float R[3][3], const float size[3]);
+void size_to_mat4(float R[4][4], const float size[3]);
void mat3_to_size(float r[3], float M[3][3]);
void mat4_to_size(float r[3], float M[4][4]);
void translate_m4(float mat[4][4], float tx, float ty, float tz);
-void rotate_m4(float mat[4][4], char axis, float angle);
+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]);
+void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[][4]);
void loc_eul_size_to_mat4(float R[4][4],
- float loc[3], float eul[3], float size[3]);
+ const float loc[3], const float eul[3], const float size[3]);
void loc_eulO_size_to_mat4(float R[4][4],
- float loc[3], float eul[3], float size[3], short order);
+ const float loc[3], const float eul[3], const float size[3], const short order);
void loc_quat_size_to_mat4(float R[4][4],
- float loc[3], float quat[4], float size[3]);
+ const float loc[3], const float quat[4], const float size[3]);
+void loc_axisangle_size_to_mat4(float R[4][4],
+ const float loc[3], const float axis[4], const float angle, const float size[3]);
-void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], float t);
-void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], float t);
+void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
+void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
int is_negative_m3(float mat[3][3]);
int is_negative_m4(float mat[4][4]);
/*********************************** Other ***********************************/
-void print_m3(char *str, float M[3][3]);
-void print_m4(char *str, float M[3][4]);
+void print_m3(const char *str, float M[3][3]);
+void print_m4(const char *str, float M[3][4]);
#ifdef __cplusplus
}
#endif
-#endif /* BLI_MATH_MATRIX */
+#endif /* BLI_MATH_MATRIX_H */