17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-07 00:22:56 +01:00

perf(sleepers): the rails of each track for the fastenings worked out once and kept until its geometry is made again, it goes far or the crossings change, not again for every track laid around it; the fastenings laid only out to 30 m past where they're drawn, the tracks further out keeping their beams to lay them on as they come near; out past 50 m the tracks laid while the laying in a frame took under 2 ms, the rest in the frames after

This commit is contained in:
maj00r
2026-10-24 00:23:50 +02:00
parent 2e00619d7f
commit f155956669
8 changed files with 225 additions and 114 deletions

View File

@@ -87,6 +87,12 @@ double constexpr pad_narrowest { 0.02 };
double constexpr fastening_overlap { 0.01 };
// how far from the camera the fastenings are drawn at most
double constexpr fastening_range { 120.0 };
// how much further out the fastenings are laid, there as the camera comes near
double constexpr fastening_lead { 30.0 };
// how near the camera the beams of a track are laid at once as they're needed; further out while the laying in a frame took less
// than the budget, in ms, the rest left for the frames after
double constexpr lay_near { 50.0 };
double constexpr lay_budget { 2.0 };
// how many tracks a cluster takes at most
std::size_t constexpr cluster_cap { 256 };