Function heron::rapier_plugin::rapier3d::parry::query::details::clip_halfspace_polygon[][src]

pub fn clip_halfspace_polygon(
    center: &OPoint<f32, Const<3_usize>>,
    normal: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>,
    polygon: &[OPoint<f32, Const<3_usize>>],
    result: &mut Vec<OPoint<f32, Const<3_usize>>, Global>
)
Expand description

Cuts a polygon with the given half-space.

Given the half-space center and outward normal, this computes the intersecting between the half-space and the polygon. (Note that a point pt is considered as inside of the half-space if normal.dot(&(pt - center)) <= 0.0.