Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_bvhutils.h
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
| * Builds a BVH-tree where nodes are the vertices of the given `em`. | * Builds a BVH-tree where nodes are the vertices of the given `em`. | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data, | BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data, | ||||
| struct BMEditMesh *em, | struct BMEditMesh *em, | ||||
| const BLI_bitmap *mask, | const BLI_bitmap *mask, | ||||
| int verts_num_active, | int verts_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the given vertices (NOTE: does not copy given `vert`!). | * Builds a BVH-tree where nodes are the given vertices (NOTE: does not copy given `vert`!). | ||||
| * \param vert_allocated: if true, vert freeing will be done when freeing data. | * \param vert_allocated: if true, vert freeing will be done when freeing data. | ||||
| * \param verts_mask: if not null, true elements give which vert to add to BVH-tree. | * \param verts_mask: if not null, true elements give which vert to add to BVH-tree. | ||||
| * \param verts_num_active: if >= 0, number of active verts to add to BVH-tree | * \param verts_num_active: if >= 0, number of active verts to add to BVH-tree | ||||
| * (else will be computed from mask). | * (else will be computed from mask). | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data, | BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data, | ||||
| const struct MVert *vert, | const struct MVert *vert, | ||||
| int verts_num, | int verts_num, | ||||
| bool vert_allocated, | bool vert_allocated, | ||||
| const BLI_bitmap *verts_mask, | const BLI_bitmap *verts_mask, | ||||
| int verts_num_active, | int verts_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| BVHTree *bvhtree_from_editmesh_edges( | BVHTree *bvhtree_from_editmesh_edges( | ||||
| BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); | BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); | ||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the edges of the given `em`. | * Builds a BVH-tree where nodes are the edges of the given `em`. | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data, | BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data, | ||||
| struct BMEditMesh *em, | struct BMEditMesh *em, | ||||
| const BLI_bitmap *edges_mask, | const BLI_bitmap *edges_mask, | ||||
| int edges_num_active, | int edges_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the given edges. | * Builds a BVH-tree where nodes are the given edges. | ||||
| * \param vert, vert_allocated: if true, elem freeing will be done when freeing data. | * \param vert, vert_allocated: if true, elem freeing will be done when freeing data. | ||||
| * \param edge, edge_allocated: if true, elem freeing will be done when freeing data. | * \param edge, edge_allocated: if true, elem freeing will be done when freeing data. | ||||
| * \param edges_mask: if not null, true elements give which vert to add to BVH-tree. | * \param edges_mask: if not null, true elements give which vert to add to BVH-tree. | ||||
| * \param edges_num_active: if >= 0, number of active edges to add to BVH-tree | * \param edges_num_active: if >= 0, number of active edges to add to BVH-tree | ||||
| * (else will be computed from mask). | * (else will be computed from mask). | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data, | BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data, | ||||
| const struct MVert *vert, | const struct MVert *vert, | ||||
| bool vert_allocated, | bool vert_allocated, | ||||
| const struct MEdge *edge, | const struct MEdge *edge, | ||||
| int edges_num, | int edges_num, | ||||
| bool edge_allocated, | bool edge_allocated, | ||||
| const BLI_bitmap *edges_mask, | const BLI_bitmap *edges_mask, | ||||
| int edges_num_active, | int edges_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the given tessellated faces | * Builds a BVH-tree where nodes are the given tessellated faces | ||||
| * (NOTE: does not copy given mfaces!). | * (NOTE: does not copy given mfaces!). | ||||
| * \param vert_allocated: if true, vert freeing will be done when freeing data. | * \param vert_allocated: if true, vert freeing will be done when freeing data. | ||||
| * \param face_allocated: if true, face freeing will be done when freeing data. | * \param face_allocated: if true, face freeing will be done when freeing data. | ||||
| * \param faces_mask: if not null, true elements give which faces to add to BVH-tree. | * \param faces_mask: if not null, true elements give which faces to add to BVH-tree. | ||||
| * \param faces_num_active: if >= 0, number of active faces to add to BVH-tree | * \param faces_num_active: if >= 0, number of active faces to add to BVH-tree | ||||
| * (else will be computed from mask). | * (else will be computed from mask). | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data, | BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data, | ||||
| const struct MVert *vert, | const struct MVert *vert, | ||||
| bool vert_allocated, | bool vert_allocated, | ||||
| const struct MFace *face, | const struct MFace *face, | ||||
| int numFaces, | int numFaces, | ||||
| bool face_allocated, | bool face_allocated, | ||||
| const BLI_bitmap *faces_mask, | const BLI_bitmap *faces_mask, | ||||
| int faces_num_active, | int faces_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| BVHTree *bvhtree_from_editmesh_looptri( | BVHTree *bvhtree_from_editmesh_looptri( | ||||
| BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); | BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); | ||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the `looptri` faces of the given `bm`. | * Builds a BVH-tree where nodes are the `looptri` faces of the given `bm`. | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data, | BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data, | ||||
| struct BMEditMesh *em, | struct BMEditMesh *em, | ||||
| const BLI_bitmap *mask, | const BLI_bitmap *mask, | ||||
| int looptri_num_active, | int looptri_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| /** | /** | ||||
| * Builds a BVH-tree where nodes are the looptri faces of the given mesh. | * Builds a BVH-tree where nodes are the looptri faces of the given mesh. | ||||
| * | * | ||||
| * \note for edit-mesh this is currently a duplicate of #bvhtree_from_mesh_faces_ex | * \note for edit-mesh this is currently a duplicate of #bvhtree_from_mesh_faces_ex | ||||
| */ | */ | ||||
| BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data, | BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data, | ||||
| const struct MVert *vert, | const struct MVert *vert, | ||||
| bool vert_allocated, | bool vert_allocated, | ||||
| const struct MLoop *mloop, | const struct MLoop *mloop, | ||||
| bool loop_allocated, | bool loop_allocated, | ||||
| const struct MLoopTri *looptri, | const struct MLoopTri *looptri, | ||||
| int looptri_num, | int looptri_num, | ||||
| bool looptri_allocated, | bool looptri_allocated, | ||||
| const BLI_bitmap *mask, | const BLI_bitmap *mask, | ||||
| int looptri_num_active, | int looptri_num_active, | ||||
| float epsilon, | float epsilon, | ||||
| int tree_type, | int tree_type, | ||||
| int axis, | int axis); | ||||
| BVHCacheType bvh_cache_type, | |||||
| struct BVHCache **bvh_cache_p, | |||||
| ThreadMutex *mesh_eval_mutex); | |||||
| /** | /** | ||||
| * Builds or queries a BVH-cache for the cache BVH-tree of the request type. | * Builds or queries a BVH-cache for the cache BVH-tree of the request type. | ||||
| * | * | ||||
| * \note This function only fills a cache, and therefore the mesh argument can | * \note This function only fills a cache, and therefore the mesh argument can | ||||
| * be considered logically const. Concurrent access is protected by a mutex. | * be considered logically const. Concurrent access is protected by a mutex. | ||||
| */ | */ | ||||
| BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, | BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||