2026-07-23 07:20:01 +00:00
|
|
|
#pragma once
|
|
|
|
|
#include "vde/mesh/halfedge_mesh.h"
|
|
|
|
|
#include "vde/core/point.h"
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace vde::mesh {
|
2026-07-23 08:19:24 +00:00
|
|
|
using core::Point2D;
|
|
|
|
|
using core::Point3D;
|
|
|
|
|
using core::Vector3D;
|
2026-07-23 07:20:01 +00:00
|
|
|
|
|
|
|
|
/// 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
|