File indexing completed on 2025-08-05 08:09:41
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Surfaces/RectangleBounds.hpp"
0010
0011 #include <iomanip>
0012 #include <iostream>
0013
0014 bool Acts::RectangleBounds::inside(const Acts::Vector2& lposition,
0015 const Acts::BoundaryCheck& bcheck) const {
0016 return bcheck.isInside(lposition, m_min, m_max);
0017 }
0018
0019 std::vector<Acts::Vector2> Acts::RectangleBounds::vertices(
0020 unsigned int ) const {
0021
0022 return {m_min, {m_max.x(), m_min.y()}, m_max, {m_min.x(), m_max.y()}};
0023 }
0024
0025 const Acts::RectangleBounds& Acts::RectangleBounds::boundingBox() const {
0026 return (*this);
0027 }
0028
0029
0030 std::ostream& Acts::RectangleBounds::toStream(std::ostream& sl) const {
0031 sl << std::setiosflags(std::ios::fixed);
0032 sl << std::setprecision(7);
0033 sl << "Acts::RectangleBounds: (hlX, hlY) = "
0034 << "(" << 0.5 * (get(eMaxX) - get(eMinX)) << ", "
0035 << 0.5 * (get(eMaxY) - get(eMinY)) << ")";
0036 sl << "\n(lower left, upper right):\n";
0037 sl << min().transpose() << "\n" << max().transpose();
0038 sl << std::setprecision(-1);
0039 return sl;
0040 }