64ad721ed7
- CMake: INTERFACE 库修复、vde_compile_options 顺序修复 - 命名空间: 所有模块添加 using 声明 - 类型补全: Ray3Dd、Point4D - 头文件: tolerance 泛型化、std::optional include - 警告: 放宽 -Wconversion/-Wsign-conversion - 构建结果: 0 errors, 22/25 tests passed
19 lines
545 B
C++
19 lines
545 B
C++
#pragma once
|
|
#include "vde/core/point.h"
|
|
#include <vector>
|
|
#include <array>
|
|
|
|
namespace vde::curves {
|
|
using core::Point3D;
|
|
using core::Vector3D;
|
|
|
|
/// Tessellate a parametric surface into a triangle mesh
|
|
/// @param eval Function(u,v) -> Point3D
|
|
/// @param res_u, res_v Number of samples in u/v directions
|
|
/// @return Pairs of (vertices, triangle indices)
|
|
std::pair<std::vector<Point3D>, std::vector<std::array<int, 3>>>
|
|
tessellate(const std::function<Point3D(double,double)>& eval,
|
|
int res_u, int res_v);
|
|
|
|
} // namespace vde::curves
|