Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pbvh.c
| Show First 20 Lines • Show All 3,344 Lines • ▼ Show 20 Lines | void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int mode) | ||||
| vi->gridsize = gridsize; | vi->gridsize = gridsize; | ||||
| if (mode == PBVH_ITER_ALL) { | if (mode == PBVH_ITER_ALL) { | ||||
| vi->totvert = totvert; | vi->totvert = totvert; | ||||
| } | } | ||||
| else { | else { | ||||
| vi->totvert = uniq_verts; | vi->totvert = uniq_verts; | ||||
| } | } | ||||
| vi->unique_vert_len = uniq_verts; | |||||
| vi->vert_indices = vert_indices; | vi->vert_indices = vert_indices; | ||||
| vi->vert_positions = pbvh->vert_positions; | vi->vert_positions = pbvh->vert_positions; | ||||
| vi->is_mesh = pbvh->vert_positions != NULL; | vi->is_mesh = pbvh->vert_positions != NULL; | ||||
| if (pbvh->header.type == PBVH_BMESH) { | if (pbvh->header.type == PBVH_BMESH) { | ||||
| BLI_gsetIterator_init(&vi->bm_unique_verts, node->bm_unique_verts); | BLI_gsetIterator_init(&vi->bm_unique_verts, node->bm_unique_verts); | ||||
| BLI_gsetIterator_init(&vi->bm_other_verts, node->bm_other_verts); | BLI_gsetIterator_init(&vi->bm_other_verts, node->bm_other_verts); | ||||
| vi->bm_vdata = &pbvh->header.bm->vdata; | vi->bm_vdata = &pbvh->header.bm->vdata; | ||||
| ▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | for (int j = 0; j < node->totprim; j++) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| MEM_SAFE_FREE(visit); | MEM_SAFE_FREE(visit); | ||||
| } | } | ||||
| void BKE_pbvh_node_automasking_mark(PBVH *pbvh, PBVHNode *node) | |||||
jbakker: pbvh isn't used and should by surrounded by the `UNUSED` macro. Same needs to be applied to the… | |||||
| { | |||||
| node->flag |= PBVH_RebuildAutomasking; | |||||
| } | |||||
| void BKE_pbvh_node_automasking_unmark(PBVH *pbvh, PBVHNode *node) | |||||
| { | |||||
| node->flag &= ~PBVH_RebuildAutomasking; | |||||
| } | |||||
| bool BKE_pbvh_node_needs_automasking(PBVH *pbvh, PBVHNode *node) | |||||
| { | |||||
| return node->flag & PBVH_RebuildAutomasking; | |||||
| } | |||||
| void BKE_pbvh_node_automasking_mark_all(PBVH *pbvh) | |||||
| { | |||||
| for (int i = 0; i < pbvh->totnode; i++) { | |||||
| if (pbvh->nodes[i].flag & PBVH_Leaf) { | |||||
| pbvh->nodes[i].flag |= PBVH_RebuildAutomasking; | |||||
| } | |||||
| } | |||||
| } | |||||
| int BKE_pbvh_debug_draw_gen_get(PBVHNode *node) | int BKE_pbvh_debug_draw_gen_get(PBVHNode *node) | ||||
| { | { | ||||
| return node->debug_draw_gen; | return node->debug_draw_gen; | ||||
| } | } | ||||
| static void pbvh_face_iter_verts_reserve(PBVHFaceIter *fd, int verts_num) | static void pbvh_face_iter_verts_reserve(PBVHFaceIter *fd, int verts_num) | ||||
| { | { | ||||
| if (verts_num >= fd->verts_size_) { | if (verts_num >= fd->verts_size_) { | ||||
| ▲ Show 20 Lines • Show All 266 Lines • Show Last 20 Lines | |||||
pbvh isn't used and should by surrounded by the UNUSED macro. Same needs to be applied to the functions below
[1502/2254] Building C object source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/intern/pbvh.c.o /Users/jeroen/blender-git/blender/source/blender/blenkernel/intern/pbvh.c:3583:43: warning: unused parameter 'pbvh' [-Wunused-parameter] void BKE_pbvh_node_automasking_mark(PBVH *pbvh, PBVHNode *node) ^ /Users/jeroen/blender-git/blender/source/blender/blenkernel/intern/pbvh.c:3588:45: warning: unused parameter 'pbvh' [-Wunused-parameter] void BKE_pbvh_node_automasking_unmark(PBVH *pbvh, PBVHNode *node) ^ /Users/jeroen/blender-git/blender/source/blender/blenkernel/intern/pbvh.c:3593:44: warning: unused parameter 'pbvh' [-Wunused-parameter] bool BKE_pbvh_node_needs_automasking(PBVH *pbvh, PBVHNode *node) ^ 3 warnings generated.