Files
ViewDesignEngine/include/vde/mesh/mesh_simplify.h
T

17 lines
464 B
C++

#pragma once
#include "vde/mesh/halfedge_mesh.h"
namespace vde::mesh {
struct SimplifyOptions {
double target_ratio = 0.5; // Target face ratio (0, 1)
int max_iterations = 100;
bool preserve_boundary = true;
};
/// QEM (Quadric Error Metrics) mesh simplification
/// Returns simplified mesh with ~target_ratio * original face count
HalfedgeMesh simplify_mesh(const HalfedgeMesh& mesh, const SimplifyOptions& opts = {});
} // namespace vde::mesh