diff --git a/source/blender/blenkernel/BKE_editmesh_bvh.hh b/source/blender/blenkernel/BKE_editmesh_bvh.hh index 0decbcf3551..a2dae915073 100644 --- a/source/blender/blenkernel/BKE_editmesh_bvh.hh +++ b/source/blender/blenkernel/BKE_editmesh_bvh.hh @@ -42,7 +42,7 @@ BMBVHTree *BKE_bmbvh_new(struct BMesh *bm, void BKE_bmbvh_free(BMBVHTree *tree); struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree); -struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree, +struct BMFace *BKE_bmbvh_ray_cast(const BMBVHTree *tree, const float co[3], const float dir[3], float radius, @@ -50,7 +50,7 @@ struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree, float r_hitout[3], float r_cagehit[3]); -struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree, +struct BMFace *BKE_bmbvh_ray_cast_filter(const BMBVHTree *tree, const float co[3], const float dir[3], float radius, @@ -63,8 +63,12 @@ struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree, /** * Find a vert closest to co in a sphere of radius dist_max. */ -struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree, const float co[3], float dist_max); -struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *tree, const float co[3], float dist_max); +struct BMVert *BKE_bmbvh_find_vert_closest(const BMBVHTree *tree, + const float co[3], + float dist_max); +struct BMFace *BKE_bmbvh_find_face_closest(const BMBVHTree *tree, + const float co[3], + float dist_max); /** * Overlap indices reference the looptris. diff --git a/source/blender/blenkernel/intern/editmesh_bvh.cc b/source/blender/blenkernel/intern/editmesh_bvh.cc index 3c729f46504..d45f632f0d3 100644 --- a/source/blender/blenkernel/intern/editmesh_bvh.cc +++ b/source/blender/blenkernel/intern/editmesh_bvh.cc @@ -218,7 +218,7 @@ struct RayCastUserData { float uv[2]; }; -static BMFace *bmbvh_ray_cast_handle_hit(BMBVHTree *bmtree, +static BMFace *bmbvh_ray_cast_handle_hit(const BMBVHTree *bmtree, RayCastUserData *bmcb_data, const BVHTreeRayHit *hit, float *r_dist, @@ -286,7 +286,7 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray, } } -BMFace *BKE_bmbvh_ray_cast(BMBVHTree *bmtree, +BMFace *BKE_bmbvh_ray_cast(const BMBVHTree *bmtree, const float co[3], const float dir[3], const float radius, @@ -344,7 +344,7 @@ static void bmbvh_ray_cast_cb_filter(void *userdata, } } -BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *bmtree, +BMFace *BKE_bmbvh_ray_cast_filter(const BMBVHTree *bmtree, const float co[3], const float dir[3], const float radius, @@ -421,7 +421,9 @@ static void bmbvh_find_vert_closest_cb(void *userdata, } } -BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *bmtree, const float co[3], const float dist_max) +BMVert *BKE_bmbvh_find_vert_closest(const BMBVHTree *bmtree, + const float co[3], + const float dist_max) { BVHTreeNearest hit; VertSearchUserData bmcb_data; @@ -480,7 +482,9 @@ static void bmbvh_find_face_closest_cb(void *userdata, } } -BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *bmtree, const float co[3], const float dist_max) +BMFace *BKE_bmbvh_find_face_closest(const BMBVHTree *bmtree, + const float co[3], + const float dist_max) { BVHTreeNearest hit; FaceSearchUserData bmcb_data; diff --git a/source/blender/editors/include/ED_mesh.hh b/source/blender/editors/include/ED_mesh.hh index ceb25557409..ccc99c4243e 100644 --- a/source/blender/editors/include/ED_mesh.hh +++ b/source/blender/editors/include/ED_mesh.hh @@ -173,12 +173,12 @@ UvVertMap *BM_uv_vert_map_create(BMesh *bm, bool use_select); void EDBM_flag_enable_all(BMEditMesh *em, char hflag); void EDBM_flag_disable_all(BMEditMesh *em, char hflag); -bool BMBVH_EdgeVisible(BMBVHTree *tree, - BMEdge *e, - Depsgraph *depsgraph, - ARegion *region, - View3D *v3d, - Object *obedit); +bool BMBVH_EdgeVisible(const BMBVHTree *tree, + const BMEdge *e, + const Depsgraph *depsgraph, + const ARegion *region, + const View3D *v3d, + const Object *obedit); void EDBM_project_snap_verts( bContext *C, Depsgraph *depsgraph, ARegion *region, Object *obedit, BMEditMesh *em); diff --git a/source/blender/editors/mesh/editmesh_utils.cc b/source/blender/editors/mesh/editmesh_utils.cc index a635b332d5e..06c8a557b1f 100644 --- a/source/blender/editors/mesh/editmesh_utils.cc +++ b/source/blender/editors/mesh/editmesh_utils.cc @@ -1825,7 +1825,7 @@ BMElem *EDBM_elem_from_index_any_multi(const Scene *scene, * \{ */ static BMFace *edge_ray_cast( - BMBVHTree *tree, const float co[3], const float dir[3], float *r_hitout, BMEdge *e) + const BMBVHTree *tree, const float co[3], const float dir[3], float *r_hitout, const BMEdge *e) { BMFace *f = BKE_bmbvh_ray_cast(tree, co, dir, 0.0f, nullptr, r_hitout, nullptr); @@ -1843,8 +1843,12 @@ static void scale_point(float c1[3], const float p[3], const float s) add_v3_v3(c1, p); } -bool BMBVH_EdgeVisible( - BMBVHTree *tree, BMEdge *e, Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obedit) +bool BMBVH_EdgeVisible(const BMBVHTree *tree, + const BMEdge *e, + const Depsgraph *depsgraph, + const ARegion *region, + const View3D *v3d, + const Object *obedit) { BMFace *f; float co1[3], co2[3], co3[3], dir1[3], dir2[3], dir3[3];