mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
refactor(editor): drop unused editor state and vertical leftovers of the route design
This commit is contained in:
@@ -245,7 +245,6 @@ recommendation recommend(double const Speed, double const Radius, limits const &
|
||||
auto const factor{Limits.gauge / (kGravity * 12.96)};
|
||||
auto const allowance{Limits.gauge * Limits.unbalanced / kGravity};
|
||||
result.radius_min = factor * Speed * Speed / (Limits.cant_max + allowance);
|
||||
result.vertical_radius = std::max(Limits.vertical_min, Limits.vertical_factor * Speed * Speed);
|
||||
if (Radius <= 0.0)
|
||||
return result;
|
||||
result.cant_equilibrium = factor * Speed * Speed / Radius;
|
||||
@@ -712,12 +711,11 @@ result fit_between(design const &Design)
|
||||
|
||||
r.vertex_chainages = vertexchainage;
|
||||
r.profile.push_back({0.0, Design.start.y, 0.0, 0.0});
|
||||
auto const radius{std::max(Design.norms.vertical_min, Design.norms.vertical_factor * Design.speed * Design.speed)};
|
||||
for (std::size_t k = 0; k < count; ++k)
|
||||
{
|
||||
auto const &vertex{Design.vertices[k]};
|
||||
auto const elevation{vertex.auto_elevation ? Design.start.y + (Design.end.y - Design.start.y) * vertexchainage[k] / std::max(r.length, 1e-6) : vertex.elevation};
|
||||
auto const elevation{Design.start.y + (Design.end.y - Design.start.y) * vertexchainage[k] / std::max(r.length, 1e-6)};
|
||||
r.vertex_elevations.push_back(elevation);
|
||||
auto const radius{vertex.vertical_radius > 0.0 ? vertex.vertical_radius : std::max(Design.norms.vertical_min, Design.norms.vertical_factor * Design.speed * Design.speed)};
|
||||
if (vertexchainage[k] <= r.profile.back().chainage + 1e-3)
|
||||
continue;
|
||||
r.profile.push_back({vertexchainage[k], elevation, radius, 0.0});
|
||||
|
||||
@@ -45,9 +45,6 @@ struct vertex
|
||||
double transition_in{0.0};
|
||||
double transition_out{0.0};
|
||||
double cant{0.0};
|
||||
bool auto_elevation{true};
|
||||
double elevation{0.0};
|
||||
double vertical_radius{0.0};
|
||||
bool reverse_turn{false};
|
||||
bool compound{false};
|
||||
double radius2{600.0};
|
||||
@@ -83,7 +80,6 @@ struct recommendation
|
||||
double cant{0.0};
|
||||
double radius_min{0.0};
|
||||
double transition{0.0};
|
||||
double vertical_radius{0.0};
|
||||
};
|
||||
recommendation recommend(double const Speed, double const Radius, limits const &Limits);
|
||||
double transition_length(double const Speed, double const Radius, double const Cant, limits const &Limits);
|
||||
|
||||
@@ -2261,12 +2261,6 @@ void editor_track::retire(TTrack &Track)
|
||||
on_retire(Track);
|
||||
}
|
||||
|
||||
void editor_track::revive(TTrack &Track)
|
||||
{
|
||||
Track.m_editorremoved = false;
|
||||
commit({&Track});
|
||||
}
|
||||
|
||||
void editor_track::rebuild_geometry(TTrack &Track)
|
||||
{
|
||||
auto §ion{simulation::Region->section(Track.location())};
|
||||
|
||||
@@ -222,7 +222,6 @@ class editor_track
|
||||
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);
|
||||
static void revive(TTrack &Track);
|
||||
|
||||
static std::string material_name(material_handle const Material);
|
||||
static material_handle fetch_material(std::string const &Name);
|
||||
|
||||
Reference in New Issue
Block a user