diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp index 9690608e4cb73fc1cdbbeb133b91d54d1e3fdc12..e75b9614da16d4ca9deeb42b556107ca7c9001a4 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp @@ -49,6 +49,7 @@ #include <Inventor/SbVec3f.h> #include <Inventor/fields/SoMFVec3f.h> #include <Inventor/fields/SoMFColor.h> +#include <Inventor/nodes/SoShapeHints.h> #include <ArmarXCore/core/system/ArmarXDataPath.h> #include <ArmarXCore/core/system/cmake/CMakePackageFinder.h> @@ -822,7 +823,14 @@ namespace armarx return; } - SoSeparator* sep = VirtualRobot::CoinVisualizationFactory::CreatePolygonVisualization(d.points, d.colorInner, d.colorBorder, d.lineWidth); + SoSeparator* sep = new SoSeparator; + + SoShapeHints* hints = new SoShapeHints; + hints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; + hints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; + sep->addChild(hints); + + sep->addChild(VirtualRobot::CoinVisualizationFactory::CreatePolygonVisualization(d.points, d.colorInner, d.colorBorder, d.lineWidth)); sep->setName(SELECTION_NAME(d.layerName, d.name)); layer.addedPolygonVisualizations[d.name] = sep; layer.mainNode->addChild(sep);