MeshLib C++ Docs
Loading...
Searching...
No Matches
Mesh Subdivide

Classes

struct  MR::SubdivideSettings

Functions

int MR::subdivideMesh (Mesh &mesh, const SubdivideSettings &settings={})
int MR::subdivideMesh (ObjectMeshData &data, const SubdivideSettings &settings)
Expected< MeshMR::copySubdividePackMesh (const MeshPart &mp, float voxelSize, const ProgressCallback &cb={})
ObjectMeshData MR::makeSubdividedObjectMeshData (const ObjectMesh &obj, const SubdivideSettings &settings)
 returns the data of subdivided mesh given ObjectMesh (which remains unchanged) and subdivision parameters

Detailed Description

Function Documentation

◆ copySubdividePackMesh()

Expected< Mesh > MR::copySubdividePackMesh ( const MeshPart & mp,
float voxelSize,
const ProgressCallback & cb = {} )
nodiscard

#include <MRMesh/MRMeshSubdivide.h>

creates a copy of given mesh part, subdivides it to get rid of too long edges compared with voxelSize, then packs resulting mesh, this is called typically in preparation for 3D space sampling with voxelSize step, and subdivision is important for making leaves of AABB tree not too big compared with voxelSize

◆ makeSubdividedObjectMeshData()

ObjectMeshData MR::makeSubdividedObjectMeshData ( const ObjectMesh & obj,
const SubdivideSettings & settings )
nodiscard

#include <MRMesh/MRMeshSubdivide.h>

returns the data of subdivided mesh given ObjectMesh (which remains unchanged) and subdivision parameters

◆ subdivideMesh() [1/2]

int MR::subdivideMesh ( Mesh & mesh,
const SubdivideSettings & settings = {} )

#include <MRMesh/MRMeshSubdivide.h>

splits edges in mesh region according to the settings;

Returns
The total number of edge splits performed

◆ subdivideMesh() [2/2]

int MR::subdivideMesh ( ObjectMeshData & data,
const SubdivideSettings & settings )

#include <MRMesh/MRMeshSubdivide.h>

subdivides mesh with per-element attributes according to given settings; \detail if settings.region is not null, then given region must be a subset of current face selection or face selection must absent

Returns
The total number of edge splits performed