EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GenericCuboidVolumeBounds.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GenericCuboidVolumeBounds.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include "Acts/Geometry/Volume.hpp"
15 
16 #include <array>
17 #include <ostream>
18 #include <vector>
19 
20 namespace Acts {
21 
22 class IVisualization3D;
23 
25  public:
26  static constexpr size_t eSize = 24;
27 
28  GenericCuboidVolumeBounds() = delete;
29 
39  const std::array<Acts::Vector3D, 8>& vertices) noexcept(false);
40 
44  GenericCuboidVolumeBounds(const std::array<double, eSize>& values) noexcept(
45  false);
46 
47  ~GenericCuboidVolumeBounds() override = default;
48 
51  }
52 
56  std::vector<double> values() const final;
57 
64  bool inside(const Vector3D& gpos, double tol = 0.) const override;
65 
77  const Transform3D& transform = Transform3D::Identity()) const override;
78 
84  Volume::BoundingBox boundingBox(const Transform3D* trf = nullptr,
85  const Vector3D& envelope = {0, 0, 0},
86  const Volume* entity = nullptr) const final;
87 
89  std::ostream& toStream(std::ostream& sl) const override;
90 
95  void draw(IVisualization3D& helper,
96  const Transform3D& transform = Transform3D::Identity()) const;
97 
98  private:
99  std::array<Vector3D, 8> m_vertices;
100  std::array<Vector3D, 6> m_normals;
101 
104  void construct() noexcept(false);
105 };
106 
107 } // namespace Acts