AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agx::BallJoint Class Reference

Constraint that removes the three translation DOF between two bodies (or one and the world). More...

#include <BallJoint.h>

+ Inheritance diagram for agx::BallJoint:

Public Types

enum  DOF {
  ALL_DOF = -1 , TRANSLATIONAL_1 = 0 , TRANSLATIONAL_2 = 1 , TRANSLATIONAL_3 = 2 ,
  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...
 
- Public Types inherited from agx::Constraint
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

 BallJoint (const BallJointFrame &bf, RigidBody *rb1, RigidBody *rb2=0)
 Constructor that creates a Ball Joint.
 
 BallJoint (RigidBody *rb1, const Vec3 &rb1LocalAttachPoint, RigidBody *rb2=nullptr, const Vec3 &rb2LocalAttachPoint=Vec3())
 Create a Ball Joint given one or two bodies with relative attachment points.
 
 BallJoint (RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2=nullptr, Frame *rb2AttachmentFrame=nullptr)
 Create a Ball Joint given one or two bodies with their respective attachment frames.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agx::BallJoint)
 
ConeLimitgetConeLimit ()
 Get ConeLimit, which can limit the movement of the first body in this constraint, relative to the second body.
 
const ConeLimitgetConeLimit () const
 Get ConeLimit, which can limit the movement of the first body in this constraint, relative to the second body.
 
RealVector getConeLimitFrictionCoefficients () const
 Get the friction coefficients of all the cone limit friction controllers.
 
FrictionControllergetConeLimitFrictionControllerLimit () const
 Get the FrictionController that acts along the cone limit.
 
FrictionControllergetConeLimitFrictionControllerRotational () const
 Get the FrictionController that acts on rotations on the cone limit.
 
FrictionControllerRefSetVector getConeLimitFrictionControllers () const
 Get FrictionControllers that control the friction on the limit of the ConeLimit.
 
virtual int getNumDOF () const override
 
RealVector getRotationalFrictionCoefficients () const
 Get the friction coefficients of all the rotational friction controllers.
 
FrictionControllergetRotationalFrictionControllerN () const
 Get the FrictionController that controls the friction around the N-axis.
 
FrictionControllerRefSetVector getRotationalFrictionControllers () const
 Get all three FrictionControllers that control the rotational friction of the BallJoint.
 
FrictionControllergetRotationalFrictionControllerU () const
 Get the FrictionController that controls the friction around the U-axis.
 
FrictionControllergetRotationalFrictionControllerV () const
 Get the FrictionController that controls the friction around the V-axis.
 
TwistRangeControllergetTwistRangeController () const
 Get TwistRange secondary constraint, making it possible to limit the twist of the first frame relative to the second one.
 
void setConeLimitFrictionCoefficients (Real frictionCoefficient)
 Set the friction coefficient for all the FrictionControllers connected to the ConeLimit.
 
void setEnableConeLimitFriction (bool enable)
 Enable/disable all the FrictionControllers connected to the ConeLimit, which sets friction on the limit.
 
void setEnableRotationalFriction (bool enable)
 Enable/disable rotational friction for all rotational directions of the BallJoint.
 
void setRotationalFrictionCoefficients (Real frictionCoefficient)
 Set the friction coefficient for all rotational FrictionControllers of the BallJoint.
 
- Public Member Functions inherited from agx::Constraint
agx::Bool addElementaryConstraint (const agx::Name &name, agx::ElementaryConstraint *elementaryConstraint)
 Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name.
 
agx::Bool addSecondaryConstraint (const agx::Name &name, agx::ElementaryConstraint *secondaryConstraint)
 Add secondary constraint (like motor, range and/or lock etc) given name.
 
 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.
 
template<typename T >
const T * as () const
 Try to do dynamic_cast on the constraint and return a pointer to the casted constraint.
 
RealVector calculateCurrentViolation () const
 Calculates the current violation of the ordinary degrees of freedom of this constraint, e.g., three translational and two rotational (total 5 elements) of a hinge, i.e., controllers DOF are not included.
 
