diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 20:37:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 20:37:23 +0400 |
commit | 4770848871c9b19caf113f250a0346b4954a8c2e (patch) | |
tree | e61129948234f91acb31bc0f50b16ba552a34307 /source/blender/bmesh/intern | |
parent | 31761f5e5b06a394a4165ddc2eca27e644b1282a (diff) |
code cleanup: bmesh use 'const' for query functions.
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.h | 4 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_private.h | 4 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 44 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.h | 38 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_structure.c | 55 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_structure.h | 22 |
7 files changed, 86 insertions, 87 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index eea5ec59674..43b261c118d 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -95,7 +95,7 @@ static void calc_poly_normal(float normal[3], float verts[][3], int nverts) * * Same as #calc_poly_normal but operates directly on a bmesh face. */ -static void bm_face_calc_poly_normal(BMFace *f, float n[3]) +static void bm_face_calc_poly_normal(const BMFace *f, float n[3]) { BMLoop *l_first = BM_FACE_FIRST_LOOP(f); BMLoop *l_iter = l_first; @@ -173,7 +173,7 @@ static void bm_face_calc_poly_center_mean_vertex_cos(BMFace *f, float r_cent[3], * \param r_loops Store face loop pointers, (f->len) * \param r_index Store triangle triples, indicies into \a r_loops, ((f->len - 2) * 3) */ -int BM_face_calc_tessellation(BMFace *f, BMLoop **r_loops, int (*_r_index)[3]) +int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*_r_index)[3]) { int *r_index = (int *)_r_index; BMLoop *l_first = BM_FACE_FIRST_LOOP(f); @@ -579,7 +579,7 @@ void BM_vert_normal_update_all(BMVert *v) * is passed in as well. */ -void BM_face_calc_normal(BMFace *f, float r_no[3]) +void BM_face_calc_normal(const BMFace *f, float r_no[3]) { BMLoop *l; diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h index 91fe94f8e48..e5dc5c081c3 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.h +++ b/source/blender/bmesh/intern/bmesh_polygon.h @@ -27,13 +27,13 @@ * \ingroup bmesh */ -int BM_face_calc_tessellation(BMFace *f, BMLoop **r_loops, int (*r_index)[3]) +int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*r_index)[3]) #ifdef __GNUC__ __attribute__((warn_unused_result)) __attribute__((nonnull)) #endif ; -void BM_face_calc_normal(BMFace *f, float r_no[3]); +void BM_face_calc_normal(const BMFace *f, float r_no[3]); void BM_face_calc_normal_vcos(BMesh *bm, BMFace *f, float r_no[3], float const (*vertexCos)[3]); float BM_face_calc_area(BMFace *f); diff --git a/source/blender/bmesh/intern/bmesh_private.h b/source/blender/bmesh/intern/bmesh_private.h index 6fd18c07179..7ec418b2253 100644 --- a/source/blender/bmesh/intern/bmesh_private.h +++ b/source/blender/bmesh/intern/bmesh_private.h @@ -53,8 +53,8 @@ int bmesh_elem_check(void *element, const char htype); } (void)0 #endif -int bmesh_radial_length(BMLoop *l); -int bmesh_disk_count(BMVert *v); +int bmesh_radial_length(const BMLoop *l); +int bmesh_disk_count(const BMVert *v); /** * Internal BMHeader.api_flag diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index a73cffac50e..0eb3b0a6443 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -644,7 +644,7 @@ int BM_vert_face_count(BMVert *v) * Tests whether or not the vertex is part of a wire edge. * (ie: has no faces attached to it) */ -bool BM_vert_is_wire(BMVert *v) +bool BM_vert_is_wire(const BMVert *v) { if (v->e) { BMEdge *e_first, *e_iter; @@ -667,7 +667,7 @@ bool BM_vert_is_wire(BMVert *v) * Tests whether or not the edge is part of a wire. * (ie: has no faces attached to it) */ -bool BM_edge_is_wire(BMEdge *e) +bool BM_edge_is_wire(const BMEdge *e) { return (e->l == NULL); } @@ -679,7 +679,7 @@ bool BM_edge_is_wire(BMEdge *e) * 3: Is part of a an edge with more than 2 faces. * 4: Is part of a wire edge. */ -bool BM_vert_is_manifold(BMVert *v) +bool BM_vert_is_manifold(const BMVert *v) { BMEdge *e, *e_old; BMLoop *l; @@ -744,7 +744,7 @@ bool BM_vert_is_manifold(BMVert *v) */ #if 1 /* fast path for checking manifold */ -bool BM_edge_is_manifold(BMEdge *e) +bool BM_edge_is_manifold(const BMEdge *e) { const BMLoop *l = e->l; return (l && (l->radial_next != l) && /* not 0 or 1 face users */ @@ -767,7 +767,7 @@ int BM_edge_is_manifold(BMEdge *e) * Tests that the edge is manifold and * that both its faces point the same way. */ -bool BM_edge_is_contiguous(BMEdge *e) +bool BM_edge_is_contiguous(const BMEdge *e) { const BMLoop *l = e->l; const BMLoop *l_other; @@ -780,7 +780,7 @@ bool BM_edge_is_contiguous(BMEdge *e) * Check if the edge is convex or concave * (depends on face winding) */ -bool BM_edge_is_convex(BMEdge *e) +bool BM_edge_is_convex(const BMEdge *e) { if (BM_edge_is_manifold(e)) { BMLoop *l1 = e->l; @@ -803,7 +803,7 @@ bool BM_edge_is_convex(BMEdge *e) */ #if 1 /* fast path for checking boundary */ -bool BM_edge_is_boundary(BMEdge *e) +bool BM_edge_is_boundary(const BMEdge *e) { const BMLoop *l = e->l; return (l && (l->radial_next == l)); @@ -821,7 +821,7 @@ int BM_edge_is_boundary(BMEdge *e) } #endif -bool BM_vert_is_boundary(BMVert *v) +bool BM_vert_is_boundary(const BMVert *v) { if (v->e) { BMEdge *e_first, *e_iter; @@ -1047,8 +1047,8 @@ BMLoop *BM_face_edge_share_loop(BMFace *f, BMEdge *e) * \note This is in fact quite a simple check, mainly include this function so the intent is more obvious. * We know these 2 verts will _always_ make up the loops edge */ -void BM_edge_ordered_verts_ex(BMEdge *edge, BMVert **r_v1, BMVert **r_v2, - BMLoop *edge_loop) +void BM_edge_ordered_verts_ex(const BMEdge *edge, BMVert **r_v1, BMVert **r_v2, + const BMLoop *edge_loop) { BLI_assert(edge_loop->e == edge); (void)edge; /* quiet warning in release build */ @@ -1056,7 +1056,7 @@ void BM_edge_ordered_verts_ex(BMEdge *edge, BMVert **r_v1, BMVert **r_v2, *r_v2 = edge_loop->next->v; } -void BM_edge_ordered_verts(BMEdge *edge, BMVert **r_v1, BMVert **r_v2) +void BM_edge_ordered_verts(const BMEdge *edge, BMVert **r_v1, BMVert **r_v2) { BM_edge_ordered_verts_ex(edge, r_v1, r_v2, edge->l); } @@ -1065,7 +1065,7 @@ void BM_edge_ordered_verts(BMEdge *edge, BMVert **r_v1, BMVert **r_v2) * Check if the loop is convex or concave * (depends on face normal) */ -bool BM_loop_is_convex(BMLoop *l) +bool BM_loop_is_convex(const BMLoop *l) { float e_dir_prev[3]; float e_dir_next[3]; @@ -1182,11 +1182,11 @@ void BM_loop_calc_face_tangent(BMLoop *l, float r_tangent[3]) * * \return angle in radians */ -float BM_edge_calc_face_angle(BMEdge *e) +float BM_edge_calc_face_angle(const BMEdge *e) { if (BM_edge_is_manifold(e)) { - BMLoop *l1 = e->l; - BMLoop *l2 = e->l->radial_next; + const BMLoop *l1 = e->l; + const BMLoop *l2 = e->l->radial_next; return angle_normalized_v3v3(l1->f->no, l2->f->no); } else { @@ -1202,7 +1202,7 @@ float BM_edge_calc_face_angle(BMEdge *e) * * \return angle in radians */ -float BM_edge_calc_face_angle_signed(BMEdge *e) +float BM_edge_calc_face_angle_signed(const BMEdge *e) { if (BM_edge_is_manifold(e)) { BMLoop *l1 = e->l; @@ -1228,7 +1228,7 @@ float BM_edge_calc_face_angle_signed(BMEdge *e) * \param r_tangent The loop corner tangent to set */ -void BM_edge_calc_face_tangent(BMEdge *e, BMLoop *e_loop, float r_tangent[3]) +void BM_edge_calc_face_tangent(const BMEdge *e, const BMLoop *e_loop, float r_tangent[3]) { float tvec[3]; BMVert *v1, *v2; @@ -1685,13 +1685,13 @@ bool BM_face_exists_multi_edge(BMEdge **earr, int len) } /* convenience functions for checking flags */ -bool BM_edge_is_any_vert_flag_test(BMEdge *e, const char hflag) +bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag) { return (BM_elem_flag_test(e->v1, hflag) || BM_elem_flag_test(e->v2, hflag)); } -bool BM_face_is_any_vert_flag_test(BMFace *f, const char hflag) +bool BM_face_is_any_vert_flag_test(const BMFace *f, const char hflag) { BMLoop *l_iter; BMLoop *l_first; @@ -1705,7 +1705,7 @@ bool BM_face_is_any_vert_flag_test(BMFace *f, const char hflag) return false; } -bool BM_face_is_any_edge_flag_test(BMFace *f, const char hflag) +bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag) { BMLoop *l_iter; BMLoop *l_first; @@ -1722,7 +1722,7 @@ bool BM_face_is_any_edge_flag_test(BMFace *f, const char hflag) /** * Use within assert's to check normals are valid. */ -bool BM_face_is_normal_valid(BMFace *f) +bool BM_face_is_normal_valid(const BMFace *f) { const float eps = 0.0001f; float no[3]; @@ -1731,7 +1731,7 @@ bool BM_face_is_normal_valid(BMFace *f) return len_squared_v3v3(no, f->no) < (eps * eps); } -static void bm_mesh_calc_volume_face(BMFace *f, float *r_vol) +static void bm_mesh_calc_volume_face(const BMFace *f, float *r_vol) { int tottri = f->len - 2; BMLoop **loops = BLI_array_alloca(loops, f->len); diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h index 25f0d773b72..2c931de995e 100644 --- a/source/blender/bmesh/intern/bmesh_queries.h +++ b/source/blender/bmesh/intern/bmesh_queries.h @@ -58,26 +58,26 @@ int BM_edge_face_count(BMEdge *e); int BM_vert_face_count(BMVert *v); BMEdge *BM_vert_other_disk_edge(BMVert *v, BMEdge *e); -bool BM_vert_is_wire(BMVert *v); -bool BM_edge_is_wire(BMEdge *e); +bool BM_vert_is_wire(const BMVert *v); +bool BM_edge_is_wire(const BMEdge *e); -bool BM_vert_is_manifold(BMVert *v); -bool BM_edge_is_manifold(BMEdge *e); -bool BM_vert_is_boundary(BMVert *v); -bool BM_edge_is_boundary(BMEdge *e); -bool BM_edge_is_contiguous(BMEdge *e); -bool BM_edge_is_convex(BMEdge *e); +bool BM_vert_is_manifold(const BMVert *v); +bool BM_edge_is_manifold(const BMEdge *e); +bool BM_vert_is_boundary(const BMVert *v); +bool BM_edge_is_boundary(const BMEdge *e); +bool BM_edge_is_contiguous(const BMEdge *e); +bool BM_edge_is_convex(const BMEdge *e); -bool BM_loop_is_convex(BMLoop *l); +bool BM_loop_is_convex(const BMLoop *l); float BM_loop_calc_face_angle(BMLoop *l); void BM_loop_calc_face_normal(BMLoop *l, float r_normal[3]); void BM_loop_calc_face_direction(BMLoop *l, float r_normal[3]); void BM_loop_calc_face_tangent(BMLoop *l, float r_tangent[3]); -float BM_edge_calc_face_angle(BMEdge *e); -float BM_edge_calc_face_angle_signed(BMEdge *e); -void BM_edge_calc_face_tangent(BMEdge *e, BMLoop *e_loop, float r_tangent[3]); +float BM_edge_calc_face_angle(const BMEdge *e); +float BM_edge_calc_face_angle_signed(const BMEdge *e); +void BM_edge_calc_face_tangent(const BMEdge *e, const BMLoop *e_loop, float r_tangent[3]); float BM_vert_calc_edge_angle(BMVert *v); float BM_vert_calc_shell_factor(BMVert *v); @@ -108,15 +108,15 @@ BMVert *BM_edge_share_vert(BMEdge *e1, BMEdge *e2); BMLoop *BM_face_vert_share_loop(BMFace *f, BMVert *v); BMLoop *BM_face_edge_share_loop(BMFace *f, BMEdge *e); -void BM_edge_ordered_verts(BMEdge *edge, BMVert **r_v1, BMVert **r_v2); -void BM_edge_ordered_verts_ex(BMEdge *edge, BMVert **r_v1, BMVert **r_v2, - BMLoop *edge_loop); +void BM_edge_ordered_verts(const BMEdge *edge, BMVert **r_v1, BMVert **r_v2); +void BM_edge_ordered_verts_ex(const BMEdge *edge, BMVert **r_v1, BMVert **r_v2, + const BMLoop *edge_loop); -bool BM_edge_is_any_vert_flag_test(BMEdge *e, const char hflag); -bool BM_face_is_any_vert_flag_test(BMFace *f, const char hflag); -bool BM_face_is_any_edge_flag_test(BMFace *f, const char hflag); +bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag); +bool BM_face_is_any_vert_flag_test(const BMFace *f, const char hflag); +bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag); -bool BM_face_is_normal_valid(BMFace *f); +bool BM_face_is_normal_valid(const BMFace *f); float BM_mesh_calc_volume(BMesh *bm, bool is_signed); diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c index 2e060a4edf5..286425cbacf 100644 --- a/source/blender/bmesh/intern/bmesh_structure.c +++ b/source/blender/bmesh/intern/bmesh_structure.c @@ -45,7 +45,7 @@ bool bmesh_vert_in_edge(const BMEdge *e, const BMVert *v) if (e->v1 == v || e->v2 == v) return true; return false; } -bool bmesh_verts_in_edge(BMVert *v1, BMVert *v2, BMEdge *e) +bool bmesh_verts_in_edge(const BMVert *v1, const BMVert *v2, const BMEdge *e) { if (e->v1 == v1 && e->v2 == v2) return true; else if (e->v1 == v2 && e->v2 == v1) return true; @@ -216,7 +216,7 @@ void bmesh_disk_edge_remove(BMEdge *e, BMVert *v) * * \return Pointer to the next edge in the disk cycle for the vertex v. */ -BMEdge *bmesh_disk_edge_next(BMEdge *e, BMVert *v) +BMEdge *bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) { if (v == e->v1) return e->v1_disk_link.next; @@ -225,7 +225,7 @@ BMEdge *bmesh_disk_edge_next(BMEdge *e, BMVert *v) return NULL; } -BMEdge *bmesh_disk_edge_prev(BMEdge *e, BMVert *v) +BMEdge *bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v) { if (v == e->v1) return e->v1_disk_link.prev; @@ -234,7 +234,7 @@ BMEdge *bmesh_disk_edge_prev(BMEdge *e, BMVert *v) return NULL; } -BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2) +BMEdge *bmesh_disk_edge_exists(const BMVert *v1, const BMVert *v2) { BMEdge *e_iter, *e_first; @@ -251,7 +251,7 @@ BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2) return NULL; } -int bmesh_disk_count(BMVert *v) +int bmesh_disk_count(const BMVert *v) { if (v->e) { BMEdge *e_first, *e_iter; @@ -304,7 +304,7 @@ bool bmesh_disk_validate(int len, BMEdge *e, BMVert *v) * equivalent to counting the number of * faces incident upon this vertex */ -int bmesh_disk_facevert_count(BMVert *v) +int bmesh_disk_facevert_count(const BMVert *v) { /* is there an edge on this vert at all */ if (v->e) { @@ -333,29 +333,28 @@ int bmesh_disk_facevert_count(BMVert *v) * vert's loops attached * to it. */ -BMEdge *bmesh_disk_faceedge_find_first(BMEdge *e, BMVert *v) +BMEdge *bmesh_disk_faceedge_find_first(const BMEdge *e, const BMVert *v) { - BMEdge *searchedge = NULL; - searchedge = e; + const BMEdge *e_find = e; do { - if (searchedge->l && bmesh_radial_facevert_count(searchedge->l, v)) { - return searchedge; + if (e_find->l && bmesh_radial_facevert_count(e_find->l, v)) { + return (BMEdge *)e_find; } - } while ((searchedge = bmesh_disk_edge_next(searchedge, v)) != e); + } while ((e_find = bmesh_disk_edge_next(e_find, v)) != e); return NULL; } -BMEdge *bmesh_disk_faceedge_find_next(BMEdge *e, BMVert *v) +BMEdge *bmesh_disk_faceedge_find_next(const BMEdge *e, const BMVert *v) { - BMEdge *searchedge = NULL; - searchedge = bmesh_disk_edge_next(e, v); + BMEdge *e_find = NULL; + e_find = bmesh_disk_edge_next(e, v); do { - if (searchedge->l && bmesh_radial_facevert_count(searchedge->l, v)) { - return searchedge; + if (e_find->l && bmesh_radial_facevert_count(e_find->l, v)) { + return e_find; } - } while ((searchedge = bmesh_disk_edge_next(searchedge, v)) != e); - return e; + } while ((e_find = bmesh_disk_edge_next(e_find, v)) != e); + return (BMEdge *)e; } /*****radial cycle functions, e.g. loops surrounding edges**** */ @@ -435,19 +434,19 @@ void bmesh_radial_loop_remove(BMLoop *l, BMEdge *e) * Finds the first loop of v around radial * cycle */ -BMLoop *bmesh_radial_faceloop_find_first(BMLoop *l, BMVert *v) +BMLoop *bmesh_radial_faceloop_find_first(const BMLoop *l, const BMVert *v) { - BMLoop *l_iter; + const BMLoop *l_iter; l_iter = l; do { if (l_iter->v == v) { - return l_iter; + return (BMLoop *)l_iter; } } while ((l_iter = l_iter->radial_next) != l); return NULL; } -BMLoop *bmesh_radial_faceloop_find_next(BMLoop *l, BMVert *v) +BMLoop *bmesh_radial_faceloop_find_next(const BMLoop *l, const BMVert *v) { BMLoop *l_iter; l_iter = l->radial_next; @@ -456,12 +455,12 @@ BMLoop *bmesh_radial_faceloop_find_next(BMLoop *l, BMVert *v) return l_iter; } } while ((l_iter = l_iter->radial_next) != l); - return l; + return (BMLoop *)l; } -int bmesh_radial_length(BMLoop *l) +int bmesh_radial_length(const BMLoop *l) { - BMLoop *l_iter = l; + const BMLoop *l_iter = l; int i = 0; if (!l) @@ -514,9 +513,9 @@ void bmesh_radial_append(BMEdge *e, BMLoop *l) * Returns the number of times a vertex appears * in a radial cycle */ -int bmesh_radial_facevert_count(BMLoop *l, BMVert *v) +int bmesh_radial_facevert_count(const BMLoop *l, const BMVert *v) { - BMLoop *l_iter; + const BMLoop *l_iter; int count = 0; l_iter = l; do { diff --git a/source/blender/bmesh/intern/bmesh_structure.h b/source/blender/bmesh/intern/bmesh_structure.h index 82bf10fe0ef..f64fb911ab4 100644 --- a/source/blender/bmesh/intern/bmesh_structure.h +++ b/source/blender/bmesh/intern/bmesh_structure.h @@ -47,11 +47,11 @@ bool bmesh_loop_validate(BMFace *f); /* DISK CYCLE MANAGMENT */ void bmesh_disk_edge_append(BMEdge *e, BMVert *v); void bmesh_disk_edge_remove(BMEdge *e, BMVert *v); -BMEdge *bmesh_disk_edge_next(BMEdge *e, BMVert *v); -BMEdge *bmesh_disk_edge_prev(BMEdge *e, BMVert *v); -int bmesh_disk_facevert_count(BMVert *v); -BMEdge *bmesh_disk_faceedge_find_first(BMEdge *e, BMVert *v); -BMEdge *bmesh_disk_faceedge_find_next(BMEdge *e, BMVert *v); +BMEdge *bmesh_disk_edge_next(const BMEdge *e, const BMVert *v); +BMEdge *bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v); +int bmesh_disk_facevert_count(const BMVert *v); +BMEdge *bmesh_disk_faceedge_find_first(const BMEdge *e, const BMVert *v); +BMEdge *bmesh_disk_faceedge_find_next(const BMEdge *e, const BMVert *v); /* RADIAL CYCLE MANAGMENT */ void bmesh_radial_append(BMEdge *e, BMLoop *l); @@ -60,18 +60,18 @@ void bmesh_radial_loop_remove(BMLoop *l, BMEdge *e); * bmesh_radial_loop_next(BMLoop *l) / prev. * just use member access l->radial_next, l->radial_prev now */ -int bmesh_radial_facevert_count(BMLoop *l, BMVert *v); -BMLoop *bmesh_radial_faceloop_find_first(BMLoop *l, BMVert *v); -BMLoop *bmesh_radial_faceloop_find_next(BMLoop *l, BMVert *v); -BMLoop *bmesh_radial_faceloop_find_vert(BMFace *f, BMVert *v); +int bmesh_radial_facevert_count(const BMLoop *l, const BMVert *v); +BMLoop *bmesh_radial_faceloop_find_first(const BMLoop *l, const BMVert *v); +BMLoop *bmesh_radial_faceloop_find_next(const BMLoop *l, const BMVert *v); +BMLoop *bmesh_radial_faceloop_find_vert(const BMFace *f, const BMVert *v); bool bmesh_radial_validate(int radlen, BMLoop *l); /* EDGE UTILITIES */ bool bmesh_vert_in_edge(const BMEdge *e, const BMVert *v); -bool bmesh_verts_in_edge(BMVert *v1, BMVert *v2, BMEdge *e); +bool bmesh_verts_in_edge(const BMVert *v1, const BMVert *v2, const BMEdge *e); bool bmesh_edge_swapverts(BMEdge *e, BMVert *orig, BMVert *newv); /* relink edge */ BMVert *bmesh_edge_other_vert_get(BMEdge *e, BMVert *v); -BMEdge *bmesh_disk_edge_exists(BMVert *v1, BMVert *v2); +BMEdge *bmesh_disk_edge_exists(const BMVert *v1, const BMVert *v2); bool bmesh_disk_validate(int len, BMEdge *e, BMVert *v); #endif /* __BMESH_STRUCTURE_H__ */ |