RavEngine
Loading...
Searching...
No Matches
physx::PxDistanceJoint Class Referenceabstract

a joint that maintains an upper or lower bound (or both) on the distance between two points on different objects More...

#include <PxDistanceJoint.h>

Inheritance diagram for physx::PxDistanceJoint:
[legend]
Collaboration diagram for physx::PxDistanceJoint:
[legend]

Public Member Functions

virtual PxReal getDistance () const =0
 Return the current distance of the joint.
 
virtual void setMinDistance (PxReal distance)=0
 Set the allowed minimum distance for the joint.
 
virtual PxReal getMinDistance () const =0
 Get the allowed minimum distance for the joint.
 
virtual void setMaxDistance (PxReal distance)=0
 Set the allowed maximum distance for the joint.
 
virtual PxReal getMaxDistance () const =0
 Get the allowed maximum distance for the joint.
 
virtual void setTolerance (PxReal tolerance)=0
 Set the error tolerance of the joint.
 
virtual PxReal getTolerance () const =0
 Get the error tolerance of the joint.
 
virtual void setStiffness (PxReal stiffness)=0
 Set the strength of the joint spring.
 
virtual PxReal getStiffness () const =0
 Get the strength of the joint spring.
 
virtual void setDamping (PxReal damping)=0
 Set the damping of the joint spring.
 
virtual PxReal getDamping () const =0
 Get the damping of the joint spring.
 
virtual void setContactDistance (PxReal contactDistance)=0
 Set the contact distance for the min & max distance limits.
 
virtual PxReal getContactDistance () const =0
 Get the contact distance.
 
virtual void setDistanceJointFlags (PxDistanceJointFlags flags)=0
 Set the flags specific to the Distance Joint.
 
virtual void setDistanceJointFlag (PxDistanceJointFlag::Enum flag, bool value)=0
 Set a single flag specific to a Distance Joint to true or false.
 
virtual PxDistanceJointFlags getDistanceJointFlags () const =0
 Get the flags specific to the Distance Joint.
 
virtual const char * getConcreteTypeName () const
 Returns string name of PxDistanceJoint, used for serialization.
 
- Public Member Functions inherited from physx::PxJoint
virtual void setActors (PxRigidActor *actor0, PxRigidActor *actor1)=0
 Set the actors for this joint.
 
virtual void getActors (PxRigidActor *&actor0, PxRigidActor *&actor1) const =0
 Get the actors for this joint.
 
virtual void setLocalPose (PxJointActorIndex::Enum actor, const PxTransform &localPose)=0
 Set the joint local pose for an actor.
 
virtual PxTransform getLocalPose (PxJointActorIndex::Enum actor) const =0
 get the joint local pose for an actor.
 
virtual PxTransform getRelativeTransform () const =0
 get the relative pose for this joint
 
virtual PxVec3 getRelativeLinearVelocity () const =0
 get the relative linear velocity of the joint
 
virtual PxVec3 getRelativeAngularVelocity () const =0
 get the relative angular velocity of the joint
 
virtual void setBreakForce (PxReal force, PxReal torque)=0
 set the break force for this joint.
 
virtual void getBreakForce (PxReal &force, PxReal &torque) const =0
 get the break force for this joint.
 
virtual void setConstraintFlags (PxConstraintFlags flags)=0
 set the constraint flags for this joint.
 
virtual void setConstraintFlag (PxConstraintFlag::Enum flag, bool value)=0
 set a constraint flags for this joint to a specified value.
 
virtual PxConstraintFlags getConstraintFlags () const =0
 get the constraint flags for this joint.
 
virtual void setInvMassScale0 (PxReal invMassScale)=0
 set the inverse mass scale for actor0.
 
virtual PxReal getInvMassScale0 () const =0
 get the inverse mass scale for actor0.
 
virtual void setInvInertiaScale0 (PxReal invInertiaScale)=0
 set the inverse inertia scale for actor0.
 
virtual PxReal getInvInertiaScale0 () const =0
 get the inverse inertia scale for actor0.
 
