AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxPowerLine::ControllerConstraintGeometry Class Reference

ConstraintGeometry for any type of constraint that has a BasicControllerConstraint along the axis that the Actutar should operate. More...

#include <Actuator1DOF.h>

+ Inheritance diagram for agxPowerLine::ControllerConstraintGeometry:

Public Member Functions

 ControllerConstraintGeometry ()
 
 ControllerConstraintGeometry (agx::Constraint *constraint, agx::BasicControllerConstraint *controller)
 Create a ConstraintGeometry aligned with the direction of the given BasicControllerConstraint.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxPowerLine::ControllerConstraintGeometry)
 
virtual agx::Real getAngle () const override
 This method returns the current angle for the constraint.
 
const agx::ConstraintAngleBasedData & getAngleData () const
 
virtual agx::RangeReal getAngleRange () const override
 Get the range of allowed angles.
 
virtual agx::Vec3 getCmToPosition (agx::UInt index) const override
 
virtual const agx::Constraint * getConstraint () const override
 
virtual agx::Constraint * getConstraint () override
 
agx::BasicControllerConstraint * getController ()
 
const agx::BasicControllerConstraint * getController () const
 
virtual agx::Real getMaxAngle () const override
 
virtual agx::Real getMinAngle () const override
 
virtual agx::Vec3 getSeparation () const override
 
virtual agx::Vec3 getWorldDirection (agx::UInt index) const override
 
virtual agx::Vec3 getWorldPosition (agx::UInt index) const override
 
virtual bool isValid () const override
 
virtual bool setConstraint (agx::Constraint *constraint) override
 Replace the constraint being queried for geometry information.
 
bool setConstraint (agx::Constraint *constraint, agx::BasicControllerConstraint *controller)
 
virtual void transform () override
 Transform constraint attachment frames and updates data.
 
- Public Member Functions inherited from agxPowerLine::ConstraintGeometry
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.
 

Static Public Member Functions

static agxStream::Serializable * create (agxStream::InputArchive &)
 
- 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.
 

Additional Inherited Members

- 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

ConstraintGeometry for any type of constraint that has a BasicControllerConstraint along the axis that the Actutar should operate.

Examples of BasicControllerConstraints are Motor1D, Lock1D, and Range1D.

Definition at line 187 of file Actuator1DOF.h.

Constructor & Destructor Documentation

◆ ControllerConstraintGeometry() [1/2]

agxPowerLine::ControllerConstraintGeometry::ControllerConstraintGeometry ( )

◆ ControllerConstraintGeometry() [2/2]

agxPowerLine::ControllerConstraintGeometry::ControllerConstraintGeometry ( agx::Constraint *  constraint,
agx::BasicControllerConstraint *  controller 
)

Create a ConstraintGeometry aligned with the direction of the given BasicControllerConstraint.

The controller should be an elementary constraint of the given constraint.

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agxPowerLine::ControllerConstraintGeometry::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agxPowerLine::ControllerConstraintGeometry  )

◆ create()

static agxStream::Serializable * agxPowerLine::ControllerConstraintGeometry::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 225 of file Actuator1DOF.h.

◆ getAngle()

virtual agx::Real agxPowerLine::ControllerConstraintGeometry::getAngle ( ) const
overridevirtual

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).

Implements agxPowerLine::ConstraintGeometry.

◆ getAngleData()

const agx::ConstraintAngleBasedData & agxPowerLine::ControllerConstraintGeometry::getAngleData ( ) const

◆ getAngleRange()

virtual agx::RangeReal agxPowerLine::ControllerConstraintGeometry::getAngleRange ( ) const
overridevirtual

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 from agxPowerLine::ConstraintGeometry.

◆ getCmToPosition()

virtual agx::Vec3 agxPowerLine::ControllerConstraintGeometry::getCmToPosition ( agx::UInt  index) const
overridevirtual
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.

Implements agxPowerLine::ConstraintGeometry.

◆ getConstraint() [1/2]

virtual const agx::Constraint * agxPowerLine::ControllerConstraintGeometry::getConstraint ( ) const
overridevirtual

◆ getConstraint() [2/2]

virtual agx::Constraint * agxPowerLine::ControllerConstraintGeometry::getConstraint ( )
overridevirtual

◆ getController() [1/2]

agx::BasicControllerConstraint * agxPowerLine::ControllerConstraintGeometry::getController ( )

◆ getController() [2/2]

const agx::BasicControllerConstraint * agxPowerLine::ControllerConstraintGeometry::getController ( ) const

◆ getMaxAngle()

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

Implements agxPowerLine::ConstraintGeometry.

◆ getMinAngle()

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

Implements agxPowerLine::ConstraintGeometry.

◆ getSeparation()

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

Implements agxPowerLine::ConstraintGeometry.

◆ getWorldDirection()

virtual agx::Vec3 agxPowerLine::ControllerConstraintGeometry::getWorldDirection ( agx::UInt  index) const
overridevirtual
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.

Implements agxPowerLine::ConstraintGeometry.

◆ getWorldPosition()

virtual agx::Vec3 agxPowerLine::ControllerConstraintGeometry::getWorldPosition ( agx::UInt  index) const
overridevirtual
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.

Implements agxPowerLine::ConstraintGeometry.

◆ isValid()

virtual bool agxPowerLine::ControllerConstraintGeometry::isValid ( ) const
overridevirtual
Returns
True if both the constraint and the controller is non-nullptr, false otherwise.

Implements agxPowerLine::ConstraintGeometry.

Reimplemented in agxPowerLine::Constraint1DOFGeometry.

◆ setConstraint() [1/2]

virtual bool agxPowerLine::ControllerConstraintGeometry::setConstraint ( agx::Constraint *  constraint)
overridevirtual

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.

Implements agxPowerLine::ConstraintGeometry.

Reimplemented in agxPowerLine::Constraint1DOFGeometry.

◆ setConstraint() [2/2]

bool agxPowerLine::ControllerConstraintGeometry::setConstraint ( agx::Constraint *  constraint,
agx::BasicControllerConstraint *  controller 
)

◆ transform()

virtual void agxPowerLine::ControllerConstraintGeometry::transform ( )
overridevirtual

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.

Implements agxPowerLine::ConstraintGeometry.


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