|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Demonstrates clipped, site-indexed Voronoi cells. More...
#include <geom_algorithms.H>#include <cassert>#include <fstream>#include <iomanip>#include <iostream>Go to the source code of this file.
Functions | |
| static void | write_polygon_wkt (ostream &out, const Polygon &poly) |
| static void | export_cells_csv (ostream &out, const Array< VoronoiDiagramFromDelaunay::ClippedCell > &cells) |
| int | main (int argc, char **argv) |
Demonstrates clipped, site-indexed Voronoi cells.
This example builds Voronoi cells from a point set, clips every cell against a convex bounding polygon, and exports the result as tabular CSV with WKT.
Usage: ./voronoi_clipped_cells_example [output.csv]
If output.csv is omitted, a default file voronoi_clipped_cells_output.csv is generated in the current directory.
Definition in file voronoi_clipped_cells_example.cc.
|
static |
Definition at line 89 of file voronoi_clipped_cells_example.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::geom_number_to_double(), Aleph::Array< T >::size(), and write_polygon_wkt().
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 108 of file voronoi_clipped_cells_example.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), export_cells_csv(), file, Aleph::geom_number_to_double(), and Aleph::Array< T >::size().
|
static |
Definition at line 55 of file voronoi_clipped_cells_example.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::geom_number_to_double(), Aleph::Point::get_x(), Aleph::Point::get_y(), and Aleph::Dlink::Iterator::has_curr().
Referenced by export_cells_csv().