virtual void setInvMassScale1 (PxReal invMassScale)=0
 set the inverse mass scale for actor1.
 
virtual PxReal getInvMassScale1 () const =0
 get the inverse mass scale for actor1.
 
virtual void setInvInertiaScale1 (PxReal invInertiaScale)=0
 set the inverse inertia scale for actor1.
 
virtual PxReal getInvInertiaScale1 () const =0
 get the inverse inertia scale for actor1.
 
virtual PxConstraint * getConstraint () const =0
 Retrieves the PxConstraint corresponding to this joint.
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName().
 
virtual const char * getName () const =0
 Retrieves the name string set with setName().
 
virtual void release ()=0
 Deletes the joint.
 
virtual PxScene * getScene () const =0
 Retrieves the scene which this joint belongs to.
 
- Public Member Functions inherited from physx::PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 

Protected Member Functions

PX_INLINE PxDistanceJoint (PxType concreteType, PxBaseFlags baseFlags)
 Constructor.
 
PX_INLINE PxDistanceJoint (PxBaseFlags baseFlags)
 Deserialization constructor.
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance.
 
- Protected Member Functions inherited from physx::PxJoint
PX_INLINE PxJoint (PxType concreteType, PxBaseFlags baseFlags)
 Constructor.
 
PX_INLINE PxJoint (PxBaseFlags baseFlags)
 Deserialization constructor.
 
- Protected Member Functions inherited from physx::PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags.
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags.
 
virtual ~PxBase ()
 Destructor.
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Static Public Member Functions inherited from physx::PxJoint
static void getBinaryMetaData (PxOutputStream &stream)
 Put class meta data in stream, used for serialization.
 
- Public Attributes inherited from physx::PxJoint
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

Detailed Description

a joint that maintains an upper or lower bound (or both) on the distance between two points on different objects

See also
PxDistanceJointCreate PxJoint

Member Function Documentation

◆ getConcreteTypeName()

virtual const char * physx::PxDistanceJoint::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of PxDistanceJoint, used for serialization.

Implements physx::PxBase.

◆ getContactDistance()

virtual PxReal physx::PxDistanceJoint::getContactDistance ( ) const
pure virtual

Get the contact distance.

Returns
the contact distance
See also
PxJointLimitParameters::contactDistance setContactDistance()

◆ getDamping()

virtual PxReal physx::PxDistanceJoint::getDamping ( ) const
pure virtual

Get the damping of the joint spring.

Returns
the degree of damping of the joint spring of the joint
See also
PxDistanceJointFlag::eSPRING_ENABLED setDamping()

◆ getDistanceJointFlags()

virtual PxDistanceJointFlags physx::PxDistanceJoint::getDistanceJointFlags ( ) const
pure virtual

Get the flags specific to the Distance Joint.

Returns
the joint flags
See also
PxDistanceJoint::flags, PxDistanceJointFlag setFlag() setFlags()

◆ getMaxDistance()

virtual PxReal physx::PxDistanceJoint::getMaxDistance ( ) const
pure virtual

Get the allowed maximum distance for the joint.

Returns
the allowed maximum distance
See also
PxDistanceJoint::maxDistance, PxDistanceJointFlag::eMAX_DISTANCE_ENABLED setMaxDistance()

◆ getMinDistance()

virtual PxReal physx::PxDistanceJoint::getMinDistance ( ) const
pure virtual

Get the allowed minimum distance for the joint.

Returns
the allowed minimum distance
See also
PxDistanceJoint::minDistance, PxDistanceJointFlag::eMIN_DISTANCE_ENABLED setMinDistance()

◆ getStiffness()

virtual PxReal physx::PxDistanceJoint::getStiffness ( ) const
pure virtual

Get the strength of the joint spring.

Returns
stiffness the spring strength of the joint
See also
PxDistanceJointFlag::eSPRING_ENABLED setStiffness()

◆ getTolerance()

virtual PxReal physx::PxDistanceJoint::getTolerance ( ) const
pure virtual

Get the error tolerance of the joint.

the distance beyond the joint's [min, max] range before the joint becomes active.

