17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 02:49:19 +02:00

feat(editor): curves over 180°, click to load curve

This commit is contained in:
maj00r
2026-10-02 23:14:03 +02:00
parent 9877ebe261
commit a392364f06
6 changed files with 143 additions and 14 deletions

View File

@@ -117,6 +117,18 @@ class editor_track
static straight find_straight(TTrack &Track, straight_tolerance const &Tolerance);
static std::vector<straight> find_straights(double const Minimumlength, straight_tolerance const &Tolerance);
static std::vector<TTrack *> straight_affected(std::vector<straight> const &Lines);
struct curve
{
TTrack *from{nullptr};
TTrack *to{nullptr};
double turn{0.0};
int reversals{0};
double radius{0.0};
double transition_in{0.0};
double transition_out{0.0};
double cant{0.0};
};
static bool find_curve(TTrack &Track, straight_tolerance const &Tolerance, double const Gauge, curve &Curve);
static void move_straights(std::vector<straight> const &Lines, std::vector<std::pair<glm::dvec3, glm::dvec3>> const &Ends);
static std::vector<TTrack *> relay(chain const &Chain, std::vector<segment_data> const &Pieces);
static void retire(TTrack &Track);