1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_HPP
10 #define BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_HPP
12 namespace boost { namespace geometry
15 namespace strategy { namespace buffer
20 A Buffer-join strategy gets 4 input points.
21 On the two consecutive segments s1 and s2 (joining at vertex v):
23 The lines from parallel at s1, s2 (at buffer-distance) end/start
24 in two points perpendicular to the segments: p1 and p2.
25 These parallel lines interesct in point ip
38 So, in clockwise order:
40 p1: perpendicular on left side of segment1<1> (perp1)
41 ip: intersection point
42 p2: perpendicular on left side of segment2<0> (perp2)
48 \brief Enumerates options for side of buffer (left/right w.r.t. directed
51 \details Around a linestring, a buffer can be defined left or right.
52 Around a polygon, assumed clockwise internally,
53 a buffer is either on the left side (inflates the polygon), or on the
54 right side (deflates the polygon)
56 enum buffer_side_selector { buffer_side_left, buffer_side_right };
59 \brief Enumerates types of pieces (parts of buffer) around geometries
69 buffered_concave, // always on the inside
75 \brief Enumerates types of joins
82 join_continue, // collinear, next segment touches previous segment
83 join_spike // collinear, with overlap, next segment goes back
87 \brief Enumerates types of result codes from buffer strategies
93 result_error_numerical,
98 }} // namespace strategy::buffer
101 }} // namespace boost::geometry
103 #endif // BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_HPP