NewtonWorldRayPrefilterCallback
NewtonWorldRayPrefilterCallback
typedef unsigned (*NewtonWorldRayPrefilterCallback)(const NewtonBody* const body, const NewtonCollision* const collision, void* const userData)
Usage
Called inside NewtonWorldRayCast, NewtonWorldConvexCast, NewtonWorldCollide, to improve it's efficiency, by filtering out unneccesary bodies first.
Parameters
- NewtonBody* body - Current body being tested by newton.
- const NewtonCollision* collision - Current body's collision id.
- void* userData - Userdata parameter from NewtonWorldRayCast or NewtonWorldConvexCast.
Return
- 0 to ignore this body from further checks
- 1 to keep this object when performing further processing
Remarks
- This is not a library function, but a callback event.
See also
NewtonWorldRayCast, NewtonWorldConvexCast, NewtonWorldCollide