MeshLib C Docs
Loading...
Searching...
No Matches
MRAABBTreeObjects.h File Reference
#include <MRCMesh/MRBox.h>
#include <MRCMesh/MRId.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_AffineXf3f MR_AffineXf3f
typedef struct MR_MeshOrPoints MR_MeshOrPoints
typedef struct MR_Vector_MR_AffineXf3f_MR_ObjId MR_Vector_MR_AffineXf3f_MR_ObjId
 std::vector<T>-like container that requires specific indexing type,
typedef struct MR_Vector_MR_MeshOrPointsXf_MR_ObjId MR_Vector_MR_MeshOrPointsXf_MR_ObjId
 std::vector<T>-like container that requires specific indexing type,
typedef struct MR_ObjTreeTraits MR_ObjTreeTraits
typedef struct MR_AABBTreeObjects MR_AABBTreeObjects

Functions

MRC_API MR_ObjTreeTraitsMR_ObjTreeTraits_DefaultConstruct (void)
MRC_API MR_ObjTreeTraitsMR_ObjTreeTraits_DefaultConstructArray (size_t num_elems)
MRC_API const MR_ObjTreeTraitsMR_ObjTreeTraits_OffsetPtr (const MR_ObjTreeTraits *ptr, ptrdiff_t i)
MRC_API MR_ObjTreeTraitsMR_ObjTreeTraits_OffsetMutablePtr (MR_ObjTreeTraits *ptr, ptrdiff_t i)
MRC_API MR_ObjTreeTraitsMR_ObjTreeTraits_ConstructFromAnother (const MR_ObjTreeTraits *_other)
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_ObjTreeTraitsMR_ObjTreeTraits_AssignFromAnother (MR_ObjTreeTraits *_this, const MR_ObjTreeTraits *_other)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_DefaultConstruct (void)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_DefaultConstructArray (size_t num_elems)
MRC_API const MR_AABBTreeObjectsMR_AABBTreeObjects_OffsetPtr (const MR_AABBTreeObjects *ptr, ptrdiff_t i)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_OffsetMutablePtr (MR_AABBTreeObjects *ptr, ptrdiff_t i)
MRC_API const MR_AABBTreeBase_MR_ObjTreeTraitsMR_AABBTreeObjects_UpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits (const MR_AABBTreeObjects *object)
MRC_API MR_AABBTreeBase_MR_ObjTreeTraitsMR_AABBTreeObjects_MutableUpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits (MR_AABBTreeObjects *object)
MRC_API const MR_AABBTreeObjectsMR_AABBTreeObjects_StaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits (const MR_AABBTreeBase_MR_ObjTreeTraits *object)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_MutableStaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits (MR_AABBTreeBase_MR_ObjTreeTraits *object)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_ConstructFromAnother (MR_PassBy _other_pass_by, MR_AABBTreeObjects *_other)
MRC_API MR_AABBTreeObjectsMR_AABBTreeObjects_Construct (MR_PassBy objs_pass_by, MR_Vector_MR_MeshOrPointsXf_MR_ObjId *objs)
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 MR_AABBTreeObjectsMR_AABBTreeObjects_AssignFromAnother (MR_AABBTreeObjects *_this, MR_PassBy _other_pass_by, MR_AABBTreeObjects *_other)
MRC_API const MR_MeshOrPointsMR_AABBTreeObjects_obj (const MR_AABBTreeObjects *_this, MR_ObjId oi)
MRC_API const MR_AffineXf3fMR_AABBTreeObjects_toWorld (const MR_AABBTreeObjects *_this, MR_ObjId oi)
MRC_API const MR_AffineXf3fMR_AABBTreeObjects_toLocal_1 (const MR_AABBTreeObjects *_this, MR_ObjId oi)
MRC_API const MR_Vector_MR_AffineXf3f_MR_ObjIdMR_AABBTreeObjects_toLocal_0 (const MR_AABBTreeObjects *_this)
MRC_API const MR_Vector_MR_AABBTreeNode_MR_ObjTreeTraits_MR_NodeIdMR_AABBTreeObjects_nodes (const MR_AABBTreeObjects *_this)
MRC_API const MR_AABBTreeNode_MR_ObjTreeTraitsMR_AABBTreeObjects_index (const MR_AABBTreeObjects *_this, MR_NodeId nid)
MRC_API MR_NodeId MR_AABBTreeObjects_rootNodeId (void)
MRC_API MR_Box3f MR_AABBTreeObjects_getBoundingBox (const MR_AABBTreeObjects *_this)
MRC_API MR_uint64_t MR_AABBTreeObjects_heapBytes (const MR_AABBTreeObjects *_this)
MRC_API MR_uint64_t MR_AABBTreeObjects_numLeaves (const MR_AABBTreeObjects *_this)
MRC_API MR_std_vector_MR_NodeIdMR_AABBTreeObjects_getSubtrees (const MR_AABBTreeObjects *_this, int minNum)
MRC_API MR_ObjBitSetMR_AABBTreeObjects_getSubtreeLeaves (const MR_AABBTreeObjects *_this, MR_NodeId subtreeRoot)
MRC_API MR_NodeBitSetMR_AABBTreeObjects_getNodesFromLeaves (const MR_AABBTreeObjects *_this, const MR_ObjBitSet *leaves)
MRC_API void MR_AABBTreeObjects_getLeafOrder (const MR_AABBTreeObjects *_this, MR_BMap_MR_ObjId_MR_ObjId *leafMap)
MRC_API void MR_AABBTreeObjects_getLeafOrderAndReset (MR_AABBTreeObjects *_this, MR_BMap_MR_ObjId_MR_ObjId *leafMap)

