From 2ee6c0ac6b774817d760e1e756e97eea476d412e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 Aug 2013 15:30:24 +0000 Subject: add utility functions for dealing with planes - plane_point_side_v3(), a bit like line_point_side_v2() - isect_point_planes_v3(), moved from paint_hide.c functions to convert between point/normal pairs. - plane_from_point_normal_v3() - plane_to_point_normal_v3() --- source/blender/editors/sculpt_paint/paint_hide.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_hide.c') diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index db6380e920f..fc31aacffcf 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -71,18 +71,6 @@ #include -static int planes_contain_v3(float (*planes)[4], int totplane, const float p[3]) -{ - int i; - - for (i = 0; i < totplane; i++) { - if (dot_v3v3(planes[i], p) + planes[i][3] > 0) - return 0; - } - - return 1; -} - /* return true if the element should be hidden/shown */ static int is_effected(PartialVisArea area, float planes[4][4], @@ -95,7 +83,7 @@ static int is_effected(PartialVisArea area, return mask > 0.5f; } else { - int inside = planes_contain_v3(planes, 4, co); + bool inside = isect_point_planes_v3(planes, 4, co); return ((inside && area == PARTIALVIS_INSIDE) || (!inside && area == PARTIALVIS_OUTSIDE)); } -- cgit v1.2.3