From Newton Wiki
Jump to: navigation, search


typedef int  (*NewtonOnAABBOverlap) (const NewtonMaterial* const material, const NewtonBody* const body0, const NewtonBody* const body1, int threadIndex)


The callback is called before contact calculation is made for a potential collision between two bodies.

It is called always, whenever axis-oriented bounding boxes(AABB) of two bodies intresect. You can then decide wheter you want to process such collision or reject it at this stage. If you accept collision, then NewtonContactProcess will be called with a material contact joint between each set of two bodies in collision.


  • const NewtonMaterial* material - newton material pair
  • const NewtonBody* body0 - first body (not in any particular order)
  • const NewtonBody* body1 - first body (not in any particular order)
  • int threadIndex


  • return 1 to keep processing this material body pair for collisions or return 0 to reject it.


  • This is not a library function, but a callback event.

See also

NewtonContactsProcess NewtonContactProcess NewtonMaterialSetCollisionCallback