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