ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
mesh_smooth.h
浏览该文件的文档.
1 #pragma once
3 
4 namespace vde::mesh {
5 using core::Point2D;
6 using core::Point3D;
7 using core::Vector3D;
8 
13 enum class SmoothMethod {
14  Laplacian,
15  Taubin,
16  HCLaplacian,
17  Bilateral
18 };
19 
24 struct SmoothOptions {
25  int iterations = 10;
26  double lambda = 0.5;
27 
30  double mu = -0.53;
31 
33  double hc_alpha = 0.0;
34  double hc_beta = 0.5;
35 
37  double bilateral_sigma_c = 0.0;
38  double bilateral_sigma_n = 0.3;
39  int bilateral_iters = 5;
40 
42 };
43 
65 HalfedgeMesh smooth_mesh(const HalfedgeMesh& mesh, const SmoothOptions& opts = {});
66 
82 HalfedgeMesh smooth_laplacian(const HalfedgeMesh& mesh, int iterations, double lambda);
83 
102 HalfedgeMesh smooth_taubin(const HalfedgeMesh& mesh, int iterations, double lambda, double mu);
103 
120 
138 
139 } // namespace vde::mesh
半边数据结构三角网格
Definition: halfedge_mesh.h:54
HalfedgeMesh smooth_bilateral(const HalfedgeMesh &mesh, const SmoothOptions &opts={})
双边网格滤波
HalfedgeMesh smooth_laplacian(const HalfedgeMesh &mesh, int iterations, double lambda)
标准拉普拉斯光顺
HalfedgeMesh smooth_mesh(const HalfedgeMesh &mesh, const SmoothOptions &opts={})
网格光顺(通用分发器)
SmoothMethod
网格光顺方法
Definition: mesh_smooth.h:13
HalfedgeMesh smooth_hc_laplacian(const HalfedgeMesh &mesh, const SmoothOptions &opts={})
HC 拉普拉斯光顺(Humphrey's Classes)
HalfedgeMesh smooth_taubin(const HalfedgeMesh &mesh, int iterations, double lambda, double mu)
Taubin λ|μ 光顺(体积保持)
@ HCLaplacian
HC 拉普拉斯(Humphrey's Classes):推拉两步保持形状/体积
@ Laplacian
标准拉普拉斯光顺:v ← v + λ·L(v),快速但会收缩
@ Taubin
Taubin λ|μ 光顺:先正后负步交替,体积保持
@ Bilateral
双边滤波:法向加权去噪,保持尖锐特征
foundation::Point2D Point2D
双精度二维点(重新导出)
Definition: point.h:29
foundation::Vector3D Vector3D
双精度三维向量(重新导出)
Definition: point.h:49
foundation::Point3D Point3D
双精度三维点(重新导出)
Definition: point.h:31
网格光顺参数
Definition: mesh_smooth.h:24
double hc_beta
前推混合系数
Definition: mesh_smooth.h:34
double bilateral_sigma_n
法向 σ(弧度),控制特征保持的敏感度
Definition: mesh_smooth.h:38
double lambda
拉普拉斯步长(Standard / Taubin 正步)
Definition: mesh_smooth.h:26
int bilateral_iters
双边内部迭代次数
Definition: mesh_smooth.h:39
double hc_alpha
HC 拉普拉斯参数
Definition: mesh_smooth.h:33
double bilateral_sigma_c
双边滤波参数
Definition: mesh_smooth.h:37
SmoothMethod method
光顺方法选择
Definition: mesh_smooth.h:41
int iterations
迭代次数
Definition: mesh_smooth.h:25