Template Class ConvexPolygonBounds< PolygonDynamic >

Inheritance Relationships

Base Type

Class Documentation

template<>
class Acts::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.

Parameters
  • vertices: The list of vertices.

~ConvexPolygonBounds() override = default

Defaulted destructor.

const RectangleBounds &boundingBox() const final

Return a rectangle bounds object that encloses this polygon.

Return

The rectangular bounds

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.

Return

Whether the points is inside

Parameters
  • lposition: The local position to check

  • bcheck: The BoundaryCheck object handling tolerances.

BoundsType type() const final

Return the bounds type of this bounds object.

Return

The bounds type

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

Return the vertices.

Note

the number of segements is ignored in this representation

Return

vector for vertices in 2D

Parameters
  • lseg: the number of segments used to approximate and eventually curved line