Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-05 08:18:11

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 #include "Acts/Visualization/ViewConfig.hpp"
0010 
0011 #include "Acts/Geometry/GeometryObject.hpp"
0012 #include "Acts/Geometry/TrackingVolume.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014 
0015 #include <functional>
0016 
0017 namespace Acts {
0018 
0019 ViewConfig defaultGeometryColoring(const GeometryObject& geoObj) {
0020   if (geoObj.geometryId().boundary() != 0) {
0021     return ViewConfig{.color = {255, 165, 0}};
0022   }
0023 
0024   if (geoObj.geometryId().sensitive() != 0) {
0025     return ViewConfig{.color = {0, 255, 0}};
0026   }
0027 
0028   else {
0029     return ViewConfig{.visible = false};
0030   }
0031 }
0032 
0033 }  // namespace Acts