File indexing completed on 2025-11-23 09:33:26
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 "Acts/Plugins/ActSVG/IndexedSurfacesSvgConverter.hpp"
0014 #include "Acts/Plugins/ActSVG/PortalSvgConverter.hpp"
0015 #include "Acts/Plugins/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 {
0024
0025 namespace Experimental {
0026 class DetectorVolume;
0027 class Portal;
0028 }
0029
0030 namespace Svg {
0031
0032 using ProtoVolume = actsvg::proto::volume<std::vector<Vector3>>;
0033
0034 namespace DetectorVolumeConverter {
0035
0036
0037 struct Options {
0038
0039 std::map<const Experimental::Portal*, unsigned int> portalIndices;
0040
0041 PortalConverter::Options portalOptions;
0042
0043 SurfaceConverter::Options surfaceOptions;
0044
0045 IndexedSurfacesConverter::Options indexedSurfacesOptions;
0046 };
0047
0048
0049
0050
0051
0052
0053
0054
0055 std::tuple<ProtoVolume, ProtoIndexedSurfaceGrid> convert(
0056 const GeometryContext& gctx, const Experimental::DetectorVolume& dVolume,
0057 const Options& volumeOptions);
0058
0059 }
0060
0061 namespace View {
0062
0063
0064
0065
0066
0067
0068
0069
0070 static inline actsvg::svg::object xy(const ProtoVolume& volume,
0071 const std::string& identification,
0072 bool displayPortals = true) {
0073 actsvg::views::x_y xyView;
0074 return actsvg::display::volume(identification, volume, xyView,
0075 displayPortals);
0076 }
0077
0078
0079
0080
0081
0082
0083
0084
0085 static inline actsvg::svg::object zr(const ProtoVolume& volume,
0086 const std::string& identification,
0087 bool displayPortals = true) {
0088 actsvg::views::z_r zrView;
0089 return actsvg::display::volume(identification, volume, zrView,
0090 displayPortals);
0091 }
0092
0093 }
0094
0095 }
0096
0097 }