Class Acts::ConvexPolygonBounds< PolygonDynamic >

class ConvexPolygonBounds<PolygonDynamic> : public Acts::ConvexPolygonBoundsBase

This is the specialization handling a polygon with a dynamic number of points.

It can accept any number of points.

Public Functions

ConvexPolygonBounds() = delete

Default constructor, deleted.

ConvexPolygonBounds(const std::vector<Vector2> &vertices)

Constructor from a vector of vertices, to facilitate construction.

This will throw if the vertices do not form a convex polygon.


vertices – The list of vertices.

~ConvexPolygonBounds() override = default

Defaulted destructor.

virtual const RectangleBounds &boundingBox() const final

Return a rectangle bounds object that encloses this polygon.


The rectangular bounds

virtual bool inside(const Vector2 &lposition, const BoundaryCheck &bcheck) const final

Return whether a local 2D point lies inside of the bounds defined by this object.

  • lposition – The local position to check

  • bcheck – The BoundaryCheck object handling tolerances.


Whether the points is inside

virtual BoundsType type() const final

Return the bounds type of this bounds object.


The bounds type

virtual std::vector<Vector2> vertices(unsigned int lseg = 1) const final

Return the vertices.


the number of segements is ignored in this representation


lseg – the number of segments used to approximate and eventually curved line


vector for vertices in 2D