agx::UInt calculateNumActiveRows () const
 Calculates the current number of active rows, including both elementary and secondary constraints.
 
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::AttachmentgetAttachment (agx::UInt i) const
 
agx::RigidBodyAttachmentgetAttachment (const agx::RigidBody *rb) const
 
agx::AttachmentPairgetAttachmentPair () const
 
agx::RigidBodygetBodyAt (agx::UInt i)
 
const agx::RigidBodygetBodyAt (agx::UInt i) const
 
virtual agx::Real getCompliance (agx::UInt dof) const
 Get the compliance for DOF i.
 
agx::Real getCurrentForce (agx::UInt dof) const
 Consider using getLastForce instead.
 
virtual Real getDamping (agx::UInt dof) const
 Get the damping for DOF dof.
 
virtual agx::Real getElasticity (agx::UInt dof) const
 Get the elasticity for DOF i.
 
agx::ElementaryConstraintgetElementaryConstraint (const agx::UInt index) const
 
agx::ElementaryConstraintgetElementaryConstraintGivenName (const agx::Name &name) const
 Find elementary constraint given name.
 
agx::Bool getEnable () const
 
agx::Bool getEnableComputeForces () const
 
bool getEnableDebugRendering () const
 
bool getEnableLinearization () const
 
agx::UInt32 getEntityId () const
 
agx::RangeReal getForceRange (agx::UInt dof=0) const
 Get the force range for DOF dof.
 
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.
 
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.
 
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.
 
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.
 
agx::UInt getNumBodies () const
 returns the number of bodies involved
 
virtual int getNumDOF () const =0
 
agx::UInt getNumElementaryConstraints () const
 
agx::UInt getNumSecondaryConstraints () const
 
virtual agx::RegularizationParametersgetRegularizationParameters (agx::UInt i)
 
virtual const agx::RegularizationParametersgetRegularizationParameters (agx::UInt i) const
 
agx::ConstraintImplementationgetRep ()
 
const agx::ConstraintImplementationgetRep () const
 
agx::ElementaryConstraintgetSecondaryConstraint (const agx::UInt index) const
 
agx::ElementaryConstraintgetSecondaryConstraintGivenName (const agx::Name &name) const
 Find secondary constraint given name.
 
agx::Constraint::SolveType getSolveType () const
 
agx::Bool getValid () const
 
agx::Bool isEnabled () const
 
virtual agx::Bool rebind ()
 Rebind this constraint, i.e., use current state as the initial configuration.
 
agx::Bool removeElementaryConstraint (agx::ElementaryConstraint *elementaryConstraint)
 Remove elementary constraint.
 
agx::Bool removeElementaryConstraint (const agx::Name &name)
 Remove elementary constraint.
 
agx::Bool removeSecondaryConstraint (agx::ElementaryConstraint *secondaryConstraint)
 Remove secondary constraint.
 
agx::Bool removeSecondaryConstraint (const agx::Name &name)
 Remove secondary constraint.
 
virtual void render (class agxRender::RenderManager *mgr, float scale) const =0
 Inherited method of how to render this constraint into DebugRenderer.
 
void restore (agxStream::InputArchive &in) override
 
virtual void restoreLightData (agxStream::StorageStream &str) override
 
void setCompliance (agx::Real compliance)
 Set the compliance of this constraint for all DOFs.
 
virtual void setCompliance (agx::Real compliance, agx::Int dof)
 Set the compliance of this constraint for the i:th DOF.
 
void setDamping (agx::Real damping)
 Set the damping of this constraint for all DOFs.
 
virtual void setDamping (agx::Real damping, agx::Int dof)
 Set the damping of this constraint for the i:th DOF.
 
virtual void setElasticity (agx::Real elasticity)
 Set the elasticity of this constraint for all DOFs.
 
