Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / geometry / doc / html / geometry / reference / concepts / concept_point.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Point 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&#160;1.&#160;Geometry">
8 <link rel="up" href="../concepts.html" title="Concepts">
9 <link rel="prev" href="../concepts.html" title="Concepts">
10 <link rel="next" href="concept_linestring.html" title="Linestring 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="../concepts.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_linestring.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_point"></a><a class="link" href="concept_point.html" title="Point Concept">Point Concept</a>
28 </h4></div></div></div>
29 <h6>
30 <a name="geometry.reference.concepts.concept_point.h0"></a>
31           <span class="phrase"><a name="geometry.reference.concepts.concept_point.description"></a></span><a class="link" href="concept_point.html#geometry.reference.concepts.concept_point.description">Description</a>
32         </h6>
33 <p>
34           The Point Concept describes the requirements for a point type. All algorithms
35           in Boost.Geometry will check any geometry arguments against the concept
36           requirements.
37         </p>
38 <p>
39           A point is <span class="emphasis"><em>an entity that has a location in space or on a plane,
40           but has no extent</em></span> (<a href="http://en.wikipedia.org/wiki/Point_(geometry)" target="_top">wiki</a>).
41           The point is the most basic geometry of Boost.Geometry, most other geometries
42           consist of points. <span class="emphasis"><em>(Exceptions are box and segment, which might
43           consist of two points but that is not necessarily the case.)</em></span>
44         </p>
45 <h6>
46 <a name="geometry.reference.concepts.concept_point.h1"></a>
47           <span class="phrase"><a name="geometry.reference.concepts.concept_point.concept_definition"></a></span><a class="link" href="concept_point.html#geometry.reference.concepts.concept_point.concept_definition">Concept
48           Definition</a>
49         </h6>
50 <p>
51           The Point Concept is defined as following:
52         </p>
53 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
54 <li class="listitem">
55               there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag</span></code>,
56               defining <code class="computeroutput"><span class="identifier">point_tag</span></code>
57               as type
58             </li>
59 <li class="listitem">
60               there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">coordinate_type</span></code>,
61               defining the type of its coordinates
62             </li>
63 <li class="listitem">
64               there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">coordinate_system</span></code>,
65               defining its coordinate system (cartesian, spherical, etc)
66             </li>
67 <li class="listitem">
68               there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">dimension</span></code>,
69               defining its number of dimensions (2, 3, ...) (hint: derive it conveniently
70               from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;</span></code>
71               for X Dimensional)
72             </li>
73 <li class="listitem">
74               there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">access</span></code>,
75               per dimension, with two functions:
76               <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
77 <li class="listitem">
78                     <code class="computeroutput"><span class="identifier">get</span></code> to get a
79                     coordinate value
80                   </li>
81 <li class="listitem">
82                     <code class="computeroutput"><span class="identifier">set</span></code> to set a
83                     coordinate value (this one is not checked for ConstPoint)
84                   </li>
85 </ul></div>
86             </li>
87 </ul></div>
88 <h6>
89 <a name="geometry.reference.concepts.concept_point.h2"></a>
90           <span class="phrase"><a name="geometry.reference.concepts.concept_point.available_models"></a></span><a class="link" href="concept_point.html#geometry.reference.concepts.concept_point.available_models">Available
91           Models</a>
92         </h6>
93 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
94 <li class="listitem">
95               <a class="link" href="../models/model_point.html" title="model::point">model::point</a>
96             </li>
97 <li class="listitem">
98               <a class="link" href="../models/model_d2_point_xy.html" title="model::d2::point_xy">model::d2::point_xy</a>
99             </li>
100 <li class="listitem">
101               a lat long point (currently in an extension)
102             </li>
103 <li class="listitem">
104               <a class="link" href="../adapted/c_array.html" title="C array">C array</a>
105             </li>
106 <li class="listitem">
107               <a class="link" href="../adapted/boost_array.html" title="Boost.Array">Boost.Array</a>
108             </li>
109 <li class="listitem">
110               <a class="link" href="../adapted/boost_fusion.html" title="Boost.Fusion">Boost.Fusion</a>
111             </li>
112 <li class="listitem">
113               <a class="link" href="../adapted/boost_polygon.html" title="Boost.Polygon">Boost.Polygon</a>
114             </li>
115 <li class="listitem">
116               <a class="link" href="../adapted/boost_tuple.html" title="Boost.Tuple">Boost.Tuple</a>
117             </li>
118 <li class="listitem">
119               other point types, adapted e.g. using one of the <a class="link" href="../adapted.html" title="Adapted models">registration
120               macro's</a>
121             </li>
122 </ul></div>
123 </div>
124 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
125 <td align="left"></td>
126 <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2017 Barend
127       Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its
128       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="../concepts.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_linestring.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
137 </div>
138 </body>
139 </html>