mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-22 05:34:58 +01:00
feat(physics): physical coupler model for the player's train and those it closes in on, plastic hit on solid buffers
This commit is contained in:
@@ -79,9 +79,16 @@ struct end_parameters {
|
||||
double damping{0.0}; // viscous damping of the devices, while pressed [N s/m]
|
||||
double link_stiffness{1.0}; // of the steel parts of the end, past the travel of the springs [N/m]
|
||||
double crush_force{std::numeric_limits<double>::max()}; // a hit on the buffers past their travel with this force crushes them [N]
|
||||
// coefficient of restitution of a hit on the springs gone solid: the steel of the housings and the underframe gives
|
||||
// for good rather than springing back, so the vehicles share their momentum rather than pass it on
|
||||
double solid_restitution{0.2};
|
||||
link_strength link;
|
||||
};
|
||||
|
||||
// the share of the energy of the relative motion a hit on the solid springs of the two ends takes, as the legacy
|
||||
// collision (ComputeCollision()) takes it: 1 - e^2
|
||||
double solid_hit_loss(end_parameters const &First, end_parameters const &Second);
|
||||
|
||||
// the weaker of the links of the two ends, which gives first; the same whichever end asks
|
||||
link_strength weaker_link(end_parameters const &First, end_parameters const &Second);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user