mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 10:31:01 +01:00
fix(track): the cab keeps the shake a track doesn't replace, and the editor redraws all that an edit changes
The side sway from the lateral acceleration now goes off only on a track with a sideways value, and the random jolts on one with a vertical or a sideways value. Dips at the rail joints and cross level alone replace neither. On a switch it goes by the path set and what its joined tracks allow. An edit in the editor also rebuilds the other switches of a joined group with the tracks they meet, and the tracks of a rail run whose joints moved. Removing a track does the same. While dragging, the tracks further off wait until the drag ends. The clatter of a bogie's axles was right: the followers stand at the pivots and the offsets are the places of the wheel sets. The misleading name goes. Also what Sonar had left: a parameter as a span, a const method, a struct and its member apart, commented out code, and a function of the grading tool split, with the same output.
This commit is contained in:
@@ -348,6 +348,8 @@ public:
|
||||
// the unevenness the track declares, on a path of a switch
|
||||
track_uneven::amounts uneven_declared( int const Path = 0 ) const;
|
||||
bool is_uneven() const;
|
||||
// the unevenness along what the vehicles take now: the path set on a switch, with what the switches joined and the tracks by them allow
|
||||
track_uneven::amounts uneven_underway();
|
||||
// the unevenness at a distance along a path, meeting the tracks joined at its ends
|
||||
track_uneven::amounts uneven_at( double const Distance, int const Path = 0 );
|
||||
// how much of the displacement a point of the profile at the depth takes
|
||||
@@ -358,6 +360,10 @@ public:
|
||||
double joint_dip( double const Distance ); // m
|
||||
// distance from the rail joint behind; negative: the track has no joints that dip
|
||||
double rail_phase( double const Distance );
|
||||
// whether the rail joints are elsewhere than the geometry of the track has them
|
||||
bool rail_joints_moved();
|
||||
// the uneven tracks whose values go by the switches among the given: all the switches joined to those, and the tracks they meet
|
||||
static std::vector<TTrack *> switch_followers( std::vector<TTrack *> const &Tracks );
|
||||
void ConnectionsLog();
|
||||
bool DoubleSlip() const;
|
||||
static void fetch_default_profiles();
|
||||
@@ -397,6 +403,7 @@ private:
|
||||
};
|
||||
void settle_rail_run();
|
||||
rail_run m_railrun;
|
||||
rail_run m_drawnrun; // as the geometry has it; stamp -1: it has no joints that dip
|
||||
// the value along each path of a switch: the lowest of that path in the switches joined, 0 next to a track with none.
|
||||
// And at the ends of the paths, by what meets there: the other path at the common end, the path of a switch joined
|
||||
struct switch_stray {
|
||||
@@ -411,10 +418,10 @@ private:
|
||||
// the lowest value of the paths ending at the point
|
||||
track_uneven::amounts switch_paths_at( glm::dvec3 const &Point ) const;
|
||||
// what a plain track comes to at its end, where it meets the other one
|
||||
track_uneven::amounts uneven_met( TTrack *Other, glm::dvec3 const &Point );
|
||||
track_uneven::amounts uneven_met( TTrack *Other, glm::dvec3 const &Point ) const;
|
||||
// the value of a switch where a track joined to it meets it
|
||||
track_uneven::amounts switch_uneven_at( glm::dvec3 const &Point );
|
||||
static int s_layoutstamp; // bumped when tracks are joined or changed, invalidates the two above
|
||||
static int s_layoutstamp; // bumped when tracks are joined or changed, invalidates the two above. Once per change: a run is walked again after each
|
||||
void create_road_profile( gfx::vertex_array &Output, bool const Forcetransition = false );
|
||||
void create_road_side_profile( gfx::vertex_array &Right, gfx::vertex_array &Left, gfx::vertex_array const &Road, bool const Forcetransition = false );
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user