Public Member Functions | Protected Member Functions | List of all members
PxContactModifyCallback Class Referenceabstract

An interface class that the user can implement in order to modify contact constraints. More...

#include <PxContactModifyCallback.h>

Public Member Functions

virtual void onContactModify (PxContactModifyPair *const pairs, PxU32 count)=0
 Passes modifiable arrays of contacts to the application. More...
 

Protected Member Functions

virtual ~PxContactModifyCallback ()
 

Detailed Description

An interface class that the user can implement in order to modify contact constraints.

Threading: It is necessary to make this class thread safe as it will be called in the context of the simulation thread. It might also be necessary to make it reentrant, since some calls can be made by multi-threaded parts of the physics engine.

You can enable the use of this contact modification callback by raising the flag PxPairFlag::eMODIFY_CONTACTS in the filter shader/callback (see PxSimulationFilterShader) for a pair of rigid body objects.

Please note:

See Also
PxScene.setContactModifyCallback() PxScene.getContactModifyCallback()

Constructor & Destructor Documentation

virtual PxContactModifyCallback::~PxContactModifyCallback ( )
inlineprotectedvirtual

Member Function Documentation

virtual void PxContactModifyCallback::onContactModify ( PxContactModifyPair *const  pairs,
PxU32  count 
)
pure virtual

Passes modifiable arrays of contacts to the application.

The initial contacts are as determined fresh each frame by collision detection.

The number of contacts can not be changed, so you cannot add your own contacts. You may however disable contacts using PxContactSet::ignore().

See Also
PxContactModifyPair

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


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com