7#ifndef JETMOMENTTOOLS_JETVORONOIDIAGRAMHELPERS_H
8#define JETMOMENTTOOLS_JETVORONOIDIAGRAMHELPERS_H
25#include <boost/polygon/voronoi.hpp>
34#include <boost/geometry.hpp>
35#include <boost/geometry/geometries/point_xy.hpp>
36#include <boost/geometry/geometries/polygon.hpp>
94 struct Polygon :
public std::vector<Point> {
105 boost::geometry::correct(out);
119 push_back(
Segment(x1,y1,x2,y2));
127 Diagram (
const std::string & name);
176 return (orient == HORIZONTAL) ? point.
x : point.
y;
183 if(orient == HORIZONTAL)
206 return dir.to_int() ? segment.
p1 : segment.
p0;
ChargedTracksWeightFilter::Spline::Point Point
boost::geometry::model::d2::point_xy< double > VoronoiPointBoost
boost::polygon::voronoi_diagram< double >::cell_type VoronoiCellBoost
boost::polygon::voronoi_diagram< double >::edge_type VoronoiEdgeBoost
boost::polygon::voronoi_diagram< double >::vertex_type VoronoiVtxBoost
boost::polygon::voronoi_diagram< double > VoronoiBoost
Jakub Cuth May 2015.
boost::geometry::model::polygon< VoronoiPointBoost > VoronoiPolygonBoost
static const Attributes_t empty
Diagram(const std::string &name)
Straight line in 2D space.
std::string description
glabal timer - how long have I taken so far?
std::vector< Polygon > PolygonList
List of polygons.
bool operator!=(const Point &a, const Point &b)
Point Center(const Point &a, const Point &b)
Point operator+(const Point &a, const Point &b)
Point operator-(const Point &a, const Point &b)
bool operator==(const Point &a, const Point &b)
Point Norm(const Point &a)
Point operator*(double a, const Point &b)
double coord
Type of coordination system.
size_t findPointIndex(const Point &a) const
StatusCode checkStatus(const VoronoiBoost &vd, size_t n_cells_processed)
bool checkSameNumber(double in, double out, const std::string &description)
Point interpolateInfinityVertex(const int i_a, const int i_b)
std::vector< double > m_area_cells
float getCellArea(const coord x, const coord y) const
StatusCode createVoronoiDiagram()
StatusCode initialize()
Dummy implementation of the initialisation function.
double intersectionAndArea(JetVoronoiDiagramHelpers::Polygon const &geo1, JetVoronoiDiagramHelpers::Polygon const &geo2, JetVoronoiDiagramHelpers::Polygon &out)
Diagram(const std::string &name)
Default object of 2D space.
Point(coord the_x=0, coord the_y=0)
List of points in 2D space.
void Add(coord x, coord y)
void FillVoroPolygon(VoronoiPolygonBoost &out) const
void Add(coord x1, coord y1, coord x2, coord y2)
Straight line in 2D space.
Segment(Point a, Point b)
Segment(coord x1, coord y1, coord x2, coord y2)
static void set(JetVoronoiDiagramHelpers::Point &point, orientation_2d orient, int value)
static JetVoronoiDiagramHelpers::Point construct(int x_value, int y_value)
JetVoronoiDiagramHelpers::coord coordinate_type
static coordinate_type get(const JetVoronoiDiagramHelpers::Point &point, orientation_2d orient)
JetVoronoiDiagramHelpers::coord coordinate_type
JetVoronoiDiagramHelpers::Point point_type
JetVoronoiDiagramHelpers::coord coordinate_type
static point_type get(const JetVoronoiDiagramHelpers::Segment &segment, direction_1d dir)