|
AGXDynamics
2.31.1.0
|
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about an axis defined in its own frame, the wheel axle, and about an axis defined in the other body, which would be the chassis. More...
#include <WheelJoint.h>
Inheritance diagram for agx::WheelJoint:Public Types | |
| enum | DOF { ALL_DOF = -1, TRANSLATIONAL_1 = 0, TRANSLATIONAL_2 = 1, ROTATIONAL_1 = 3, NUM_DOF = 3 } |
| Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for example: constraint->getRegularizationParameters( dof ); constraint->setDamping( damping, dof );. More... | |
| enum | SecondaryConstraint { STEERING = 0, WHEEL = 1, SUSPENSION = 2, STEERINGCONSTRAINT_BOUNDS = 3, NUM_FREEDOF = 3 } |
| Enum for specifying which secondary constraint to access. More... | |
| enum | SolveType { DIRECT = 1, ITERATIVE = (1<<2), DIRECT_AND_ITERATIVE = (DIRECT | ITERATIVE) } |
| Specifies in what solvers the constraint will be solved. More... | |
Public Member Functions | |
| WheelJoint (const WheelJointFrame &wjf, RigidBody *rb1, RigidBody *rb2) | |
| Construct a WheelJoint from a WheelJointFrame and bodies. More... | |
| WheelJoint (RigidBody *rb1, RigidBody *rb2, const Vec3 ¢er, const Vec3 &axis) | |
| Constructor to create a wheel from two rigid bodies, a center point and a steering/suspension axis. More... | |
| WheelJoint (RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2=nullptr, Frame *rb2AttachmentFrame=nullptr) | |
| Create wheel given body attachment frames and one or two rigid bodies. More... | |
| agx::Bool | addElementaryConstraint (const agx::Name &name, agx::ElementaryConstraint *elementaryConstraint) |
| Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name. More... | |
| agx::Bool | addSecondaryConstraint (const agx::Name &name, agx::ElementaryConstraint *secondaryConstraint) |
| Add secondary constraint (like motor, range and/or lock etc) given name. More... | |
| AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agx::Constraint) | |
| template<typename T > | |
| T * | as () |
| Try to do dynamic_cast on the constraint and return a pointer to the casted constraint. More... | |
| template<typename T > | |
| const T * | as () const |
| Try to do dynamic_cast on the constraint and return a pointer to the casted constraint. More... | |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| agx::UInt | calculateNumActiveRows () const |
| Calculates the current number of active rows, including both elementary and secondary constraints. More... | |
| template<typename T > | |
| ref_ptr< T > | createFromBody (Vec3 bodyPoint, Vec3 bodyAxis, RigidBody *rb1, RigidBody *rb2) |
| template<typename T > | |
| ref_ptr< T > | createFromWorld (Vec3 worldPoint, Vec3 worldAxis, RigidBody *rb1, RigidBody *rb2) |
| Real | getAngle (SecondaryConstraint sc=STEERING) const |
| agx::RigidBodyAttachment * | getAttachment (const agx::RigidBody *rb) const |
| agx::Attachment * | getAttachment (agx::UInt i) const |
| agx::AttachmentPair * | getAttachmentPair () const |
| agx::RigidBody * | getBodyAt (agx::UInt i) |
| const agx::RigidBody * | getBodyAt (agx::UInt i) const |
| RigidBody * | getChassisRigidBody () |
| Get the rigid body of the chassis. More... | |
| const char * | getClassName () const override |
| virtual agx::Real | getCompliance (agx::UInt dof) const |
| Get the compliance for DOF i. More... | |
| agx::Real | getCurrentForce (agx::UInt dof) const |
Consider using getLastForce instead. More... | |
| virtual Real | getDamping (agx::UInt dof) const |
Get the damping for DOF dof. More... | |
| virtual agx::Real | getElasticity (agx::UInt dof) const |
| Get the elasticity for DOF i. More... | |
| agx::ElementaryConstraint * | getElementaryConstraint (const agx::UInt index) const |
| agx::ElementaryConstraint * | getElementaryConstraintGivenName (const agx::Name &name) const |
| Find elementary constraint given name. More... | |
| agx::Bool | getEnable () const |
| agx::Bool | getEnableComputeForces () const |
| bool | getEnableDebugRendering () const |
| bool | getEnableLinearization () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getEntityId () const |
| agx::RangeReal | getForceRange (agx::UInt dof=0) const |
Get the force range for DOF dof. More... | |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Bool | getLastForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. More... | |
| agx::Bool | getLastForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. More... | |
| agx::Bool | getLastLocalForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. More... | |
| agx::Bool | getLastLocalForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. More... | |
| Lock1D * | getLock1D (SecondaryConstraint sc) |
| Motor1D * | getMotor1D (SecondaryConstraint sc) |
| const agx::Name & | getName () const |
| agx::UInt | getNumBodies () const |
| returns the number of bodies involved More... | |
| int | getNumDOF () const override |
| agx::UInt | getNumElementaryConstraints () const |
| agx::UInt | getNumSecondaryConstraints () const |
| agx::PropertyContainer * | getPropertyContainer () |
| const agx::PropertyContainer * | getPropertyContainer () const |
| Range1D * | getRange1D (SecondaryConstraint sc) |
| int | getReferenceCount () const |
| virtual agx::RegularizationParameters * | getRegularizationParameters (agx::UInt i) |
| virtual const agx::RegularizationParameters * | getRegularizationParameters (agx::UInt i) const |
| agx::ConstraintImplementation * | getRep () |
| const agx::ConstraintImplementation * | getRep () const |
| agx::ElementaryConstraint * | getSecondaryConstraint (const agx::UInt index) const |
| agx::ElementaryConstraint * | getSecondaryConstraintGivenName (const agx::Name &name) const |
| Find secondary constraint given name. More... | |
| agxSDK::SimulationProxy * | getSimulationProxy () const |
| agx::Constraint::SolveType | getSolveType () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| agx::Bool | getValid () const |
| RigidBody * | getWheelRigidBody () |
| Get the rigid body of the wheel. More... | |
| agx::Bool | hasPropertyContainer () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| agx::Bool | isEnabled () const |
| bool | isFinished () const |
| virtual agx::Bool | rebind () |
| Rebind this constraint, i.e., use current state as the initial configuration. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| agx::Bool | removeElementaryConstraint (agx::ElementaryConstraint *elementaryConstraint) |
| Remove elementary constraint. More... | |
| agx::Bool | removeElementaryConstraint (const agx::Name &name) |
| Remove elementary constraint. More... | |
| agx::Bool | removeSecondaryConstraint (agx::ElementaryConstraint *secondaryConstraint) |
| Remove secondary constraint. More... | |
| agx::Bool | removeSecondaryConstraint (const agx::Name &name) |
| Remove secondary constraint. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| virtual void | setCompliance (agx::Real compliance, agx::Int dof) |
| Set the compliance of this constraint for the i:th DOF. More... | |
| void | setCompliance (agx::Real compliance) |
| Set the compliance of this constraint for all DOFs. More... | |
| virtual void | setDamping (agx::Real damping, agx::Int dof) |
| Set the damping of this constraint for the i:th DOF. More... | |
| void | setDamping (agx::Real damping) |
| Set the damping of this constraint for all DOFs. More... | |
| virtual void | setElasticity (agx::Real elasticity, agx::Int dof) |
| Set the elasticity of this constraint for the i:th DOF. More... | |
| virtual void | setElasticity (agx::Real elasticity) |
| Set the elasticity of this constraint for all DOFs. More... | |
| virtual void | setEnable (agx::Bool enable) |
| Enable/disable a constraint. More... | |
| void | setEnableComputeForces (agx::Bool enable) |
| Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint. More... | |
| void | setEnableDebugRendering (agx::Bool enable) |
| Enable/disable debug rendering of this constraint. More... | |
| void | setEnableLinearization (bool enable) |
Pass true to enable linearization of constraint compliance. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setForceRange (agx::RangeReal forceRange) |
| Assign force range for all DOF of the elementary constraints. More... | |
| void | setForceRange (agx::RangeReal forceRange, agx::Int dof) |
| Assign force range, of an elementary constraint, for a given DOF. More... | |
| void | setForceRange (agx::Real lower, agx::Real upper, agx::Int dof) |
| Assign force range, of an elementary constraint, for a given DOF. More... | |
| void | setName (const agx::Name &name) |
| Name this interaction. More... | |
| void | setPropertyContainer (agx::PropertyContainer *propertyContainer) |
| Assign a new property container. More... | |
| void | setSolveType (agx::Constraint::SolveType solveType) |
| Specify the solve type for this constraint. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| virtual void | updateForce (agx::DynamicsSystem *dynamicsSystem) |
| This virtual method is implemented so that it computes the interaction forces on all the physical bodies implicated. More... | |
Static Public Member Functions | |
| static agx::Bool | calculateFramesFromBody (agx::Vec3 bodyPoint, agx::Vec3 bodyAxis, const agx::RigidBody *body, agx::Frame *bodyFrame, const agx::RigidBody *otherBody, agx::Frame *otherFrame) |
Calculates the constraint attachment frames given point and axis in body coordinates of body. More... | |
| static agx::Bool | calculateFramesFromBody (agx::Vec3 bodyPoint, agx::Vec3 bodyAxis, agx::Vec3 secondBodyAxis, const agx::RigidBody *body, agx::Frame *bodyFrame, const agx::RigidBody *otherBody, agx::Frame *otherFrame) |
Calculates the constraint attachment frames given point and axes in body coordinates of body. More... | |
| static agx::Bool | calculateFramesFromWorld (agx::Vec3 worldPoint, agx::Vec3 worldAxis, const agx::RigidBody *rb1, agx::Frame *rb1Frame, const agx::RigidBody *rb2, agx::Frame *rb2Frame) |
| Given a point and an axis in world, this function calculates each local attachment frame for one or two bodies. More... | |
| static agx::Bool | calculateFramesFromWorld (agx::Vec3 worldPoint, agx::Vec3 worldAxis, agx::Vec3 secondWorldAxis, const agx::RigidBody *rb1, agx::Frame *rb1Frame, const agx::RigidBody *rb2, agx::Frame *rb2Frame) |
| Given a point and two axes in world, this function calculates each local attachment frame for one or two bodies. More... | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| template<typename T > | |
| static agx::ref_ptr< T > | createFromBody (agx::Vec3 bodyPoint, agx::Vec3 bodyAxis, agx::RigidBody *rb1, agx::RigidBody *rb2=nullptr) |
Creates a constraint given a point and an axis in rb1 model frame. More... | |
| template<typename T > | |
| static agx::ref_ptr< T > | createFromWorld (agx::Vec3 worldPoint, agx::Vec3 worldAxis, agx::RigidBody *rb1, agx::RigidBody *rb2=nullptr) |
| Creates a constraint given a point and an axis in world frame. More... | |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| WheelJoint () | |
| virtual | ~WheelJoint () |
| virtual void | addNotification () override |
| Called when added to a simulation. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| virtual void | postSystemCallback (agx::DynamicsSystem *dynamicsSystem) override |
| Called after all post step events, after solve. More... | |
| virtual void | preSystemCallback (agx::DynamicsSystem *dynamicsSystem) override |
| Called after all pre step events, before solve. More... | |
| virtual void | removeNotification () override |
| Called when removed from a simulation. More... | |
| void | render (class agxRender::RenderManager *mgr, float scale) const override |
| Used internally for debug rendering. More... | |
| void | setRep (agx::ConstraintImplementation *_rep) |
| virtual void | setSimulation (agxSDK::Simulation *simulation) override |
| Assign simulation. More... | |
| virtual void | setSystem (agx::DynamicsSystem *) |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about an axis defined in its own frame, the wheel axle, and about an axis defined in the other body, which would be the chassis.
This second axis becomes the steering axis and is also the direction for suspension.
The wheel axis and steering axis must be perpendicular.
This allows for rotation about the center of the wheel around the axle as well as rotation about the steering axis. The wheel is also allowed to move up/down along the steering axis to have suspension.
By default, there is no control on steering or driving. Suspension is initially locked. By using the DOFController object and setting flags and other parameters, the relative angles can be computed and the extension for suspension can be controlled.
Definition at line 69 of file WheelJoint.h.
| enum agx::WheelJoint::DOF |
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for example: constraint->getRegularizationParameters( dof ); constraint->setDamping( damping, dof );.
Definition at line 123 of file WheelJoint.h.
Enum for specifying which secondary constraint to access.
| Enumerator | |
|---|---|
| STEERING | For control of the steering axis. |
| WHEEL | For control of wheel rotation. |
| SUSPENSION | For control of the suspension. |
| STEERINGCONSTRAINT_BOUNDS | Extra bounds that are available for a steering constraint to use (e.g. an AckermannSteering constraint). This secondary constraint should not be used by the API user. Instead use STEERING. |
| NUM_FREEDOF | |
Definition at line 134 of file WheelJoint.h.
|
inherited |
Specifies in what solvers the constraint will be solved.
| Enumerator | |
|---|---|
| DIRECT | Solved only in the DIRECT solver. |
| ITERATIVE | Solved only in the ITERATIVE solver. |
| DIRECT_AND_ITERATIVE | Solved both in the ITERATIVE and the DIRECT solver. |
Definition at line 90 of file Constraint.h.
| agx::WheelJoint::WheelJoint | ( | const WheelJointFrame & | wjf, |
| RigidBody * | rb1, | ||
| RigidBody * | rb2 | ||
| ) |
Construct a WheelJoint from a WheelJointFrame and bodies.
| wjf | A WheelJointFrame specifying directions and point |
| rb1 | Rigid body for the wheel. |
| rb2 | Rigid body for the chassi. Passing a nullptr for rb2 is allowed, then world is used. |
| agx::WheelJoint::WheelJoint | ( | RigidBody * | rb1, |
| RigidBody * | rb2, | ||
| const Vec3 & | center, | ||
| const Vec3 & | axis | ||
| ) |
Constructor to create a wheel from two rigid bodies, a center point and a steering/suspension axis.
| rb1 | - First rigid body (invalid if null). Wheel axle will be along this body's Y-axis. |
| rb2 | - Second rigid body (if null, first rigid body will be attached in world) |
| center | - intersection point of steering axis and wheel rotation axis given in world coordinates |
| axis | - steering axis given in world coordinates \ |
| agx::WheelJoint::WheelJoint | ( | RigidBody * | rb1, |
| Frame * | rb1AttachmentFrame, | ||
| RigidBody * | rb2 = nullptr, |
||
| Frame * | rb2AttachmentFrame = nullptr |
||
| ) |
Create wheel given body attachment frames and one or two rigid bodies.
The wheel axle is defined to be along the Y-axis for the first attachment frame. The steering axle and suspension is along the Z-axis for body 2. If rb2 == rb2AttachmentFrame == nullptr, then first body will be attached to the world given rb1AttachmentFrame and in this case, the world z-axis will be the direction of the suspension. If rb2 == nullptr and rb2AttachmentFrame != nullptr, then rb2AttachmentFrame will be used as the world frame attachment.
| rb1 | - First rigid body (invalid if null) |
| rb1AttachmentFrame | - First rigid body attachment frame (invalid if null) |
| rb2 | - Second rigid body (if null, first rigid body will be attached in world) |
| rb2AttachmentFrame | - Second rigid body attachment frame (invalid if rb2 != 0 and this is null) |
|
protected |
|
protectedvirtual |
|
inherited |
Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name.
General for elementary constraints is that their input is based on body relative data (far from general).
|
overrideprotectedvirtualinherited |
Called when added to a simulation.
Reimplemented from agx::Interaction.
Reimplemented in agx::GenericConstraint.
|
inherited |
Add secondary constraint (like motor, range and/or lock etc) given name.
General for secondary constraints is that their input is based on the current constraint angle.
|
inherited |
|
protectedinherited |
|
inherited |
Try to do dynamic_cast on the constraint and return a pointer to the casted constraint.
Definition at line 902 of file Constraint.h.
|
inherited |
Try to do dynamic_cast on the constraint and return a pointer to the casted constraint.
Definition at line 909 of file Constraint.h.
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
staticinherited |
Calculates the constraint attachment frames given point and axis in body coordinates of body.
| bodyPoint | - point in body coordinates of reference rigid body "body" |
| bodyAxis | - axis in body coordinates of reference rigid body "body" |
| body | - reference body, invalid if null |
| bodyFrame | - reference body attachment frame, invalid if null |
| otherBody | - other rigid body, if null otherFrame will be calculated in world frame |
| otherFrame | - other frame, invalid if null |
|
staticinherited |
Calculates the constraint attachment frames given point and axes in body coordinates of body.
The frames' z-axis will be aligned with the bodyAxis and its y-axis will be normal to the bodyAxis-secondBodyAxis plane.
| bodyPoint | - point in body coordinates of reference rigid body "body" |
| bodyAxis | - axis in body coordinates of reference rigid body "body" |
| secondBodyAxis | - non-parallel axis to bodyAxis in body coordinates of reference rigid body "body" |
| body | - reference body, invalid if null |
| bodyFrame | - reference body attachment frame, invalid if null |
| otherBody | - other rigid body, if null otherFrame will be calculated in world frame |
| otherFrame | - other frame, invalid if null |
|
staticinherited |
Given a point and an axis in world, this function calculates each local attachment frame for one or two bodies.
The first body, rb1, has to be valid. If the second body, rb2, is zero the second frame, rb2Frame, will be given in world frame.
| worldPoint | - point in world |
| worldAxis | - axis in world (for example prismatic- or hinge axis) |
| rb1 | - first rigid body, invalid if null |
| rb1Frame | - frame to calculate for rb1, invalid if null |
| rb2 | - second rigid body, if null rb2Frame will be given in world |
| rb2Frame | - frame to calculate for rb2, invalid if null |
|
staticinherited |
Given a point and two axes in world, this function calculates each local attachment frame for one or two bodies.
The frames' z-axis will be aligned with the worldAxis and its y-axis will be normal to the worldAxis-secondWorldAxis plane. The first body, rb1, has to be valid. If the second body, rb2, is zero the second frame, rb2Frame, will be given in world frame.
| worldPoint | - point in world |
| worldAxis | - axis in world (for example prismatic- or hinge axis) |
| secondWorldAxis | - axis in world (must be non-parallel to worldAxis) |
| rb1 | - first rigid body, invalid if null |
| rb1Frame | - frame to calculate for rb1, invalid if null |
| rb2 | - second rigid body, if null rb2Frame will be given in world |
| rb2Frame | - frame to calculate for rb2, invalid if null |
|
inherited |
Calculates the current number of active rows, including both elementary and secondary constraints.
The result can be used to allocate temporary buffers for additional calls to solver related methods, e.g., getViolation.
|
inlinestatic |
Definition at line 172 of file WheelJoint.h.
|
inlinestatic |
Definition at line 172 of file WheelJoint.h.
|
staticinherited |
Creates a constraint given a point and an axis in rb1 model frame.
Seen from body one frame - both relative attachment frames will coincide at the given point with their z-axes pointing in the axis direction.
| bodyPoint | - constraint center point given in first body's frame |
| bodyAxis | - constraint axis given in first body's frame |
| rb1 | - first rigid body (not defined if null) |
| rb2 | - second rigid body, if null, rb1 will be attached in world |
|
inherited |
Definition at line 891 of file Constraint.h.
|
staticinherited |
Creates a constraint given a point and an axis in world frame.
Both relative attachment frames will coincide at the given world point with their z-axes pointing in the given world axis direction.
| worldPoint | - constraint center point given in the world frame |
| worldAxis | - constraint axis given in world frame |
| rb1 | - first rigid body (not defined if null) |
| rb2 | - second rigid body, if null, rb1 will be attached in world |
|
inherited |
Definition at line 881 of file Constraint.h.
|
protectedinherited |
|
protectedinherited |
| Real agx::WheelJoint::getAngle | ( | SecondaryConstraint | sc = STEERING | ) | const |
|
inherited |
rb if present - otherwise 0
|
inherited |
i (call equal to constraint->getAttachment( constraint->getBodyAt( i ) ))
|
inherited |
|
inherited |
|
inherited |
| RigidBody* agx::WheelJoint::getChassisRigidBody | ( | ) |
Get the rigid body of the chassis.
If the wheel is attached to the world, a nullptr will be returned.
|
inlineoverridevirtual |
Reimplemented from agx::Interaction.
Definition at line 172 of file WheelJoint.h.
Get the compliance for DOF i.
Note that indices > number of DOF for this constraint is not defined, so compliance of index 0 will be returned.
| dof | - index of the requested DOF |
Reimplemented in agxWire::EyeNodeArea, and agx::DistanceJoint.
|
inlinestatic |
Definition at line 172 of file WheelJoint.h.
Consider using getLastForce instead.
This method returns the magnitude of the force in a given degree of freedom (DOF). Enabled controllers in the given DOF will NOT be included, agx::ElementaryConstraint::getCurrentForce has to be used for that.
Get the damping for DOF dof.
Note that indices > number of DOF for this constraint is not defined, so damping of index 0 will be returned.
| dof | - index of the requested DOF |
Reimplemented in agxWire::EyeNodeArea, and agx::DistanceJoint.
|
staticprotectedinherited |
Get the elasticity for DOF i.
Note that indices > number of DOF for this constraint is not defined, so elasticity of index 0 will be returned.
| dof | - index of the requested DOF |
|
inherited |
| index | - index of the elementary constraint |
|
inherited |
Find elementary constraint given name.
| name | - name of the elementary constraint |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inherited |
|
inherited |
Get the force range for DOF dof.
| dof | - index of the requested DOF |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex.
The force is given in world coordinates and is the one applied at the anchor position of this constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| bodyIndex | - index of body, if number of bodies = 1 and bodyIndex = 1, the force and torque applied to "the world body" is returned |
| retForce | - the force applied by this constraint on body at bodyIndex last solve |
| retTorque | - the torque applied by this constraint on body at bodyIndex last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \( T_{new} = T - r \times F \) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false
|
inherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb.
The force is given in world coordinates and is the one applied at the anchor position of this constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| rb | - body in this constraint. If this constraint is attached in world, nullptr can be used. |
| retForce | - the force applied by this constraint on body rb at the last solve |
| retTorque | - the torque applied by this constraint on body rb at the last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false
|
inherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex.
The force is given in the frame of the constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| bodyIndex | - index of body, if number of bodies = 1 and bodyIndex = 1, the force and torque applied to "the world body" is returned |
| retForce | - the force applied by this constraint on body at bodyIndex last solve |
| retTorque | - the torque applied by this constraint on body at bodyIndex last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false
|
inherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb.
The force is given in the frame of the constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| rb | - body in this constraint. If this constraint is attached in world, nullptr can be used. |
| retForce | - the force applied by this constraint on body rb at the last solve |
| retTorque | - the torque applied by this constraint on body rb at the last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false | Lock1D* agx::WheelJoint::getLock1D | ( | SecondaryConstraint | sc | ) |
| Motor1D* agx::WheelJoint::getMotor1D | ( | SecondaryConstraint | sc | ) |
|
inherited |
|
inherited |
returns the number of bodies involved
|
overridevirtual |
Implements agx::Constraint.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| Range1D* agx::WheelJoint::getRange1D | ( | SecondaryConstraint | sc | ) |
|
inherited |
|
virtualinherited |
Reimplemented in agx::DistanceJoint.
|
virtualinherited |
Reimplemented in agx::DistanceJoint.
|
inlineinherited |
Definition at line 870 of file Constraint.h.
Referenced by agxSDK::MergeSplitHandler::getProperties().
|
inlineinherited |
Definition at line 875 of file Constraint.h.
|
inherited |
| index | - index of the secondary constraint |
|
inherited |
Find secondary constraint given name.
| name | - name of the elementary constraint |
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agx::Interaction.
Definition at line 172 of file WheelJoint.h.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
inherited |
| RigidBody* agx::WheelJoint::getWheelRigidBody | ( | ) |
Get the rigid body of the wheel.
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
overrideprotectedvirtualinherited |
Called after all post step events, after solve.
Reimplemented from agx::Interaction.
|
overrideprotectedvirtualinherited |
Called after all pre step events, before solve.
Reimplemented from agx::Interaction.
|
virtualinherited |
Rebind this constraint, i.e., use current state as the initial configuration.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
inherited |
Remove elementary constraint.
| elementaryConstraint | - elementary constraint to remove |
Remove elementary constraint.
| name | - name of the elementary constraint to remove |
|
overrideprotectedvirtualinherited |
Called when removed from a simulation.
Reimplemented from agx::Interaction.
Reimplemented in agx::GenericConstraint.
|
inherited |
Remove secondary constraint.
| secondaryConstraint | - secondary constraint to remove |
Remove secondary constraint.
| name | - name of the secondary constraint to remove |
|
overrideprotectedvirtual |
Used internally for debug rendering.
Implements agx::Constraint.
|
overridevirtual |
Reimplemented from agx::Constraint.
|
overridevirtualinherited |
Set the compliance of this constraint for the i:th DOF.
| compliance | - value of compliance |
| dof | - index of the requested DOF (-1 indicates all) |
Reimplemented in agxWire::EyeNodeArea, and agx::DistanceJoint.
Set the compliance of this constraint for all DOFs.
| compliance | - value of compliance |
Set the damping of this constraint for the i:th DOF.
| damping | - value of damping |
| dof | - index of the requested DOF (-1 indicates all). |
Reimplemented in agxWire::EyeNodeArea, and agx::DistanceJoint.
Set the damping of this constraint for all DOFs.
| damping | - value of damping |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
Set the elasticity of this constraint for the i:th DOF.
Elasticity is 1 / compliance.
| elasticity | - value of elasticity |
| dof | - index of the requested DOF (-1 indicates all) |
Set the elasticity of this constraint for all DOFs.
| elasticity | - value of elasticity |
Enable/disable a constraint.
| enable | - If true the constraint will be enabled. |
Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint.
Matrix-vector operation to compute the forces after solve.
| enable | - true to enable, false to disable |
Referenced by agxSDK::ConstraintLogListener::addConstraint().
Enable/disable debug rendering of this constraint.
|
inherited |
Pass true to enable linearization of constraint compliance.
This makes constraint violation a linear function of the force or torque used to violate the constraint also for the elementary constraint types for which this isn't already the case, such as QuatLock. The effect of this is that the parameters sent to the solver by the constraint are tweaked to make the constrain more closely follow Hook's law.
Setting this to true has no effect on most constraints. It does have an effect on the rotational part of AngularLockJoint, LockJoint, and Prismatic.
When false, the default, the resulting violation of any QuatLock in the constraint is linear in quaternion space instead of degrees and radians.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
inherited |
Assign force range for all DOF of the elementary constraints.
| forceRange | - value of force range for all elementary DOFs |
|
inherited |
Assign force range, of an elementary constraint, for a given DOF.
| forceRange | - value of force range for the given DOF |
| dof | - index of the DOF (-1 indicates all) |
Assign force range, of an elementary constraint, for a given DOF.
| lower | - lower value of force range for the given DOF |
| upper | - lower value of force range for the given DOF |
| dof | - index of the DOF (-1 indicates all) |
Name this interaction.
| name | - new name of this interaction |
|
inherited |
Assign a new property container.
| propertyContainer | - new property container |
|
protectedinherited |
|
overrideprotectedvirtualinherited |
|
inherited |
Specify the solve type for this constraint.
Valid is DIRECT (default for non-iterative solvers), ITERATIVE or DIRECT_AND_ITERATIVE where DIRECT_AND_ITERATIVE means that this constraint will be solved both direct and iterative.
| solveType | - new solve type for this constraint |
|
inlineprotectedvirtualinherited |
Definition at line 620 of file Constraint.h.
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Reimplemented from agx::Constraint.
|
overridevirtualinherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
inlinevirtualinherited |
This virtual method is implemented so that it computes the interaction forces on all the physical bodies implicated.
This method defaults to doing nothing. Constraints and other strong interactions might not implement anything for this because the forces they generate are computed by a solver. A weak interaction must implement this method to have any effect.
| dynamicsSystem | - the system to which the forces should be added |
Definition at line 128 of file Interaction.h.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.