Function parry2d_f64::query::details::clip_halfspace_polygon [−][src]
pub fn clip_halfspace_polygon(
center: &Point<Real>,
normal: &Vector<Real>,
polygon: &[Point<Real>],
result: &mut Vec<Point<Real>>
)
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
.