NewtonWorldRayPrefilterCallback

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

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