ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
delaunay_2d.h
浏览该文件的文档.
1 #pragma once
2 #include "vde/core/point.h"
3 #include <vector>
4 #include <array>
5 
6 namespace vde::mesh {
7 using core::Point2D;
8 using core::Point3D;
9 using core::Vector3D;
10 
16  std::vector<Point2D> vertices;
17  std::vector<std::array<int, 3>> triangles;
18 };
19 
45 DelaunayResult delaunay_2d(const std::vector<Point2D>& points);
46 
47 } // namespace vde::mesh
DelaunayResult delaunay_2d(const std::vector< Point2D > &points)
2D Delaunay 三角化(Bowyer-Watson 增量算法)
foundation::Point2D Point2D
双精度二维点(重新导出)
Definition: point.h:29
foundation::Vector3D Vector3D
双精度三维向量(重新导出)
Definition: point.h:49
foundation::Point3D Point3D
双精度三维点(重新导出)
Definition: point.h:31
2D Delaunay 三角化结果
Definition: delaunay_2d.h:15
std::vector< Point2D > vertices
顶点坐标(可能含超级三角形的辅助点)
Definition: delaunay_2d.h:16
std::vector< std::array< int, 3 > > triangles
三角形索引(CCW 顺序)
Definition: delaunay_2d.h:17