Default 0.25f * PxTolerancesScale::length Range (0, PX_MAX_F32)

This value should be used to ensure that if the minimum distance is zero and the spring function is in use, the rest length of the spring is non-zero.

See also
PxDistanceJoint::tolerance, setTolerance()

◆ isKindOf()

virtual bool physx::PxDistanceJoint::isKindOf ( const char *  name) const
inlineprotectedvirtual

Returns whether a given type name matches with the type of this instance.

Reimplemented from physx::PxJoint.

◆ setContactDistance()

virtual void physx::PxDistanceJoint::setContactDistance ( PxReal  contactDistance)
pure virtual

Set the contact distance for the min & max distance limits.

This is similar to the PxJointLimitParameters::contactDistance parameter for regular limits.

The two most common values are 0 and infinite. Infinite means the internal constraints are always created, resulting in the best simulation quality but slower performance. Zero means the internal constraints are only created when the limits are violated, resulting in best performance but worse simulation quality.

Default 0.0f Range [0, PX_MAX_F32)

Parameters
[in]contactDistanceThe contact distance
See also
PxJointLimitParameters::contactDistance getContactDistance()

◆ setDamping()

virtual void physx::PxDistanceJoint::setDamping ( PxReal  damping)
pure virtual

Set the damping of the joint spring.

The spring is used if enabled, and the distance exceeds the range [min-error, max+error].

Default 0.0f Range [0, PX_MAX_F32)

Parameters
[in]dampingthe degree of damping of the joint spring of the joint
See also
PxDistanceJointFlag::eSPRING_ENABLED setDamping()

◆ setDistanceJointFlag()

virtual void physx::PxDistanceJoint::setDistanceJointFlag ( PxDistanceJointFlag::Enum  flag,
bool  value 
)
pure virtual

Set a single flag specific to a Distance Joint to true or false.

Parameters
[in]flagThe flag to set or clear.
[in]valuethe value to which to set the flag
See also
PxDistanceJointFlag, getFlags() setFlags()

◆ setDistanceJointFlags()

virtual void physx::PxDistanceJoint::setDistanceJointFlags ( PxDistanceJointFlags  flags)
pure virtual

Set the flags specific to the Distance Joint.

Default PxDistanceJointFlag::eMAX_DISTANCE_ENABLED

Parameters
[in]flagsThe joint flags.
See also
PxDistanceJointFlag setFlag() getFlags()

◆ setMaxDistance()

virtual void physx::PxDistanceJoint::setMaxDistance ( PxReal  distance)
pure virtual

Set the allowed maximum distance for the joint.

The maximum distance must be no less than the minimum distance.

Default 0.0f Range [0, PX_MAX_F32)

Parameters
[in]distancethe maximum distance
See also
PxDistanceJoint::maxDistance, PxDistanceJointFlag::eMAX_DISTANCE_ENABLED getMinDistance()

◆ setMinDistance()

virtual void physx::PxDistanceJoint::setMinDistance ( PxReal  distance)
pure virtual

Set the allowed minimum distance for the joint.

The minimum distance must be no more than the maximum distance

Default 0.0f Range [0, PX_MAX_F32)

Parameters
[in]distancethe minimum distance
See also
PxDistanceJoint::minDistance, PxDistanceJointFlag::eMIN_DISTANCE_ENABLED getMinDistance()

◆ setStiffness()

virtual void physx::PxDistanceJoint::setStiffness ( PxReal  stiffness)
pure virtual

Set the strength of the joint spring.

The spring is used if enabled, and the distance exceeds the range [min-error, max+error].

Default 0.0f Range [0, PX_MAX_F32)

Parameters
[in]stiffnessthe spring strength of the joint
See also
PxDistanceJointFlag::eSPRING_ENABLED getStiffness()

◆ setTolerance()

virtual void physx::PxDistanceJoint::setTolerance ( PxReal  tolerance)
pure virtual

Set the error tolerance of the joint.

Parameters
[in]tolerancethe distance beyond the allowed range at which the joint becomes active
See also
PxDistanceJoint::tolerance, getTolerance()

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