diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 19:39:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 19:39:24 +0400 |
commit | 2433404e4b90581fe65c8259e58baeee14259638 (patch) | |
tree | ae18da5ef1eebbe12869bf72b8575f570295daa1 /source/blender/blenlib/intern/math_matrix.c | |
parent | 85f15bb0ed1ee74a86c7877877fc99579bd5605c (diff) |
add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 69ece9b9ed0..f116c9b8443 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -367,9 +367,7 @@ void mul_mat3_m4_v3(float mat[4][4], float vec[3]) void mul_project_m4_v3(float mat[4][4], float vec[3]) { - const float w = (mat[0][3] * vec[0]) + - (mat[1][3] * vec[1]) + - (mat[2][3] * vec[2]) + mat[3][3]; + const float w = mul_project_m4_v3_zfac(mat, vec); mul_m4_v3(mat, vec); vec[0] /= w; |