Typedef Documentation

◆ 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).

◆ MR_AffineXf3f

typedef struct MR_AffineXf3f MR_AffineXf3f

◆ 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).

◆ 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).

◆ MR_Vector_MR_AffineXf3f_MR_ObjId

std::vector<T>-like container that requires specific indexing type,

Template Parameters
Ttype of stored elements
Itype of index (shall be convertible to 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).

◆ MR_Vector_MR_MeshOrPointsXf_MR_ObjId

std::vector<T>-like container that requires specific indexing type,

Template Parameters
Ttype of stored elements
Itype of index (shall be convertible to 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).

Function Documentation

◆ MR_AABBTreeObjects_AssignFromAnother()

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.

◆ MR_AABBTreeObjects_Construct()

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.

◆ MR_AABBTreeObjects_ConstructFromAnother()

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.

◆ MR_AABBTreeObjects_DefaultConstruct()

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.

◆ MR_AABBTreeObjects_DefaultConstructArray()

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.

◆ MR_AABBTreeObjects_Destroy()

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.

◆ MR_AABBTreeObjects_DestroyArray()

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.

◆ MR_AABBTreeObjects_getBoundingBox()

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.

◆ MR_AABBTreeObjects_getLeafOrder()

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.

◆ MR_AABBTreeObjects_getLeafOrderAndReset()

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.

◆ MR_AABBTreeObjects_getNodesFromLeaves()

MRC_API MR_NodeBitSet * MR_AABBTreeObjects_getNodesFromLeaves ( const MR_AABBTreeObjects * _this,
const MR_ObjBitSet * leaves )

returns set of 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.

◆ MR_AABBTreeObjects_getSubtreeLeaves()

MRC_API MR_ObjBitSet * MR_AABBTreeObjects_getSubtreeLeaves ( const MR_AABBTreeObjects * _this,
MR_NodeId subtreeRoot )

returns all leaves in the subtree with given root 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.

◆ MR_AABBTreeObjects_getSubtrees()

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, 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.

◆ MR_AABBTreeObjects_heapBytes()

MRC_API MR_uint64_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.

◆ MR_AABBTreeObjects_index()

MRC_API const MR_AABBTreeNode_MR_ObjTreeTraits * MR_AABBTreeObjects_index ( const MR_AABBTreeObjects * _this,
MR_NodeId nid )

const-access to any 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.

◆ MR_AABBTreeObjects_MutableStaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits()

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.

◆ MR_AABBTreeObjects_MutableUpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits()

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.

◆ MR_AABBTreeObjects_nodes()

MRC_API const MR_Vector_MR_AABBTreeNode_MR_ObjTreeTraits_MR_NodeId * MR_AABBTreeObjects_nodes ( const MR_AABBTreeObjects * _this)

const-access to all 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.

◆ MR_AABBTreeObjects_numLeaves()

MRC_API MR_uint64_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.

◆ MR_AABBTreeObjects_obj()

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.

◆ MR_AABBTreeObjects_OffsetMutablePtr()

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.

◆ MR_AABBTreeObjects_OffsetPtr()

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.

◆ MR_AABBTreeObjects_rootNodeId()

MRC_API MR_NodeId MR_AABBTreeObjects_rootNodeId ( void )

returns root node id Generated from method MR::AABBTreeObjects::rootNodeId.

◆ MR_AABBTreeObjects_StaticDowncastFrom_MR_AABBTreeBase_MR_ObjTreeTraits()

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.

◆ MR_AABBTreeObjects_toLocal_0()

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.

◆ MR_AABBTreeObjects_toLocal_1()

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.

◆ MR_AABBTreeObjects_toWorld()

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.

◆ MR_AABBTreeObjects_UpcastTo_MR_AABBTreeBase_MR_ObjTreeTraits()

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.

◆ MR_ObjTreeTraits_AssignFromAnother()

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.

◆ MR_ObjTreeTraits_ConstructFromAnother()

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.

◆ MR_ObjTreeTraits_DefaultConstruct()

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.

◆ MR_ObjTreeTraits_DefaultConstructArray()

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.

◆ MR_ObjTreeTraits_Destroy()

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.

◆ MR_ObjTreeTraits_DestroyArray()

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.

◆ MR_ObjTreeTraits_OffsetMutablePtr()

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.

◆ MR_ObjTreeTraits_OffsetPtr()

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.