diff --git a/Examples/Io/Obj/include/ActsExamples/Plugins/Obj/ObjTrackingGeometryWriter.hpp b/Examples/Io/Obj/include/ActsExamples/Plugins/Obj/ObjTrackingGeometryWriter.hpp index 086d973a282..e77497bac8e 100644 --- a/Examples/Io/Obj/include/ActsExamples/Plugins/Obj/ObjTrackingGeometryWriter.hpp +++ b/Examples/Io/Obj/include/ActsExamples/Plugins/Obj/ObjTrackingGeometryWriter.hpp @@ -43,11 +43,11 @@ class ObjTrackingGeometryWriter { std::size_t outputPrecision = 6; ///< floating point precision std::string outputDir = "."; - Acts::ViewConfig containerView = Acts::ViewConfig({220, 220, 220}); - Acts::ViewConfig volumeView = Acts::ViewConfig({220, 220, 0}); - Acts::ViewConfig sensitiveView = Acts::ViewConfig({0, 180, 240}); - Acts::ViewConfig passiveView = Acts::ViewConfig({240, 280, 0}); - Acts::ViewConfig gridView = Acts::ViewConfig({220, 0, 0}); + Acts::ViewConfig containerView = {.color = {220, 220, 220}}; + Acts::ViewConfig volumeView = {.color = {220, 220, 0}}; + Acts::ViewConfig sensitiveView = {.color = {0, 180, 240}}; + Acts::ViewConfig passiveView = {.color = {240, 280, 0}}; + Acts::ViewConfig gridView = {.color = {220, 0, 0}}; }; /// Constructor diff --git a/Examples/Python/src/Obj.cpp b/Examples/Python/src/Obj.cpp index 1a7faa287fd..6fbd8a48682 100644 --- a/Examples/Python/src/Obj.cpp +++ b/Examples/Python/src/Obj.cpp @@ -43,7 +43,7 @@ void addObj(Context& ctx) { const GeometryContext& viewContext, const std::array& viewRgb, unsigned int viewSegements, const std::string& fileName) { - Acts::ViewConfig sConfig = Acts::ViewConfig{viewRgb}; + Acts::ViewConfig sConfig = Acts::ViewConfig{.color = viewRgb}; sConfig.nSegments = viewSegements; Acts::GeometryView3D view3D; Acts::ObjVisualization3D obj; @@ -60,7 +60,7 @@ void addObj(Context& ctx) { const GeometryContext& viewContext, const std::array& viewRgb, unsigned int viewSegements, const std::string& fileName) { - Acts::ViewConfig sConfig = Acts::ViewConfig{viewRgb}; + Acts::ViewConfig sConfig = Acts::ViewConfig{.color = viewRgb}; sConfig.nSegments = viewSegements; Acts::GeometryView3D view3D; Acts::ObjVisualization3D obj; @@ -79,7 +79,7 @@ void addObj(Context& ctx) { const GeometryContext& viewContext, const std::array& viewRgb, unsigned int viewSegements, const std::string& fileName) { - Acts::ViewConfig sConfig = Acts::ViewConfig{viewRgb}; + Acts::ViewConfig sConfig = Acts::ViewConfig{.color = viewRgb}; sConfig.nSegments = viewSegements; Acts::GeometryView3D view3D; Acts::ObjVisualization3D obj; diff --git a/Tests/UnitTests/Core/Geometry/ProtoLayerHelperTests.cpp b/Tests/UnitTests/Core/Geometry/ProtoLayerHelperTests.cpp index e316b2f29aa..fd9bd8cd987 100644 --- a/Tests/UnitTests/Core/Geometry/ProtoLayerHelperTests.cpp +++ b/Tests/UnitTests/Core/Geometry/ProtoLayerHelperTests.cpp @@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE(ProtoLayerHelperTests) { layerSurfaces.end()); } - ViewConfig unsorted({252, 160, 0}); + ViewConfig unsorted{.color = {252, 160, 0}}; for (auto& sf : cylinderSurfaces) { GeometryView3D::drawSurface(objVis, *sf, tgContext, Transform3::Identity(), unsorted); @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(ProtoLayerHelperTests) { std::size_t il = 0; for (auto& layer : radialLayers) { for (auto& sf : layer.surfaces()) { - ViewConfig sorted(sortedColors[il]); + ViewConfig sorted{.color = sortedColors[il]}; GeometryView3D::drawSurface(objVis, *sf, tgContext, Transform3::Identity(), sorted); } @@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(ProtoLayerHelperTests) { il = 0; for (auto& layer : discLayersZ) { for (auto& sf : layer.surfaces()) { - ViewConfig ViewConfig(sortedColors[il]); + ViewConfig ViewConfig{.color = sortedColors[il]}; GeometryView3D::drawSurface(objVis, *sf, tgContext, Transform3::Identity(), ViewConfig); } diff --git a/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp b/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp index 8cc6c21074d..2d9d110ec5f 100644 --- a/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp +++ b/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp @@ -1158,15 +1158,15 @@ BOOST_AUTO_TEST_CASE(Material) { ObjVisualization3D obj; bool triangulate = true; - ViewConfig viewSensitive = ViewConfig({0, 180, 240}); + ViewConfig viewSensitive = {.color = {0, 180, 240}}; viewSensitive.triangulate = triangulate; - ViewConfig viewPassive = ViewConfig({240, 280, 0}); + ViewConfig viewPassive = {.color = {240, 280, 0}}; viewPassive.triangulate = triangulate; - ViewConfig viewVolume = ViewConfig({220, 220, 0}); + ViewConfig viewVolume = {.color = {220, 220, 0}}; viewVolume.triangulate = triangulate; - ViewConfig viewContainer = ViewConfig({220, 220, 0}); + ViewConfig viewContainer = {.color = {220, 220, 0}}; viewContainer.triangulate = triangulate; - ViewConfig viewGrid = ViewConfig({220, 0, 0}); + ViewConfig viewGrid = {.color = {220, 0, 0}}; viewGrid.nSegments = 8; viewGrid.offset = 3.; viewGrid.triangulate = triangulate; @@ -1186,7 +1186,7 @@ BOOST_AUTO_TEST_CASE(Material) { ObjVisualization3D obj; double localErrorScale = 10000000.; - ViewConfig mcolor({255, 145, 48}); + ViewConfig mcolor{.color = {255, 145, 48}}; mcolor.offset = 2; // mcolor.visible = true; diff --git a/Tests/UnitTests/Core/Visualization/EventDataView3DBase.hpp b/Tests/UnitTests/Core/Visualization/EventDataView3DBase.hpp index b642b3a5ddc..cf6143d2015 100644 --- a/Tests/UnitTests/Core/Visualization/EventDataView3DBase.hpp +++ b/Tests/UnitTests/Core/Visualization/EventDataView3DBase.hpp @@ -165,8 +165,8 @@ void createDetector(GeometryContext& tgContext, static inline std::string testBoundTrackParameters(IVisualization3D& helper) { std::stringstream ss; - ViewConfig pcolor({20, 120, 20}); - ViewConfig scolor({235, 198, 52}); + ViewConfig pcolor{.color = {20, 120, 20}}; + ViewConfig scolor{.color = {235, 198, 52}}; auto gctx = GeometryContext(); auto identity = Transform3::Identity(); @@ -245,7 +245,7 @@ static inline std::string testMeasurement(IVisualization3D& helper, eBoundLoc0, eBoundLoc1, loc, cov2D, surface->geometryId()}); } - ViewConfig mcolor({255, 145, 48}); + ViewConfig mcolor{.color = {255, 145, 48}}; mcolor.offset = 0.01; // Draw the measurements @@ -378,14 +378,14 @@ static inline std::string testMultiTrajectory(IVisualization3D& helper) { double localErrorScale = 100.; double directionErrorScale = 100000; - ViewConfig scolor({214, 214, 214}); - ViewConfig mcolor({255, 145, 48}); + ViewConfig scolor{.color = {214, 214, 214}}; + ViewConfig mcolor{.color = {255, 145, 48}}; mcolor.offset = -0.01; - ViewConfig ppcolor({51, 204, 51}); + ViewConfig ppcolor{.color = {51, 204, 51}}; ppcolor.offset = -0.02; - ViewConfig fpcolor({255, 255, 0}); + ViewConfig fpcolor{.color = {255, 255, 0}}; fpcolor.offset = -0.03; - ViewConfig spcolor({0, 125, 255}); + ViewConfig spcolor{.color = {0, 125, 255}}; spcolor.offset = -0.04; EventDataView3D::drawMultiTrajectory( diff --git a/Tests/UnitTests/Core/Visualization/PrimitivesView3DBase.hpp b/Tests/UnitTests/Core/Visualization/PrimitivesView3DBase.hpp index 505646cfd75..4c64929061a 100644 --- a/Tests/UnitTests/Core/Visualization/PrimitivesView3DBase.hpp +++ b/Tests/UnitTests/Core/Visualization/PrimitivesView3DBase.hpp @@ -40,7 +40,7 @@ GeometryContext gctx = GeometryContext(); static inline std::string run(IVisualization3D& helper) { std::stringstream ss; - ViewConfig lineView({0, 0, 255}); + ViewConfig lineView{.color = {0, 0, 255}}; lineView.lineThickness = 0.1; // Line visualization ------------------------------------------------ @@ -71,7 +71,7 @@ static inline std::string run(IVisualization3D& helper) { // Error visualization: local --------------------------------------------- Acts::GeometryView3D::drawSurface(helper, *plane, gctx); - ViewConfig errorVis({250, 0, 0}); + ViewConfig errorVis{.color = {250, 0, 0}}; errorVis.lineThickness = 0.025; SquareMatrix2 cov = SquareMatrix2::Identity(); diff --git a/Tests/UnitTests/Core/Visualization/TrackingGeometryView3DBase.hpp b/Tests/UnitTests/Core/Visualization/TrackingGeometryView3DBase.hpp index 350e08e1490..ccf5f267212 100644 --- a/Tests/UnitTests/Core/Visualization/TrackingGeometryView3DBase.hpp +++ b/Tests/UnitTests/Core/Visualization/TrackingGeometryView3DBase.hpp @@ -37,15 +37,15 @@ static inline std::string run(IVisualization3D& helper, bool triangulate, const std::string& tag) { std::stringstream cStream; - ViewConfig viewSensitive = ViewConfig({0, 180, 240}); + ViewConfig viewSensitive = {.color = {0, 180, 240}}; viewSensitive.triangulate = triangulate; - ViewConfig viewPassive = ViewConfig({240, 280, 0}); + ViewConfig viewPassive = {.color = {240, 280, 0}}; viewPassive.triangulate = triangulate; - ViewConfig viewVolume = ViewConfig({220, 220, 0}); + ViewConfig viewVolume = {.color = {220, 220, 0}}; viewVolume.triangulate = triangulate; - ViewConfig viewContainer = ViewConfig({220, 220, 0}); + ViewConfig viewContainer = {.color = {220, 220, 0}}; viewContainer.triangulate = triangulate; - ViewConfig viewGrid = ViewConfig({220, 0, 0}); + ViewConfig viewGrid = {.color = {220, 0, 0}}; viewGrid.nSegments = 8; viewGrid.offset = 3.; viewGrid.triangulate = triangulate; diff --git a/Tests/UnitTests/Plugins/Geant4/Geant4DetectorSurfaceFactoryTests.cpp b/Tests/UnitTests/Plugins/Geant4/Geant4DetectorSurfaceFactoryTests.cpp index dc102eefaf2..87c9914755f 100644 --- a/Tests/UnitTests/Plugins/Geant4/Geant4DetectorSurfaceFactoryTests.cpp +++ b/Tests/UnitTests/Plugins/Geant4/Geant4DetectorSurfaceFactoryTests.cpp @@ -161,17 +161,14 @@ BOOST_AUTO_TEST_CASE(Geant4DetecturSurfaceFactory_Transforms) { Acts::ObjVisualization3D obj; Acts::Vector3 origin(0, 0, 0); Acts::GeometryView3D::drawArrowForward(obj, origin, Acts::Vector3(100, 0, 0), - 1000, 10, - Acts::ViewConfig({255, 0, 0})); + 1000, 10, {.color = {255, 0, 0}}); Acts::GeometryView3D::drawArrowForward(obj, origin, Acts::Vector3(0, 100, 0), - 1000, 10, - Acts::ViewConfig({0, 255, 0})); + 1000, 10, {.color = {0, 255, 0}}); Acts::GeometryView3D::drawArrowForward(obj, origin, Acts::Vector3(0, 0, 100), - 1000, 10, - Acts::ViewConfig({0, 0, 255})); - Acts::GeometryView3D::drawArrowForward( - obj, surface->center(gctx), surface->center(gctx) + 100 * normal, 1000, - 10, Acts::ViewConfig({0, 255, 0})); + 1000, 10, {.color = {0, 0, 255}}); + Acts::GeometryView3D::drawArrowForward(obj, surface->center(gctx), + surface->center(gctx) + 100 * normal, + 1000, 10, {.color = {0, 255, 0}}); auto surfaces = cache.sensitiveSurfaces; for (const auto& [k, val] : Acts::enumerate(cache.sensitiveSurfaces)) { const auto& [el, surf] = val; diff --git a/Tests/UnitTests/Plugins/TGeo/TGeoArb8ConversionTests.cpp b/Tests/UnitTests/Plugins/TGeo/TGeoArb8ConversionTests.cpp index c632e37347f..ea21c2be64b 100644 --- a/Tests/UnitTests/Plugins/TGeo/TGeoArb8ConversionTests.cpp +++ b/Tests/UnitTests/Plugins/TGeo/TGeoArb8ConversionTests.cpp @@ -36,9 +36,9 @@ namespace Acts::Test { GeometryContext tgContext = GeometryContext(); -ViewConfig red({200, 0, 0}); -ViewConfig green({0, 200, 0}); -ViewConfig blue({0, 0, 200}); +ViewConfig red{.color = {200, 0, 0}}; +ViewConfig green{.color = {0, 200, 0}}; +ViewConfig blue{.color = {0, 0, 200}}; /// @brief Unit test to convert a TGeoTrd2 into a Plane /// diff --git a/Tests/UnitTests/Plugins/TGeo/TGeoBBoxConversionTests.cpp b/Tests/UnitTests/Plugins/TGeo/TGeoBBoxConversionTests.cpp index f94428ad773..8d2fcd7e654 100644 --- a/Tests/UnitTests/Plugins/TGeo/TGeoBBoxConversionTests.cpp +++ b/Tests/UnitTests/Plugins/TGeo/TGeoBBoxConversionTests.cpp @@ -35,9 +35,9 @@ namespace Acts::Test { GeometryContext tgContext = GeometryContext(); -ViewConfig red({200, 0, 0}); -ViewConfig green({0, 200, 0}); -ViewConfig blue({0, 0, 200}); +ViewConfig red{.color = {200, 0, 0}}; +ViewConfig green{.color = {0, 200, 0}}; +ViewConfig blue{.color = {0, 0, 200}}; /// @brief Unit test to convert a Bbox into a Plane /// diff --git a/Tests/UnitTests/Plugins/TGeo/TGeoTrd1ConversionTests.cpp b/Tests/UnitTests/Plugins/TGeo/TGeoTrd1ConversionTests.cpp index ebdcaf8ddf1..56392407168 100644 --- a/Tests/UnitTests/Plugins/TGeo/TGeoTrd1ConversionTests.cpp +++ b/Tests/UnitTests/Plugins/TGeo/TGeoTrd1ConversionTests.cpp @@ -40,9 +40,9 @@ namespace Acts::Test { GeometryContext tgContext = GeometryContext(); -ViewConfig red({200, 0, 0}); -ViewConfig green({0, 200, 0}); -ViewConfig blue({0, 0, 200}); +ViewConfig red{.color = {200, 0, 0}}; +ViewConfig green{.color = {0, 200, 0}}; +ViewConfig blue{.color = {0, 0, 200}}; /// @brief Unit test to convert a TGeoTrd1 into a Plane /// diff --git a/Tests/UnitTests/Plugins/TGeo/TGeoTrd2ConversionTests.cpp b/Tests/UnitTests/Plugins/TGeo/TGeoTrd2ConversionTests.cpp index cf9bea4acd7..1feca6e1d99 100644 --- a/Tests/UnitTests/Plugins/TGeo/TGeoTrd2ConversionTests.cpp +++ b/Tests/UnitTests/Plugins/TGeo/TGeoTrd2ConversionTests.cpp @@ -40,9 +40,9 @@ namespace Acts::Test { GeometryContext tgContext = GeometryContext(); -ViewConfig red({200, 0, 0}); -ViewConfig green({0, 200, 0}); -ViewConfig blue({0, 0, 200}); +ViewConfig red{.color = {200, 0, 0}}; +ViewConfig green{.color = {0, 200, 0}}; +ViewConfig blue{.color = {0, 0, 200}}; /// @brief Unit test to convert a TGeoTrd2 into a Plane /// diff --git a/Tests/UnitTests/Plugins/TGeo/TGeoTubeConversionTests.cpp b/Tests/UnitTests/Plugins/TGeo/TGeoTubeConversionTests.cpp index dd9340de81c..18ac5edfd18 100644 --- a/Tests/UnitTests/Plugins/TGeo/TGeoTubeConversionTests.cpp +++ b/Tests/UnitTests/Plugins/TGeo/TGeoTubeConversionTests.cpp @@ -40,9 +40,9 @@ namespace Acts::Test { GeometryContext tgContext = GeometryContext(); -ViewConfig red({200, 0, 0}); -ViewConfig green({0, 200, 0}); -ViewConfig blue({0, 0, 200}); +ViewConfig red{.color = {200, 0, 0}}; +ViewConfig green{.color = {0, 200, 0}}; +ViewConfig blue{.color = {0, 0, 200}}; std::vector allowedAxes = {"XY*", "Xy*", "xy*", "xY*", "YX*", "yx*", "yX*", "Yx*"};