Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_pbvh.h
| Show All 22 Lines | |||||
| */ | */ | ||||
| #include "BLI_bitmap.h" | #include "BLI_bitmap.h" | ||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| /* For embedding CCGKey in iterator. */ | /* For embedding CCGKey in iterator. */ | ||||
| #include "BKE_ccg.h" | #include "BKE_ccg.h" | ||||
| #ifdef __cplusplus | |||||
| extern "C" { | |||||
| #endif | |||||
| struct BMLog; | struct BMLog; | ||||
| struct BMesh; | struct BMesh; | ||||
| struct CCGElem; | struct CCGElem; | ||||
| struct CCGKey; | struct CCGKey; | ||||
| struct CustomData; | struct CustomData; | ||||
| struct DMFlagMat; | struct DMFlagMat; | ||||
| struct GPU_PBVH_Buffers; | struct GPU_PBVH_Buffers; | ||||
| struct IsectRayPrecalc; | struct IsectRayPrecalc; | ||||
| struct MLoop; | struct MLoop; | ||||
| struct MLoopTri; | struct MLoopTri; | ||||
| struct MPoly; | struct MPoly; | ||||
| struct MVert; | struct MVert; | ||||
| struct PBVH; | struct PBVH; | ||||
| struct PBVHNode; | struct PBVHNode; | ||||
| struct SubdivCCG; | struct SubdivCCG; | ||||
| struct TaskParallelSettings; | struct TaskParallelSettings; | ||||
| struct TaskParallelTLS; | |||||
| typedef struct PBVH PBVH; | typedef struct PBVH PBVH; | ||||
| typedef struct PBVHNode PBVHNode; | typedef struct PBVHNode PBVHNode; | ||||
| typedef struct { | typedef struct { | ||||
| float (*co)[3]; | float (*co)[3]; | ||||
| } PBVHProxyNode; | } PBVHProxyNode; | ||||
| ▲ Show 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | |||||
| void BKE_pbvh_gather_proxies(PBVH *pbvh, PBVHNode ***nodes, int *totnode); | void BKE_pbvh_gather_proxies(PBVH *pbvh, PBVHNode ***nodes, int *totnode); | ||||
| void BKE_pbvh_node_get_bm_orco_data(PBVHNode *node, | void BKE_pbvh_node_get_bm_orco_data(PBVHNode *node, | ||||
| int (**r_orco_tris)[3], | int (**r_orco_tris)[3], | ||||
| int *r_orco_tris_num, | int *r_orco_tris_num, | ||||
| float (**r_orco_coords)[3]); | float (**r_orco_coords)[3]); | ||||
| bool BKE_pbvh_node_vert_update_check_any(PBVH *bvh, PBVHNode *node); | bool BKE_pbvh_node_vert_update_check_any(PBVH *bvh, PBVHNode *node); | ||||
| void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings, | |||||
| bool use_threading, | |||||
| int totnode); | |||||
| // void BKE_pbvh_node_BB_reset(PBVHNode *node); | // void BKE_pbvh_node_BB_reset(PBVHNode *node); | ||||
| // void BKE_pbvh_node_BB_expand(PBVHNode *node, float co[3]); | // void BKE_pbvh_node_BB_expand(PBVHNode *node, float co[3]); | ||||
| bool pbvh_has_mask(PBVH *bvh); | bool pbvh_has_mask(PBVH *bvh); | ||||
| void pbvh_show_mask_set(PBVH *bvh, bool show_mask); | void pbvh_show_mask_set(PBVH *bvh, bool show_mask); | ||||
| /* Parallelization */ | |||||
| typedef void (*PBVHParallelRangeFunc)(void *__restrict userdata, | |||||
| const int iter, | |||||
| const struct TaskParallelTLS *__restrict tls); | |||||
| typedef void (*PBVHParallelReduceFunc)(const void *__restrict userdata, | |||||
| void *__restrict chunk_join, | |||||
| void *__restrict chunk); | |||||
| typedef struct PBVHParallelSettings { | |||||
| bool use_threading; | |||||
| void *userdata_chunk; | |||||
| size_t userdata_chunk_size; | |||||
| PBVHParallelReduceFunc func_reduce; | |||||
| } PBVHParallelSettings; | |||||
| void BKE_pbvh_parallel_range_settings(struct PBVHParallelSettings *settings, | |||||
| bool use_threading, | |||||
| int totnode); | |||||
| void BKE_pbvh_parallel_range(const int start, | |||||
| const int stop, | |||||
| void *userdata, | |||||
| PBVHParallelRangeFunc func, | |||||
| const struct PBVHParallelSettings *settings); | |||||
| #ifdef __cplusplus | |||||
| } | |||||
| #endif | |||||
| #endif /* __BKE_PBVH_H__ */ | #endif /* __BKE_PBVH_H__ */ | ||||