• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Ring Concept</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="../concepts.html" title="Concepts">
9<link rel="prev" href="concept_box.html" title="Box Concept">
10<link rel="next" href="concept_segment.html" title="Segment Concept">
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="concept_box.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="concept_segment.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="geometry.reference.concepts.concept_ring"></a><a class="link" href="concept_ring.html" title="Ring Concept">Ring Concept</a>
28</h4></div></div></div>
29<h6>
30<a name="geometry.reference.concepts.concept_ring.h0"></a>
31          <span class="phrase"><a name="geometry.reference.concepts.concept_ring.description"></a></span><a class="link" href="concept_ring.html#geometry.reference.concepts.concept_ring.description">Description</a>
32        </h6>
33<p>
34          The Ring Concept describes the requirements for a ring type. All algorithms
35          in Boost.Geometry will check any geometry arguments against the concept
36          requirements.
37        </p>
38<div class="note"><table border="0" summary="Note">
39<tr>
40<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
41<th align="left">Note</th>
42</tr>
43<tr><td align="left" valign="top"><p>
44            Also called linear ring, but we explicitly refer to a filled feature
45            here
46          </p></td></tr>
47</table></div>
48<h6>
49<a name="geometry.reference.concepts.concept_ring.h1"></a>
50          <span class="phrase"><a name="geometry.reference.concepts.concept_ring.concept_definition"></a></span><a class="link" href="concept_ring.html#geometry.reference.concepts.concept_ring.concept_definition">Concept
51          Definition</a>
52        </h6>
53<p>
54          The Ring Concept is defined as following:
55        </p>
56<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
57<li class="listitem">
58              there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag</span></code>
59              defining <code class="computeroutput"><span class="identifier">ring_tag</span></code> as
60              type
61            </li>
62<li class="listitem">
63              it must behave like a Boost.Range Random Access Range
64            </li>
65<li class="listitem">
66              The type defined by the metafunction <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;...&gt;::</span><span class="identifier">type</span></code>
67              must fulfill the <a class="link" href="concept_point.html" title="Point Concept">Point
68              Concept</a>
69            </li>
70<li class="listitem">
71              there might be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">point_order</span></code>
72              defining the order or orientation of its points, <code class="computeroutput"><span class="identifier">clockwise</span></code>
73              or <code class="computeroutput"><span class="identifier">counterclockwise</span></code>
74            </li>
75<li class="listitem">
76              there might be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">closure</span></code>
77              defining the closure, <code class="computeroutput"><span class="identifier">open</span></code>
78              or <code class="computeroutput"><span class="identifier">closed</span></code>
79            </li>
80</ul></div>
81<h6>
82<a name="geometry.reference.concepts.concept_ring.h2"></a>
83          <span class="phrase"><a name="geometry.reference.concepts.concept_ring.rules"></a></span><a class="link" href="concept_ring.html#geometry.reference.concepts.concept_ring.rules">Rules</a>
84        </h6>
85<p>
86          Besides the Concepts, which are checks on compile-time, there are rules
87          that valid rings must fulfill. See the <a class="link" href="concept_polygon.html" title="Polygon Concept">Polygon
88          Concept</a> for more information on the rules a polygon (and also a
89          ring) must fulfill.
90        </p>
91<h6>
92<a name="geometry.reference.concepts.concept_ring.h3"></a>
93          <span class="phrase"><a name="geometry.reference.concepts.concept_ring.available_models"></a></span><a class="link" href="concept_ring.html#geometry.reference.concepts.concept_ring.available_models">Available
94          Models</a>
95        </h6>
96<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
97<li class="listitem">
98              <a class="link" href="../models/model_ring.html" title="model::ring">ring</a>
99            </li>
100<li class="listitem">
101              a Boost.Polygon polygon_data (requires <code class="computeroutput"><span class="preprocessor">#include</span>
102              <span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">boost_polygon</span><span class="special">/</span><span class="identifier">ring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>)
103            </li>
104<li class="listitem">
105              a std::vector (requires <code class="computeroutput"><span class="preprocessor">#include</span>
106              <span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">std_as_ring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>)
107            </li>
108<li class="listitem">
109              a std::deque (requires <code class="computeroutput"><span class="preprocessor">#include</span>
110              <span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">std_as_ring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>)
111            </li>
112</ul></div>
113<div class="note"><table border="0" summary="Note">
114<tr>
115<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
116<th align="left">Note</th>
117</tr>
118<tr><td align="left" valign="top"><p>
119            See also the sample in the <a href="../../../../../../range/doc/html/range/reference/extending/method_2.html" target="_top">Boost.Range
120            documentation</a> showing how a type can be adapted to a Boost.Range
121            to fulfill the concept of a Ring
122          </p></td></tr>
123</table></div>
124</div>
125<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
126<td align="left"></td>
127<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
128      Wulkiewicz, Oracle and/or its affiliates<p>
129        Distributed under the Boost Software License, Version 1.0. (See accompanying
130        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>)
131      </p>
132</div></td>
133</tr></table>
134<hr>
135<div class="spirit-nav">
136<a accesskey="p" href="concept_box.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="concept_segment.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
137</div>
138</body>
139</html>
140