Skip to main content

MeshReduce

The MeshReduce namespace contains algorithms for reducing the complexity of 3D meshes, by collapsing vertices and edges to reduce the number of triangles. This is commonly used in mesh optimization workflows, such as generating level-of-detail versions of models.

#include <geometry/TellusimMeshReduce.h>

Functions

Performs mesh reduction.

bool collapse(Mesh &dest, const Mesh &src, float32_t ratio, float32_t threshold = 0.0f, const ProgressCallback *func = nullptr)
bool collapse(MeshGeometry &dest, const MeshGeometry &src, float32_t ratio, float32_t threshold = 0.0f, const ProgressCallback *func = nullptr, uint32_t position = Maxu32)
TypeNameDescription
float32_tratioTriangle reduction ratio (use negative ratio for border reduction)
float32_tthresholdEdge collapse threshold
uint32_tpositionPosition attribute index

Types

using ProgressCallback = Function<bool(uint32_t progress)>