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

Classes

struct  PulleyJointData
 

Public Member Functions

 PulleyJoint (physx::PxPhysics &physics, physx::PxRigidBody &body0, const physx::PxTransform &localFrame0, const physx::PxVec3 &attachment0, physx::PxRigidBody &body1, const physx::PxTransform &localFrame1, const physx::PxVec3 &attachment1)
 
void release ()
 
void setAttachment0 (const physx::PxVec3 &pos)
 
physx::PxVec3 getAttachment0 () const
 
void setAttachment1 (const physx::PxVec3 &pos)
 
physx::PxVec3 getAttachment1 () const
 
void setDistance (physx::PxReal totalDistance)
 
physx::PxReal getDistance () const
 
void setRatio (physx::PxReal ratio)
 
physx::PxReal getRatio () const
 
void * prepareData ()
 Pre-simulation data preparation when the constraint is marked dirty, this function is called at the start of the simulation step for the SDK to copy the constraint data block.
 
void onConstraintRelease ()
 Constraint release callback.
 
void onComShift (physx::PxU32 actor)
 Center-of-mass shift callback.
 
void onOriginShift (const physx::PxVec3 &shift)
 Origin shift callback.
 
void * getExternalReference (physx::PxU32 &typeID)
 Fetches external data for a constraint.
 
bool updatePvdProperties (physx::pvdsdk::PvdDataStream &, const physx::PxConstraint *, physx::PxPvdUpdateType::Enum) const
 this function is called by the SDK to update PVD's view of it
 
void updateOmniPvdProperties () const
 this function is called by the SDK to update OmniPVD's view of it
 
physx::PxBase * getSerializable ()
 Obtain a reference to a PxBase interface if the constraint has one.
 
virtual physx::PxConstraintSolverPrep getPrep () const
 Obtain the shader function pointer used to prep rows for this constraint.
 
virtual const void * getConstantBlock () const
 Obtain the pointer to the constraint's constant data.
 
- Public Member Functions inherited from physx::PxConstraintConnector
virtual void connectToConstraint (PxConstraint *)
 Let the connector know it has been connected to a constraint.
 
virtual ~PxConstraintConnector ()
 virtual destructor
 

Public Attributes

physx::PxRigidBody * mBody [2]
 
physx::PxTransform mLocalPose [2]
 
physx::PxConstraint * mConstraint
 
PulleyJointData mData
 

Static Public Attributes

static const physx::PxU32 TYPE_ID = physx::PxConcreteType::eFIRST_USER_EXTENSION
 

Member Function Documentation

◆ getConstantBlock()

virtual const void * PulleyJoint::getConstantBlock ( ) const
inlinevirtual

Obtain the pointer to the constraint's constant data.

Implements physx::PxConstraintConnector.

◆ getExternalReference()

void * PulleyJoint::getExternalReference ( physx::PxU32 &  typeID)
virtual

Fetches external data for a constraint.

This function is used by the SDK to acquire a reference to the owner of a constraint and a unique owner type ID. This information will be passed on when a breakable constraint breaks or when #PxConstraint::getExternalReference() is called.

Parameters
[out]typeIDUnique type identifier of the external object. The value 0xffffffff is reserved and should not be used. Furthermore, if the PhysX extensions library is used, some other IDs are reserved already (see PxConstraintExtIDs)
Returns
Reference to the external object which owns the constraint.
See also
PxConstraintInfo PxSimulationEventCallback.onConstraintBreak()

Implements physx::PxConstraintConnector.

◆ getPrep()

PxConstraintSolverPrep PulleyJoint::getPrep ( ) const
virtual

Obtain the shader function pointer used to prep rows for this constraint.

Implements physx::PxConstraintConnector.

◆ getSerializable()

physx::PxBase * PulleyJoint::getSerializable ( )
inlinevirtual

Obtain a reference to a PxBase interface if the constraint has one.

If the constraint does not implement the PxBase interface, it should return NULL.

Implements physx::PxConstraintConnector.

◆ onComShift()

void PulleyJoint::onComShift ( physx::PxU32  actor)
virtual

Center-of-mass shift callback.

This function is called by the SDK when the CoM of one of the actors is moved. Since the API specifies constraint positions relative to actors, and the constraint shader functions are supplied with coordinates relative to bodies, some synchronization is usually required when the application moves an object's center of mass.

Implements physx::PxConstraintConnector.

◆ onConstraintRelease()

void PulleyJoint::onConstraintRelease ( )
virtual

Constraint release callback.

When the SDK deletes a PxConstraint object this function is called by the SDK. In general custom constraints should not be deleted directly by applications: rather, the constraint should respond to a release() request by calling PxConstraint::release(), then wait for this call to release its own resources.

This function is also called when a PxConstraint object is deleted on cleanup due to destruction of the PxPhysics object.

Implements physx::PxConstraintConnector.

◆ onOriginShift()

void PulleyJoint::onOriginShift ( const physx::PxVec3 &  shift)
virtual

Origin shift callback.

This function is called by the SDK when the scene origin gets shifted and allows to adjust custom data which contains world space transforms.

Note
If the adjustments affect constraint shader data, it is necessary to call PxConstraint::markDirty() to make sure that the data gets synced at the beginning of the next simulation step.
Parameters
[in]shiftTranslation vector the origin is shifted by.
See also
PxScene.shiftOrigin()

Implements physx::PxConstraintConnector.

◆ prepareData()

void * PulleyJoint::prepareData ( )
virtual

Pre-simulation data preparation when the constraint is marked dirty, this function is called at the start of the simulation step for the SDK to copy the constraint data block.

Implements physx::PxConstraintConnector.

◆ updateOmniPvdProperties()

void PulleyJoint::updateOmniPvdProperties ( ) const
inlinevirtual

this function is called by the SDK to update OmniPVD's view of it

Implements physx::PxConstraintConnector.

◆ updatePvdProperties()

bool PulleyJoint::updatePvdProperties ( physx::pvdsdk::PvdDataStream &  pvdConnection,
const physx::PxConstraint *  c,
physx::PxPvdUpdateType::Enum  updateType 
) const
inlinevirtual

this function is called by the SDK to update PVD's view of it

Implements physx::PxConstraintConnector.


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