MeshLib C Docs
Loading...
Searching...
No Matches
MRAABBTree.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRBox.h>
4#include <MRCMesh/MRId.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
8
9#include <stdbool.h>
10#include <stddef.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_FaceBMap MR_FaceBMap; // Defined in `#include <MRCMesh/MRBuffer.h>`.
17typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
18typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
19typedef struct MR_MeshPart MR_MeshPart; // Defined in `#include <MRCMesh/MRMeshPart.h>`.
20typedef struct MR_NodeBitSet MR_NodeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
21typedef struct MR_TriMesh MR_TriMesh; // Defined in `#include <MRCMesh/MRTriMesh.h>`.
22typedef struct MR_Vector_MR_AABBTreeWideLeafTri MR_Vector_MR_AABBTreeWideLeafTri; // Defined in `#include <MRCMesh/MRVector.h>`.
23typedef struct MR_Vector_MR_AABBTreeWideNode_MR_NodeId MR_Vector_MR_AABBTreeWideNode_MR_NodeId; // Defined in `#include <MRCMesh/MRVector.h>`.
24typedef struct MR_Vector_MR_Box3f MR_Vector_MR_Box3f; // Defined in `#include <MRCMesh/MRVector.h>`.
25typedef struct MR_VertBMap MR_VertBMap; // Defined in `#include <MRCMesh/MRBuffer.h>`.
26typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
28typedef struct MR_std_vector_MR_NodeId MR_std_vector_MR_NodeId; // Defined in `#include <MRCMisc/std_vector_MR_NodeId.h>`.
29
30
35
40
45typedef struct MR_AABBTree MR_AABBTree;
46
53
60
67
74
80
87
94
100
107
111
116
122
126
130
136
139
142
150
154
158
164
170
176
183
190
197
201
206
213
217
221
227
230
233
241
245
249
254
258
263
266MRC_API const MR_AABBTree *MR_AABBTree_OffsetPtr(const MR_AABBTree *ptr, ptrdiff_t i);
267
271
276
283
293
296
299
307
313
318
324
330
335
341
347
354
361
367MRC_API void MR_AABBTree_renumber(MR_AABBTree *_this, const MR_FaceBMap *faceMap, const MR_VertBMap *vertMap);
368
375
383MRC_API void MR_AABBTree_refit(MR_AABBTree *_this, const MR_Mesh *mesh, const MR_VertBitSet *changedVerts);
384
396
397#ifdef __cplusplus
398} // extern "C"
399#endif
MRC_API MR_Box3f * MR_AABBTreeWideNode_GetMutable_box(MR_AABBTreeWideNode *_this)
MRC_API const MR_AABBTree * MR_AABBTree_OffsetPtr(const MR_AABBTree *ptr, ptrdiff_t i)
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_OffsetMutablePtr(MR_AABBTreeWideNode *ptr, ptrdiff_t i)
struct MR_Vector_MR_AABBTreeWideNode_MR_NodeId MR_Vector_MR_AABBTreeWideNode_MR_NodeId
Definition MRAABBTree.h:23
struct MR_AABBTreeWideNode MR_AABBTreeWideNode
Definition MRAABBTree.h:34
struct MR_std_vector_MR_NodeId MR_std_vector_MR_NodeId
Definition MRAABBTree.h:28
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_AssignFromAnother(MR_AABBTreeWideLeafTri *_this, const MR_AABBTreeWideLeafTri *_other)
MRC_API void MR_AABBTreeWideNode_DestroyArray(const MR_AABBTreeWideNode *_this)
Destroys a heap-allocated array of MR_AABBTreeWideNode. Does nothing if the pointer is null.
MRC_API void MR_AABBTree_Destroy(const MR_AABBTree *_this)
Destroys a heap-allocated instance of MR_AABBTree. Does nothing if the pointer is null.
MRC_API void MR_AABBTreeWideNode_Destroy(const MR_AABBTreeWideNode *_this)
Destroys a heap-allocated instance of MR_AABBTreeWideNode. Does nothing if the pointer is null.
MRC_API const MR_AABBTreeWideNode * MR_AABBTreeWideNode_OffsetPtr(const MR_AABBTreeWideNode *ptr, ptrdiff_t i)
MRC_API MR_AABBTree * MR_AABBTree_OffsetMutablePtr(MR_AABBTree *ptr, ptrdiff_t i)
MRC_API void MR_AABBTreeWideNode_Set_box(MR_AABBTreeWideNode *_this, MR_Box3f value)
MRC_API MR_AABBTree * MR_AABBTree_DefaultConstruct(void)
MRC_API MR_std_array_MR_VertId_3 * MR_AABBTreeWideLeafTri_GetMutable_verts(MR_AABBTreeWideLeafTri *_this)
struct MR_Vector_MR_AABBTreeWideLeafTri MR_Vector_MR_AABBTreeWideLeafTri
Definition MRAABBTree.h:22
MRC_API void MR_AABBTree_renumber(MR_AABBTree *_this, const MR_FaceBMap *faceMap, const MR_VertBMap *vertMap)
MRC_API const MR_FaceId * MR_AABBTreeWideLeafTri_Get_face(const MR_AABBTreeWideLeafTri *_this)
MRC_API const MR_std_array_MR_VertId_3 * MR_AABBTreeWideLeafTri_Get_verts(const MR_AABBTreeWideLeafTri *_this)
struct MR_Vector_MR_Box3f MR_Vector_MR_Box3f
Definition MRAABBTree.h:24
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:26
MRC_API MR_NodeBitSet * MR_AABBTree_getNodesFromFaces(const MR_AABBTree *_this, const MR_FaceBitSet *faces)
MRC_API void MR_AABBTree_getLeafOrder(const MR_AABBTree *_this, MR_FaceBMap *faceMap)
MRC_API void MR_AABBTree_addSplitFaces(MR_AABBTree *_this, const MR_Mesh *mesh, const MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId *new2Old)
MRC_API MR_AABBTree * MR_AABBTree_Construct_2(const MR_TriMesh *tmesh, const MR_FaceBitSet *region)
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_DefaultConstructArray(size_t num_elems)
MRC_API const int * MR_AABBTree_Get_MaxDepth(void)
struct MR_AABBTree MR_AABBTree
Definition MRAABBTree.h:45
MRC_API void MR_AABBTreeWideLeafTri_Set_face(MR_AABBTreeWideLeafTri *_this, MR_FaceId value)
MRC_API void MR_AABBTreeWideLeafTri_DestroyArray(const MR_AABBTreeWideLeafTri *_this)
Destroys a heap-allocated array of MR_AABBTreeWideLeafTri. Does nothing if the pointer is null.
MRC_API MR_AABBTree * MR_AABBTree_ConstructFromAnother(MR_PassBy _other_pass_by, MR_AABBTree *_other)
MRC_API void MR_AABBTreeWideNode_Set_first(MR_AABBTreeWideNode *_this, int value)
MRC_API const MR_Box3f * MR_AABBTreeWideNode_Get_box(const MR_AABBTreeWideNode *_this)
MRC_API int * MR_AABBTreeWideNode_GetMutable_first(MR_AABBTreeWideNode *_this)
MRC_API bool MR_AABBTreeWideNode_leaf(const MR_AABBTreeWideNode *_this)
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_DefaultConstruct(void)
MRC_API const int * MR_AABBTreeWideNode_Get_first(const MR_AABBTreeWideNode *_this)
MRC_API int MR_AABBTreeWideNode_numLeafTris(const MR_AABBTreeWideNode *_this)
MRC_API void MR_AABBTreeWideLeafTri_Destroy(const MR_AABBTreeWideLeafTri *_this)
Destroys a heap-allocated instance of MR_AABBTreeWideLeafTri. Does nothing if the pointer is null.
struct MR_AABBTreeWideLeafTri MR_AABBTreeWideLeafTri
Definition MRAABBTree.h:39
MRC_API void MR_AABBTree_DestroyArray(const MR_AABBTree *_this)
Destroys a heap-allocated array of MR_AABBTree. Does nothing if the pointer is null.
MRC_API void MR_AABBTreeWideLeafTri_Set_verts(MR_AABBTreeWideLeafTri *_this, MR_std_array_MR_VertId_3 value)
MRC_API const MR_Vector_MR_AABBTreeWideNode_MR_NodeId * MR_AABBTree_nodes(const MR_AABBTree *_this)
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_OffsetMutablePtr(MR_AABBTreeWideLeafTri *ptr, ptrdiff_t i)
MRC_API void MR_AABBTree_refit(MR_AABBTree *_this, const MR_Mesh *mesh, const MR_VertBitSet *changedVerts)
MRC_API const int * MR_AABBTree_Get_MaxChildren(void)
MRC_API MR_AABBTree * MR_AABBTree_AssignFromAnother(MR_AABBTree *_this, MR_PassBy _other_pass_by, MR_AABBTree *_other)
MRC_API int * MR_AABBTreeWideNode_GetMutable_count(MR_AABBTreeWideNode *_this)
MRC_API MR_Box3f MR_AABBTree_getBoundingBox(const MR_AABBTree *_this)
struct MR_VertBMap MR_VertBMap
Definition MRAABBTree.h:25
struct MR_NodeBitSet MR_NodeBitSet
Definition MRAABBTree.h:20
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_DefaultConstructArray(size_t num_elems)
MRC_API void MR_AABBTree_flipOrientation(MR_AABBTree *_this, const MR_FaceBitSet *region)
MRC_API void MR_AABBTreeWideNode_Set_count(MR_AABBTreeWideNode *_this, int value)
struct MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId
Definition MRAABBTree.h:27
MRC_API MR_AABBTree * MR_AABBTree_DefaultConstructArray(size_t num_elems)
MRC_API const MR_Vector_MR_AABBTreeWideLeafTri * MR_AABBTree_leafTris(const MR_AABBTree *_this)
struct MR_TriMesh MR_TriMesh
Definition MRAABBTree.h:21
MRC_API size_t MR_AABBTree_heapBytes(const MR_AABBTree *_this)
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_ConstructFrom(MR_FaceId face, MR_std_array_MR_VertId_3 verts)
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_ConstructFromAnother(const MR_AABBTreeWideLeafTri *_other)
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_ConstructFromAnother(const MR_AABBTreeWideNode *_other)
MRC_API const MR_Vector_MR_Box3f * MR_AABBTree_leafBoxes(const MR_AABBTree *_this)
MRC_API MR_std_vector_MR_NodeId * MR_AABBTree_getSubtrees(const MR_AABBTree *_this, int minNum)
MRC_API const int * MR_AABBTreeWideNode_Get_count(const MR_AABBTreeWideNode *_this)
MRC_API MR_FaceBitSet * MR_AABBTree_getSubtreeFaces(const MR_AABBTree *_this, MR_NodeId subtreeRoot)
MRC_API const MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_OffsetPtr(const MR_AABBTreeWideLeafTri *ptr, ptrdiff_t i)
MRC_API MR_AABBTreeWideLeafTri * MR_AABBTreeWideLeafTri_DefaultConstruct(void)
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_AssignFromAnother(MR_AABBTreeWideNode *_this, const MR_AABBTreeWideNode *_other)
MRC_API MR_FaceId * MR_AABBTreeWideLeafTri_GetMutable_face(MR_AABBTreeWideLeafTri *_this)
MRC_API MR_AABBTree * MR_AABBTree_Construct_1(const MR_MeshPart *mp)
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:19
MRC_API MR_AABBTreeWideNode * MR_AABBTreeWideNode_ConstructFrom(MR_Box3f box, int first, int count)
struct MR_FaceBMap MR_FaceBMap
Definition MRAABBTree.h:16
MRC_API const int * MR_AABBTree_Get_MaxLeafTris(void)
struct MR_Mesh MR_Mesh
Definition MRCtm.h:17
MR_PassBy
Definition common.h:13
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRBox.h:107
Definition MRId.h:31
Definition MRId.h:72
A fixed-size array of MR::VertId of size 3.
Definition std_array_MR_VertId_3.h:12