Belle II Software development
|
2D polygon. More...
#include <Polygon2D.h>
Public Member Functions | |
Polygon2D (const HepGeom::Point3D< double > *points, int n) | |
Constructor. | |
Polygon2D (const Polygon2D &)=delete | |
Copy constructor (disabled). | |
Polygon2D & | operator= (const Polygon2D &)=delete |
Operator = (disabled). | |
~Polygon2D () | |
Destructor. | |
bool | pointInside (const HepGeom::Point3D< double > &point) const |
Check if point is inside the polygon. | |
bool | hasIntersection (const LineSegment2D &lineSegment) const |
Check whether polygon has an intersection with a line segment or this line segment is fully inside the polygon. | |
bool | hasIntersection (const Arc2D &arc) const |
Check whether polygon has an intersection with an arc or this arc is fully inside the polygon. | |
bool | hasIntersection (const Polygon2D &polygon) const |
Check whether polygon has an intersection with a polygon or one of the polygons is fully inside another polygon. | |
LineSegment2D ** | getLineSegments () const |
Get line segments. | |
Private Attributes | |
int | m_nPoints |
Number of points. | |
LineSegment2D ** | m_LineSegments |
Line segments. | |
2D polygon.
Definition at line 29 of file Polygon2D.h.
Polygon2D | ( | const HepGeom::Point3D< double > * | points, |
int | n | ||
) |
Constructor.
[in] | points | Points. |
[in] | n | Number of points. |
Definition at line 17 of file Polygon2D.cc.
~Polygon2D | ( | ) |
|
inline |
bool hasIntersection | ( | const Arc2D & | arc | ) | const |
Check whether polygon has an intersection with an arc or this arc is fully inside the polygon.
[in] | arc | Arc. |
Definition at line 76 of file Polygon2D.cc.
bool hasIntersection | ( | const LineSegment2D & | lineSegment | ) | const |
Check whether polygon has an intersection with a line segment or this line segment is fully inside the polygon.
[in] | lineSegment | Line segment. |
Definition at line 63 of file Polygon2D.cc.
bool hasIntersection | ( | const Polygon2D & | polygon | ) | const |
Check whether polygon has an intersection with a polygon or one of the polygons is fully inside another polygon.
[in] | polygon | Polygon. |
Definition at line 89 of file Polygon2D.cc.
bool pointInside | ( | const HepGeom::Point3D< double > & | point | ) | const |
Check if point is inside the polygon.
Definition at line 38 of file Polygon2D.cc.
|
private |
Line segments.
Definition at line 95 of file Polygon2D.h.
|
private |
Number of points.
Definition at line 92 of file Polygon2D.h.