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

3469 Commits

Author SHA1 Message Date
maj00r
438cb4ea3a feat(editor): a join of ends side by side shifts the track with reverse curves over the whole gap
The reverse curves of a join start and end at the joined ends, with the
largest radius that fits, so a shift of the track spacing (4 -> 4.75 m
over 400 m) is one S instead of two curves with straights around them.
A straight or a single arc with a kink at its ends, though still under
the joints check, comes after the smooth curves among the variants; a
practically exact one stays first.

An element under 1 mm, like the straight left between the reverse
curves by the radius fit, no longer drops out of the pieces and leaves
a gap: the neighbouring piece takes it over.
2026-10-19 18:40:43 +02:00
maj00r
ffdccd90ed fix(track): the carving scan's near() clashed with the near macro of windows.h on MSVC 2026-10-19 18:37:44 +02:00
maj00r
93a45fb632 fix(editor): a slip goes to the crossing under the cursor or nowhere, shown before the click
A slip went to the crossing of the selected straight with another straight within 40 m of the click. When the track under the cursor wasn't taken as a straight (a slight curve, a switch), the slip silently went to another crossing up to 40 m away. A double slip within 25 m of the click was replaced, even when the click was on a free crossing.

- The crossing nearest the cursor, within 12 m, is found among all the rail tracks. A slip goes only there; when that track is a curve or a switch, the tool says so.
- A double slip is replaced only when it is nearer the cursor than any crossing.
- The cursor is taken at the height of the straight under it, so on a grade the 3D view doesn't put the click metres away from the track.
- Before the click, the view marks the crossing the slip goes to, with its two straights, or the reason it can't go there.
2026-10-19 18:20:41 +02:00
maj00r
59ee32da58 feat(editor): the joints check finds the tracks lying off the terrain model
The joints check also compares the tracks with the terrain model (NMT), every 5 m. Bridges, tunnels and tracks over others are left out.
- Each path lying higher or lower than the model by more than the threshold (0.5 m by default) is listed once, at its farthest place off.
- The places are compared with the same offset the model has against the scenery; a scenery not fitted to the model as a whole is measured about its median.
- The squares of the model are loaded in the background, and the check waits for them with a progress bar.
- These entries can't be fixed from the list. In the top view, the overlay shows the issues over the whole screen.
- Self-test: jointsmodel <threshold>.
2026-10-19 17:17:01 +02:00
maj00r
d1dbd40566 feat(editor): the top view of the tracks draws the terrain to the corners of the screen, the ballast optional
- In the top view of the tracks work area, the renderer's reach is the half diagonal of the screen. It used to be three extents, which cut wide windows short.
- Cells far from the camera no longer draw only their tracks: the terrain shapes are drawn too. Models keep their own ranges.
- In that view, the heightmap streamer loads chunks as far as the corners, up to 50 km. The detail comes from the size of a pixel, not from the distance.
- The walk over the chunks around the camera is skipped while it would ask for nothing, so a wide reach costs little.
- A setting, kept in the editor settings, leaves out the ballast of the railway in the top view, so the ground under the tracks shows. It is in the View menu and next to the extent slider.
- Self-test: ortho <extent> [noballast|ballast], orthophoto off.
2026-10-19 17:10:27 +02:00
maj00r
97be54e688 feat(editor): the vertical profile shows the terrain model, the terrain follows it, the camera follows the plot
- The plot draws the ground of the terrain model (NMT) as measured, before any earthworks. The squares under the route are fetched in the background. The tooltip gives the grade line's distance from the model.
- Applying a profile lays the formation of the changed tracks anew, or reshapes the route's earthworks when there are any, so the heightmap terrain follows the new grade line. The terrain step is joined to the track step: one undo takes both back.
- In 3D and in the top view, the camera shows the part of the route the plot shows once the plot stops moving. It keeps clear of the floating plot window. A toggle turns this off.
- nmt_shape_tracks can shape only the given tracks, removing the modifiers of their paths that are gone.
2026-10-19 17:10:20 +02:00
maj00r
fe2cd6a09a fix(track): portal tracks were saved as "track none"
The export took the category of the track from the whole flag word, so a portal track, whose flag word carries 0x100 next to the category, was written as "track none". The loader then fails on that track with no segment. The category is now taken from the low four bits.
2026-10-19 17:10:06 +02:00
maj00r
949965009b fix(editor): the templates looked for in the background from the start, the panels don't wait for them
The include bank read every .inc of the scenery directory on the first use, on the main thread: opening the
switch panel or selecting a switch stopped the editor until all of them were read, which on a large scenery
directory under Windows takes long. The bank now starts looking as the editor starts, in the background,
and the main thread only reads the descriptions once the files are read.

