diff options
Diffstat (limited to 'source/blender/io/alembic/intern/abc_axis_conversion.h')
-rw-r--r-- | source/blender/io/alembic/intern/abc_axis_conversion.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/io/alembic/intern/abc_axis_conversion.h b/source/blender/io/alembic/intern/abc_axis_conversion.h index 30988222fb7..21b95ec717e 100644 --- a/source/blender/io/alembic/intern/abc_axis_conversion.h +++ b/source/blender/io/alembic/intern/abc_axis_conversion.h @@ -70,20 +70,27 @@ BLI_INLINE void copy_yup_from_zup(short yup[3], const short zup[3]) } /* Names are given in (dst, src) order, just like - * the parameters of copy_m44_axis_swap() */ + * the parameters of copy_m44_axis_swap(). */ + typedef enum { ABC_ZUP_FROM_YUP = 1, ABC_YUP_FROM_ZUP = 2, } AbcAxisSwapMode; -/* Create a rotation matrix for each axis from euler angles. - * Euler angles are swapped to change coordinate system. */ +/** + * Create a rotation matrix for each axis from euler angles. + * Euler angles are swapped to change coordinate system. + */ void create_swapped_rotation_matrix(float rot_x_mat[3][3], float rot_y_mat[3][3], float rot_z_mat[3][3], const float euler[3], AbcAxisSwapMode mode); +/** + * Convert matrix from Z=up to Y=up or vice versa. + * Use yup_mat = zup_mat for in-place conversion. + */ void copy_m44_axis_swap(float dst_mat[4][4], float src_mat[4][4], AbcAxisSwapMode mode); typedef enum { @@ -91,6 +98,10 @@ typedef enum { ABC_MATRIX_LOCAL = 2, } AbcMatrixMode; +/** + * Recompute transform matrix of object in new coordinate system + * (from Z-Up to Y-Up). + */ void create_transform_matrix(Object *obj, float r_yup_mat[4][4], AbcMatrixMode mode, |