37 class IVolumeMaterial;
40 namespace Experimental {
74 template <
typename internal_type>
77 std::vector<internal_type>
internal = {};
80 std::vector<const typename internal_type::element_type*>
external = {};
111 std::vector<std::shared_ptr<Surface>>
surfaces,
112 std::vector<std::shared_ptr<DetectorVolume>>
volumes,
135 static std::shared_ptr<DetectorVolume>
makeShared(
138 std::vector<std::shared_ptr<Surface>>
surfaces,
139 std::vector<std::shared_ptr<DetectorVolume>>
volumes,
146 static std::shared_ptr<DetectorVolume>
makeShared(
172 std::shared_ptr<const DetectorVolume>
getSharedPtr()
const;
243 std::vector<std::shared_ptr<Portal>>&
portalPtrs();
248 std::vector<std::shared_ptr<Surface>>&
surfacePtrs();
253 std::vector<std::shared_ptr<DetectorVolume>>&
volumePtrs();
261 const std::vector<const Portal*>&
portals()
const;
270 const std::vector<const Surface*>&
surfaces()
const;
280 const std::vector<const DetectorVolume*>&
volumes()
const;
294 const std::vector<std::shared_ptr<Surface>>&
surfaces = {},
295 const std::vector<std::shared_ptr<DetectorVolume>>&
volumes = {});
307 unsigned int pIndex) noexcept(
false);
415 std::shared_ptr<VolumeBounds>
bounds,
416 const std::vector<std::shared_ptr<Surface>>& surfaces,
417 const std::vector<std::shared_ptr<DetectorVolume>>&
volumes,
423 dVolume->construct(gctx, portalGenerator);
431 std::shared_ptr<VolumeBounds>
bounds,
436 dVolume->construct(gctx, portalGenerator);
449 inline static const std::vector<const Portal*>
extract(
453 throw std::runtime_error(
454 "AllPortalsExtractor: no detector volume given.");
469 inline static const std::vector<const Surface*>
extract(
472 [[maybe_unused]]
const std::vector<size_t>& indices = {}) {
474 throw std::runtime_error(
475 "AllSurfacesExtractor: no detector volume given.");
492 inline static const std::vector<const Surface*>
extract(
496 throw std::runtime_error(
497 "IndexedSurfacesExtractor: no detector volume given.");
502 std::vector<const Surface*> eSurfaces;
503 eSurfaces.reserve(indices.size());
504 std::for_each(indices.begin(), indices.end(),
505 [&](
const auto&
i) { eSurfaces.push_back(surfaces[
i]); });
519 inline static const std::vector<const DetectorVolume*>
extract(
522 [[maybe_unused]]
const std::vector<size_t>& indices = {}) {
524 throw std::runtime_error(
525 "AllSubVolumesExtractor: no detector volume given.");
540 inline static const std::vector<const DetectorVolume*>
extract(
544 throw std::runtime_error(
545 "AllSubVolumesExtractor: no detector volume given.");
550 std::vector<const DetectorVolume*>
eVolumes;
551 eVolumes.reserve(indices.size());
552 std::for_each(indices.begin(), indices.end(),
553 [&](
const auto&
i) { eVolumes.push_back(
volumes[
i]); });