- the switch drives, turntables and signals are read again from the bank when it changes; the panels show
  "Looking for the templates..." meanwhile, only the edits which need the templates wait for them
- the sweep tool takes the templates from the bank instead of looking through the scenery directory again
- a folder linked into one of its own subfolders no longer leads the walk in circles
- the log tells how many templates were found and how long it took
2026-10-19 16:21:55 +02:00
maj00r
ff1710d9ea feat(editor): labels for a layman, light at the start; whole sceneries fitted to the terrain model
Labels:
- every button, field, tooltip and message of the editor reread for a beginner: short nouns for the fields with the
  sentence in the tooltip, the less used options under More settings, one glossary (field of work, template, track,
  grade), sides told from directions, degrees and per mille as signs, messages built from one format string
- plural forms through STR_P; the last entry of a po file is read too, and the Polish plural rule is in the header
- lang/editor_pl.po: the code pass entries merged, 391 entries no code uses and 3 duplicates dropped
- roads: the notes and errors naming a road translated; the build options and the layout fold the texture length,
  kerb sizes, traffic share, roundabout part, height over the ground and junction speed limit under More settings, the
  lanes start folded

Grade lines fitted to the terrain model (NMT), a line or the whole scenery at once:
- fit_ground: a robust fit on nodes 5 m apart; the ground parting from the line (a bridge, a viaduct, a wall) is gone
  past rather than followed, the bends keep off the switches as far as their curves reach, a run of bends the same way
  is one point of intersection, a curve with no room is as sharp as the room lets it be
- the ends of the line and the other paths of its switches leading into lines fitted already bound the line by what
  the tracks between can climb; ends meeting in the plan, laid apart in height by hand, are joined before the run
- apply_profile: the paths are split where split_path takes the parameter (a straight was cut in the wrong place, into
  pieces of a few centimetres the game takes for zero length), no piece shorter than the margin; the paths off the
  ends of the route are brought to its height
- Bytom: 1600 lines, grade breaks at the joints 89 -> 20; Tarnowskie Gory: 848 lines, 223 -> 3; no step over 2 cm
2026-10-19 15:27:50 +02:00
maj00r
5a00d88be9 feat(editor): a scenery begun from nothing is asked for its terrain as the first track is laid
With the lay tool on, a scenery with no tracks nor terrain chunks gets the offer of the terrain model and the aerial photos
around the camera; without a place yet it asks for the PUWG 1992 coordinates of this point, as geoportal.gov.pl gives them,
and keeps them as the place of its orthophoto. The offer can be turned off (editor setting terrain_offer). Self-test
nmtoffer.
2026-10-18 13:02:01 +02:00
maj00r
5af699fba4 feat(editor): heightmap terrain from the terrain model of GUGiK, fitted to the tracks of the scenery
- editorNmt: squares of 500 m of the NMT at 1 m from the WCS service of geoportal.gov.pl, as GeoTIFF, fetched in the
  background, kept in editor/cache/nmt and sampled in the coordinates of the scenery, placed as its orthophoto is
- the terrain panel's Terrain model section: Fit to the tracks moves the model up or down by the median of the
  differences to the formation of the tracks (Biała Podlaska, built at 0: -145.73 m, 0.28 m around it); Along the tracks
  and Around the camera make the chunks as the model comes in; each path gets its formation and slopes 1:1.5 as a modifier
  of the terrain, laid over each other into one corridor, bridges and tunnels keep the model; the orthophoto is turned
  on and laid onto the new ground
- the http client of the orthophoto in editorHttp, shared; fill_from_nearest in editormodeshared.h
- after the generator of Hirek (MaszynaTerrainGenerator): the WCS requests, the cache of squares, the corridor by envelopes
- self-tests nmtfit, nmtmake, nmtwait
2026-10-18 12:56:25 +02:00
maj00r
16348c655a refactor(editor): the track mode split by tool instead of one file of 6900 lines
- editormoderoute.cpp: the route design, its kept records and digitizing
- editormodestraights.cpp: the plan tool: straights, the detour, the curve fit
- editormodelay.cpp: laying track, free ends and extending, the build tools
- editormodeswitchplace.cpp: placing switches, crossovers and links, double slips, curved switches
- editormodetrack.cpp keeps the selection, the snapshots, the tabs, the inspector and the path panel, the hints
- the sizes of the handles and reaches and the small helpers they all use in editormodetrackshared.h

