29 collisionCallback_onAABBOverlap,
30 collisionCallback_contactsProcess);
41int _CDECL MaterialPair::collisionCallback_onAABBOverlap(
const NewtonMaterial* material,
const NewtonBody* newtonBody0,
const NewtonBody* newtonBody1,
int threadIndex )
44 me = (
MaterialPair*)NewtonMaterialGetMaterialPairUserData( material );
52void _CDECL MaterialPair::collisionCallback_contactsProcess(
const NewtonJoint *newtonContactJoint, dFloat timestep,
int threadIndex )
54 ContactJoint contactJoint(newtonContactJoint);
56 MaterialPair* me = contactJoint.getMaterialPair();
60 (me->m_contactcallback->contactsProcess)(contactJoint, timestep, threadIndex);
main class for all Rigid Bodies in the system.
int getID() const
get Newton-assigned material ID.
define interaction between materials
MaterialPair(const World *world, const MaterialID *mat1, const MaterialID *mat2)
constructor
void setContactCallback(OgreNewt::ContactCallback *callback)
assign a custom collision callback.
~MaterialPair()
destructor
OgreNewt::ContactCallback * m_contactcallback
represents a physics world.
NewtonWorld * getNewtonWorld() const
retrieves a pointer to the NewtonWorld
void waitForUpdateToFinish() const