Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

clip_to_plane_unchecked

Function clip_to_plane_unchecked 

Source
pub unsafe fn clip_to_plane_unchecked<Vertex: Copy, Plane: AttributedClipPlane<Vertex>>(
    source: &[Vertex],
    destination: &mut [Vertex],
    plane: &Plane,
    traversal: ClipTraversal,
) -> usize
Expand description

clip_to_plane without the bounds check on each write, for fixed scratch whose size is proven.

§Safety

destination.len() must be at least 2 * source.len(); or at least source.len() + 1 when source is convex and plane.inside gives the same answer every time a vertex’s distance is evaluated (the CurrentToNext traversal evaluates each distance twice).