File RectangleBounds.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
class RectangleBounds : public Acts::PlanarBounds
- #include <Acts/Surfaces/RectangleBounds.hpp>
Bounds for a rectangular, planar surface - it can be used to for rectangles that are symetrically centered around (0.
/0.) and for generic shifted rectangles
Public Types
-
enum BoundValues
Values:
-
enumerator eMinX
-
enumerator eMinY
-
enumerator eMaxX
-
enumerator eMaxY
-
enumerator eSize
-
enumerator eMinX
Public Functions
-
RectangleBounds() = delete
-
inline RectangleBounds(double halfX, double halfY) noexcept(false)
Constructor with halflength in x and y - symmetric.
- Parameters
halfX – halflength in X
halfY – halflength in Y
-
inline RectangleBounds(const std::array<double, eSize> &values) noexcept(false)
Constructor - from fixed size array - generic.
- Parameters
values – The parameter values
-
inline RectangleBounds(const Vector2 &min, const Vector2 &max) noexcept(false)
Constructor - from min/max - generic.
- Parameters
min – The left bottom corner
max – The right top corning
-
~RectangleBounds() override = default
-
virtual const RectangleBounds &boundingBox() const final
Bounding box parameters.
- Returns
rectangle bounds for a bounding box
-
inline double get(BoundValues bValue) const
Access to the bound values.
- Parameters
bValue – the class nested enum for the array access
-
inline double halfLengthX() const
Access to the half length in X.
-
inline double halfLengthY() const
Access to the half length in Y.
-
virtual bool inside(const Vector2 &lposition, const BoundaryCheck &bcheck) const final
Inside check for the bounds object driven by the boundary check directive Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds Inside can be called without/with tolerances.
- Parameters
lposition – Local position (assumed to be in right surface frame)
bcheck – boundary check directive
- Returns
boolean indicator for the success of this operation
-
inline const Vector2 &max() const
Get the max vertex defining the bounds.
- Returns
The max vertex
-
inline const Vector2 &min() const
Get the min vertex defining the bounds.
- Returns
The min vertex
-
virtual std::ostream &toStream(std::ostream &sl) const final
Output Method for std::ostream.
- Parameters
sl – is the ostream for the dump
-
inline virtual BoundsType type() const final
Return the bounds type - for persistency optimization.
- Returns
is a BoundsType enum
-
inline virtual std::vector<double> values() const final
Access method for bound values, this is a dynamically sized vector containing the parameters needed to describe these bounds.
- Returns
of the stored values for this SurfaceBounds object
-
virtual std::vector<Vector2> vertices(unsigned int lseg = 1) const final
Return the vertices.
Note
the number of segements is ignored in this representation
- Parameters
lseg – the number of segments used to approximate and eventually curved line
- Returns
vector for vertices in 2D
Private Functions
-
inline void checkConsistency() noexcept(false)¶
Check the input values for consistency, will throw a logic_exception if consistency is not given.
-
enum BoundValues
-
class RectangleBounds : public Acts::PlanarBounds