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
618a3004dd
feat(track): at an obtuse crossing the flangeway between the point rail and the knuckle rail is closed below by a filler block at the height of the webs, from the meeting point to where the point reaches its full profile, so the ballast no longer shows through the gap; the rail profile gives the middle of its web and the height where its head starts above it
2026-10-17 23:28:41 +02:00
maj00r
9448bd8c70
feat(track): where two rails share a running surface it takes the texture whose running surface is brighter; the brightness is read from the texture file over the u range of the rail head top, the shared parts are the block of crossing grooved rails, the nose of an acute frog from its tip to the end of the V, the through rail across a wide or grooved crossing, the frog of a switch, and the stock rails of a switch with frogs up to half the blade length where the blade grows to a full head
2026-10-17 23:28:41 +02:00
maj00r
2f8aeb24c0
fix(track): a crossing of grooved rails is one flat block where their lofts overlap; the rail cut by the other covers the roundings of the rail going through, the tops in the block are flat in one texture, the plates of the V reach up to the rail top, the walls of the cuts are lit and textured as walls, and the nose between two flangeways starts blunt at the width of a nose tip instead of a thin sliver standing in the groove
2026-10-17 23:28:41 +02:00
maj00r
9343ebcb13
feat(track): frogs and crossings for every rail profile; grooved rails share the floor of their grooves where they cross and need no check rails, the V beside the rail going through is one block where the lofts of the rails overlap; the nose of an acute frog of flat rails is filled between its legs as far as their lofts overlap, like a cast insert
2026-10-17 23:28:41 +02:00
maj00r
405081e81c
refactor(track): the rails of the two paths of a switch are laid by one loop for left and right switches alike, the side of the blade of a path and the blade itself come from one place, used when a switch is made, thrown and its frog found
2026-10-17 23:28:41 +02:00
maj00r
809b48c2ab
refactor(track): the blades of a thrown switch are drawn again with their cut faces by one helper instead of four copies; self-test command switches sets every switch to a path and moves its blades there at once
2026-10-17 23:28:41 +02:00
maj00r
36fb68d8f9
perf(track): the gauge lines, crossings and check rails of a track are kept until a track is made, rebuilt or removed, so laying the rails of a track no longer recomputes its neighbours' crossings for each wing rail; self-test command railtime times planning the rails of all tracks
2026-10-17 23:28:41 +02:00
maj00r
2159d682f2
feat(track): rails are cut where they cross other rails: a switch with the key frogs draws its frog, wing rails and check rails from its rails, tracks crossing other tracks get acute frogs with wing rails and check rails, obtuse points, guard rails along the quadrilateral of a crossing between 20 and 45 degrees and broken rails with guard rails at wider angles, the track going through chosen by name; sizes come from the rail profile, only for the profiles default, s60, uic60 and s39, others are laid whole; rail ends left open are closed with their cross-section; switches of older sceneries, with check rails in their includes and no key, are drawn as before
2026-10-17 23:28:41 +02:00
maj00r
ea341af27a
feat(editor): a switch path can be a chain of pieces: the attributes pieces1 and pieces2 keep the parts of each path after the classic bezier, which stays as the approximation older versions read and log the attributes as unknown; the simulation drives, draws and maps a path along its pieces by distance, pieces that don't join the ends of the path are reported and the bezier used; the catalogue Rz switches get the diverging path as the arc of their radius and the straight after it, moving, rotating and mirroring a switch carry the pieces, reshaping a path by hand drops them; self-test commands switchpieces and switchbreak
2026-10-12 18:32:23 +02:00
jerrrrycho
8125166690
Fix/sonar reliability security ( #205 )
...
* fix(sonar): addressing reliability/security issues
* fix(sonar): addressing reliability/security issues
* fix(sonar): addressing reliability/security issues
* fix(sonar): addressing last reliability/security issues
* fix(sonar): addressing last reliability/security issues
* fix(sonar): addressing last reliability/security issues
* refactor(sonar): imgui update
* refactor(sonar): hasChar revert
2026-10-11 15:31:45 +02:00
27a94509c4
feat(roads): right of way and lane turns at junctions, road weights, kerbs, medians and forking roads, banks to the ground, roundabouts, pedestrian crossings, spawn sets by count; fix(editor): model skin export, placement on the ground under the orthophoto
2026-10-04 01:55:35 +02:00
maj00r
7ede96df5f
chore(editor): cleanup comments
2026-10-03 02:41:34 +02:00
maj00r
b93c5dde60
feat(editor): edit tracks loaded from the scenery
2026-10-03 02:41:34 +02:00
maj00r
e46fe6d06c
refactor(track): reusable segment init, geometry rebuild, cell removal
2026-10-03 02:41:30 +02:00
jerrrrycho
d85096f64d
reformat: remove redundant parentheses
2026-06-30 21:19:46 +02:00
jerrrrycho
bf147dd155
refactor: replace null with nullptr
2026-06-29 02:48:25 +02:00
1be56de0fa
Add sleepermodel optional parameter for tracks
2026-05-19 22:10:47 +02:00
docentYT
aaf0352ff6
Remove not needed import
2026-05-02 14:54:40 +02:00
docentYT
7081dab3c2
Replace RadToDeg and DegToRad with glm::degrees and glm::radians
2026-05-02 14:51:13 +02:00
docentYT
d1f16411a1
Replace clamp with std::clamp
2026-05-01 22:14:29 +02:00
docentYT
ca839652bf
Use the sq function to force constexpr expressions for numeric literals and enhance readability
2026-04-28 13:23:14 +02:00
docentYT
6be1b0886d
Remove sad workaround
2026-04-28 01:23:53 +02:00
docentYT
cba106e22e
Use glm::length2 instead of glm::length where possible
2026-04-27 23:27:08 +02:00
docentYT
7d561f8443
use glm::length2 instead of glm::dot for squared length
2026-04-27 23:13:12 +02:00
docentYT
ed28eff066
use glm instead of Math3D in world
2026-04-27 00:36:03 +02:00
jerrrrycho
9f43dca48b
refactor: create paths namespace instead of global variables
2026-03-15 11:55:30 +01:00
copilot-swe-agent[bot]
7e49aa8740
Rewrite #includes to use explicit subdirectory paths
...
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com >
2026-03-14 19:16:48 +00:00
copilot-swe-agent[bot]
0531086bb9
Reorganize source files into logical subdirectories
...
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com >
2026-03-14 19:01:57 +00:00