boost::geometry::strategy::intersection::liang_barsky
clip_linestring.hpp
typename Box Box
typename Point Point
model::referring_segment< Point > typedef model::referring_segment<Point> boost::geometry::strategy::intersection::liang_barsky< Box, Point >::segment_type segment_type
typename CoordinateType
typename CalcType
bool bool boost::geometry::strategy::intersection::liang_barsky< Box, Point >::check_edge (CoordinateType const &p, CoordinateType const &q, CalcType &t1, CalcType &t2) const check_edge CoordinateType const & p CoordinateType const & q CalcType & t1 CalcType & t2
typename Linestring
typename OutputIterator
void void boost::geometry::strategy::intersection::liang_barsky< Box, Point >::apply (Linestring &line_out, OutputIterator out) const apply Linestring & line_out OutputIterator out
bool bool boost::geometry::strategy::intersection::liang_barsky< Box, Point >::clip_segment (Box const &b, segment_type &s, bool &sp1_clipped, bool &sp2_clipped) const clip_segment Box const & b segment_type & s bool & sp1_clipped bool & sp2_clipped

Strategy: line clipping algorithm after Liang Barsky.

The Liang-Barsky line clipping algorithm clips a line with a clipping box. It is slightly adapted in the sense that it returns which points are clipped B

input box type of clipping box

P

input/output point-type of segments to be clipped

The algorithm is currently only implemented for 2D Cartesian points

Though it is implemented in namespace strategy, and theoretically another strategy could be used, it is not (yet) updated to the general strategy concepts, and not (yet) splitted into a file in folder strategies

Barend Gehrels, and the following recourses

- A tutorial: http://www.skytopia.com/project/articles/compsci/clipping.html

- a German applet (link broken): http://ls7-www.cs.uni-dortmund.de/students/projectgroups/acit/lineclip.shtml

- boost::geometry::strategy::intersection::liang_barsky
  apply
- boost::geometry::strategy::intersection::liang_barsky
  check_edge
- boost::geometry::strategy::intersection::liang_barsky
  clip_segment
- boost::geometry::strategy::intersection::liang_barsky
  segment_type