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/editors/transform/transform_constraints.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/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 35287c145c6..3088b96c339 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -892,9 +892,7 @@ static void setNearestAxis3d(TransInfo *t) * of two 2D points 30 pixels apart (that's the last factor in the formula) after * projecting them with ED_view3d_win_to_delta and then get the length of that vector. */ - zfac = (t->persmat[0][3] * t->center[0]) + - (t->persmat[1][3] * t->center[1]) + - (t->persmat[2][3] * t->center[2]) + t->persmat[3][3]; + zfac = mul_project_m4_v3_zfac(t->persmat, t->center); zfac = len_v3(t->persinv[0]) * 2.0f / t->ar->winx * zfac * 30.0f; for (i = 0; i < 3; i++) { |