Commit 24b2516a authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Updated visualization of ORCA lines

parent c8bff383
......@@ -543,12 +543,12 @@ void UMANSOpenGLWidget::drawAgentCostCircle(Agent& agent)
// - draw ORCA lines, if they exist
const auto& orcaSolution = agent.GetOrcaSolution();
const QColor& orcaColor = orcaSolution.isFeasible ? QColor(0, 0, 0) : QColor(255, 0, 0);
for (const auto& line : orcaSolution.orcaLines)
{
Vector2D dir = line.direction.getnormalized();
Vector2D drawLinePoint = agentPos + line.point;
addPointsToBuffer({ { drawLinePoint - 5 * dir } }, QColor(0, 0, 0), Target_Agents_Contours, Depth_Agents + 0.2);
addPointsToBuffer({ { drawLinePoint + 5 * dir } }, QColor(200, 200, 200), Target_Agents_Contours, Depth_Agents + 0.2);
addSegmentsToBuffer({ LineSegment2D(drawLinePoint - 2 * dir, drawLinePoint + 2 * dir) }, orcaColor, Target_Agents_Contours, Depth_Agents + 0.2);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment