void NewtonStaticCollisionSetDebugCallback (const NewtonCollision* staticCollision, NewtonTreeCollisionCallback userCallback);
Assign an event function in case a Collision Tree primitive collides.
- const NewtonCollision* staticCollision - pointer to the Collision Tree containing triangle soup based geometry data.
- NewtonTreeCollisionCallback userCallback - pointer to a callback function used to handle collisions for the given Collision Tree.
Assign a callback to be triggered, in case a Collision Tree primitive collides with another dynamic object.
The event handler callback function receives a pointer to the body having the Collision Tree, pointer to the dynamic body causing the collision, the face ID which collided, the data of the vertices corresponding to the given face.
The application can use this callback for debugging purposes or also to modify the collision geometry by changing the face ID. This can be useful to make surface changes based for the given faces based on collision with bodies with different attributes.
- Added in Newton 2.0
- This callback can be used for TreeCollision, HeightFieldCollision primitives and for SceneCollision primitives containing TreeCollision and/or HeightFieldCollision primitives