Correction to previous commit

pBVH nodes buffers could share some pointers from pBVH itself,
and after updating pointers in pBVH we need to recreate this buffers.

This starts looking a bit awkward and seems it's mainly because of
assumptions made when was working on sculpting on deformed mesh.
Would revision such a sculpting and would try to make it more clear
later.
This commit is contained in:
Sergey Sharybin
2012-11-08 14:22:05 +00:00
parent eacc74ef1b
commit ff1e337bb4

View File

@@ -1710,11 +1710,16 @@ void BLI_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3],
void BLI_pbvh_grids_update(PBVH *bvh, CCGElem **grids, DMGridAdjacency *gridadj, void **gridfaces,
DMFlagMat *flagmats, BLI_bitmap *grid_hidden)
{
int a;
bvh->grids = grids;
bvh->gridadj = gridadj;
bvh->gridfaces = gridfaces;
bvh->grid_flag_mats = flagmats;
bvh->grid_hidden = grid_hidden;
for (a = 0; a < bvh->totnode; ++a)
BLI_pbvh_node_mark_rebuild_draw(&bvh->nodes[a]);
}
float (*BLI_pbvh_get_vertCos(PBVH * pbvh))[3]