Analysis Software
Documentation for sPHENIX simulation 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 
12 #include "Acts/Geometry/Volume.hpp"
14 
15 #include <array>
16 #include <cstddef>
17 #include <ostream>
18 #include <vector>
19 
20 namespace Acts {
21 
22 class IVisualization3D;
23 
25  public:
28  struct BoundValues {
29  static constexpr size_t eSize = 24;
30  };
31 
32  GenericCuboidVolumeBounds() = delete;
33 
43  const std::array<Acts::Vector3, 8>& vertices) noexcept(false);
44 
49  const std::array<double, BoundValues::eSize>& values) noexcept(false);
50 
51  ~GenericCuboidVolumeBounds() override = default;
52 
55  }
56 
60  std::vector<double> values() const final;
61 
68  bool inside(const Vector3& gpos, double tol = 0.) const override;
69 
81  const Transform3& transform = Transform3::Identity()) const override;
82 
88  Volume::BoundingBox boundingBox(const Transform3* trf = nullptr,
89  const Vector3& envelope = {0, 0, 0},
90  const Volume* entity = nullptr) const final;
91 
93  std::ostream& toStream(std::ostream& sl) const override;
94 
99  void draw(IVisualization3D& helper,
100  const Transform3& transform = Transform3::Identity()) const;
101 
102  private:
103  std::array<Vector3, 8> m_vertices;
104  std::array<Vector3, 6> m_normals;
105 
108  void construct() noexcept(false);
109 };
110 
111 } // namespace Acts