improve nearest track-point search

This commit is contained in:
milek7
2019-03-15 01:18:23 +01:00
parent 1b508954e7
commit 7ca562211a
8 changed files with 104 additions and 24 deletions

View File

@@ -260,9 +260,9 @@ void ui::map_panel::render_contents()
else if (objects.size() == 1)
handle_map_object_click(*this, objects.begin()->second);
TTrack *nearest = simulation::Region->find_nearest_track_point(world_pos);
if (nearest) {
WriteLog(nearest->name());
glm::vec3 nearest = simulation::Region->find_nearest_track_point(world_pos);
if (!glm::isnan(nearest.x)) {
WriteLog(glm::to_string(nearest));
}
//scene::basic_section &clicked_section = simulation::Region->section(world_pos);
//clicked_section.