57 DETRAY_HOST_DEVICE
constexpr void init(
58 const track_t &track, nav_state_t &navigation,
60 const bool resolve_overstepping =
false)
const {
62 navigation::local_navigation(track, navigation, cfg, ctx,
63 resolve_overstepping);
65 DETRAY_VERBOSE_HOST(
"Status: " << navigation.status() <<
" (next sf.: "
66 << navigation.next_surface().index() <<
")");
67 if (navigation.is_on_surface()) {
68 DETRAY_VERBOSE_HOST(
"-> Current surface: "
69 << navigation.current_surface().index()
70 <<
", has material: " << std::boolalpha
71 << navigation.current_surface().has_material()
74 DETRAY_VERBOSE_HOST_DEVICE(
"Update complete: dist to next %f mm",
95 DETRAY_HOST_DEVICE DETRAY_INLINE
constexpr bool update(
96 const track_t &track, nav_state_t &navigation,
98 assert(navigation.is_alive());
99 assert(!track.is_invalid());
102 if (navigation.trust_level() == navigation::trust_level::e_full) {
103 DETRAY_VERBOSE_HOST_DEVICE(
104 "-> Full trust, nothing left to do: dist to next %f mm",
111 constexpr const navigator_impl_t navigation_impl{};
112 bool is_init = navigation_impl.update_impl(track, navigation, cfg, ctx);
115 if (navigation.is_on_portal()) {
116 navigation::volume_switch(track, navigation, cfg, ctx);
120 if (!navigation.is_alive()) {
126 if (navigation.trust_level() != navigation::trust_level::e_full ||
127 navigation.cache_exhausted()) {
129 navigation::init_loose_cfg(track, navigation, cfg, ctx);
131 navigation.run_inspector(cfg, track.pos(), track.dir(),
"Re-init: ");
134 DETRAY_VERBOSE_HOST(
"Status: " << navigation.status() <<
" (vol.:"
135 << navigation.volume() <<
", next sf.: "
136 << navigation.next_surface().index() <<
")");
137 if (navigation.is_on_surface()) {
138 DETRAY_VERBOSE_HOST(
"-> Current surface: "
139 << navigation.current_surface().index()
140 <<
", has material: " << std::boolalpha
141 << navigation.current_surface().has_material()
142 << std::noboolalpha);
144 DETRAY_VERBOSE_HOST_DEVICE(
"Update complete: dist to next %f mm",