Function heron::rapier_plugin::rapier::parry::query::details::clip_halfspace_polygon [−][src]
pub fn clip_halfspace_polygon(
center: &Point<f32, 3_usize>,
normal: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>,
polygon: &[Point<f32, 3_usize>],
result: &mut Vec<Point<f32, 3_usize>, Global>
)
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
.