Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-22 19:30:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-22 19:30:24 +0400
commit2ee6c0ac6b774817d760e1e756e97eea476d412e (patch)
treea7b0807f16ae5838c981d224d5774f81de8a8e54 /source/blender/editors/sculpt_paint/paint_hide.c
parent29c8d3e20de92577d9067b70c6745bf1f0654e9c (diff)
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()
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_hide.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c14
1 files changed, 1 insertions, 13 deletions
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 <assert.h>
-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));
}