ATLAS Offline Software
Loading...
Searching...
No Matches
JetVoronoiDiagramHelpers::Polygon Class Reference

List of points in 2D space. More...

#include <JetVoronoiDiagramHelpers.h>

Inheritance diagram for JetVoronoiDiagramHelpers::Polygon:
Collaboration diagram for JetVoronoiDiagramHelpers::Polygon:

Public Member Functions

void Add (coord x, coord y)
void FillVoroPolygon (VoronoiPolygonBoost &out) const

Public Attributes

elements
 STL member.

Detailed Description

List of points in 2D space.

Not necessary to be closed polygon.

Definition at line 94 of file JetVoronoiDiagramHelpers.h.

Member Function Documentation

◆ Add()

void JetVoronoiDiagramHelpers::Polygon::Add ( coord x,
coord y )
inline

Definition at line 95 of file JetVoronoiDiagramHelpers.h.

95 {
96 push_back(Point(x,y));
97 }
ChargedTracksWeightFilter::Spline::Point Point
#define y
#define x

◆ FillVoroPolygon()

void JetVoronoiDiagramHelpers::Polygon::FillVoroPolygon ( VoronoiPolygonBoost & out) const
inline

Definition at line 98 of file JetVoronoiDiagramHelpers.h.

98 {
99 if (empty()) return;
100 // add all
101 for ( const Point& p : *this ) out.outer().push_back(VoronoiPointBoost(p.x,p.y));
102 // add first again to close shape if necessary
103 if ( front() != back() ) out.outer().push_back(VoronoiPointBoost(front().x,front().y));
104 // correct geometry
105 boost::geometry::correct(out);
106 }
boost::geometry::model::d2::point_xy< double > VoronoiPointBoost
static const Attributes_t empty

Member Data Documentation

◆ elements

T std::vector< T >::elements
inherited

STL member.


The documentation for this class was generated from the following file: