17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 12:49:13 +01:00

feat(editor): the chunks waiting for the terrain model and the tiles of the orthophoto asked for and not shown yet outlined on the ground where they will be, pulsing, blue and orange, named where the name fits: at the heights of the terrain beside them or of the model, else level with the nearest chunk or track

This commit is contained in:
maj00r
2026-10-24 18:31:24 +02:00
parent 336c940c28
commit 2ae10f5901
6 changed files with 120 additions and 0 deletions

View File

@@ -853,6 +853,20 @@ std::pair<std::size_t, std::size_t> editor_orthophoto::grounded() const
return result;
}
std::vector<std::pair<glm::dvec2, glm::dvec2>> editor_orthophoto::waiting() const
{
std::vector<std::pair<glm::dvec2, glm::dvec2>> result;
if (false == m_enabled || m_map_level > 0)
return result;
for (auto const &entry : m_tiles)
if (entry.second.level == 0 && entry.second.requested > 0 && false == entry.second.empty)
{
glm::dvec2 const corner = tile_corner(entry.first);
result.emplace_back(corner - glm::dvec2{tile_size}, corner);
}
return result;
}
bool editor_orthophoto::sampled_height(tile_key const &Own, double const X, double const Z, float &Height) const
{
auto const key{camera_tile({X, 0.0, Z})};