1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>return_buffer</title> 5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../../index.html" title="Chapter 1. Geometry"> 8<link rel="up" href="../buffer.html" title="buffer"> 9<link rel="prev" href="buffer_7_with_strategies.html" title="buffer (with strategies)"> 10<link rel="next" href="../centroid.html" title="centroid"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="buffer_7_with_strategies.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../buffer.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../centroid.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h5 class="title"> 27<a name="geometry.reference.algorithms.buffer.return_buffer"></a><a class="link" href="return_buffer.html" title="return_buffer">return_buffer</a> 28</h5></div></div></div> 29<p> 30 <a class="indexterm" name="idm45635705890992"></a> 31Calculates the buffer of a geometry. 32 </p> 33<h6> 34<a name="geometry.reference.algorithms.buffer.return_buffer.h0"></a> 35 <span class="phrase"><a name="geometry.reference.algorithms.buffer.return_buffer.description"></a></span><a class="link" href="return_buffer.html#geometry.reference.algorithms.buffer.return_buffer.description">Description</a> 36 </h6> 37<p> 38 The free function return_buffer calculates the buffer (a polygon being 39 the spatial point set collection within a specified maximum distance 40 from a geometry) of a geometry. This version with the return_ prefix 41 returns the buffer, and a template parameter must therefore be specified 42 in the call.. 43 </p> 44<h6> 45<a name="geometry.reference.algorithms.buffer.return_buffer.h1"></a> 46 <span class="phrase"><a name="geometry.reference.algorithms.buffer.return_buffer.synopsis"></a></span><a class="link" href="return_buffer.html#geometry.reference.algorithms.buffer.return_buffer.synopsis">Synopsis</a> 47 </h6> 48<p> 49</p> 50<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Output</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Input</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Distance</span><span class="special">></span> 51<span class="identifier">Output</span> <span class="identifier">return_buffer</span><span class="special">(</span><span class="identifier">Input</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">geometry</span><span class="special">,</span> <span class="identifier">Distance</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">distance</span><span class="special">,</span> <span class="identifier">Distance</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">chord_length</span> <span class="special">=</span> <span class="special">-</span><span class="number">1</span><span class="special">)</span></pre> 52<p> 53 </p> 54<h6> 55<a name="geometry.reference.algorithms.buffer.return_buffer.h2"></a> 56 <span class="phrase"><a name="geometry.reference.algorithms.buffer.return_buffer.parameters"></a></span><a class="link" href="return_buffer.html#geometry.reference.algorithms.buffer.return_buffer.parameters">Parameters</a> 57 </h6> 58<div class="informaltable"><table class="table"> 59<colgroup> 60<col> 61<col> 62<col> 63<col> 64</colgroup> 65<thead><tr> 66<th> 67 <p> 68 Type 69 </p> 70 </th> 71<th> 72 <p> 73 Concept 74 </p> 75 </th> 76<th> 77 <p> 78 Name 79 </p> 80 </th> 81<th> 82 <p> 83 Description 84 </p> 85 </th> 86</tr></thead> 87<tbody> 88<tr> 89<td> 90 <p> 91 Output 92 </p> 93 </td> 94<td> 95 <p> 96 Any type fulfilling a Geometry Concept 97 </p> 98 </td> 99<td> 100 <p> 101 - 102 </p> 103 </td> 104<td> 105 <p> 106 Must be specified 107 </p> 108 </td> 109</tr> 110<tr> 111<td> 112 <p> 113 Input const & 114 </p> 115 </td> 116<td> 117 <p> 118 Any type fulfilling a Geometry Concept 119 </p> 120 </td> 121<td> 122 <p> 123 geometry 124 </p> 125 </td> 126<td> 127 <p> 128 A model of the specified concept 129 </p> 130 </td> 131</tr> 132<tr> 133<td> 134 <p> 135 Distance const & 136 </p> 137 </td> 138<td> 139 <p> 140 numerical type (int, double, ttmath, ...) 141 </p> 142 </td> 143<td> 144 <p> 145 distance 146 </p> 147 </td> 148<td> 149 <p> 150 The distance to be used for the buffer 151 </p> 152 </td> 153</tr> 154<tr> 155<td> 156 <p> 157 Distance const & 158 </p> 159 </td> 160<td> 161 <p> 162 numerical type (int, double, ttmath, ...) 163 </p> 164 </td> 165<td> 166 <p> 167 chord_length 168 </p> 169 </td> 170<td> 171 <p> 172 (optional) The length of the chord's in the generated arcs 173 around points or bends (RESERVED, NOT YET USED) 174 </p> 175 </td> 176</tr> 177</tbody> 178</table></div> 179<h6> 180<a name="geometry.reference.algorithms.buffer.return_buffer.h3"></a> 181 <span class="phrase"><a name="geometry.reference.algorithms.buffer.return_buffer.returns"></a></span><a class="link" href="return_buffer.html#geometry.reference.algorithms.buffer.return_buffer.returns">Returns</a> 182 </h6> 183<p> 184 The calculated buffer 185 </p> 186<h6> 187<a name="geometry.reference.algorithms.buffer.return_buffer.h4"></a> 188 <span class="phrase"><a name="geometry.reference.algorithms.buffer.return_buffer.header"></a></span><a class="link" href="return_buffer.html#geometry.reference.algorithms.buffer.return_buffer.header">Header</a> 189 </h6> 190<p> 191 Either 192 </p> 193<p> 194 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 195 </p> 196<p> 197 Or 198 </p> 199<p> 200 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 201 </p> 202</div> 203<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 204<td align="left"></td> 205<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 206 Wulkiewicz, Oracle and/or its affiliates<p> 207 Distributed under the Boost Software License, Version 1.0. (See accompanying 208 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 209 </p> 210</div></td> 211</tr></table> 212<hr> 213<div class="spirit-nav"> 214<a accesskey="p" href="buffer_7_with_strategies.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../buffer.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../centroid.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 215</div> 216</body> 217</html> 218