diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 16:36:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 16:36:35 +0400 |
commit | 8ccf118058fceb99bdbef12d82a6cd6627a0fc3f (patch) | |
tree | 286a59fced013f5f9f71cb8ab9810b47e6f748e3 /source | |
parent | 1f53674bb8d34c3fff836e064679d5e845eaff4b (diff) |
rename overlap to holes for isect_point_poly_v2
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 9f837c25a73..f815716148b 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -155,8 +155,8 @@ bool isect_ray_tri_epsilon_v3(const float p1[3], const float d[3], 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]); diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 148aa62ee1a..0d15eede9ea 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -713,7 +713,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], /* 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 @@ bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsign } 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(const float pt[2], const float verts[][2], const unsign } } 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 @@ bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsign } 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); |