diff --git a/Core/include/Acts/Geometry/TrackingGeometry.hpp b/Core/include/Acts/Geometry/TrackingGeometry.hpp index ae96ebb632d..e8d48c5ae5e 100644 --- a/Core/include/Acts/Geometry/TrackingGeometry.hpp +++ b/Core/include/Acts/Geometry/TrackingGeometry.hpp @@ -150,9 +150,11 @@ class TrackingGeometry { /// @param gctx The geometry context /// @param viewConfig Global view config /// @param portalViewConfig View config for portals + /// @param sensitiveViewConfig View configuration for sensitive surfaces void visualize(IVisualization3D& helper, const GeometryContext& gctx, - const ViewConfig& viewConfig = {}, - const ViewConfig& portalViewConfig = {}) const; + const ViewConfig& viewConfig = s_viewVolume, + const ViewConfig& portalViewConfig = s_viewPortal, + const ViewConfig& sensitiveViewConfig = s_viewSensitive) const; private: // the known world diff --git a/Core/include/Acts/Geometry/TrackingVolume.hpp b/Core/include/Acts/Geometry/TrackingVolume.hpp index 2568ef0d191..2f1461cbe70 100644 --- a/Core/include/Acts/Geometry/TrackingVolume.hpp +++ b/Core/include/Acts/Geometry/TrackingVolume.hpp @@ -25,6 +25,7 @@ #include "Acts/Utilities/BinnedArray.hpp" #include "Acts/Utilities/Logger.hpp" #include "Acts/Utilities/TransformRange.hpp" +#include "Acts/Visualization/ViewConfig.hpp" #include #include @@ -477,10 +478,12 @@ class TrackingVolume : public Volume { /// @param helper The visualization helper describing the output format /// @param gctx The geometry context /// @param viewConfig The view configuration + /// @param portalViewConfig View configuration for portals + /// @param sensitiveViewConfig View configuration for sensitive surfaces void visualize(IVisualization3D& helper, const GeometryContext& gctx, - const ViewConfig& viewConfig = {}, - const ViewConfig& portalViewConfig = { - .color{"#308c48"}}) const; + const ViewConfig& viewConfig = s_viewVolume, + const ViewConfig& portalViewConfig = s_viewPortal, + const ViewConfig& sensitiveViewConfig = s_viewSensitive) const; private: void connectDenseBoundarySurfaces( diff --git a/Core/include/Acts/Surfaces/Surface.hpp b/Core/include/Acts/Surfaces/Surface.hpp index c93e7d3c9aa..cc1dd635474 100644 --- a/Core/include/Acts/Surfaces/Surface.hpp +++ b/Core/include/Acts/Surfaces/Surface.hpp @@ -481,7 +481,7 @@ class Surface : public virtual GeometryObject, const GeometryContext& gctx, const Vector3& position) const = 0; void visualize(IVisualization3D& helper, const GeometryContext& gctx, - const ViewConfig& viewConfig = {}) const; + const ViewConfig& viewConfig = s_viewSurface) const; protected: /// Output Method for std::ostream, to be overloaded by child classes diff --git a/Core/src/Geometry/TrackingGeometry.cpp b/Core/src/Geometry/TrackingGeometry.cpp index e209f644b5a..f9207afbd18 100644 --- a/Core/src/Geometry/TrackingGeometry.cpp +++ b/Core/src/Geometry/TrackingGeometry.cpp @@ -88,7 +88,8 @@ Acts::TrackingGeometry::geoIdSurfaceMap() const { void Acts::TrackingGeometry::visualize( IVisualization3D& helper, const GeometryContext& gctx, - const ViewConfig& viewConfig, const ViewConfig& portalViewConfig) const { - highestTrackingVolume()->visualize(helper, gctx, viewConfig, - portalViewConfig); + const ViewConfig& viewConfig, const ViewConfig& portalViewConfig, + const ViewConfig& sensitiveViewConfig) const { + highestTrackingVolume()->visualize(helper, gctx, viewConfig, portalViewConfig, + sensitiveViewConfig); } diff --git a/Core/src/Geometry/TrackingVolume.cpp b/Core/src/Geometry/TrackingVolume.cpp index c4b4f7e9755..d15821295d2 100644 --- a/Core/src/Geometry/TrackingVolume.cpp +++ b/Core/src/Geometry/TrackingVolume.cpp @@ -687,10 +687,15 @@ void TrackingVolume::addSurface(std::shared_ptr surface) { void TrackingVolume::visualize(IVisualization3D& helper, const GeometryContext& gctx, const ViewConfig& viewConfig, - const ViewConfig& portalViewConfig) const { + const ViewConfig& portalViewConfig, + const ViewConfig& sensitiveViewConfig) const { helper.object(volumeName()); Volume::visualize(helper, gctx, viewConfig); + for (const auto& surface : surfaces()) { + surface.visualize(helper, gctx, sensitiveViewConfig); + } + for (const auto& child : volumes()) { child.visualize(helper, gctx, viewConfig, portalViewConfig); }