|
|
|||
File indexing completed on 2025-11-23 09:33:26
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include "Acts/Definitions/Algebra.hpp" 0012 #include "Acts/Plugins/ActSVG/SvgUtils.hpp" 0013 #include "Acts/Utilities/Logger.hpp" 0014 #include <actsvg/core.hpp> 0015 0016 namespace Acts::Svg::EventDataConverter { 0017 0018 /// Write/create a 3D point in XY view 0019 /// 0020 /// @param pos the position 0021 /// @param size the size of the object 0022 /// @param style the style of the object 0023 /// @param idx the running index 0024 /// 0025 /// @return a vector of svg objects 0026 actsvg::svg::object pointXY(const Vector3& pos, double size, const Style& style, 0027 unsigned int idx = 0); 0028 0029 /// Write/create a 3D point in ZR view 0030 /// 0031 /// @param pos the position 0032 /// @param size the size of the object 0033 /// @param style the style of the object 0034 /// @param indx the running index 0035 /// 0036 /// @return a vector of svg objects 0037 actsvg::svg::object pointZR(const Vector3& pos, double size, const Style& style, 0038 unsigned int idx = 0); 0039 0040 /// Write/create a 3D point in a given view 0041 /// 0042 /// @param pos the position 0043 /// @param size the size of the object 0044 /// @param style the style of the object 0045 /// @param indx the running index 0046 /// 0047 /// @return a vector of svg objects 0048 template <typename view_type> 0049 actsvg::svg::object point(const Vector3& pos, double size, const Style& style, 0050 unsigned int idx) { 0051 view_type view; 0052 std::vector<Vector3> ps = {pos}; 0053 auto ppos = view(ps)[0]; 0054 auto [fill, stroke] = style.fillAndStroke(); 0055 auto circle = 0056 actsvg::draw::circle("p_" + std::to_string(idx), ppos, 0057 static_cast<actsvg::scalar>(size), fill, stroke); 0058 return circle; 0059 } 0060 0061 } // namespace Acts::Svg::EventDataConverter
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|