Skip to main content

Module ray

Module ray 

Expand description

Rays and the intersection tests that go with them.

One shared implementation for every caster in the engine: physics queries, editor picking, and gizmo manipulation all measure against the same primitives rather than each rolling their own. Ray lived in [crate::physics] for a while — it is re-exported from there, since a ray is geometry and only some of its users are physics.

Every test returns a signed distance along the ray (its t parameter), never a point, because the caller almost always wants to compare hits before it wants a position. Recover the position with Ray::at.

Structs§

Ray
A half-line: an origin and a direction.