Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OCSR
UMANS
Commits
24b2516a
Commit
24b2516a
authored
Sep 17, 2020
by
VAN TOLL Wouter
Browse files
Updated visualization of ORCA lines
parent
c8bff383
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/GUI/UMANSOpenGLWidget.cpp
View file @
24b2516a
...
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment