mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 10:50:28 +01:00
feat(editor): the plain straight a switch branch leads into gets its end moved to where the branch lands instead of a short straight being added: shortened when it reaches past, lengthened when it ends short; straights drawn with handles count (the trimmed end loses them), so a switch slid up to a track that ends close to the crossing now places
This commit is contained in:
@@ -221,13 +221,14 @@ class editor_track
|
||||
double shortfall{0.0};
|
||||
bool reverse{false};
|
||||
double insert{0.0};
|
||||
glm::dvec3 landing{0.0};
|
||||
std::vector<segment_data> pieces;
|
||||
};
|
||||
static double branch_radius(segment_data const &Diverging);
|
||||
static double reverse_insert(double const Speed);
|
||||
static double diverging_speed(double const Radius);
|
||||
static std::optional<double> branch_shift(branch_end const &From, glm::dvec2 const &Slide, double const Radius, branch_end const &To, double const Kink);
|
||||
static branch_link link_branch(branch_end const &From, double const Radius, branch_end const &To, double const Kink, double const Insert);
|
||||
static branch_link link_branch(branch_end const &From, double const Radius, branch_end const &To, double const Kink, double const Insert, bool const Stretch);
|
||||
|
||||
struct snap_target
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user