19 #define DEBUG_DRAWING_POLYGON(polygon, color, ns) (DebugDrawing::getInstance()->drawPolygon(polygon, color, ns))
20 #define DEBUG_DRAWING_LINE(line, color, ns) (DebugDrawing::getInstance()->drawLine(line, color, ns))
21 #define DEBUG_DRAWING_IS_ENABLED() (DebugDrawing::getInstance()->isEnabled())
34 namespace unstructured {
41 void operator()(
const void *)
56 DebugLine(Line
const &iLine, std::string
const &iColor, std::string
const &iNs)
63 std::string color{
"white"};
66 std::vector<DebugPoint> getVector()
68 std::vector<DebugPoint> vectorLine;
69 for (
auto const &pt : line)
71 vectorLine.push_back(
DebugPoint(pt.x(), pt.y()));
79 DebugPolygon(Polygon
const &iPolygon, std::string
const &iColor, std::string
const &iNs)
86 std::string color{
"white"};
89 std::vector<DebugPoint> getVector()
91 std::vector<DebugPoint> vectorPolygon;
92 for (
auto const &pt : polygon.outer())
94 vectorPolygon.push_back(
DebugPoint(pt.x(), pt.y()));
108 return std::shared_ptr<DebugDrawing>(mSingleton,
NullDeleter());
147 void drawLine(Line
const &line, std::string
const &color =
"white", std::string
const &ns =
"")
153 mLines.push_back(
DebugLine(line, color, ns));
155 spdlog::trace(
"DRAW;{};{};{};LINE", ns, color, std::to_string(line));
165 void drawPolygon(Polygon
const &polygon, std::string
const &color =
"white", std::string
const &ns =
"")
174 std::vector<DebugLine> mLines;
175 std::vector<DebugPolygon> mPolygons;
176 bool mEnabled{
false};