Cleanup: use_holes arg to isect_point_poly_v2 has been ignored since 2013

07851dd8df made the use_holes argument be no longer used.
This commit is contained in:
Aras Pranckevicius
2023-11-06 13:39:29 +02:00
parent 03bbdd804c
commit 6e4adbe694
7 changed files with 9 additions and 18 deletions

View File

@@ -790,12 +790,10 @@ bool isect_ray_line_v3(const float ray_origin[3],
bool isect_point_poly_v2(const float pt[2],
const float verts[][2],
unsigned int nr,
bool use_holes);
unsigned int nr);
bool isect_point_poly_v2_int(const int pt[2],
const int verts[][2],
unsigned int nr,
bool use_holes);
unsigned int nr);
/**
* Point in quad - only convex quads.

View File

@@ -48,7 +48,7 @@ bool BLI_lasso_is_point_inside(const int mcoords[][2],
}
const int pt[2] = {sx, sy};
return isect_point_poly_v2_int(pt, mcoords, mcoords_len, true);
return isect_point_poly_v2_int(pt, mcoords, mcoords_len);
}
bool BLI_lasso_is_edge_inside(const int mcoords[][2],

View File

@@ -1462,10 +1462,7 @@ int isect_line_sphere_v2(const float l1[2],
return -1;
}
bool isect_point_poly_v2(const float pt[2],
const float verts[][2],
const uint nr,
[[maybe_unused]] const bool use_holes)
bool isect_point_poly_v2(const float pt[2], const float verts[][2], const uint nr)
{
/* Keep in sync with #isect_point_poly_v2_int. */
@@ -1482,10 +1479,7 @@ bool isect_point_poly_v2(const float pt[2],
}
return isect;
}
bool isect_point_poly_v2_int(const int pt[2],
const int verts[][2],
const uint nr,
[[maybe_unused]] const bool use_holes)
bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const uint nr)
{
/* Keep in sync with #isect_point_poly_v2. */

View File

@@ -944,7 +944,7 @@ bool BM_face_point_inside_test(const BMFace *f, const float co[3])
mul_v2_m3v3(projverts[i], axis_mat, l_iter->v->co);
}
return isect_point_poly_v2(co_2d, projverts, f->len, false);
return isect_point_poly_v2(co_2d, projverts, f->len);
}
void BM_face_triangulate(BMesh *bm,

View File

@@ -208,6 +208,5 @@ bool BM_face_uv_point_inside_test(const BMFace *f, const float co[2], const int
projverts[i] = BM_ELEM_CD_GET_FLOAT2_P(l_iter, cd_loop_uv_offset);
}
return isect_point_poly_v2(
co, reinterpret_cast<const float(*)[2]>(projverts.data()), f->len, false);
return isect_point_poly_v2(co, reinterpret_cast<const float(*)[2]>(projverts.data()), f->len);
}

View File

@@ -4965,7 +4965,7 @@ static bool edbm_mesh_knife_point_isect(LinkNode *polys, const float cent_ss[2])
while (p) {
const float(*mval_fl)[2] = static_cast<const float(*)[2]>(p->link);
const int mval_tot = MEM_allocN_len(mval_fl) / sizeof(*mval_fl);
isect += int(isect_point_poly_v2(cent_ss, mval_fl, mval_tot - 1, false));
isect += int(isect_point_poly_v2(cent_ss, mval_fl, mval_tot - 1));
p = p->next;
}

View File

@@ -606,7 +606,7 @@ BLI_INLINE SDefBindWeightData *computeBindWeights(SDefBindCalcData *const data,
return nullptr;
}
bpoly->inside = isect_point_poly_v2(bpoly->point_v2, bpoly->coords_v2, face.size(), false);
bpoly->inside = isect_point_poly_v2(bpoly->point_v2, bpoly->coords_v2, face.size());
/* Initialize weight components */
bpoly->weight_angular = 1.0f;