SimApi Physics AddContactReport
Jump to navigation
Jump to search
static int SimApi::Physics::AddContactReport(NxUserContactReport *i_pContactReport)
Description
Registers a contact report class instance in the PhysX scene, so each contact occurs will call the OnContact callback in the supplied class instance.
Parameters
i_pContactReport - a pointer to PhysX NxUserContactReport class
Return
Type: int Description: An integer handle used for removing the contact report
Remarks
Code Sample
class CCustomContactReport:public NxUserContactReport{
public:
virtual void onContactNotify(NxContactPair& pair, NxU32 events);
};
CCustomContactReport myContactReport;
int reportH(-1);
reportH = SimApi::Physics::AddContactReport(&myContactReport);
See Also
RemoveContantReport