feat: P2 Alpha Shapes + 网格参数化
- mesh: Alpha Shapes (点云→表面) - mesh: Tutte 嵌入参数化 - mesh: LSCM 保角参数化 - 新增 4 文件,更新 CMake
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "vde/core/point.h"
|
||||
#include "vde/mesh/delaunay_3d.h"
|
||||
#include <vector>
|
||||
|
||||
namespace vde::mesh {
|
||||
|
||||
/// Alpha Shapes: extract surface from point cloud
|
||||
/// For alpha → ∞, returns convex hull; for alpha → 0, returns all faces
|
||||
/// @param alpha Radius threshold: faces with circumradius > alpha are removed
|
||||
TetrahedronMesh alpha_shapes(const std::vector<Point3D>& points, double alpha);
|
||||
|
||||
/// Convert alpha shapes tet mesh to triangle surface
|
||||
std::pair<std::vector<Point3D>, std::vector<std::array<int,3>>>
|
||||
alpha_shapes_surface(const TetrahedronMesh& tet_mesh);
|
||||
|
||||
} // namespace vde::mesh
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "vde/mesh/halfedge_mesh.h"
|
||||
#include "vde/core/point.h"
|
||||
#include <vector>
|
||||
|
||||
namespace vde::mesh {
|
||||
|
||||
/// Tutte embedding (harmonic parameterization) for a mesh with fixed boundary
|
||||
/// Boundary vertices are mapped to a circle; interior vertices are solved via Laplacian
|
||||
/// Returns per-vertex UV coordinates as Point2D
|
||||
[[nodiscard]] std::vector<Point2D> tutte_parameterization(const HalfedgeMesh& mesh);
|
||||
|
||||
/// LSCM (Least Squares Conformal Maps) — simplified version
|
||||
[[nodiscard]] std::vector<Point2D> lscm_parameterization(const HalfedgeMesh& mesh);
|
||||
|
||||
} // namespace vde::mesh
|
||||
Reference in New Issue
Block a user