17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 19:37:44 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
maj00r
d25f20a56c feat(track): 3D sleepers and switch timbers, blade heel and throw from templates, one rail carving pass
- sleepers3d / sleepers3dplain / sleepers3dbed in eu07.ini: timbers put together from the begin, main and end parts of a model
  and stretched to their length, plain sleepers of their own model; tracks whose plain sleepers would touch are laid as one
  cluster, lines of timbers led by priority and turned to the bisectors of frogs and crossings at a limited rate, whole timbers
  under crossings, split ones between tracks with room to part them, gaps filled per rail and overlaps shortened or dropped;
  clusters worked out in a background thread while driving, on demand in the editor
- the ballast can be left out under the beams (sleepers3dbed no)
- blades get their heel and throw from the switch template or blades <heel> <throw> in the scenery; blades of double switches
  run on into the track linking them to the next switch
- rail cutting at frogs, wing rails, movable noses and switch crossings done by one carving pass (RailCarve)
- tint of the rail treads applied to the colour only, without the matte band at the frog
- a switch trailed through with a movable nose set the other way derails the vehicle
- self-tests: sleepercheck, sharedzones, beamsnear, throw, sleepersbg
2026-10-17 23:32:43 +02:00
maj00r
306555a654 feat(track): a check rail is held to its running rail by spacer blocks every 0.5 m along its straight part, laid in the same way as the spacers of a guard rail at a wide crossing, below the head from the web of the running rail to the face of the check rail, so the flangeway stays open above them; a check rail replaced by a wing rail gets none; the spacing of spacers and castings is shared by guard rails and check rails 2026-10-17 23:29:08 +02:00
maj00r
16f3a63bb2 fix(track): at a crossing at nearly a right angle the tip of a guard rail under the wheels of the other track takes their rolling surface on its top, bright under a used track and rusty under an unused one, with the sides staying matte, instead of the whole tip going matte because the plain span of the tread was laid as a band between two lines it does not have; plain spans of treads are painted in the debug colour of EU07_EDITOR_TREADS too 2026-10-17 23:29:08 +02:00
maj00r
7d130be3de fix(track): at a crossing at a wide angle the floor of the flangeway between a running rail and its guard rail is laid only where real crossings have it, as the cast floor of each corner up to 0.3 m past the rail of the other track and as separate spacer blocks every 0.5 m along the rest of the guard, and the floor takes its texture across its width at the scale of the head instead of one stretched column; the wheels of the other track roll over a guard rail across their whole tread instead of only over the head of their rail; and when the tracks cross at nearly a right angle the treads of the other track are laid as plain spans along the rail instead of lines running almost straight across it, which left fins standing up at every edge of a tread 2026-10-17 23:29:08 +02:00
maj00r
ae4e828ed2 feat(track): at a crossing at a wide angle the tread of the other track is laid where its wheels roll over the mitred corners: the part of a guard rail under the running rail of the other track becomes a running surface in the shared tread material instead of matte, and running rails of different materials share the tread over the rolled band of the other track instead of over a square span; wide_tread draws the edges of the band from the crossing itself, since the gauge lines meet in one point at right angles, and a tread gives its own fade, widened for bands lying across the rail; treaded keeps the matte parts of a guard rail matte, lay_treads splits guard rails at their treads, and a piece of no triangles is not inserted 2026-10-17 23:29:08 +02:00
maj00r
f03c6b8ebc feat(track): at a crossing at a wide angle every head of one track meets every head of the other in a mitre from the corner of their flangeways to the far corner of the heads, the way the corners of a cast diamond look, so the running rails and guard rails of both tracks form closed corners and only the flangeways stay open, instead of the rails of one track going through and the other ones glued to their sides; corner_cut gives the mitres, as bends of the running rails and as miters of the guard rails; the fit of a loft end to the profile of another rail and the field and gauge outlines of the rail profile are gone with the gluing 2026-10-17 23:29:08 +02:00
maj00r
4016c4ce04 feat(track): the guard rails of a crossing at a wide angle reach a metre past the rails of the other track instead of 0.3 m and open their flangeway over 0.6 m at the ends, the way the guard arms of the corners of a diamond run out on real crossings, the reach and the flare are the constants guard_reach and guard_flare shared by the plan and the layer 2026-10-17 23:29:08 +02:00
maj00r
08d439a2f6 refactor(track): the cap of a lofted rail end takes its texture from cap_texture and its triangles from ear_clip instead of computing both inside cap_loft 2026-10-17 23:29:08 +02:00
maj00r
3d1c97442c refactor(track): the plates, fillers and check rails of a rail drawing are made from one box_profile and one helper for both sides, and the colour of a tread is sampled by sample_dds and sample_image into one colour_mean, a block of a DXT texture decoded by add_dxt_block, instead of one function 2026-10-17 23:29:08 +02:00
maj00r
22e378b910 refactor(track): a rail is laid by the class TTrack::rail_layer instead of one function of lambdas sharing a current material and the bends and fits of the ends; a piece of rail is a rail_piece value with its material, the ends of a run are passed as piece_ends, the bands across the top of the head of a running and of a shared tread are laid from one table each by lay_top, the guard and check rails take their flared offsets from one helper, and the grooved profile is split by split_grooved and cut by top_cuts 2026-10-17 23:29:08 +02:00
maj00r
f67380f843 refactor(track): the rail code is split by concern into gauge lines, crossings and check rails, rail materials, rail profile measuring, planning the cuts and laying the geometry, instead of one TrackRails.cpp; rail_offset reuses nearest_distance and lateral; TTrack::rail_dimensions measures the profile through track_rails::measure_rail 2026-10-17 23:29:08 +02:00