mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 23:32:06 +01:00
feat(editor): the SRK tool shows the block of each line out of the station and places the SHP resonators: the automatic or the semi-automatic block chosen in a table of the lines, by hand or by the block signals standing along it, a double-track line taking the automatic one, a single-track one the other, kept in the record of the station; the block signals placed only on the lines of the automatic block, the warning discs only on those of the semi-automatic one. The heads checked for their resonators 200 m before an entry signal, a block signal and a warning disc and at an exit signal telling of the next one, 5 m either way, those of the old sceneries found by any event ending with _shp within 100 m; the ones missing placed as rezonator.inc with their events on the tracks the trains run into, at a joint within 5 m, else the track cut, in one step of undo. A signal stands by the track of its read event only when it lies near it, else by the nearest track, so a read event put on a track before the signal no longer shifts its routes
This commit is contained in:
@@ -249,4 +249,18 @@ double path_speed(TTrack const &Track, int const Path);
|
||||
// the routes of the trains from each of the posts given on through the switches, none longer than the limit
|
||||
std::vector<std::vector<route>> routes(std::vector<post> const &Posts, std::vector<std::size_t> const &From, double const Limit);
|
||||
|
||||
// a point of the way of the trains up to a signal
|
||||
struct approach_point
|
||||
{
|
||||
TTrack *track{nullptr};
|
||||
int path{0};
|
||||
int facing{1}; // the trains run 1: towards the end of the path, -1: towards its start
|
||||
glm::dvec3 point{0.0};
|
||||
glm::dvec3 way{0.0, 0.0, 1.0}; // the trains run, in the plan
|
||||
double distance{0.0}; // m, before the signal
|
||||
};
|
||||
// the way of the trains running past the point of the track the way given, back along the tracks they come by up to the distance
|
||||
// before it or the end of the tracks, a metre or so apart: into a switch from its start along its straighter path
|
||||
std::vector<approach_point> approach(TTrack &Track, glm::dvec3 const &Point, int const Facing, double const Distance);
|
||||
|
||||
} // namespace station
|
||||
|
||||
Reference in New Issue
Block a user