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>
7
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
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>`.
22typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
23typedef struct MR_std_vector_MR_NodeId MR_std_vector_MR_NodeId; // Defined in `#include <MRCMisc/std_vector_MR_NodeId.h>`.
24
25
32typedef struct MR_AABBTree MR_AABBTree;
33
37
42
44MRC_API const MR_AABBTree *MR_AABBTree_OffsetPtr(const MR_AABBTree *ptr, ptrdiff_t i);
45
48
52
55
59
65
68
71
76
85MRC_API void MR_AABBTree_refit(MR_AABBTree *_this, const MR_Mesh *mesh, const MR_VertBitSet *changedVerts);
86
92
98
102
107
112
117
123
129
136
143
150
151#ifdef __cplusplus
152} // extern "C"
153#endif
MRC_API MR_NodeId MR_AABBTree_rootNodeId(void)
MRC_API const MR_AABBTree * MR_AABBTree_OffsetPtr(const MR_AABBTree *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f * MR_AABBTree_index(const MR_AABBTree *_this, MR_NodeId nid)
struct MR_std_vector_MR_NodeId MR_std_vector_MR_NodeId
Definition MRAABBTree.h:23
struct MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f
Definition MRAABBTree.h:15
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 MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f * MR_AABBTree_MutableUpcastTo_MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f(MR_AABBTree *object)
Upcasts an instance of MR::AABBTree to its base class MR::AABBTreeBase<MR::AABBTreeTraits<MR::FaceTag...
MRC_API MR_AABBTree * MR_AABBTree_OffsetMutablePtr(MR_AABBTree *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_AABBTree * MR_AABBTree_DefaultConstruct(void)
MRC_API MR_AABBTree * MR_AABBTree_Construct(const MR_MeshPart *mp)
MRC_API const MR_Vector_MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f_MR_NodeId * MR_AABBTree_nodes(const MR_AABBTree *_this)
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:22
MRC_API const MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f * MR_AABBTree_UpcastTo_MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f(const MR_AABBTree *object)
MRC_API void MR_AABBTree_getLeafOrder(const MR_AABBTree *_this, MR_FaceBMap *leafMap)
struct MR_AABBTree MR_AABBTree
Definition MRAABBTree.h:32
MRC_API MR_AABBTree * MR_AABBTree_ConstructFromAnother(MR_PassBy _other_pass_by, MR_AABBTree *_other)
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 MR_NodeBitSet * MR_AABBTree_getNodesFromLeaves(const MR_AABBTree *_this, const MR_FaceBitSet *leaves)
MRC_API MR_uint64_t MR_AABBTree_numLeaves(const MR_AABBTree *_this)
MRC_API void MR_AABBTree_refit(MR_AABBTree *_this, const MR_Mesh *mesh, const MR_VertBitSet *changedVerts)
MRC_API MR_AABBTree * MR_AABBTree_AssignFromAnother(MR_AABBTree *_this, MR_PassBy _other_pass_by, MR_AABBTree *_other)
MRC_API MR_Box3f MR_AABBTree_getBoundingBox(const MR_AABBTree *_this)
MRC_API MR_FaceBitSet * MR_AABBTree_getSubtreeLeaves(const MR_AABBTree *_this, MR_NodeId subtreeRoot)
struct MR_NodeBitSet MR_NodeBitSet
Definition MRAABBTree.h:20
struct MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f MR_AABBTreeBase_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f
Definition MRAABBTree.h:14
MRC_API MR_AABBTree * MR_AABBTree_DefaultConstructArray(size_t num_elems)
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
struct MR_Vector_MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f_MR_NodeId MR_Vector_MR_AABBTreeNode_MR_AABBTreeTraits_MR_FaceTag_MR_Box3f_MR_NodeId
Definition MRAABBTree.h:21
MRC_API MR_std_vector_MR_NodeId * MR_AABBTree_getSubtrees(const MR_AABBTree *_this, int minNum)
MRC_API void MR_AABBTree_getLeafOrderAndReset(MR_AABBTree *_this, MR_FaceBMap *leafMap)
MRC_API MR_uint64_t MR_AABBTree_heapBytes(const MR_AABBTree *_this)
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:19
struct MR_FaceBMap MR_FaceBMap
Definition MRAABBTree.h:16
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11
Definition MRBox.h:110
Definition MRId.h:86