commit | 0fa27330f8f642f46f66443c5b71c93f61a89d81 | [log] [tgz] |
---|---|---|
author | Vova Bilonenko <bilonenko.v@gmail.com> | Sun Sep 09 09:13:37 2018 +0200 |
committer | Vova Bilonenko <bilonenko.v@gmail.com> | Sun Sep 09 09:13:37 2018 +0200 |
tree | f5346f45033a371fb56745aa4f5a0956a58cfee5 | |
parent | 52b622bf92b5a5a393f566866232de7cb851bf29 [diff] |
remove redundant CI jobs
A really fast C++ library for Delaunay triangulation of 2D points.
delaunator-cpp is a C++ port from https://github.com/mapbox/delaunator a JavaScript implementation of very fast 2D Delaunay algorithm.
#include <delaunator.hpp> #include <cstdio> //... int main(int, char* argv[]) { //... std::vector<double> coords = {/* x0, y0, x1, y1, ... */}; //triangulation happens here //note moving points to constructor delaunator::Delaunator delaunator(coords); for(std::size_t i = 0; i < delaunator.triangles.size(); i+=3) { printf( "Triangle points: [[%f, %f], [%f, %f], [%f, %f]]\n", delaunator.coords[2 * delaunator.triangles[i]], //tx0 delaunator.coords[2 * delaunator.triangles[i] + 1], //ty0 delaunator.coords[2 * delaunator.triangles[i + 1]], //tx1 delaunator.coords[2 * delaunator.triangles[i + 1] + 1], //ty1 delaunator.coords[2 * delaunator.triangles[i + 2]], //tx2 delaunator.coords[2 * delaunator.triangles[i + 2] + 1], //ty2 ) } }
For full example see examples/triangulate/main.cpp