17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 23:23:30 +02:00

feat(editor): W17 placed and checked one by one: a list of the switches without one or with one standing wrong, a click on its point in the view puts or moves that one

- the panel shows the scope and what's found first, then Place and Move for all, then each missing or wrong marker with its
  own button and a click flying the camera there; the spacing, tolerances, height, model and turn are under Settings
- a click on a green point (no marker) or a red one (marker standing wrong) in the view puts or moves that marker alone
- the check starts around the camera
- one camera flight, fly_to, instead of four copies of it
- self-test fouling show=1 and place=one
This commit is contained in:
maj00r
2026-10-18 02:00:54 +02:00
parent d222c833fc
commit 52a762879c
7 changed files with 190 additions and 88 deletions

View File

@@ -677,13 +677,7 @@ void editor_mode::gauge_focus(int const Index)
look = glm::length(look) > 1e-6 ? glm::normalize(look) : glm::dvec3(0.0, 0.0, 1.0);
if (glm::dot(Camera.Pos - hit.point, look) > 0.0)
look = -look;
m_focus_start_pos = Camera.Pos;
m_focus_start_angle = Camera.Angle;
m_focus_target_pos = hit.point - look * gauge_view_distance;
m_focus_target_angle = glm::vec3(static_cast<float>(std::asin(std::clamp(look.y, -1.0, 1.0))), static_cast<float>(std::atan2(-look.x, -look.z)), 0.0f);
m_focus_active = true;
m_focus_time = 0.0;
m_focus_duration = 0.6;
fly_to(hit.point, look, gauge_view_distance);
}
void editor_mode::gauge_spot(gauge_hit const &Hit)