NewtonTreeCollisionSetUserRayCastCallback

From Newton Wiki
Revision as of 08:02, 10 June 2019 by Unknown user (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NewtonTreeCollisionSetUserRayCastCallback

 void NewtonTreeCollisionSetUserRayCastCallback (const NewtonCollision* treeCollision, NewtonCollisionTreeRayCastCallback rayHitCallback);

Usage

Changes a Tree collision to use a custom raycast functionality, this may be sometimes desired for performance reasons when raycast performance is critical, and the application programmer creates custom structure and methods to facilitate custom raycasting on a newton trimesh.

Parameters

  • const NewtonCollision* treeCollision - pointer to a tree collision shape to override it's raycast function.
  • NewtonCollisionTreeRayCastCallback rayHitCallback - set a new callback, which will handle the collision tree's raycasting from now on.

Remarks

Added in Newton 2.0

See also

NewtonCreateTreeCollision