Skip to main content

clip_segment

Function clip_segment 

Source
fn clip_segment(aabb: WorldAabb, from: DVec3, to: DVec3) -> Option<DVec3>
Expand description

Clips the segment from -> to against aabb, returning the entry point.

Returns from when the segment starts inside the box and None when it never intersects. Mirrors vanilla AABB.clip using the slab method.