72 return getWorldPosition(0);
81 return getWorldPosition(1);
96 return getWorldDirection(0);
105 return getWorldDirection(1);
120 return getCmToPosition(0);
128 return getCmToPosition(1);
151 return {getMinAngle(), getMaxAngle()};
227 const
agx::ConstraintAngleBasedData& getAngleData() const;
230 agx::Constraint* m_constraint;
231 agx::BasicControllerConstraint* m_controller;
439 int dimensionType)
const override;
492 static dont_create_input_t dont_create_input;
498 void connectActuatorConnector();
499 void disconnectActuatorConnector();
500 void reconnectActuatorConnector();
505 agxPowerLine::detail::RotationalActuatorConnectorRef m_actuatorConnector;
507 agx::Bool m_useHighSpeedMode;
575 agxPowerLine::detail::TranslationalActuatorConnectorRef m_actuatorConnector;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Observer that not only sets the Constraint pointer to nullptr on object deletion, but also informs th...
ConstraintObserver(agx::Constraint *actuatedConstraint, Actuator1DOF *owningActuator)
virtual void objectDeleted(void *) override
An Actuator that operates on Constraint1DOF constraints.
virtual agx::Vec3 getCmToAnchorPos2() const override
ConstraintGeometryRef m_constraintGeometry
void store(agxStream::OutputArchive &out) const override
Actuator1DOF(agx::Constraint *constraint1DOF, ConstraintGeometry *constraintGeometry)
void synchronizeDirections()
Synchronize the power-line dimension state directions with the constraint frame directions using the ...
virtual agx::Vec3 getCmToAnchorPos1() const override
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual agx::Vec3 getDir2() const override
void replaceActuatorUnit(Unit *oldUnit, Unit *newUnit)
const ConstraintGeometry * getConstraintGeometry() const
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxPowerLine::Actuator1DOF)
ConstraintObserver m_constraintObserver
virtual bool preUpdate(agx::Real timeStamp) override
virtual agx::Vec3 getSeparation() const override
void detachActuatorUnitsFromEachOther()
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual agxPowerLine::DimensionAndSide getConnectableDimension(agxPowerLine::PhysicalDimension::Type type, agxPowerLine::Side side) override
void synchronizeUnits(agx::Constraint *constraint)
ConstraintGeometry * getConstraintGeometry()
void restore(agxStream::InputArchive &in) override
virtual agx::Real calculateRelativeValue() const override
virtual agx::Vec3 getDir1() const override
Actuator1DOF(agx::Constraint1DOF *constraint1DOF)
Abstract base class for connecting a agxPowerLine::Unit to an ordinary constraint such as a Hinge or ...
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.
ConstraintGeometry for 1-DOF constraints.
Constraint1DOFGeometry(agx::Constraint1DOF *constraint)
virtual bool setConstraint(agx::Constraint *constraint) override
Set a new constraint, which must be of type Constraint1DOF.
virtual bool isValid() const override
Description of how an Actuator is allowed to apply forces and torques on the body or bodies attached ...
virtual agx::Vec3 getCmToPosition(agx::UInt index) const =0
virtual agx::Constraint * getConstraint()=0
agx::Vec3 getWorldDirection2() const
virtual const agx::Constraint * getConstraint() const =0
virtual bool isValid() const =0
virtual void transform()=0
Transform constraint attachment frames and updates data.
virtual agx::Vec3 getWorldDirection(agx::UInt index) const =0
agx::Vec3 getWorldDirection1() const
virtual agx::RangeReal getAngleRange() const
Get the range of allowed angles.
virtual bool setConstraint(agx::Constraint *constraint)=0
Replace the constraint being queried for geometry information.
virtual agx::Vec3 getWorldPosition(agx::UInt index) const =0
virtual agx::Real getMinAngle() const =0
virtual agx::Real getAngle() const =0
This method returns the current angle for the constraint.
virtual agx::Real getMaxAngle() const =0
virtual agx::Vec3 getSeparation() const =0
agx::Vec3 getWorldPosition2() const
agx::Vec3 getCmToPosition2() const
agx::Vec3 getCmToPosition1() const
agx::Vec3 getWorldPosition1() const
ConstraintGeometry for any type of constraint that has a BasicControllerConstraint along the axis tha...
virtual const agx::Constraint * getConstraint() const override
virtual agx::Vec3 getWorldPosition(agx::UInt index) const override
bool setConstraint(agx::Constraint *constraint, agx::BasicControllerConstraint *controller)
agx::BasicControllerConstraint * getController()
virtual agx::Real getMaxAngle() const override
virtual agx::Vec3 getWorldDirection(agx::UInt index) const override
ControllerConstraintGeometry()
virtual bool isValid() const override
virtual agx::Constraint * getConstraint() override
virtual agx::Real getAngle() const override
This method returns the current angle for the constraint.
ControllerConstraintGeometry(agx::Constraint *constraint, agx::BasicControllerConstraint *controller)
Create a ConstraintGeometry aligned with the direction of the given BasicControllerConstraint.
const agx::BasicControllerConstraint * getController() const
virtual agx::RangeReal getAngleRange() const override
Get the range of allowed angles.
virtual agx::Vec3 getCmToPosition(agx::UInt index) const override
virtual bool setConstraint(agx::Constraint *constraint) override
Replace the constraint being queried for geometry information.
virtual agx::Vec3 getSeparation() const override
virtual void transform() override
Transform constraint attachment frames and updates data.
virtual agx::Real getMinAngle() const override
Class that will connect a agxPowerLine::Unit to a rotational ordinary constraint such as a agx::Hinge...
virtual void setEnable(bool enabled)
virtual bool getEnable() const
virtual agx::Real calculateRelativeGradient() const override
RotationalActuator(agx::Constraint *constraint, agxPowerLine::ConstraintGeometry *constraintGeometry)
Constructor for constraints that have a more complicated geometry than a simple Hinge.
agx::Bool getUseHighSpeedMode() const
virtual agx::Vec3 calculateLocalDirection(Side side, int dimensionType) const override
virtual bool preUpdate(agx::Real timeStamp) override
RotationalActuator(agx::Constraint1DOF *constraint)
virtual bool restore(agxStream::StorageStream &in) override
Restores internal data from stream.
void setUseHighSpeedMode(agx::Bool highSpeedMode)
Set the usage of high speed mode.
virtual void getConnectableDimensionTypes(agxPowerLine::PhysicalDimension::TypeVector &types, agxPowerLine::Side side) const override
virtual bool store(agxStream::StorageStream &out) const override
Stores internal data into stream.
agxPowerLine::RotationalUnit * getInputShaft()
virtual agx::Vec3 calculateWorldDirection(Side side, agxPowerLine::PhysicalDimension::Type dimensionType) const override
A rotational unit has one degree of freedom.
Class that will connect a agxPowerLine::Unit to a translational ordinary constraint such as a agx::Pr...
agxPowerLine::TranslationalUnit * getInputRod()
TranslationalActuator(agx::Constraint *constraint, agxPowerLine::ConstraintGeometry *constraintGeometry, dont_create_input_t)
void connectActuatorConnector()
virtual agx::Vec3 calculateLocalDirection(Side side, int dimensionType) const override
static dont_create_input_t dont_create_input
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual void getConnectableDimensionTypes(agxPowerLine::PhysicalDimension::TypeVector &types, agxPowerLine::Side side) const override
virtual ~TranslationalActuator()
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
TranslationalActuator(agx::Constraint1DOF *constraint)
TranslationalActuator(agx::Constraint1DOF *constraint, dont_create_input_t)
virtual agx::Real calculateRelativeGradient() const override
virtual agxPowerLine::DimensionAndSide getConnectableDimension(agxPowerLine::PhysicalDimension::Type type, agxPowerLine::Side side) override
virtual agx::Vec3 calculateWorldDirection(Side side, agxPowerLine::PhysicalDimension::Type dimensionType) const override
TranslationalActuator(agx::Constraint *constraint, ConstraintGeometry *constraintGeometry)
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Abstract base class for storing/restoring a line/drums with version control.
Base class for constraint angle based elementary constraints (secondary constraints).
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
The base class for a constraint.
Base class providing referencing counted objects.
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
agxPowerLine contains a collection of connected components that transport power across a system.
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
The agx namespace contains the dynamics/math part of the AGX Dynamics API.