diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-23 09:15:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-23 09:15:12 +0400 |
commit | 77fa1aaab58c3adfad9a508cea6811cea6cd10b6 (patch) | |
tree | 08950db24c01de2275c35a08db2b765c7ce6291b /source/blender/editors/object/object_vgroup.c | |
parent | 6cba2b8d73d80be30205aede15e6f1a0f787623a (diff) |
modify closest_to_plane_v3 not to use point-normal form.
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 294b0632015..b68fa150777 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1561,9 +1561,12 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f /* A = Q - ((Q - P).N)N * D = (a * x0 + b * y0 +c * z0 + d) */ float projA[3], projB[3]; + float plane[4]; - closest_to_plane_v3(projA, coord, norm, start); - closest_to_plane_v3(projB, coord, norm, end); + plane_from_point_normal_v3(plane, coord, norm); + + closest_to_plane_v3(projA, plane, start); + closest_to_plane_v3(projB, plane, end); /* (vertical and horizontal refer to the plane's y and xz respectively) * vertical distance */ dists[index] = dot_v3v3(norm, end) + d; |