12#include "detray/core/concepts.hpp"
13#include "detray/geometry/tracking_volume.hpp"
14#include "detray/plugins/svgtools/conversion/volume.hpp"
15#include "detray/plugins/svgtools/styling/styling.hpp"
18#include "actsvg/proto/detector.hpp"
20namespace detray::svgtools::conversion {
34template <concepts::detector detector_t,
typename view_t>
35auto detector(
const typename detector_t::geometry_context& context,
36 const detector_t& detector,
const view_t& view,
37 const styling::detector_style& style =
39 bool hide_portals =
false,
bool hide_passives =
false,
40 bool hide_grids =
false) {
41 using point3_container_t = std::vector<typename detector_t::point3_type>;
42 actsvg::proto::detector<point3_container_t> p_detector;
44 for (
const auto& vol_desc : detector.volumes()) {
45 auto [p_volume, gr_type] = svgtools::conversion::volume(
46 context, detector, tracking_volume{detector, vol_desc}, view,
47 style._volume_style, hide_portals, hide_passives, hide_grids);
49 p_detector._volumes.push_back(p_volume);