|
AGXDynamics
2.31.1.0
|
Given two vectors or directions, this constraint will keep the two vectors orthogonal. More...
#include <Dot1Joint.h>
Inheritance diagram for agx::Dot1Joint:Public Types | |
| enum | DOF { ALL_DOF =-1, ROTATIONAL_1 =0, NUM_DOF =1 } |
| 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 | SolveType { DIRECT = 1, ITERATIVE = (1<<2), DIRECT_AND_ITERATIVE = (DIRECT | ITERATIVE) } |
| Specifies in what solvers the constraint will be solved. More... | |
Public Member Functions | |
| Dot1Joint (RigidBody *rb1, const Vec3 &rb1LocalAxis, RigidBody *rb2, const Vec3 &rb2LocalAxis) | |
| Create dot 1 constraint between one or two bodies. More... | |
| Dot1Joint (RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2, Frame *rb2AttachmentFrame) | |
| Create dot 1 constraint between one or two bodies given attachment frames where the axis is defined to be the z-axis. 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) |
| 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 |
| 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... | |
| const agx::Name & | getName () const |
| agx::UInt | getNumBodies () const |
| returns the number of bodies involved More... | |
| virtual int | getNumDOF () const override |
| agx::UInt | getNumElementaryConstraints () const |
| agx::UInt | getNumSecondaryConstraints () const |
| agx::PropertyContainer * | getPropertyContainer () |
| const agx::PropertyContainer * | getPropertyContainer () const |
| 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 |
| 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 | |
| Dot1Joint () | |
| virtual | ~Dot1Joint () |
| 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... | |
| virtual void | render (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 |
Given two vectors or directions, this constraint will keep the two vectors orthogonal.
Definition at line 27 of file Dot1Joint.h.
| enum agx::Dot1Joint::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 );.
| Enumerator | |
|---|---|
| ALL_DOF |
Select all degrees of freedom. |
| ROTATIONAL_1 |
Select DOF corresponding to the first rotational axis. |
| NUM_DOF |
Number of DOF available for this constraint. |
Definition at line 54 of file Dot1Joint.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::Dot1Joint::Dot1Joint | ( | RigidBody * | rb1, |
| const Vec3 & | rb1LocalAxis, | ||
| RigidBody * | rb2, | ||
| const Vec3 & | rb2LocalAxis | ||
| ) |
Create dot 1 constraint between one or two bodies.
In world frame, rb1LocalAxis and rb2LocalAxis are constrained to be orthogonal.
| rb1 | - first rigid body (invalid if 0) |
| rb1LocalAxis | - axis given in rb1 coordinate frame (invalid if rb1LocalAxis.length() = 0) |
| rb2 | - second rigid body, if 0, rb1 will be constrained with world |
| rb2LocalAxis | - axis given in rb2 coordinate frame. If rb2 is 0 this axis should be given in world frame (invalid if rb2LocalAxis.length() = 0) |
| agx::Dot1Joint::Dot1Joint | ( | RigidBody * | rb1, |
| Frame * | rb1AttachmentFrame, | ||
| RigidBody * | rb2, | ||
| Frame * | rb2AttachmentFrame | ||
| ) |
Create dot 1 constraint between one or two bodies given attachment frames where the axis is defined to be the z-axis.
| rb1 | - first rigid body (invalid if 0) |
| rb1AttachmentFrame | - attachment frame belonging to rb1 (invalid if 0) |
| rb2 | - second rigid body, if 0, rb1 will be constrained with world |
| rb2AttachmentFrame | - second rigid body attachment frame. If rb2 is 0 this attachment defines the world frame (invalid if 0) |
|
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 |
Referenced by agx::Constraint::createFromBody().
|
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 |
Referenced by agx::Constraint::createFromWorld().
|
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 66 of file Dot1Joint.h.
|
inlinestatic |
Definition at line 66 of file Dot1Joint.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.
References agx::Constraint::calculateFramesFromBody().
|
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.
References agx::Constraint::calculateFramesFromWorld().
|
protectedinherited |
|
protectedinherited |
|
inherited |
rb if present - otherwise 0
|
inherited |
i (call equal to constraint->getAttachment( constraint->getBodyAt( i ) ))
|
inherited |
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 66 of file Dot1Joint.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 66 of file Dot1Joint.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
|
inherited |
|
inherited |
returns the number of bodies involved
|
inlineoverridevirtual |
Implements agx::Constraint.
Definition at line 64 of file Dot1Joint.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
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 |
Implements agxStream::Serializable.
Definition at line 66 of file Dot1Joint.h.
|
inherited |
Definition at line 268 of file Serializable.h.
|
inherited |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
inherited |
|
inherited |
Definition at line 252 of file Serializable.h.
|
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.
Referenced by agxData::Val< UInt >::Val().
|
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.
|
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.