[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60566] trunk/blender/source/blender/ blenlib: rename overlap to holes for isect_point_poly_v2

Campbell Barton ideasman42 at gmail.com
Sat Oct 5 14:36:35 CEST 2013


Revision: 60566
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60566
Author:   campbellbarton
Date:     2013-10-05 12:36:35 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
rename overlap to holes for isect_point_poly_v2

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_math_geom.h
    trunk/blender/source/blender/blenlib/intern/math_geom.c

Modified: trunk/blender/source/blender/blenlib/BLI_math_geom.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_geom.h	2013-10-05 11:59:15 UTC (rev 60565)
+++ trunk/blender/source/blender/blenlib/BLI_math_geom.h	2013-10-05 12:36:35 UTC (rev 60566)
@@ -155,8 +155,8 @@
                               const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon);
 
 /* point in polygon */
-bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool use_overlap);
-bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr, const bool use_overlap);
+bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool use_holes);
+bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr, const bool use_holes);
 
 int isect_point_quad_v2(const float p[2], const float a[2], const float b[2], const float c[2], const float d[2]);
 

Modified: trunk/blender/source/blender/blenlib/intern/math_geom.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_geom.c	2013-10-05 11:59:15 UTC (rev 60565)
+++ trunk/blender/source/blender/blenlib/intern/math_geom.c	2013-10-05 12:36:35 UTC (rev 60566)
@@ -713,7 +713,7 @@
 
 /* point in polygon (keep float and int versions in sync) */
 bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr,
-                         const bool use_overlap)
+                         const bool use_holes)
 {
 	/* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
 	float angletot = 0.0;
@@ -751,7 +751,7 @@
 	}
 
 	angletot = fabsf(angletot);
-	if (use_overlap) {
+	if (use_holes) {
 		const int nested = floorf((angletot / (float)(M_PI * 2.0)) + 0.00001f);
 		angletot -= nested * (float)(M_PI * 2.0);
 		return (angletot > 4.0f) != (nested % 2);
@@ -761,7 +761,7 @@
 	}
 }
 bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr,
-                             const bool use_overlap)
+                             const bool use_holes)
 {
 	/* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
 	float angletot = 0.0;
@@ -799,7 +799,7 @@
 	}
 
 	angletot = fabsf(angletot);
-	if (use_overlap) {
+	if (use_holes) {
 		const int nested = floorf((angletot / (float)(M_PI * 2.0)) + 0.00001f);
 		angletot -= nested * (float)(M_PI * 2.0);
 		return (angletot > 4.0f) != (nested % 2);




More information about the Bf-blender-cvs mailing list