NewtonCollisionTreeRayCastCallback
NewtonCollisionTreeRayCastCallback
typedef dFloat (*NewtonCollisionTreeRayCastCallback) (const NewtonBody* const body, const NewtonCollision* const treeCollision, dFloat intersection, dFloat* const normal, int faceId, void* const usedData)
Usage
This callback lets you implement your own custom collision tree raycast method (see: NewtonTreeCollisionSetUserRayCastCallback)
Parameters
- body NewtonBody*
- treeCollision NewtonCollision*
- dFloat interception - current raycast check distance
- dFloat* normal - Hit Normal is returned here.
- int faceId - current faceid (the faceAttribute parameter set in the NewtonTreeCollisionAddFace function )
- void* userData - current collision's user data.
Return
- Return the distance at which a object was hit return 1.0 if nothing was hit.
Remarks
- This is not a library function, but a callback event.
See also
NewtonCreateTreeCollision NewtonTreeCollisionSetUserRayCastCallback