diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp index 9dabab63daeba10e73ac9734297a9eacbf4dc16a..ebf8cfff1911bad7dacae2174ae3e67b4bd36360 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp @@ -25,6 +25,7 @@ #include "DebugDrawerComponent.h" +#include <RobotAPI/libraries/core/math/ColorUtils.h> #include <VirtualRobot/VirtualRobot.h> #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h> @@ -621,8 +622,16 @@ namespace armarx coordinateValues[2 * i].setValue(d.lineSet.points[2 * i].x, d.lineSet.points[2 * i].y, d.lineSet.points[2 * i].z); coordinateValues[2 * i + 1].setValue(d.lineSet.points[2 * i + 1].x, d.lineSet.points[2 * i + 1].y, d.lineSet.points[2 * i + 1].z); - VirtualRobot::VisualizationFactory::Color c = visualizationColorMap.getColor(d.lineSet.intensities[i]); - colorValues[i].setValue(c.r, c.g, c.b); + if (d.lineSet.useHeatMap) + { + auto c = colorutils::HeatMapRGBAColor(d.lineSet.intensities[i]); + colorValues[i].setValue(c.r, c.g, c.b); + } + else + { + VirtualRobot::VisualizationFactory::Color c = visualizationColorMap.getColor(d.lineSet.intensities[i]); + colorValues[i].setValue(c.r, c.g, c.b); + } } coordinateNode->point.setValuesPointer(d.lineSet.points.size(), coordinateValues); diff --git a/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice b/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice index 1e629a61b88b7941bc7a828f104009981eb1caca..0a25c6ee696e7a3a8fbb72c39aae65345078812a 100644 --- a/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice +++ b/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice @@ -189,6 +189,8 @@ module armarx DebugDrawerLineSetPointList points; DebugDrawerLineSetIntensityList intensities; + + bool useHeatMap = false; }; sequence< Vector3Base > PolygonPointList;