RavEngine
Loading...
Searching...
No Matches
physx::NpConstraint Class Reference
Inheritance diagram for physx::NpConstraint:
[legend]
Collaboration diagram for physx::NpConstraint:
[legend]

Public Member Functions

 NpConstraint (PxBaseFlags baseFlags)
 
void preExportDataReset ()
 
void exportExtraData (PxSerializationContext &)
 
void importExtraData (PxDeserializationContext &)
 
void resolveReferences (PxDeserializationContext &context)
 
virtual void requiresObjects (PxProcessPxBaseCallback &)
 
virtual bool isSubordinate () const
 
 NpConstraint (PxRigidActor *actor0, PxRigidActor *actor1, PxConstraintConnector &connector, const PxConstraintShaderTable &shaders, PxU32 dataSize)
 
virtual void release () PX_OVERRIDE
 Releases a PxConstraint instance.
 
virtual PxScene * getScene () const PX_OVERRIDE
 Retrieves the scene which this constraint belongs to.
 
virtual void getActors (PxRigidActor *&actor0, PxRigidActor *&actor1) const PX_OVERRIDE
 Retrieves the actors for this constraint.
 
virtual void setActors (PxRigidActor *actor0, PxRigidActor *actor1) PX_OVERRIDE
 Sets the actors for this constraint.
 
virtual void markDirty () PX_OVERRIDE
 Notify the scene that the constraint shader data has been updated by the application.
 
virtual PxConstraintFlags getFlags () const PX_OVERRIDE
 Retrieve the flags for this constraint.
 
virtual void setFlags (PxConstraintFlags flags) PX_OVERRIDE
 Set the flags for this constraint.
 
virtual void setFlag (PxConstraintFlag::Enum flag, bool value) PX_OVERRIDE
 Set a flag for this constraint.
 
virtual void getForce (PxVec3 &linear, PxVec3 &angular) const PX_OVERRIDE
 Retrieve the constraint force most recently applied to maintain this constraint.
 
virtual bool isValid () const PX_OVERRIDE
 whether the constraint is valid.
 
virtual void setBreakForce (PxReal linear, PxReal angular) PX_OVERRIDE
 Set the break force and torque thresholds for this constraint.
 
virtual void getBreakForce (PxReal &linear, PxReal &angular) const PX_OVERRIDE
 Retrieve the constraint break force and torque thresholds.
 
virtual void setMinResponseThreshold (PxReal threshold) PX_OVERRIDE
 Set the minimum response threshold for a constraint row.
 
virtual PxReal getMinResponseThreshold () const PX_OVERRIDE
 Retrieve the constraint break force and torque thresholds.
 
virtual void * getExternalReference (PxU32 &typeID) PX_OVERRIDE
 Fetch external owner of the constraint.
 
virtual void setConstraintFunctions (PxConstraintConnector &n, const PxConstraintShaderTable &t) PX_OVERRIDE
 Set the constraint functions for this constraint.
 
void updateConstants (PxsSimulationController &simController)
 
void comShift (PxRigidActor *)
 
void actorDeleted (PxRigidActor *)
 
NpScene * getSceneFromActors () const
 
PX_FORCE_INLINE Sc::ConstraintCore & getCore ()
 
PX_FORCE_INLINE const Sc::ConstraintCore & getCore () const
 
PX_FORCE_INLINE bool isDirty () const
 
PX_FORCE_INLINE void markClean ()
 
- Public Member Functions inherited from physx::PxConstraint
virtual const char * getConcreteTypeName () const PX_OVERRIDE
 Returns string name of dynamic type.
 
- 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.
 
- Public Member Functions inherited from physx::NpBase
 NpBase (const PxEMPTY)
 
 NpBase (NpType::Enum type)
 
PX_INLINE bool isAPIWriteForbidden () const
 
PX_INLINE bool isAPIWriteForbiddenExceptSplitSim () const
 
PX_FORCE_INLINE NpType::Enum getNpType () const
 
PX_FORCE_INLINE void setNpScene (NpScene *scene)
 
PX_FORCE_INLINE NpScene * getNpScene () const
 
PX_FORCE_INLINE PxU32 getBaseIndex () const
 
PX_FORCE_INLINE void setBaseIndex (PxU32 index)
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Static Public Member Functions

static NpConstraint * createObject (PxU8 *&address, PxDeserializationContext &context)
 
static void getBinaryMetaData (PxOutputStream &stream)
 
static PX_FORCE_INLINE size_t getCoreOffset ()
 
- Static Public Member Functions inherited from physx::NpBase
static void getBinaryMetaData (PxOutputStream &stream)
 

Additional Inherited Members

