30#include "RailRunner.h"
32#include "trax/Simulated.h"
33#include "spat/Frame.h"
34#include "spat/Sphere.h"
72 static dclspc std::shared_ptr<Bogie>
Make(
Scene& scene, std::shared_ptr<Gestalt> pGestalt =
nullptr ) noexcept;
79 virtual
Gestalt& GetGestalt() const noexcept = 0;
297 dclspc
bool AreCoupled( const
Bogie& a, const
Bogie& b ) noexcept;
constexpr Force infinite__force
Dimensionated infinite values.
Definition DimensionedValues.h:368
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
constexpr Real _m(Length l) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1210
constexpr Real _N(Force f) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1551
Value< Dimension< 1, 1, -2 > > Force
Force.
Definition DimensionedValues.h:333
Value< Dimension< 1, 1, -1 > > Momentum
Momentum.
Definition DimensionedValues.h:335
The namespace provides classes and methods for spatial computations.
Definition Box.h:32
constexpr Position< Valtype > Origin3D
Origin of coordinate system.
Definition Position.h:143
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
Sphere with center and radius.
Definition Sphere.h:39
Describing data of a coupling.
Definition Bogie.h:194
spat::Sphere< Length > Position
Position and trigger radius of the coupling relative to the bogie's body frame.
Definition Bogie.h:202
BreakingType
Definition Bogie.h:195
@ onMomentumConsumedWithRecuperation
The coupling breaks if the momentum is consumed, but the momentum can be recuperated.
Definition Bogie.h:199
@ onNever
The coupling never breaks.
Definition Bogie.h:196
@ onForceLimitReached
The coupling breaks if the force limit is reached.
Definition Bogie.h:197
@ onMomentumConsumed
The coupling breaks if the momentum is consumed.
Definition Bogie.h:198
Force RecuperationForce
Force to recuperate the spare momentum of the coupling.
Definition Bogie.h:205
Force BreakingForce
Breaking force of the coupling. infinite for unbreakable.
Definition Bogie.h:203
Momentum BreakingSpareMomentum
Breaking momentum of the coupling to be consumed, before the coupling breaks.
Definition Bogie.h:204
int CouplingTypeIdx
Index of the coupling type. Only coupling with same index greater 0 can be coupled.
Definition Bogie.h:206
A Bogie is a RailRunner that can be attached to another Bogie by a swivel and can be coupled to anoth...
Definition Bogie.h:67
virtual void SetCouplingHeight(EndType end, Length height)=0
Sets the height of the coupling over the track.
virtual void Detach(EndType atEnd=EndType::all) noexcept=0
Detaches a bogie from its parent(s).
virtual RollingStock * GetRollingStock() const noexcept=0
virtual Jack & JackOnSouthSwivelBendingIn() noexcept=0
Gets a Jack that pulses its Plug if the Bogie's hinge, that connects it to its south child,...
virtual std::shared_ptr< Bogie > GetPrevious() const noexcept=0
Gets the previous bogie in the rolling stock.
virtual Jack & JackOnCouplingForceLimitExceeded(EndType end)=0
Gets a Jack that pulses its Plug if one (or any) of the RailRunner's outmost couplings experiences a ...
virtual Jack & JackOnSouthSwivelBendingOut() noexcept=0
Gets a Jack that pulses its Plug if the Bogie's hinge, that connects it to its south child,...
virtual Jack & JackOnBrakeRelease() noexcept=0
Gets a Jack that pulses its Plug if the WheelFrame's brakes are released, i.e. if the braking value i...
virtual Jack & JackOnBrakeApply() noexcept=0
Gets a Jack that pulses its Plug if the WheelFrame's brakes are applied, i.e. if the braking value is...
virtual std::pair< std::shared_ptr< Bogie >, spat::Frame< Length, One > > GetChild(EndType atEnd) const noexcept=0
Gets the a pointer to a child bogie and the pose relative to this Bogie, were the swivel axis is runn...
virtual std::shared_ptr< Bogie > GetFirst() const noexcept=0
Gets the first bogie in the rolling stock.
virtual void SetCouplingProps(EndType atEnd, const CouplingProps &props)=0
Sets the coupling properties.
virtual Jack & JackOnNorthSwivelBendingIn() noexcept=0
Gets a Jack that pulses its Plug if the Bogie's hinge, that connects it to its north child,...
virtual std::shared_ptr< Bogie > GetNext() const noexcept=0
Gets the next bogie in the rolling stock.
virtual Jack & JackOnNorthSwivelBendingOut() noexcept=0
Gets a Jack that pulses its Plug if the Bogie's hinge, that connects it to its north child,...
virtual Jack & JackOnMotorStart() noexcept=0
Gets a Jack that pulses its Plug if the RailRunner's motor starts, i.e. if the thrust is set to nonze...
virtual void Attach(std::shared_ptr< Bogie > pChildBogie, EndType atEnd, const spat::Frame< Length, One > &swivelPose)=0
virtual Jack & JackOnMotorStop() noexcept=0
Gets a Jack that pulses its Plug if the RailRunner's motor stops, i.e. if the thrust is set to zero.
virtual bool BreakCoupling(EndType atEnd, bool btriggerPulses=true) noexcept=0
Breaks (not uncouples) the coupling at the enoted end.
virtual std::shared_ptr< Bogie > GetLast() const noexcept=0
Gets the last bogie in the rolling stock.
virtual bool Couple(EndType end, Bogie &with, EndType withEnd, bool btriggerPulses=true) noexcept=0
Couples this Bogie with another at the respective ends.
static dclspc std::shared_ptr< Bogie > Make(Scene &scene, std::shared_ptr< Gestalt > pGestalt=nullptr) noexcept
Makes a Bogie object.
virtual CouplingProps GetCouplingProps(EndType atEnd) const noexcept=0
Gets the coupling properties.
virtual std::shared_ptr< Bogie > ThisBogie() const noexcept=0
Gets a shared pointer to this.
virtual std::pair< std::shared_ptr< Bogie >, EndType > GetCoupledBogie(EndType end) const noexcept=0
Get the coupled Bogie.
virtual std::pair< std::shared_ptr< Bogie >, spat::Frame< Length, One > > GetParent(EndType atEnd=EndType::any) const noexcept=0
Gets the a pointer to a parent bogie and the pose relative to this Bogie, were the swivel axis is r...
A Gestalt is a Body with a Shape.
Definition Gestalt.h:100
A jack a plug can get connected with.
Definition Jack.h:83
Interface for train and rolling stock that can be railed on a track and might provide brakes and powe...
Definition RailRunner.h:345
EndType
Types of the RailRunner's end's.
Definition RailRunner.h:351
@ any
Denotes the north or south end of a Railrunner.
Definition RailRunner.h:355
@ all
Denotes both ends of a RailRunner.
Definition RailRunner.h:356
A RollingStock is a RailRunner that manages one or more connected Bogies.
Definition RollingStock.h:45
A physical simulation scene for running a simulation and creating physical objects in the scene.
Definition Scene.h:72
A simulated object. Register the object with a scene to get called back for Update,...
Definition Simulated.h:39