virtual void setElasticity (agx::Real elasticity, agx::Int dof)
 Set the elasticity of this constraint for the i:th DOF.
 
virtual void setEnable (agx::Bool enable)
 Enable/disable a constraint.
 
void setEnableComputeForces (agx::Bool enable)
 Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint.
 
void setEnableDebugRendering (agx::Bool enable)
 Enable/disable debug rendering of this constraint.
 
void setEnableLinearization (bool enable)
 Pass true to enable linearization of constraint compliance.
 
void setForceRange (agx::RangeReal forceRange)
 Assign force range for all DOF of the elementary constraints.
 
void setForceRange (agx::RangeReal forceRange, agx::Int dof)
 Assign force range, of an elementary constraint, for a given DOF.
 
void setForceRange (agx::Real lower, agx::Real upper, agx::Int dof)
 Assign force range, of an elementary constraint, for a given DOF.
 
void setSolveType (agx::Constraint::SolveType solveType)
 Specify the solve type for this constraint.
 
void store (agxStream::OutputArchive &out) const override
 
virtual void storeLightData (agxStream::StorageStream &str) const override
 
- Public Member Functions inherited from agx::Interaction
 Interaction ()
 Default constructor.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agx::Interaction)
 
const agx::NamegetName () const
 
agx::PropertyContainergetPropertyContainer ()
 
const agx::PropertyContainergetPropertyContainer () const
 
agxSDK::SimulationProxygetSimulationProxy () const
 
agx::Bool hasPropertyContainer () const
 
virtual void postSystemCallback (agx::DynamicsSystem *)
 Called after all post step events, after solve.
 
virtual void preSystemCallback (agx::DynamicsSystem *)
 Called after all pre step events, before solve.
 
void setName (const agx::Name &name)
 Name this interaction.
 
void setPropertyContainer (agx::PropertyContainer *propertyContainer)
 Assign a new property container.
 
virtual void updateForce (agx::DynamicsSystem *dynamicsSystem)
 This virtual method is implemented so that it computes the interaction forces on all the physical bodies implicated.
 
- 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.
 
