Skip to content

Commit

Permalink
Fix agent-analysis parameter injection according to the current sala
Browse files Browse the repository at this point in the history
  • Loading branch information
pklampros committed Jul 18, 2024
1 parent 268d9d4 commit 5244bd3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions depthmapX/graphdoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,13 +1690,16 @@ void QGraphDoc::OnToolsAgentRun() {
std::vector<Point2f> releasePoints;
std::optional<size_t> randomReleaseLocationSeed = 0;

std::optional<std::pair<size_t, std::reference_wrapper<ShapeMap>>> recordTrails = std::nullopt;

if (dlg.m_record_trails) {
auto &agentmap =
m_meta_graph->createNewShapeMap(depthmapX::ImportType::DATAMAP, "Agent trails");
recordTrails = std::make_pair(dlg.m_trail_count, std::ref(agentmap.getInternalMap()));
}
std::optional<AgentAnalysis::TrailRecordOptions> recordTrails =
dlg.m_record_trails
? std::make_optional(AgentAnalysis::TrailRecordOptions{
dlg.m_trail_count == 0
? std::nullopt
: std::make_optional(static_cast<size_t>(dlg.m_trail_count)),
std::ref(m_meta_graph
->createNewShapeMap(depthmapX::ImportType::DATAMAP, "Agent trails")
.getInternalMap())})
: std::nullopt;

if (dlg.m_release_location == 1) {
randomReleaseLocationSeed = std::nullopt;
Expand Down

0 comments on commit 5244bd3

Please sign in to comment.