MeshLib C Docs
Loading...
Searching...
No Matches
MRLevelOfDetails.h File Reference
#include <MRCMisc/exports.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_std_shared_ptr_MR_Object MR_std_shared_ptr_MR_Object
 

Functions

MRC_API MR_std_shared_ptr_MR_ObjectMR_makeLevelOfDetails (MR_Mesh *mesh, int32_t maxDepth)
 

Typedef Documentation

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_std_shared_ptr_MR_Object

Function Documentation

◆ MR_makeLevelOfDetails()

MRC_API MR_std_shared_ptr_MR_Object * MR_makeLevelOfDetails ( MR_Mesh * mesh,
int32_t maxDepth )

divides given mesh into hierarchy of mesh objects: the deepest level of the hierarchy has all details from the original mesh; top levels have progressively less number of objects and less details in each; the number of faces in any object on any level is about the same. Generated from function MR::makeLevelOfDetails. Parameter mesh can not be null. It is a single object. In C++ this parameter takes an rvalue reference: it might invalidate the passed object, but if your pointer is owning, you must still destroy it manually later. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_Object_Destroy() to free it when you're done using it.