Files
ViewDesignEngine/include/vde/mesh/mesh_curvature.h
T
ViewDesignEngine 64ad721ed7
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 31s
fix: 编译通过 — CMake + 命名空间 + 头文件修复
- CMake: INTERFACE 库修复、vde_compile_options 顺序修复
- 命名空间: 所有模块添加 using 声明
- 类型补全: Ray3Dd、Point4D
- 头文件: tolerance 泛型化、std::optional include
- 警告: 放宽 -Wconversion/-Wsign-conversion
- 构建结果: 0 errors, 22/25 tests passed
2026-07-23 08:19:24 +00:00

22 lines
659 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include "vde/mesh/halfedge_mesh.h"
#include <vector>
namespace vde::mesh {
using core::Point2D;
using core::Point3D;
using core::Vector3D;
struct CurvatureResult {
std::vector<double> gaussian; // per-vertex Gaussian curvature
std::vector<double> mean; // per-vertex mean curvature
std::vector<double> area; // per-vertex Voronoi area
};
/// Discrete curvature using Cotan formula (Meyer et al. 2003)
/// Gaussian: K(v) = (2π - Σθ_j) / A_v (interior vertices)
/// Mean: H(v) = ||Σ(cot α + cot β)·e|| / (2·A_v)
CurvatureResult compute_curvature(const HalfedgeMesh& mesh);
} // namespace vde::mesh