17#ifndef AGXPOWERLINE_ROTATIONAL_DIMENSION_H
18#define AGXPOWERLINE_ROTATIONAL_DIMENSION_H
35 #define DEFAULT_ROTATIONAL_DIRECTION agx::Vec3(0,1,0)
69 bool externalBody =
false);
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Links two connections together.
Constraint implementation for constraining a number of physical dimensions of the same type.
Will generate power by adding a load to a physical dimension.
Defines a stiff gear constraint between two rotational dimensions.
virtual ~RotationalConnector()
RotationalConnector()
Create a connector between two rotational dimensions.
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.
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual PhysicalDimensionMultiBodyConstraintImplementation * createConstraint() override
Create a gear constraint.
The rotational has one rotational degree of freedom.
virtual void renderDebug() override
Render the axis of the dimension.
virtual bool store(agxStream::StorageStream &out) const override
Stores internal data into stream.
RotationalDimension(agxPowerLine::Unit *unit, agx::RigidBody *body, agx::UInt8 slot)
Virtual function so that an instance can find its own name and not the name of the base class.
agx::Real getInputTorque() const
static std::string getStaticTypeName()
Each class inheriting from agxPowerLine::PhysicalDimension has to have a static function returning a ...
agx::Real getInertia() const
virtual ~RotationalDimension()
virtual std::string getTypeName() const override
Virtual function so that an instance can find its own name and not the name of the base class.
virtual agx::Real getOutputLoad() const override
void postUpdate(agx::Real timeStep)
virtual agx::Real getMassProperty() const override
virtual bool restore(agxStream::StorageStream &in) override
Restores internal data from stream.
RotationalDimension(agxPowerLine::Unit *unit, agx::RigidBody *body, const agx::Vec3 &direction, agxPowerLine::DirectionReference directionReference, bool externalBody=false)
Create a RotationalDimension whose direction can be relative to either the world or the body coordina...
virtual void setAngularVelocityDamping(agx::Real damping)
set the angular velocity damping.
virtual agx::Real getPowerOut() const override
static agxPowerLine::PhysicalDimension::Type getStaticType()
agx::Real getAngularVelocity() const
virtual bool setInertia(agx::Real value)
set the inertia of the rotational dimension.
virtual agx::Real getPowerIn() const override
RotationalDimension(Unit *unit)
Create a RotationalDimension with a direction relative to the world coordinate frame.
agx::Real getOutputTorque() const
void setAngularVelocity(agx::Real)
A rotational unit has one degree of freedom.
A torque generator adds torque to the body of a rotational dimension.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual ~TorqueGenerator()
virtual void applyPower() override
Implement this to apply power each timestep.
agx::observer_ptr< RotationalDimension > m_rotationalDimension
TorqueGenerator(agxPowerLine::RotationalDimension *dimension)
Create a torque generator.
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual agx::Real variableLookupFunction() const override
Finds the current RPM (and not angular velocity)
virtual agx::Real resultScalerFunction() const override
Implement this to scale lookups accordingly.
Abstract base class for storing/restoring a line/drums with version control.
The rigid body class, combining a geometric model and a frame of reference.
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Smart pointer for handling referenced counted objects.
agxPowerLine contains a collection of connected components that transport power across a system.
DirectionReference
The DirectionReference specifies what the direction attribute of a DimensionState is relative to.
agx::ref_ptr< RotationalConnector > RotationalConnectorRef
agx::ref_ptr< RotationalDimension > RotationalDimensionRef