The code is moved as it was.
2026-10-18 02:24:04 +02:00
maj00r
4912199bd1 refactor(editor): the self-test commands in a file per group instead of one file of 4200 lines
editormodeselftest.cpp keeps the dispatch, the list of the commands and the step; the groups go to
editormodeselftest{scene,sleepers,sweep,track,switch,join,signal,terrain,rails}.cpp, the sleeper commands (beams,
sharedzones, sleepersbg, beamsnear, sleepercheck) in a group of their own; the frame count and one_line shared through
editormodeselftest.h. The output of geomhash, sleepercheck, wings, space, guards, crossings and switches is the same on the
seven sceneries of the regression.
2026-10-18 02:18:36 +02:00
maj00r
9474293af7 fix(editor): signals move along their track again, and the editor finds the descriptions of the templates beside the game data
- a press on the mast of a selected signal grabbed the gizmo, whose up axis runs along the mast, and lifted the signal
  instead of moving it along the track; the gizmo gives way over a signal and while one is dragged
- dragged beside its track, off every track, the signal follows the nearest place of the track it stands by instead of
  staying put
- a drop away from any track, and a signal in a file the editor doesn't change, say so instead of doing nothing
- a template without a //$e description of its own takes it from editor/templates/<its path in the scenery folder>; the
  header scripts write there with --sidecar, leaving the templates alone, so a check of the game files by the store
  doesn't take the descriptions away (the descriptions written into the templates on 8.10 and 11.10 were gone, and with
  them every signal and drive the editor knew)
2026-10-18 02:08:19 +02:00
maj00r
52a762879c 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
2026-10-18 02:00:54 +02:00
maj00r
d222c833fc feat(editor): the tutorial says what the switch tool places now, the connection drag, More for the trainset and the gizmo option shorter 2026-10-18 01:52:33 +02:00
maj00r
979a3d1ce4 feat(editor): switch templates for the rail of the selected track, their names translated, shorter hints
- the template list shows the templates of the rail the selected track is laid with (railprofile s60/uic60: 60E1, s49:
  49E1, s42: S42), a box shows them all
- the words of the catalogue names are translated (movable nose, long, gauge, blades outside), the kind of a slip or a
  crossing its type says already is left out
- shorter hints of the switch tool, of More and of the missing drives
2026-10-18 01:50:56 +02:00
maj00r
3ba22aae10 feat(editor): a less crowded track editor and one choice of what the switch tool places
- the switch tool asks what to place: a switch, a slip switch, a crossing or a connection of tracks (crossover, double,
  scissors, ladder), with the templates and the options of that kind only and one line of how to place it with the mouse;
  the bar of hints says the same, the wheel keys of a connection included; panel in its own editormodeswitchtool.cpp
- templates are listed by their names, the lengths a and b and the rest of the label in the tooltip
- the panel of a selected switch shows its length, its type and its drive; the name, number, rail, kilometre and angle are
  under Details
- one toolbar: the tools are no longer drawn a second time down the edge of the view; the track tools show select, lay,
  plan, switch and parallel, the others behind More, which starts closed again (setting track_tools_all)
- the infrastructure tool has no button nor key
- the gizmo options start closed, the node bank isn't drawn in the track mode
- no drive models: said in plain words
- self-test switchkind
2026-10-18 01:47:06 +02:00
maj00r
e52d8d6e84 feat(editor): no frog, movable nose nor 3D sleeper model fields while these features are off in the build
The switch panel and the track properties show the frog and movable nose boxes only with track_features::crossings, and the
sleeper and timber model fields of the pack only with track_features::sleepers.
2026-10-18 00:58:55 +02:00
maj00r
d72fa51ce5 refactor(track): the sleeper layout split by concern instead of one TrackSleepers.cpp
- SleeperRules: the rules beams are laid by and the faults counted where the layout breaks them
- SleeperGeometry: plan helpers, beam boxes with their overlap and support tests and a grid of cells, shared by laying, filling
  gaps, keeping beams apart and checking instead of three copies of each
