Skip to content

Commit 5a3f5a9

Browse files
author
Vakho Tsulaia
committed
Pass geometry context to navigator::update()
1 parent d28875c commit 5a3f5a9

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

core/include/detray/navigation/navigator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ class navigator {
683683
const context_type &ctx = {}) const {
684684
// Candidates are re-evaluated based on the current trust level.
685685
// Should result in 'full trust'
686-
bool is_init = update_kernel(track, navigation, cfg);
686+
bool is_init = update_kernel(track, navigation, cfg, ctx);
687687

688688
// Update was completely successful (most likely case)
689689
if (navigation.trust_level() == navigation::trust_level::e_full) {

core/include/detray/propagator/propagator.hpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct propagator {
160160
run_actors(actor_state_refs, propagation);
161161

162162
// Find next candidate
163-
m_navigator.update(track, navigation, m_cfg.navigation);
163+
m_navigator.update(track, navigation, m_cfg.navigation, context);
164164
propagation._heartbeat &= navigation.is_alive();
165165
}
166166

@@ -178,6 +178,7 @@ struct propagator {
178178
typename actor_chain_t::state actor_state_refs) const {
179179
auto &navigation = propagation._navigation;
180180
auto &stepping = propagation._stepping;
181+
auto &context = propagation._context;
181182
const auto &track = stepping();
182183

183184
// Set access to the volume material for the stepper
@@ -197,14 +198,14 @@ struct propagator {
197198
typename stepper_t::policy_type{}(stepping.policy_state(), propagation);
198199

199200
// Find next candidate
200-
is_init = m_navigator.update(track, navigation, m_cfg.navigation);
201+
is_init = m_navigator.update(track, navigation, m_cfg.navigation, context);
201202
propagation._heartbeat &= navigation.is_alive();
202203

203204
// Run all registered actors/aborters after update
204205
run_actors(actor_state_refs, propagation);
205206

206207
// And check the status
207-
is_init |= m_navigator.update(track, navigation, m_cfg.navigation);
208+
is_init |= m_navigator.update(track, navigation, m_cfg.navigation, context);
208209
propagation._heartbeat &= navigation.is_alive();
209210

210211
#if defined(__NO_DEVICE__)
@@ -278,6 +279,7 @@ struct propagator {
278279

279280
auto &navigation = propagation._navigation;
280281
auto &stepping = propagation._stepping;
282+
auto &context = propagation._context;
281283
const auto &track = stepping();
282284

283285
while (propagation.is_alive()) {
@@ -305,7 +307,7 @@ struct propagator {
305307

306308
// Find next candidate
307309
is_init =
308-
m_navigator.update(track, navigation, m_cfg.navigation);
310+
m_navigator.update(track, navigation, m_cfg.navigation, context);
309311
propagation._heartbeat &= navigation.is_alive();
310312

311313
// If the track is on a sensitive surface, break the loop to
@@ -318,7 +320,7 @@ struct propagator {
318320

319321
// And check the status
320322
is_init |=
321-
m_navigator.update(track, navigation, m_cfg.navigation);
323+
m_navigator.update(track, navigation, m_cfg.navigation, context);
322324
propagation._heartbeat &= navigation.is_alive();
323325
}
324326
}
@@ -330,7 +332,7 @@ struct propagator {
330332

331333
// And check the status
332334
is_init |=
333-
m_navigator.update(track, navigation, m_cfg.navigation);
335+
m_navigator.update(track, navigation, m_cfg.navigation, context);
334336
propagation._heartbeat &= navigation.is_alive();
335337
}
336338

0 commit comments

Comments
 (0)