Public Member Functions
|virtual void *||prepareData ()=0|
|virtual bool||updatePvdProperties (physx::pvdsdk::PvdDataStream &pvdConnection, const PxConstraint *c, PxPvdUpdateType::Enum updateType) const =0|
|virtual void||onConstraintRelease ()=0|
|virtual void||onComShift (PxU32 actor)=0|
|virtual void||onOriginShift (const PxVec3 &shift)=0|
|virtual void *||getExternalReference (PxU32 &typeID)=0|
|Fetches external data for a constraint. |
|virtual PxBase *||getSerializable ()=0|
|Obtain a reference to a PxBase interface if the constraint has one. |
|virtual PxConstraintSolverPrep||getPrep () const =0|
|Obtain the shader function pointer used to prep rows for this constraint. |
|virtual const void *||getConstantBlock () const =0|
|Obtain the pointer to the constraint's constant data. |
|virtual destructor |
This class connects a custom constraint to the SDK, and functions are called by the SDK to query the custom implementation for specific information to pass on to the application or inform the constraint when the application makes calls into the SDK which will update the custom constraint's internal implementation
|virtual const void* PxConstraintConnector::getConstantBlock||(||)|| const
Obtain the pointer to the constraint's constant data.
|virtual void* PxConstraintConnector::getExternalReference||(||PxU32 &||typeID||)||
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.
|[out]||typeID||Unique 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)|
|virtual PxConstraintSolverPrep PxConstraintConnector::getPrep||(||)|| const
Obtain the shader function pointer used to prep rows for this constraint.
|virtual PxBase* PxConstraintConnector::getSerializable||(||)||
|virtual void PxConstraintConnector::onComShift||(||PxU32||actor||)||
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.
|virtual void PxConstraintConnector::onConstraintRelease||(||)||
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, so that even if the release() call occurs during a simulation step, the deletion of the constraint is buffered until that step completes.
|virtual void PxConstraintConnector::onOriginShift||(||const PxVec3 &||shift||)||
This function is called by the SDK when the scene origin gets shifted and allows to adjust custom data which contains world space transforms.
|[in]||shift||Translation vector the origin is shifted by.|
|virtual void* PxConstraintConnector::prepareData||(||)||
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.
|virtual bool PxConstraintConnector::updatePvdProperties||(||physx::pvdsdk::PvdDataStream &||pvdConnection,|
|const PxConstraint *||c,|
this function is called by the SDK to update PVD's view of it