File indexing completed on 2025-12-11 09:40:21
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Geometry/GeometryHierarchyMap.hpp"
0013 #include "ActsPlugins/ActSVG/IndexedSurfacesSvgConverter.hpp"
0014 #include "ActsPlugins/ActSVG/PortalSvgConverter.hpp"
0015 #include "ActsPlugins/ActSVG/SvgUtils.hpp"
0016 #include <actsvg/core.hpp>
0017 #include <actsvg/meta.hpp>
0018
0019 #include <map>
0020 #include <string>
0021 #include <tuple>
0022
0023 namespace Acts::Experimental {
0024 class DetectorVolume;
0025 class Portal;
0026 }
0027
0028 namespace ActsPlugins::Svg {
0029
0030 using ProtoVolume = actsvg::proto::volume<std::vector<Acts::Vector3>>;
0031
0032 namespace DetectorVolumeConverter {
0033
0034
0035 struct Options {
0036
0037 std::map<const Acts::Experimental::Portal*, unsigned int> portalIndices;
0038
0039 PortalConverter::Options portalOptions;
0040
0041 SurfaceConverter::Options surfaceOptions;
0042
0043 IndexedSurfacesConverter::Options indexedSurfacesOptions;
0044 };
0045
0046
0047
0048
0049
0050
0051
0052
0053 std::tuple<ProtoVolume, ProtoIndexedSurfaceGrid> convert(
0054 const Acts::GeometryContext& gctx,
0055 const Acts::Experimental::DetectorVolume& dVolume,
0056 const Options& volumeOptions);
0057
0058 }
0059
0060 namespace View {
0061
0062
0063
0064
0065
0066
0067
0068
0069 static inline actsvg::svg::object xy(const ProtoVolume& volume,
0070 const std::string& identification,
0071 bool displayPortals = true) {
0072 actsvg::views::x_y xyView;
0073 return actsvg::display::volume(identification, volume, xyView,
0074 displayPortals);
0075 }
0076
0077
0078
0079
0080
0081
0082
0083
0084 static inline actsvg::svg::object zr(const ProtoVolume& volume,
0085 const std::string& identification,
0086 bool displayPortals = true) {
0087 actsvg::views::z_r zrView;
0088 return actsvg::display::volume(identification, volume, zrView,
0089 displayPortals);
0090 }
0091
0092 }
0093
0094 }