#include <MRCMesh/MRBox.h>#include <MRCMesh/MRId.h>#include <MRCMisc/common.h>#include <MRCMisc/exports.h>#include <stdbool.h>#include <stddef.h>Go to the source code of this file.
Typedefs | |
| typedef struct MR_MeshOrPoints | MR_MeshOrPoints |
| typedef struct MR_Vector_MR_AffineXf3f_MR_ObjId | MR_Vector_MR_AffineXf3f_MR_ObjId |
| typedef struct MR_Vector_MR_MeshOrPointsXf_MR_ObjId | MR_Vector_MR_MeshOrPointsXf_MR_ObjId |
| typedef struct MR_ObjTreeTraits | MR_ObjTreeTraits |
| typedef struct MR_AABBTreeObjects | MR_AABBTreeObjects |
| typedef struct MR_AABBTreeObjects MR_AABBTreeObjects |
tree containing world bounding boxes of individual objects having individual local-to-world transformations Generated from class MR::AABBTreeObjects. Base classes: Direct: (non-virtual) MR::AABBTreeBase<MR::ObjTreeTraits> Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_MeshOrPoints MR_MeshOrPoints |
This class can hold either mesh part or point cloud. It is used for generic algorithms operating with either of them Generated from class MR::MeshOrPoints. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_ObjTreeTraits MR_ObjTreeTraits |
Generated from class MR::ObjTreeTraits. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| typedef struct MR_Vector_MR_AffineXf3f_MR_ObjId MR_Vector_MR_AffineXf3f_MR_ObjId |
Vector<T> is indexed by size_t Generated from class MR::Vector<MR::AffineXf3f, MR::ObjId>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
Vector<T> is indexed by size_t Generated from class MR::Vector<MR::MeshOrPointsXf, MR::ObjId>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_AssignFromAnother | ( | MR_AABBTreeObjects * | _this, |
| MR_PassBy | _other_pass_by, | ||
| MR_AABBTreeObjects * | _other ) |
Generated from method MR::AABBTreeObjects::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.
| MRC_API const MR_Box3f * MR_AABBTreeObjects_box | ( | const MR_AABBTreeObjects * | _this, |
| MR_NodeId | n ) |
returns the bounding box of given node or leaf Generated from method MR::AABBTreeObjects::box. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_Construct | ( | MR_PassBy | objs_pass_by, |
| MR_Vector_MR_MeshOrPointsXf_MR_ObjId * | objs ) |
creates tree for given set of objects each with its own transformation Generated from constructor MR::AABBTreeObjects::AABBTreeObjects. The reference to the parameter objs might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_AABBTreeObjects_Destroy() to free it when you're done using it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_ConstructFromAnother | ( | MR_PassBy | _other_pass_by, |
| MR_AABBTreeObjects * | _other ) |
Generated from constructor MR::AABBTreeObjects::AABBTreeObjects. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_AABBTreeObjects_Destroy() to free it when you're done using it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_DefaultConstruct | ( | void | ) |
Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_AABBTreeObjects_Destroy() to free it when you're done using it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_DefaultConstructArray | ( | size_t | num_elems | ) |
Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_AABBTreeObjects_DestroyArray(). Use MR_AABBTreeObjects_OffsetMutablePtr() and MR_AABBTreeObjects_OffsetPtr() to access the array elements.
| MRC_API void MR_AABBTreeObjects_Destroy | ( | const MR_AABBTreeObjects * | _this | ) |
Destroys a heap-allocated instance of MR_AABBTreeObjects. Does nothing if the pointer is null.
| MRC_API void MR_AABBTreeObjects_DestroyArray | ( | const MR_AABBTreeObjects * | _this | ) |
Destroys a heap-allocated array of MR_AABBTreeObjects. Does nothing if the pointer is null.
| MRC_API bool MR_AABBTreeObjects_empty | ( | const MR_AABBTreeObjects * | _this | ) |
returns true if the tree has no leaves Generated from method MR::AABBTreeObjects::empty. Parameter _this can not be null. It is a single object.
| MRC_API MR_Box3f MR_AABBTreeObjects_getBoundingBox | ( | const MR_AABBTreeObjects * | _this | ) |
returns the root node bounding box Generated from method MR::AABBTreeObjects::getBoundingBox. Parameter _this can not be null. It is a single object.
| MRC_API void MR_AABBTreeObjects_getLeafOrder | ( | const MR_AABBTreeObjects * | _this, |
| MR_BMap_MR_ObjId_MR_ObjId * | leafMap ) |
fills map: LeafId -> leaf#; buffer in leafMap must be resized before the call, and caller is responsible for filling missing leaf elements Generated from method MR::AABBTreeObjects::getLeafOrder. Parameter _this can not be null. It is a single object. Parameter leafMap can not be null. It is a single object.
| MRC_API void MR_AABBTreeObjects_getLeafOrderAndReset | ( | MR_AABBTreeObjects * | _this, |
| MR_BMap_MR_ObjId_MR_ObjId * | leafMap ) |
fills map: LeafId -> leaf#, then resets leaf order to 0,1,2,...; buffer in leafMap must be resized before the call, and caller is responsible for filling missing leaf elements Generated from method MR::AABBTreeObjects::getLeafOrderAndReset. Parameter _this can not be null. It is a single object. Parameter leafMap can not be null. It is a single object.
| MRC_API MR_NodeBitSet * MR_AABBTreeObjects_getNodesFromLeaves | ( | const MR_AABBTreeObjects * | _this, |
| const MR_ObjBitSet * | leaves ) |
returns set of not-leaf nodes containing among direct or indirect children given leaves Generated from method MR::AABBTreeObjects::getNodesFromLeaves. Parameter _this can not be null. It is a single object. Parameter leaves can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_NodeBitSet_Destroy() to free it when you're done using it.
| MRC_API MR_ObjBitSet * MR_AABBTreeObjects_getSubtreeLeaves | ( | const MR_AABBTreeObjects * | _this, |
| MR_NodeId | subtreeRoot ) |
returns all leaves in the subtree with given root (can be a leaf) Generated from method MR::AABBTreeObjects::getSubtreeLeaves. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_ObjBitSet_Destroy() to free it when you're done using it.
| MRC_API MR_std_vector_MR_NodeId * MR_AABBTreeObjects_getSubtrees | ( | const MR_AABBTreeObjects * | _this, |
| int | minNum ) |
returns at least given number of top-level not-intersecting subtrees (some can be leaves), union of which contain all tree leaves Generated from method MR::AABBTreeObjects::getSubtrees. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_MR_NodeId_Destroy() to free it when you're done using it.
| MRC_API size_t MR_AABBTreeObjects_heapBytes | ( | const MR_AABBTreeObjects * | _this | ) |
returns the amount of memory this object occupies on heap Generated from method MR::AABBTreeObjects::heapBytes. Parameter _this can not be null. It is a single object.
| MRC_API const MR_AABBTreeNode_MR_ObjTreeTraits * MR_AABBTreeObjects_index | ( | const MR_AABBTreeObjects * | _this, |
| MR_NodeId | nid ) |
const-access to any not-leaf node Generated from method MR::AABBTreeObjects::operator[]. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
returns true if given node id is in fact a leaf (encoded as negative number) Generated from method MR::AABBTreeObjects::isLeaf.
| MRC_API const MR_BoxedLeaf_MR_ObjTreeTraits * MR_AABBTreeObjects_leaf | ( | const MR_AABBTreeObjects * | _this, |
| MR_NodeId | n ) |
returns the leaf encoded in given node id Generated from method MR::AABBTreeObjects::leaf. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API MR_ObjId MR_AABBTreeObjects_leafId | ( | const MR_AABBTreeObjects * | _this, |
| MR_NodeId | n ) |
returns the id of the leaf encoded in given node id Generated from method MR::AABBTreeObjects::leafId. Parameter _this can not be null. It is a single object.
| MRC_API const MR_Vector_MR_BoxedLeaf_MR_ObjTreeTraits * MR_AABBTreeObjects_leaves | ( | const MR_AABBTreeObjects * | _this | ) |
all leaves in the order of the tree right after its construction Generated from method MR::AABBTreeObjects::leaves. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_MutableStaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits | ( | MR_AABBTreeBase_MR_ObjTreeTraits * | object | ) |
Downcasts an instance of MR::AABBTreeBase<MR::ObjTreeTraits> to a derived class MR::AABBTreeObjects. This is a static downcast, it trusts the programmer that the target type is correct. Results in UB and returns an invalid pointer otherwise. The reference to the parameter object might be preserved in the return value.
| MRC_API MR_AABBTreeBase_MR_ObjTreeTraits * MR_AABBTreeObjects_MutableUpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits | ( | MR_AABBTreeObjects * | object | ) |
Upcasts an instance of MR::AABBTreeObjects to its base class MR::AABBTreeBase<MR::ObjTreeTraits>. The reference to the parameter object might be preserved in the return value.
| MRC_API const MR_Vector_MR_AABBTreeNode_MR_ObjTreeTraits_MR_NodeId * MR_AABBTreeObjects_nodes | ( | const MR_AABBTreeObjects * | _this | ) |
const-access to all not-leaf nodes, a tree with N leaves has N-1 nodes Generated from method MR::AABBTreeObjects::nodes. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API size_t MR_AABBTreeObjects_numLeaves | ( | const MR_AABBTreeObjects * | _this | ) |
returns the number of leaves in whole tree Generated from method MR::AABBTreeObjects::numLeaves. Parameter _this can not be null. It is a single object.
| MRC_API const MR_MeshOrPoints * MR_AABBTreeObjects_obj | ( | const MR_AABBTreeObjects * | _this, |
| MR_ObjId | oi ) |
gets object by its id Generated from method MR::AABBTreeObjects::obj. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API MR_AABBTreeObjects * MR_AABBTreeObjects_OffsetMutablePtr | ( | MR_AABBTreeObjects * | ptr, |
| ptrdiff_t | i ) |
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.
| MRC_API const MR_AABBTreeObjects * MR_AABBTreeObjects_OffsetPtr | ( | const MR_AABBTreeObjects * | ptr, |
| ptrdiff_t | i ) |
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.
| MRC_API MR_NodeId MR_AABBTreeObjects_rootNodeId | ( | const MR_AABBTreeObjects * | _this | ) |
returns root node id: 0 if the tree has at least two leaves, or the only leaf; must not be called for empty tree Generated from method MR::AABBTreeObjects::rootNodeId. Parameter _this can not be null. It is a single object.
| MRC_API const MR_AABBTreeObjects * MR_AABBTreeObjects_StaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits | ( | const MR_AABBTreeBase_MR_ObjTreeTraits * | object | ) |
Downcasts an instance of MR::AABBTreeBase<MR::ObjTreeTraits> to a derived class MR::AABBTreeObjects. This is a static downcast, it trusts the programmer that the target type is correct. Results in UB and returns an invalid pointer otherwise. This version is acting on mutable pointers. The reference to the parameter object might be preserved in the return value.
| MRC_API const MR_Vector_MR_AffineXf3f_MR_ObjId * MR_AABBTreeObjects_toLocal_0 | ( | const MR_AABBTreeObjects * | _this | ) |
gets mapping: objId -> its transformation from world space to local space Generated from method MR::AABBTreeObjects::toLocal. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API const MR_AffineXf3f * MR_AABBTreeObjects_toLocal_1 | ( | const MR_AABBTreeObjects * | _this, |
| MR_ObjId | oi ) |
gets transformation from world space to local space of given object Generated from method MR::AABBTreeObjects::toLocal. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API const MR_AffineXf3f * MR_AABBTreeObjects_toWorld | ( | const MR_AABBTreeObjects * | _this, |
| MR_ObjId | oi ) |
gets transformation from local space of given object to world space Generated from method MR::AABBTreeObjects::toWorld. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API const MR_AABBTreeBase_MR_ObjTreeTraits * MR_AABBTreeObjects_UpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits | ( | const MR_AABBTreeObjects * | object | ) |
Upcasts an instance of MR::AABBTreeObjects to its base class MR::AABBTreeBase<MR::ObjTreeTraits>. This version is acting on mutable pointers. The reference to the parameter object might be preserved in the return value.
| MRC_API MR_ObjTreeTraits * MR_ObjTreeTraits_AssignFromAnother | ( | MR_ObjTreeTraits * | _this, |
| const MR_ObjTreeTraits * | _other ) |
Generated from method MR::ObjTreeTraits::operator=. Parameter _this can not be null. It is a single object. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.
| MRC_API MR_ObjTreeTraits * MR_ObjTreeTraits_ConstructFromAnother | ( | const MR_ObjTreeTraits * | _other | ) |
Generated from constructor MR::ObjTreeTraits::ObjTreeTraits. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_ObjTreeTraits_Destroy() to free it when you're done using it.
| MRC_API MR_ObjTreeTraits * MR_ObjTreeTraits_DefaultConstruct | ( | void | ) |
Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_ObjTreeTraits_Destroy() to free it when you're done using it.
| MRC_API MR_ObjTreeTraits * MR_ObjTreeTraits_DefaultConstructArray | ( | size_t | num_elems | ) |
Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_ObjTreeTraits_DestroyArray(). Use MR_ObjTreeTraits_OffsetMutablePtr() and MR_ObjTreeTraits_OffsetPtr() to access the array elements.
| MRC_API void MR_ObjTreeTraits_Destroy | ( | const MR_ObjTreeTraits * | _this | ) |
Destroys a heap-allocated instance of MR_ObjTreeTraits. Does nothing if the pointer is null.
| MRC_API void MR_ObjTreeTraits_DestroyArray | ( | const MR_ObjTreeTraits * | _this | ) |
Destroys a heap-allocated array of MR_ObjTreeTraits. Does nothing if the pointer is null.
| MRC_API MR_ObjTreeTraits * MR_ObjTreeTraits_OffsetMutablePtr | ( | MR_ObjTreeTraits * | ptr, |
| ptrdiff_t | i ) |
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.
| MRC_API const MR_ObjTreeTraits * MR_ObjTreeTraits_OffsetPtr | ( | const MR_ObjTreeTraits * | ptr, |
| ptrdiff_t | i ) |
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.