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

feat(editor): the hectometre posts go by the kilometrage of the line where the Kilometrage tool sets it, its jumps too, a post at a jump of the km on from it or of the km it is reached at, the km given at the point still there as a choice; the posts standing go with the place of their number nearest to them

This commit is contained in:
maj00r
2026-10-22 14:33:18 +02:00
parent 7cc8e5bb9a
commit 435b80eb55
6 changed files with 240 additions and 101 deletions

View File

@@ -41,6 +41,7 @@ class hekto_tool final : public editor_tool
double chainage{0.0};
glm::dvec3 position{0.0};
double yaw{0.0};
int growth{1}; // 1: the kilometrage grows along the line there, -1: against
int standing{-1}; // post already there with this number
};
struct hekto_found
@@ -54,6 +55,7 @@ class hekto_tool final : public editor_tool
bool wrong{false};
bool duplicate{false}; // another post with the same number stands nearer to its place
bool outside{false}; // its number belongs past the ends of the line
int place{-1}; // of the posts, the one with its number nearest to it
};
struct hekto_state
{
@@ -62,6 +64,9 @@ class hekto_tool final : public editor_tool
double km{0.0};
bool km_read{false}; // the kilometrage was read from the posts already standing
int growth{1}; // 1: grows along the line, -1: against
std::string line; // of the kilometrage set for the line in the Kilometrage tool the posts follow, empty for the one given here
std::string line_set; // the line the Kilometrage tool sets the kilometrage of at the point, empty for none
bool own_km{false}; // the kilometrage given here, even where the line has one set
int side{1}; // 1: to the right of the growing kilometrage, -1: to the left, 0: alternately
double offset{3.0}; // m from the axis
int style{0}; // nowy, stary, zgnity, mixed