#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The gear box can have an arbitrary number of gears.
virtual void initConstraint() override
virtual agx::RegularizationParameters::VariableType calculateComplianceAndDamping(const agx::Real timeStep, agx::Real &compliance, agx::Real &damping) override
Calculate a compliance that will result in the wanted efficiency.
GearBox(const agx::RealVector &gears)
Create a gear box with the given gear ratios.
agx::Real getTorque() const
Get current load torque, i.e., the torque applied on the output.
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
bool setGear(int gearIndex)
Change to the gear at the given index.
bool gearDown()
Change to the previous gear, if there is one.
agx::Real getCurrentGearRatio() const
GearBox()
Create an empty gear box.
bool gearUp()
Change to the next gear, if there is one.
void setGearRatios(const agx::RealVector &gearRatios)
Set the gear ratios.
size_t getNumGears() const
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
agx::Real getGearRatio(int gearIndex) const
agx::Real getCurrentRatio() const
agx::RealVector m_gearTable
Defines a stiff gear constraint between two rotational dimensions.
Abstract base class for storing/restoring a line/drums with version control.
Smart pointer for handling referenced counted objects.
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
agx::ref_ptr< GearBox > GearBoxRef