diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-23 03:58:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-23 03:58:52 +0400 |
commit | adba6952094388113cd750a252e28c3a32199b4e (patch) | |
tree | b5225e8e4a0c206d7c39c026f2f3a34529d300e9 /source/blender/blenlib | |
parent | 80ffe6f9b630e670fb58482caa3dd5f473a4f93f (diff) |
remove vec_rot_to_mat3(), replace with axis_angle_normalized_to_mat3()
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_rotation.h | 7 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 29 |
2 files changed, 0 insertions, 36 deletions
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index b576ad7c8bb..b3702d10d87 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -106,13 +106,6 @@ void mat4_to_axis_angle(float axis[3], float *angle, float M[4][4]); void single_axis_angle_to_mat3(float R[3][3], const char axis, const float angle); -/****************************** Vector/Rotation ******************************/ -/* old axis angle code */ -/* TODO: the following calls should probably be deprecated sometime */ - -/* conversion */ -void vec_rot_to_mat3(float mat[3][3], const float vec[3], const float phi); - /******************************** XYZ Eulers *********************************/ void eul_to_quat(float quat[4], const float eul[3]); diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 38046825308..96664b776f0 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -861,35 +861,6 @@ void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float ang } } -/****************************** Vector/Rotation ******************************/ -/* TODO: the following calls should probably be deprecated sometime */ - -/* TODO, replace use of this function with axis_angle_to_mat3() */ -void vec_rot_to_mat3(float mat[3][3], const float vec[3], const float phi) -{ - /* rotation of phi radials around vec */ - float vx, vx2, vy, vy2, vz, vz2, co, si; - - vx = vec[0]; - vy = vec[1]; - vz = vec[2]; - vx2 = vx * vx; - vy2 = vy * vy; - vz2 = vz * vz; - co = cosf(phi); - si = sinf(phi); - - mat[0][0] = vx2 + co * (1.0f - vx2); - mat[0][1] = vx * vy * (1.0f - co) + vz * si; - mat[0][2] = vz * vx * (1.0f - co) - vy * si; - mat[1][0] = vx * vy * (1.0f - co) - vz * si; - mat[1][1] = vy2 + co * (1.0f - vy2); - mat[1][2] = vy * vz * (1.0f - co) + vx * si; - mat[2][0] = vz * vx * (1.0f - co) + vy * si; - mat[2][1] = vy * vz * (1.0f - co) - vx * si; - mat[2][2] = vz2 + co * (1.0f - vz2); -} - /******************************** XYZ Eulers *********************************/ /* XYZ order */ |