From d7f33668d6e69f22e0b0ee28be0039df00f63ad3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Jun 2017 19:31:27 +1000 Subject: Math Lib: Add mat3_from_axis_conversion_single Single axis version of mat3_from_axis_conversion, when the second axis isn't important (orienting an arrow for eg). --- source/blender/blenlib/BLI_math_rotation.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/BLI_math_rotation.h') diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index d60be30e10d..e059327a490 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -218,8 +218,12 @@ float angle_wrap_deg(float angle); float angle_compat_rad(float angle, float angle_compat); -int mat3_from_axis_conversion(int from_forward, int from_up, int to_forward, int to_up, - float r_mat[3][3]); +bool mat3_from_axis_conversion( + int src_forward, int src_up, int dst_forward, int dst_up, + float r_mat[3][3]); +bool mat3_from_axis_conversion_single( + int src_axis, int dst_axis, + float r_mat[3][3]); #ifdef __cplusplus } -- cgit v1.2.3