AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxPowerLine::ConstraintGeometry Class Referenceabstract

Description of how an Actuator is allowed to apply forces and torques on the body or bodies attached to the actuated constraint. More...

#include <Actuator1DOF.h>

+ Inheritance diagram for agxPowerLine::ConstraintGeometry:

Public Member Functions

virtual agx::Real getAngle () const =0
 This method returns the current angle for the constraint.
 
virtual agx::RangeReal getAngleRange () const
 Get the range of allowed angles.
 
virtual agx::Vec3 getCmToPosition (agx::UInt index) const =0
 
agx::Vec3 getCmToPosition1 () const
 
agx::Vec3 getCmToPosition2 () const
 
virtual const agx::Constraint * getConstraint () const =0
 
virtual agx::Constraint * getConstraint ()=0
 
virtual agx::Real getMaxAngle () const =0
 
virtual agx::Real getMinAngle () const =0
 
virtual agx::Vec3 getSeparation () const =0
 
virtual agx::Vec3 getWorldDirection (agx::UInt index) const =0
 
agx::Vec3 getWorldDirection1 () const
 
agx::Vec3 getWorldDirection2 () const
 
virtual agx::Vec3 getWorldPosition (agx::UInt index) const =0
 
agx::Vec3 getWorldPosition1 () const
 
agx::Vec3 getWorldPosition2 () const
 
virtual bool isValid () const =0
 
virtual bool setConstraint (agx::Constraint *constraint)=0
 Replace the constraint being queried for geometry information.
 
virtual void transform ()=0
 Transform constraint attachment frames and updates data.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Description of how an Actuator is allowed to apply forces and torques on the body or bodies attached to the actuated constraint.

Definition at line 46 of file Actuator1DOF.h.

Member Function Documentation

◆ getAngle()

virtual agx::Real agxPowerLine::ConstraintGeometry::getAngle ( ) const
pure virtual

This method returns the current angle for the constraint.

For a prismatic, this is the position of the constraint. For a hinge, this is the angle of rotation including winding.

Returns
the current joint angle including winding (if available).

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getAngleRange()

virtual agx::RangeReal agxPowerLine::ConstraintGeometry::getAngleRange ( ) const
inlinevirtual

Get the range of allowed angles.

Corresponds to the Range1D in a Constraint1D. Used by e.g. the PistonActuator to compute chamber volumes.

Returns
Range of allowed angles.

Reimplemented in agxPowerLine::ControllerConstraintGeometry.

Definition at line 149 of file Actuator1DOF.h.

◆ getCmToPosition()

virtual agx::Vec3 agxPowerLine::ConstraintGeometry::getCmToPosition ( agx::UInt  index) const
pure virtual
Parameters
indexThe index of the body to get the CoM-to-attachment point vector for. Either 0 or 1.
Returns
The vector from CoM to the attachment point in world coordinates for one of the attachments.

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getCmToPosition1()

agx::Vec3 agxPowerLine::ConstraintGeometry::getCmToPosition1 ( ) const
inline
Returns
The vector from CoM to the attachment point in world coordinates for first attachment.

Definition at line 117 of file Actuator1DOF.h.

◆ getCmToPosition2()

agx::Vec3 agxPowerLine::ConstraintGeometry::getCmToPosition2 ( ) const
inline
Returns
The vector from CoM to the attachment point in world coordinates for second attachment.

Definition at line 126 of file Actuator1DOF.h.

◆ getConstraint() [1/2]

virtual const agx::Constraint * agxPowerLine::ConstraintGeometry::getConstraint ( ) const
pure virtual

◆ getConstraint() [2/2]

virtual agx::Constraint * agxPowerLine::ConstraintGeometry::getConstraint ( )
pure virtual

◆ getMaxAngle()

virtual agx::Real agxPowerLine::ConstraintGeometry::getMaxAngle ( ) const
pure virtual
Returns
The minimum angle that the constraint allows.

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getMinAngle()

virtual agx::Real agxPowerLine::ConstraintGeometry::getMinAngle ( ) const
pure virtual
Returns
The minimum angle that the constraint allows.

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getSeparation()

virtual agx::Vec3 agxPowerLine::ConstraintGeometry::getSeparation ( ) const
pure virtual
Returns
the separation vector between the two attachments (att1->pos - att2->pos).

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getWorldDirection()

virtual agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldDirection ( agx::UInt  index) const
pure virtual
Parameters
indexThe index of the body to get the attachment direction for. Either 0 or 1.
Returns
The world direction the angle is defined along or about for one of the attachments.

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getWorldDirection1()

agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldDirection1 ( ) const
inline
Returns
The world direction the angle is defined along or about for the first attachment.

Definition at line 93 of file Actuator1DOF.h.

◆ getWorldDirection2()

agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldDirection2 ( ) const
inline
Returns
The world direction the angle is defined along or about for second attachment.

Definition at line 102 of file Actuator1DOF.h.

◆ getWorldPosition()

virtual agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldPosition ( agx::UInt  index) const
pure virtual
Parameters
indexThe index of the body to get the attachment position for. Either 0 or 1.
Returns
The constraint attachment point in world coordinates for one of the attachments.

Implemented in agxPowerLine::ControllerConstraintGeometry.

◆ getWorldPosition1()

agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldPosition1 ( ) const
inline
Returns
The constraint attachment point in world coordinates for first attachment.

Definition at line 69 of file Actuator1DOF.h.

◆ getWorldPosition2()

agx::Vec3 agxPowerLine::ConstraintGeometry::getWorldPosition2 ( ) const
inline
Returns
The constraint attachment point in world coordinates for second attachment.

Definition at line 78 of file Actuator1DOF.h.

◆ isValid()

virtual bool agxPowerLine::ConstraintGeometry::isValid ( ) const
pure virtual

◆ setConstraint()

virtual bool agxPowerLine::ConstraintGeometry::setConstraint ( agx::Constraint *  constraint)
pure virtual

Replace the constraint being queried for geometry information.

If the new constraint is not compatible with the current ConstraintGeometry subclass then it is put in an invalid state and false is returned

Parameters
constraintThe constraint to use for future queries
Returns
True if the constraint was set. False if wrong constraint type.

Implemented in agxPowerLine::ControllerConstraintGeometry, and agxPowerLine::Constraint1DOFGeometry.

◆ transform()

virtual void agxPowerLine::ConstraintGeometry::transform ( )
pure virtual

Transform constraint attachment frames and updates data.

Constraints do this by themselves during stepping, but at setup time and when very early in the step it may be necessary to trigger an early transform update.

Implemented in agxPowerLine::ControllerConstraintGeometry.


The documentation for this class was generated from the following file: