[Bf-blender-cvs] [91964f04693] refactor-mesh-face-generic: Merge branch 'refactor-mesh-corners-generic' into refactor-mesh-face-generic
Hans Goudey
noreply at git.blender.org
Mon Feb 6 14:39:50 CET 2023
Commit: 91964f046930b388c02afd56a47ef63b379075de
Author: Hans Goudey
Date: Sun Feb 5 22:49:01 2023 -0500
Branches: refactor-mesh-face-generic
https://developer.blender.org/rB91964f046930b388c02afd56a47ef63b379075de
Merge branch 'refactor-mesh-corners-generic' into refactor-mesh-face-generic
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/pbvh.cc
index 061dabea61f,ddfe4f52606..ca0e5a09d83
--- a/source/blender/blenkernel/intern/pbvh.cc
+++ b/source/blender/blenkernel/intern/pbvh.cc
@@@ -623,18 -615,16 +624,18 @@@ static void build_sub(PBVH *pbvh
/* Build children */
build_sub(pbvh,
+ sharp_faces,
pbvh->nodes[node_index].children_offset,
- NULL,
+ nullptr,
prim_bbc,
offset,
end - offset,
prim_scratch,
depth + 1);
build_sub(pbvh,
+ sharp_faces,
pbvh->nodes[node_index].children_offset + 1,
- NULL,
+ nullptr,
prim_bbc,
end,
offset + count - end,
@@@ -668,7 -659,7 +670,7 @@@ static void pbvh_build(PBVH *pbvh, cons
}
pbvh->totnode = 1;
- build_sub(pbvh, sharp_faces, 0, cb, prim_bbc, 0, totprim, NULL, 0);
- build_sub(pbvh, 0, cb, prim_bbc, 0, totprim, nullptr, 0);
++ build_sub(pbvh, sharp_faces, 0, cb, prim_bbc, 0, totprim, nullptr, 0);
}
static void pbvh_draw_args_init(PBVH *pbvh, PBVH_GPU_Args *args, PBVHNode *node)
@@@ -836,11 -827,11 +838,11 @@@ void BKE_pbvh_build_mesh(PBVH *pbvh
pbvh->mesh = mesh;
pbvh->header.type = PBVH_FACES;
- pbvh->mpoly = mpoly;
+ pbvh->poly_offsets = poly_offsets;
- pbvh->hide_poly = (bool *)CustomData_get_layer_named_for_write(
- &mesh->pdata, CD_PROP_BOOL, ".hide_poly", mesh->totpoly);
- pbvh->material_indices = (const int *)CustomData_get_layer_named(
- &mesh->pdata, CD_PROP_INT32, "material_index");
+ pbvh->hide_poly = static_cast<bool *>(CustomData_get_layer_named_for_write(
+ &mesh->pdata, CD_PROP_BOOL, ".hide_poly", mesh->totpoly));
+ pbvh->material_indices = static_cast<const int *>(
+ CustomData_get_layer_named(&mesh->pdata, CD_PROP_INT32, "material_index"));
pbvh->corner_verts = corner_verts;
pbvh->looptri = looptri;
pbvh->vert_positions = vert_positions;
@@@ -3844,11 -3847,11 +3862,11 @@@ void BKE_pbvh_sync_visibility_from_vert
break;
}
case PBVH_GRIDS: {
- const MPoly *mp = BKE_mesh_polys(mesh);
+ const MPoly *mp = BKE_mesh_poly_offsets(mesh);
CCGKey key = pbvh->gridkey;
- bool *hide_poly = (bool *)CustomData_get_layer_named_for_write(
- &mesh->pdata, CD_PROP_BOOL, ".hide_poly", mesh->totpoly);
+ bool *hide_poly = static_cast<bool *>(CustomData_get_layer_named_for_write(
+ &mesh->pdata, CD_PROP_BOOL, ".hide_poly", mesh->totpoly));
bool delete_hide_poly = true;
for (int face_index = 0; face_index < mesh->totpoly; face_index++, mp++) {
diff --cc source/blender/blenkernel/intern/pbvh_intern.hh
index 822df9842d2,7757275f6de..882b5592a42
--- a/source/blender/blenkernel/intern/pbvh_intern.hh
+++ b/source/blender/blenkernel/intern/pbvh_intern.hh
@@@ -8,23 -6,20 +6,19 @@@
* \ingroup bke
*/
- #ifdef __cplusplus
- extern "C" {
- #endif
-
+ struct PBVHGPUFormat;
struct MLoopTri;
-struct MPoly;
+ struct MeshElemMap;
/* Axis-aligned bounding box */
- typedef struct {
+ struct BB {
float bmin[3], bmax[3];
- } BB;
+ };
/* Axis-aligned bounding box with centroid */
- typedef struct {
+ struct BBC {
float bmin[3], bmax[3], bcentroid[3];
- } BBC;
-
- struct MeshElemMap;
+ };
/* NOTE: this structure is getting large, might want to split it into
* union'd structs */
More information about the Bf-blender-cvs
mailing list