Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_pbvh.h
| Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | |||||
| typedef struct PBVHVertexIter { | typedef struct PBVHVertexIter { | ||||
| /* iteration */ | /* iteration */ | ||||
| int g; | int g; | ||||
| int width; | int width; | ||||
| int height; | int height; | ||||
| int gx; | int gx; | ||||
| int gy; | int gy; | ||||
| int i; | int i; | ||||
| int index; | |||||
| /* grid */ | /* grid */ | ||||
| struct CCGElem **grids; | struct CCGElem **grids; | ||||
| struct CCGElem *grid; | struct CCGElem *grid; | ||||
| struct CCGKey *key; | struct CCGKey *key; | ||||
| BLI_bitmap **grid_hidden, *gh; | BLI_bitmap **grid_hidden, *gh; | ||||
| int *grid_indices; | int *grid_indices; | ||||
| int totgrid; | int totgrid; | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | for (vi.gy = 0; vi.gy < vi.height; vi.gy++) { \ | ||||
| } \ | } \ | ||||
| } \ | } \ | ||||
| else if (vi.mverts) { \ | else if (vi.mverts) { \ | ||||
| vi.mvert = &vi.mverts[vi.vert_indices[vi.gx]]; \ | vi.mvert = &vi.mverts[vi.vert_indices[vi.gx]]; \ | ||||
| if (mode == PBVH_ITER_UNIQUE && vi.mvert->flag & ME_HIDE) \ | if (mode == PBVH_ITER_UNIQUE && vi.mvert->flag & ME_HIDE) \ | ||||
| continue; \ | continue; \ | ||||
| vi.co = vi.mvert->co; \ | vi.co = vi.mvert->co; \ | ||||
| vi.no = vi.mvert->no; \ | vi.no = vi.mvert->no; \ | ||||
| vi.index = vi.vert_indices[vi.i]; \ | |||||
| if (vi.vmask) \ | if (vi.vmask) \ | ||||
| vi.mask = &vi.vmask[vi.vert_indices[vi.gx]]; \ | vi.mask = &vi.vmask[vi.vert_indices[vi.gx]]; \ | ||||
| } \ | } \ | ||||
| else { \ | else { \ | ||||
| if (!BLI_gsetIterator_done(&vi.bm_unique_verts)) { \ | if (!BLI_gsetIterator_done(&vi.bm_unique_verts)) { \ | ||||
| vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_unique_verts); \ | vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_unique_verts); \ | ||||
| BLI_gsetIterator_step(&vi.bm_unique_verts); \ | BLI_gsetIterator_step(&vi.bm_unique_verts); \ | ||||
| } \ | } \ | ||||
| else { \ | else { \ | ||||
| vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_other_verts); \ | vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_other_verts); \ | ||||
| BLI_gsetIterator_step(&vi.bm_other_verts); \ | BLI_gsetIterator_step(&vi.bm_other_verts); \ | ||||
| } \ | } \ | ||||
| if (mode == PBVH_ITER_UNIQUE && BM_elem_flag_test(vi.bm_vert, BM_ELEM_HIDDEN)) \ | if (mode == PBVH_ITER_UNIQUE && BM_elem_flag_test(vi.bm_vert, BM_ELEM_HIDDEN)) \ | ||||
| continue; \ | continue; \ | ||||
| vi.co = vi.bm_vert->co; \ | vi.co = vi.bm_vert->co; \ | ||||
| vi.fno = vi.bm_vert->no; \ | vi.fno = vi.bm_vert->no; \ | ||||
| vi.index = BM_elem_index_get(vi.bm_vert); \ | |||||
| vi.mask = BM_ELEM_CD_GET_VOID_P(vi.bm_vert, vi.cd_vert_mask_offset); \ | vi.mask = BM_ELEM_CD_GET_VOID_P(vi.bm_vert, vi.cd_vert_mask_offset); \ | ||||
| } | } | ||||
| #define BKE_pbvh_vertex_iter_end \ | #define BKE_pbvh_vertex_iter_end \ | ||||
| } \ | } \ | ||||
| } \ | } \ | ||||
| } \ | } \ | ||||
| ((void)0) | ((void)0) | ||||
| Show All 20 Lines | |||||