- Public Attributes inherited from physx::PxConstraint
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Protected Member Functions inherited from physx::PxConstraint
PX_INLINE PxConstraint (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxConstraint (PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const PX_OVERRIDE
 Returns whether a given type name matches with the type of this instance.
 
- 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
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 
- Protected Attributes inherited from physx::NpBase
PxU32 mFreeSlot
 

Member Function Documentation

◆ getActors()

void NpConstraint::getActors ( PxRigidActor *&  actor0,
PxRigidActor *&  actor1 
) const
virtual

Retrieves the actors for this constraint.

Parameters
[out]actor0a reference to the pointer for the first actor
[out]actor1a reference to the pointer for the second actor
See also
PxActor

Implements physx::PxConstraint.

◆ getBreakForce()

void NpConstraint::getBreakForce ( PxReal &  linear,
PxReal &  angular 
) const
virtual

Retrieve the constraint break force and torque thresholds.

Parameters
[out]linearthe linear break threshold
[out]angularthe angular break threshold

Implements physx::PxConstraint.

◆ getExternalReference()

void * NpConstraint::getExternalReference ( PxU32 &  typeID)
virtual

Fetch external owner of the constraint.

Provides a reference to the external owner of a constraint and a unique owner type ID.

Parameters
[out]typeIDUnique type identifier of the external object.
Returns
Reference to the external object which owns the constraint.
See also
PxConstraintConnector.getExternalReference()

Implements physx::PxConstraint.

◆ getFlags()

PxConstraintFlags NpConstraint::getFlags ( ) const
virtual

Retrieve the flags for this constraint.

Returns
the constraint flags
See also
PxConstraintFlags

Implements physx::PxConstraint.

◆ getForce()

void NpConstraint::getForce ( PxVec3 &  linear,
PxVec3 &  angular 
) const
virtual

Retrieve the constraint force most recently applied to maintain this constraint.

Note
It is not allowed to use this method while the simulation is running (except during PxScene::collide(), in PxContactModifyCallback or in contact report callbacks).
Parameters
[out]linearthe constraint force
[out]angularthe constraint torque

Implements physx::PxConstraint.

◆ getMinResponseThreshold()

PxReal NpConstraint::getMinResponseThreshold ( ) const
virtual

Retrieve the constraint break force and torque thresholds.

Returns
the minimum response threshold for a constraint row

Implements physx::PxConstraint.

◆ getScene()

PxScene * NpConstraint::getScene ( ) const
virtual

Retrieves the scene which this constraint belongs to.

Returns
Owner Scene. NULL if not part of a scene.
See also
PxScene

Implements physx::PxConstraint.

◆ isValid()

bool NpConstraint::isValid ( ) const
virtual

whether the constraint is valid.

A constraint is valid if it has at least one dynamic rigid body or articulation link. A constraint that is not valid may not be inserted into a scene, and therefore a static actor to which an invalid constraint is attached may not be inserted into a scene.

Invalid constraints arise only when an actor to which the constraint is attached has been deleted.

Implements physx::PxConstraint.

◆ markDirty()

void NpConstraint::markDirty ( )
virtual

Notify the scene that the constraint shader data has been updated by the application.

Implements physx::PxConstraint.

◆ release()

void NpConstraint::release ( )
virtual

Releases a PxConstraint instance.

Note
This call does not wake up the connected rigid bodies.
See also
PxPhysics.createConstraint, PxBase.release()

Implements physx::PxConstraint.

◆ setActors()

void NpConstraint::setActors ( PxRigidActor *  actor0,
PxRigidActor *  actor1 
)
virtual

Sets the actors for this constraint.

Parameters
[in]actor0a reference to the pointer for the first actor
[in]actor1a reference to the pointer for the second actor
See also
PxActor

Implements physx::PxConstraint.

◆ setBreakForce()

void NpConstraint::setBreakForce ( PxReal  linear,
PxReal  angular 
)
virtual

Set the break force and torque thresholds for this constraint.

If either the force or torque measured at the constraint exceed these thresholds the constraint will break.

Parameters
[in]linearthe linear break threshold
[in]angularthe angular break threshold

Implements physx::PxConstraint.

◆ setConstraintFunctions()

void NpConstraint::setConstraintFunctions ( PxConstraintConnector &  connector,
const PxConstraintShaderTable &  shaders 
)
virtual

Set the constraint functions for this constraint.

Parameters
[in]connectorthe constraint connector object by which the SDK communicates with the constraint.
[in]shadersthe shader table for the constraint
See also
PxConstraintConnector PxConstraintSolverPrep PxConstraintProject PxConstraintVisualize

Implements physx::PxConstraint.

◆ setFlag()

void NpConstraint::setFlag ( PxConstraintFlag::Enum  flag,
bool  value 
)
virtual

Set a flag for this constraint.

Parameters
[in]flagthe constraint flag
[in]valuethe new value of the flag
See also
PxConstraintFlags

Implements physx::PxConstraint.

◆ setFlags()

void NpConstraint::setFlags ( PxConstraintFlags  flags)
virtual

Set the flags for this constraint.

Parameters
[in]flagsthe new constraint flags

default: PxConstraintFlag::eDRIVE_LIMITS_ARE_FORCES

See also
PxConstraintFlags

Implements physx::PxConstraint.

◆ setMinResponseThreshold()

void NpConstraint::setMinResponseThreshold ( PxReal  threshold)
virtual

Set the minimum response threshold for a constraint row.

When using mass modification for a joint or infinite inertia for a jointed body, very stiff solver constraints can be generated which can destabilize simulation. Setting this value to a small positive value (e.g. 1e-8) will cause constraint rows to be ignored if very large changes in impulses will generate only small changes in velocity. When setting this value, also set PxConstraintFlag::eDISABLE_PREPROCESSING. The solver accuracy for this joint may be reduced.

Parameters
[in]thresholdthe minimum response threshold
See also
PxConstraintFlag::eDISABLE_PREPROCESSING

Implements physx::PxConstraint.


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