From Newton Wiki
Jump to: navigation, search


 void NewtonCollisionForEachPolygonDo (const NewtonCollision* collision, const dFloat* matrix, NewtonCollisionIterator callback, void* userData);


Iterate thought polygon of the collision geometry of a body calling the function callback.


  • NewtonCollision* collision - is the pointer to the collision object.
  • const dFloat* matrix - is the transformation matrix, returned polygons will be transformed using this matrix.
  • NewtonCollisionIterator callback - application define callback
  • void* userData - userdata defined pointer sent to the NewtonCollisionIterator callback


  • nothing


This function can be called by the application in order to show the collision geometry. The application should provide a pointer to the function NewtonCollisionIterator, Newton will convert the collision geometry into a polygonal mesh, and will call callback for every polygon of the mesh


  • Added in Newton 2.0
  • This function affect severely the performance of Newton. The application should call this function only for debugging purpose

See also

NewtonWorldGetFirstBody NewtonWorldGetNextBody NewtonCollisionGetInfo NewtonBodyGetCollision NewtonBodyGetMatrix