vgl_polygon< T > vgl_clip(const vgl_polygon< T > &poly1, const vgl_polygon< T > &poly2, vgl_clip_type op=vgl_clip_type_intersect)
Clip a polygon against another polygon.
vgl_line_segment_2d< T > vgl_clip_line_to_box(vgl_line_2d< T > const &l, vgl_box_2d< T > const &b)
clip given line to given box, and return resulting line segment.
bool vgl_clip_lineseg_to_line(T &x1, T &y1, T &x2, T &y2, T a, T b, T c)
clips away the portion where ax+by+c<0. return false if nothing left.