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/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "ActsPlugins/ActSVG/SvgUtils.hpp"
0014 #include <actsvg/core.hpp>
0015 #include <actsvg/meta.hpp>
0016
0017 namespace Acts {
0018
0019 class Surface;
0020 }
0021
0022 namespace ActsPlugins::Svg {
0023
0024 using ProtoSurface = actsvg::proto::surface<std::vector<Acts::Vector3>>;
0025
0026 namespace SurfaceConverter {
0027
0028
0029 struct Options {
0030
0031 Style style = defaultSensitiveStyle;
0032
0033 bool templateSurface = false;
0034 };
0035
0036
0037
0038
0039
0040
0041
0042
0043 ProtoSurface convert(const Acts::GeometryContext& gctx,
0044 const Acts::Surface& surface,
0045 const SurfaceConverter::Options& cOptions);
0046
0047 }
0048
0049 namespace View {
0050
0051
0052
0053
0054
0055
0056
0057 static inline actsvg::svg::object xy(const ProtoSurface& pSurface,
0058 const std::string& identification) {
0059 actsvg::views::x_y xyView;
0060 return actsvg::display::surface(identification, pSurface, xyView);
0061 }
0062
0063
0064
0065
0066
0067
0068
0069 static inline actsvg::svg::object zr(const ProtoSurface& pSurface,
0070 const std::string& identification) {
0071 actsvg::views::z_r zrView;
0072 return actsvg::display::surface(identification, pSurface, zrView);
0073 }
0074
0075
0076
0077
0078
0079
0080
0081 static inline actsvg::svg::object zphi(const ProtoSurface& pSurface,
0082 const std::string& identification) {
0083 actsvg::views::z_phi zphiView;
0084 return actsvg::display::surface(identification, pSurface, zphiView);
0085 }
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095 static inline actsvg::svg::object zrphi(const ProtoSurface& pSurface,
0096 const std::string& identification) {
0097 actsvg::views::z_rphi zrphiView;
0098 zrphiView._fixed_r = pSurface._radii[0u];
0099 return actsvg::display::surface(identification, pSurface, zrphiView);
0100 }
0101
0102 }
0103
0104 namespace Sheet {
0105
0106
0107
0108
0109
0110
0111
0112 static inline actsvg::svg::object xy(const ProtoSurface& pSurface,
0113 const std::string& identification) {
0114 return actsvg::display::surface_sheet_xy(identification, pSurface);
0115 }
0116
0117 }
0118
0119 }