mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 15:30:21 +01:00
fix(editor): the plan warns of the curved track adjoining a curve only where the curvature jumps there: a curve going on from the diverging track of a switch at its radius (R 300 after R 301 in wsd) no longer has it. The side the adjoining track turns to is taken with its radius into the chain and the design, and the curvature the design meets it with, signed by its turn, compared with it, within 5%; a design kept without the side is taken for turning its way. Unit test: R 300 from the very start after R 301 turning the same way gives no warning, turning the other way or starting with a straight does
This commit is contained in:
@@ -272,6 +272,9 @@ class editor_track
|
||||
glm::dvec3 end_direction{0.0};
|
||||
double start_radius{0.0};
|
||||
double end_radius{0.0};
|
||||
// the side the adjoining track turns to there, going from the start to the end: 1 left, -1 right, 0 straight
|
||||
int start_turn{0};
|
||||
int end_turn{0};
|
||||
double length{0.0};
|
||||
double velocity{-1.0};
|
||||
double radius{0.0};
|
||||
|
||||
Reference in New Issue
Block a user