ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
voronoi.h
浏览该文件的文档.
1 #pragma once
2 #include "vde/core/point.h"
3 #include <vector>
4 #include <array>
5 
6 namespace vde::core {
11 
20 struct VoronoiCell {
23 
29  std::vector<Point2D> vertices;
30 
36  std::vector<std::array<int, 2>> edges;
37 };
38 
62 std::vector<VoronoiCell> voronoi_2d(const std::vector<Point2D>& points);
63 
64 } // namespace vde::core
std::vector< VoronoiCell > voronoi_2d(const std::vector< Point2D > &points)
二维 Voronoi 图生成(通过 Delaunay 对偶图)
Definition: aabb.h:6
foundation::Point2D Point2D
双精度二维点(重新导出)
Definition: point.h:29
Point< double, 2 > Point2D
双精度二维点
Definition: math_types.h:41
Point< double, 3 > Point3D
双精度三维点
Definition: math_types.h:43
Vector< double, 2 > Vector2D
双精度二维向量
Definition: math_types.h:53
Vector< double, 3 > Vector3D
双精度三维向量
Definition: math_types.h:55
Voronoi 单元格
Definition: voronoi.h:20
std::vector< Point2D > vertices
单元格边界顶点(按逆时针顺序排列)
Definition: voronoi.h:29
Point2D site
生成点(站点)
Definition: voronoi.h:22
std::vector< std::array< int, 2 > > edges
单元格边界边
Definition: voronoi.h:36