Class Acts::ConvexPolygonBounds< PolygonDynamic >¶
-
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.
-
virtual const RectangleBounds &boundingBox() const final¶
Return a rectangle bounds object that encloses this polygon.
- Returns
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.
- Parameters
lposition – The local position to check
bcheck – The
BoundaryCheck
object handling tolerances.
- Returns
Whether the points is inside
-
virtual BoundsType type() const final¶
Return the bounds type of this bounds object.
- Returns
The bounds type
-
ConvexPolygonBounds() = delete¶