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