Difference between revisions of "NewtonCollisionForEachPolygonDo"

From Newton Wiki
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:02, 10 June 2019

NewtonCollisionForEachPolygonDo

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

Usage

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

Parameters

  • 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

Return

  • nothing

Description

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

Remarks

  • 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