Referencedoperator= (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::Serializablecreate (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agx::Constraint
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
- Static Public Member Functions inherited from agx::Interaction
static agxStream::Serializablecreate (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.
 

Protected Member Functions

 BallJoint ()
 
 BallJoint (class BallJointImplementation *impl)
 
virtual ~BallJoint ()
 
virtual void render (agxRender::RenderManager *mgr, float scale) const override
 Inherited method of how to render this constraint into DebugRenderer.
 
- Protected Member Functions inherited from agx::Constraint
 Constraint ()
 
virtual ~Constraint ()
 
virtual void addNotification () override
 Called when added to a simulation.
 
virtual void postSystemCallback (agx::DynamicsSystem *dynamicsSystem) override
 Called after all post step events, after solve.
 
virtual void preSystemCallback (agx::DynamicsSystem *dynamicsSystem) override
 Called after all pre step events, before solve.
 
virtual void removeNotification () override
 Called when removed from a simulation.
 
void setRep (agx::ConstraintImplementation *_rep)
 
virtual void setSimulation (agxSDK::Simulation *simulation) override
 Assign simulation.
 
virtual void setSystem (agx::DynamicsSystem *)
 
- Protected Member Functions inherited from agx::Interaction
virtual ~Interaction ()
 Reference counted object, protected destructor.
 
virtual void addNotification ()
 Called when added to a simulation.
 
virtual void removeNotification ()
 Called when removed from a simulation.
 
virtual void setSimulation (agxSDK::Simulation *simulation)
 Assign simulation.
 
- 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 ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
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::Constraint
agx::ConstraintImplementationm_implementation
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Constraint that removes the three translation DOF between two bodies (or one and the world).

Definition at line 47 of file BallJoint.h.

Member Enumeration Documentation

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

TRANSLATIONAL_1 

Select DOF for the first translational axis.

TRANSLATIONAL_2 

Select DOF for the second translational axis.

TRANSLATIONAL_3 

Select DOF for the third translational axis.

NUM_DOF 

Number of DOF available for this constraint.

Definition at line 88 of file BallJoint.h.

Constructor & Destructor Documentation

◆ BallJoint() [1/5]

agx::BallJoint::BallJoint ( const BallJointFrame bf,
RigidBody rb1,
RigidBody rb2 = 0 
)

Constructor that creates a Ball Joint.

Parameters
bf- Frame specifying the geometry of the constraint.
rb1- The first body
rb2- If null, rb1 is attached to the world, if not, rb1 and rb2 are attached to each other.

◆ BallJoint() [2/5]

agx::BallJoint::BallJoint ( RigidBody rb1,
Frame rb1AttachmentFrame,
RigidBody rb2 = nullptr,
Frame rb2AttachmentFrame = nullptr 
)

Create a Ball Joint given one or two bodies with their respective attachment frames.

Given two bodies and two frames, the ball of the ball joint will be located at these two frames origins. For one body, rb2 == rb2AttachmentFrame == 0, the ball of the ball joint will be located at the world position of the attachment frame.

Parameters
rb1- First rigid body (invalid if null)
rb1AttachmentFrame- First rigid body attachment frame
rb2- Second rigid body (if null, first rigid body will be attached to world)
rb2AttachmentFrame- Second rigid body attachment frame (invalid if rb2 != 0 and rb2AttachmentFrame == 0)
Note
Valid configurations: rb1 != 0 && rb1AttachmentFrame != 0, rb1 != 0 && rb1AttachmentFrame != 0 && rb2 == 0 and rb1 != 0 && rb1AttachmentFrame != 0 && rb2 != 0 && rb2AttachmentFrame != 0. All other configurations are invalid.

◆ BallJoint() [3/5]

agx::BallJoint::BallJoint ( RigidBody rb1,
const Vec3 rb1LocalAttachPoint,
RigidBody rb2 = nullptr,
const Vec3 rb2LocalAttachPoint = Vec3() 
)

Create a Ball Joint given one or two bodies with relative attachment points.

This is similar to attachment frames.

Parameters
rb1- First rigid body (invalid if null)
rb1LocalAttachPoint- Attach point given in first rigid body local frame
rb2- Second rigid body (if null, first rigid body will be attached to world)
rb2LocalAttachPoint- Attach point given in second rigid body local frame

◆ BallJoint() [4/5]

agx::BallJoint::BallJoint ( )
protected

◆ BallJoint() [5/5]

agx::BallJoint::BallJoint ( class BallJointImplementation *  impl)
protected

◆ ~BallJoint()

virtual agx::BallJoint::~BallJoint ( )
protectedvirtual

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agx::BallJoint::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agx::BallJoint  )

◆ create()

static agxStream::Serializable * agx::BallJoint::create ( agxStream::InputArchive )
inlinestatic

Definition at line 206 of file BallJoint.h.

◆ getConeLimit() [1/2]

ConeLimit * agx::BallJoint::getConeLimit ( )

Get ConeLimit, which can limit the movement of the first body in this constraint, relative to the second body.

Returns
the ConeLimit secondary constraint

◆ getConeLimit() [2/2]

const ConeLimit * agx::BallJoint::getConeLimit ( ) const

Get ConeLimit, which can limit the movement of the first body in this constraint, relative to the second body.

Two limit angles can be set, which will define an elliptic cone that limits the movement of the bodies.

Returns
ConeLimit secondary constraint

◆ getConeLimitFrictionCoefficients()

RealVector agx::BallJoint::getConeLimitFrictionCoefficients ( ) const

Get the friction coefficients of all the cone limit friction controllers.

Returns
RealVector containing the friction coefficients

◆ getConeLimitFrictionControllerLimit()

FrictionController * agx::BallJoint::getConeLimitFrictionControllerLimit ( ) const

Get the FrictionController that acts along the cone limit.

Returns
FrictionController that controls part of the ConeLimit friction.

◆ getConeLimitFrictionControllerRotational()

FrictionController * agx::BallJoint::getConeLimitFrictionControllerRotational ( ) const

Get the FrictionController that acts on rotations on the cone limit.

Returns
FrictionController that controls part of the ConeLimit friction.

◆ getConeLimitFrictionControllers()

FrictionControllerRefSetVector agx::BallJoint::getConeLimitFrictionControllers ( ) const

Get FrictionControllers that control the friction on the limit of the ConeLimit.

Note that these FrictionControllers will not do anything if the ConeLimit is not active. There are two FrictionControllers on the limit, one which controls the friction along the limit, and the other one for rotation on the limit.

Returns
Vector of FrictionControllers related to the ConeLimit

◆ getNumDOF()

virtual int agx::BallJoint::getNumDOF ( ) const
overridevirtual
Returns
the number of DOF for this constraint, not including secondary constraints

Implements agx::Constraint.

◆ getRotationalFrictionCoefficients()

RealVector agx::BallJoint::getRotationalFrictionCoefficients ( ) const

Get the friction coefficients of all the rotational friction controllers.

Returns
RealVector containing the friction coefficients

◆ getRotationalFrictionControllerN()

FrictionController * agx::BallJoint::getRotationalFrictionControllerN ( ) const

Get the FrictionController that controls the friction around the N-axis.

Returns
FrictionController

◆ getRotationalFrictionControllers()

FrictionControllerRefSetVector agx::BallJoint::getRotationalFrictionControllers ( ) const

Get all three FrictionControllers that control the rotational friction of the BallJoint.

Returns
Vector of FrictionControllers

◆ getRotationalFrictionControllerU()

FrictionController * agx::BallJoint::getRotationalFrictionControllerU ( ) const

Get the FrictionController that controls the friction around the U-axis.

Returns
FrictionController

◆ getRotationalFrictionControllerV()

FrictionController * agx::BallJoint::getRotationalFrictionControllerV ( ) const

Get the FrictionController that controls the friction around the V-axis.

Returns
FrictionController

◆ getTwistRangeController()

TwistRangeController * agx::BallJoint::getTwistRangeController ( ) const

Get TwistRange secondary constraint, making it possible to limit the twist of the first frame relative to the second one.

When enabled no range is set by default.

Returns
TwistRange secondary constraint

◆ render()

virtual void agx::BallJoint::render ( agxRender::RenderManager mgr,
float  scale 
) const
overrideprotectedvirtual

Inherited method of how to render this constraint into DebugRenderer.

Implements agx::Constraint.

◆ setConeLimitFrictionCoefficients()

void agx::BallJoint::setConeLimitFrictionCoefficients ( Real  frictionCoefficient)

Set the friction coefficient for all the FrictionControllers connected to the ConeLimit.

The friction is only active on the limit. Note that this will override any other values set.

Parameters
frictionCoefficient- the friction coefficient for all the cone limit FrictionControllers

◆ setEnableConeLimitFriction()

void agx::BallJoint::setEnableConeLimitFriction ( bool  enable)

Enable/disable all the FrictionControllers connected to the ConeLimit, which sets friction on the limit.

Parameters
enable- Set to true to enable all ConeLimit FrictionControllers and false disable them.

◆ setEnableRotationalFriction()

void agx::BallJoint::setEnableRotationalFriction ( bool  enable)

Enable/disable rotational friction for all rotational directions of the BallJoint.

Parameters
enable- Set to true to enable all rotational FrictionControllers and false disable them.

◆ setRotationalFrictionCoefficients()

void agx::BallJoint::setRotationalFrictionCoefficients ( Real  frictionCoefficient)

Set the friction coefficient for all rotational FrictionControllers of the BallJoint.

Parameters
frictionCoefficient- the friction coefficient for all rotational FrictionControllers

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