- SleeperPaths: sampled paths, how near they run and whether one carries another; the tracks near a track and the stretches of
  a path where a test holds, shared by paths_around/unsettle_around and shared_zones/zones_of
- SleeperFeatures: frogs and crossings the timbers turn to; SleeperLines: lines of beams, the rails they carry, where they part
- SleeperLayout: clusters and their layout, given the epoch instead of reading it; SleeperModels: the models of the beams
- SleeperWorker: the layouts kept per epoch and worked out in the background, behind a small interface
- TrackSleepers: the facade, laying the instances, the shared zones and the check
- sleepercheck reports a digest of all beams; geomhash skips empty chunks instead of crashing

The layout is unchanged: geomhash, sleepercheck with the digest, wings, space, guards, crossings and switches give the same
output on baltyk, zz_rozjazdy_id4, zz_rf_slips, zz_rf_wide, zz_slips_s42, zz_demo_przechylka and zz_connections.
2026-10-18 00:27:50 +02:00
maj00r
d3ac394a43 feat(track): frogs cut from the rails and 3D sleepers switched off in the build
track_features::crossings and track_features::sleepers, both off: the rails of plain tracks and of switches with the key
frogs are laid whole as before, and no sleepers or timbers are laid whatever sleepers3d in eu07.ini sets, the ballast kept
2026-10-17 23:39:23 +02:00
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
21eca4d9a6 fix(track): the tip of a blade is where the diverging track of the switch is broken into pieces near the start, as a template lays it from the scheme of the switch, so blades of 60E1 and 49E1 switches keep the cut tips of their tables at 1.248, 1.500, 2.165, 2.633 and 3.335 m and blades of S42 switches start at the end of their pre-blade stretch; without such a break a blade is told angled or tangent by its angle to the stock rail taken back to where it touches it, read from the nearest point of the other rail instead of its nearest sample, which took the blade of the main track of an S42-190-1:6,6 for a tangent one 2026-10-17 23:32:43 +02:00
maj00r
2c3ab90db5 fix(track): the tip of a blade lying tangent to its stock rail, as in 60E1 and 49E1 switches with cut tips, is where its theoretical arc gets 5 mm off the gauge face of the stock rail less the 125 mm the nose is planed over, instead of where it gets 3 mm off, so the tips lie 1.25, 1.60, 2.11, 2.63 and 3.34 m from the start of the switch at R190, 300, 500, 760 and 1200 as in the tables of these switches instead of 0.2 to 0.65 m nearer it; blades cutting into the stock rail at an angle, as in S42 switches, keep their tips 2026-10-17 23:32:43 +02:00
maj00r
22dbfb77e6 feat(editor): the tutorial lesson of laying track lists Ctrl+wheel for the radius and Shift+wheel for the shape, the lesson of fixing tells the gizmo can be turned off so the track isn't moved or stretched by chance, and the clips only draw each frame over the last one, so every GIF reader shows them alike 2026-10-17 23:32:43 +02:00
maj00r
0093791067 fix(stb): a GIF frame after one with the disposal "restore to previous" is restored from the frame two back in the output instead of from memory before the start of the output, which crashed the editor at random when the tutorial played its clips 2026-10-17 23:32:43 +02:00
maj00r
513daa52cc merge feat/rail-crossings: the split rail code, mitred wide crossings, guard rail treads, check rail spacers and frogs for every rail profile, with the geometric switch blades moved into RailCrossings, their shape in track_rails::switch_blade and the lowering of the head in loft_span 2026-10-17 23:32:43 +02:00
maj00r
970c6b52c5 feat(editor): clips of the tutorial lessons (looking around, laying track, curves, joining, switches, fixing), recorded in the editor with a badge of the mouse button or key in use 2026-10-17 23:30:37 +02:00
maj00r
a890087b8b fix(editor): the tooltip of the Terrain work area is translated 2026-10-17 23:30:37 +02:00
maj00r
dfeb1b9e23 fix(editor): the hints of laying and dragging track (start, starts at the end of, joins, no track fits, moved) are translated 2026-10-17 23:30:37 +02:00
maj00r
2a3d7f2e29 feat(editor): scripted mouse and keys of a self-test are delivered between frames like real input events, so a press seen by ImGui starts a drag as it does by hand; while a script drives the input the real mouse and keyboard are ignored 2026-10-17 23:30:37 +02:00
maj00r
92aa39ce6e fix(editor): dragging a point of a selected track no longer hands the drag to the gizmo, which jumped under the cursor and lifted the point in the plane of the screen; the gizmo is switched off while a point is dragged 2026-10-17 23:30:37 +02:00
maj00r
d0ebb01c2f fix(editor): a blank standard orthophoto tile that the geoportal sent while it was busy is removed from the disk cache and fetched once more, instead of staying a black hole in the map for good 2026-10-17 23:30:37 +02:00
maj00r
fc3f391e19 feat(editor): Help > Tutorial instead of First steps: seven lessons (looking around, laying track, curves, joining, switches, selecting and fixing, saving and driving), each with a looping clip from lang/editor_tutorial/<lesson>.gif played from the start on a click, the mouse buttons and keys drawn as pictures beside what they do, ticks that fill in when the user does it, a button that turns the right tool on, Back / Next and a dot per lesson that turns green when it is done 2026-10-17 23:30:37 +02:00
maj00r
6d0423b58a feat(editor): friendlier track editing: the point labels of a path are translated, a selected switch says that the turnout tool sets its geometry and offers Edit the switch (T), the geometry of its paths starts collapsed, the gizmo options show only on the tabs that use the gizmo, cancelling a laying clears its status and the status of a laying counts pieces and metres 2026-10-17 23:30:37 +02:00
maj00r
1dc61eaf31 feat(editor): scripted mouse and keys for the self-tests and the launcher: mouse, mouseat, glide, button, wheel, press, release, tap, type and softcursor drive the window as the user does, EU07_LAUNCHER_SELFTEST runs a script in the launcher and the scenery wizard and hands an editor script on with editorscript; selectat selects the path nearest a point, switchlink no longer takes over a crossover left in the tool, joints without points logs every issue with free ends 2026-10-17 23:30:37 +02:00
maj00r
58a0b0c864 Merge branch 'feat/track-join-ux' into feat/switch-blades 2026-10-17 23:30:37 +02:00
maj00r
20c4b6542e feat(track): the blades of a switch whose frog is cut from the rails are made from its geometry: the tip is where the gauge lines of both paths are 3 mm apart, the head reaches its full width where they are a head plus 0.5 mm apart, and the heel is the shortest blade whose open flangeway stays at least 58 mm with a throw of 160 mm bent like a cantilever from the heel, or straight when that does not fit as in slips; the blade is the whole rail profile lofted from the tip to the heel, cut along the head of the stock rail, with the head lowered by the drop of the blade half of the profile file towards the tip and back to the top at a 50 mm head, and thrown with knots every 0.5 m so the vertex count does not change between the positions; the stock rails get stations every 0.5 m along the blades so their curve follows the blade, the fixed rail behind the heel starts at the heel, the old blades take their segment count per path, and the self-test command blade logs the tip, heel, drop, flangeway and the gauge lines against x^2/2R and faults on a short flangeway, a heel past the throat or a change of the vertex count 2026-10-17 23:30:36 +02:00
maj00r
df2bbae449 Merge branch 'feat/rail-crossings' into feat/switch-blades
The frogs, crossings and check rails of feat/rail-crossings next to the track editor and the switch paths made of pieces of feat/track-join-ux. The self-test commands of the crossings (frog, geomhash, frogkey, guards, railtime, crossings and switches 0|1, now called throw 0|1 because the editor already has switches) go into their own group selftest_rails.
2026-10-17 23:30:36 +02:00
maj00r
3307cb94e8 feat(track): frogs, crossings, guard rails with their castings and spacers, check rails and shared running surfaces for every rail profile again, not only for tracks without a profile, default, s60, uic60 and s39; grooved profiles keep their shared grooves without check rails 2026-10-17 23:29:08 +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
df192fc5e0 fix(track): a point of a rail profile clamped to a cut edge of a lofted span is never moved past its own place nor raised past its own height, and the edges at a station are read from the side of the span being laid, so the rings at a step of an edge or at a bent mitred end no longer stretch points out of the profile and stand them up to 18 mm above the head as thin fins at the corners of wide crossings, and points of other cut rails sit exactly on the profile instead of up to a millimetre off it 2026-10-17 23:29:08 +02:00
maj00r
c5df55802f fix(track): the part of a guard rail under the running rail of the other track at a wide crossing takes the rail material of the other track, whose wheels alone roll there, instead of the brighter of the two, so a guard of a used track under an unused rail stays rusty, and it ends at the head of that rail without a tinted fade, since the guard itself is never rolled on 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