EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryView3D.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GeometryView3D.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
16 
17 namespace Acts {
18 
19 class Layer;
20 class Surface;
21 class SurfaceArray;
22 class TrackingVolume;
23 struct Polyhedron;
24 
25 static ViewConfig s_viewSensitive = ViewConfig({0, 180, 240});
26 static ViewConfig s_viewPassive = ViewConfig({240, 280, 0});
27 static ViewConfig s_viewVolume = ViewConfig({220, 220, 0});
28 static ViewConfig s_viewGrid = ViewConfig({220, 0, 0});
29 static ViewConfig s_viewLine = ViewConfig({0, 0, 220});
30 
37  static void drawPolyhedron(IVisualization3D& helper,
38  const Polyhedron& polyhedron,
40 
48  static void drawSurface(
49  IVisualization3D& helper, const Surface& surface,
50  const GeometryContext& gctx,
51  const Transform3D& transform = Transform3D::Identity(),
53 
63  static void drawSurfaceArray(
64  IVisualization3D& helper, const SurfaceArray& surfaceArray,
65  const GeometryContext& gctx,
66  const Transform3D& transform = Transform3D::Identity(),
67  const ViewConfig& sensitiveConfig = s_viewSensitive,
68  const ViewConfig& passiveConfig = s_viewPassive,
69  const ViewConfig& gridConfig = s_viewGrid);
70 
78  static void drawVolume(IVisualization3D& helper, const AbstractVolume& volume,
79  const GeometryContext& gctx,
80  const Transform3D& transform = Transform3D::Identity(),
81  const ViewConfig& viewConfig = s_viewVolume);
82 
91  static void drawLayer(IVisualization3D& helper, const Layer& layer,
92  const GeometryContext& gctx,
93  const ViewConfig& layerConfig = s_viewPassive,
94  const ViewConfig& sensitiveConfig = s_viewSensitive,
95  const ViewConfig& gridConfig = s_viewGrid);
96 
110  static void drawTrackingVolume(
111  IVisualization3D& helper, const TrackingVolume& tVolume,
112  const GeometryContext& gctx,
113  const ViewConfig& containerView = s_viewVolume,
114  const ViewConfig& volumeView = s_viewVolume,
115  const ViewConfig& layerView = s_viewPassive,
116  const ViewConfig& sensitiveView = s_viewSensitive,
117  const ViewConfig& gridView = s_viewGrid, bool writeIt = true,
118  const std::string& tag = "");
119 
129  static void drawSegmentBase(IVisualization3D& helper, const Vector3D& start,
130  const Vector3D& end, int arrows = 0,
131  double arrowLength = 0., double arrowWidth = 0.,
132  const ViewConfig& viewConfig = s_viewLine);
133 
140  static void drawSegment(IVisualization3D& helper, const Vector3D& start,
141  const Vector3D& end,
142  const ViewConfig& viewConfig = s_viewLine);
143 
152  static void drawArrowBackward(IVisualization3D& helper, const Vector3D& start,
153  const Vector3D& end, double arrowLength,
154  double arrowWidth,
155  const ViewConfig& viewConfig = s_viewLine);
156 
165  static void drawArrowForward(IVisualization3D& helper, const Vector3D& start,
166  const Vector3D& end, double arrowLength,
167  double arrowWidth,
168  const ViewConfig& viewConfig = s_viewLine);
169 
178  static void drawArrowsBoth(IVisualization3D& helper, const Vector3D& start,
179  const Vector3D& end, double arrowLength,
180  double arrowWidth,
181  const ViewConfig& viewConfig = s_viewLine);
182 };
183 
184 } // namespace Acts