Files
ViewDesignEngine/include/vde/mesh/mesh_curvature.h
T
ViewDesignEngine cf13496ff6
CI / Build & Test (push) Failing after 1m31s
CI / Release Build (push) Failing after 16m55s
feat: v0.5.0 P1 + 差异化功能 — Voronoi, Marching Cubes, 曲率, 序列化, Python绑定
新增功能:
- core: 2D Voronoi 图(Delaunay 对偶图)
- mesh: Marching Cubes(完整256项三角表 + SDF 辅助函数)
- mesh: 离散曲率(Gaussian/Mean, Cotan 公式)
- foundation: 二进制序列化(版本化格式,Little-Endian)
- python: pybind11 绑定(30+ API 暴露)
- marching_cubes.h: SDF 基本体(球/盒)+ 光滑布尔
2026-07-23 06:27:43 +00:00

19 lines
595 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 {
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