summaryrefslogtreecommitdiff
path: root/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html
blob: 094882002eaa64f06d7d93586131c2c87a14f241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Point Concept</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Geometry">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="../concepts.html" title="Concepts">
<link rel="next" href="concept_linestring.html" title="Linestring Concept">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="geometry.reference.concepts.concept_point"></a><a class="link" href="concept_point.html" title="Point Concept">Point Concept</a>
</h4></div></div></div>
<h6>
<a name="geometry.reference.concepts.concept_point.h0"></a>
          <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>
        </h6>
<p>
          The Point Concept describes the requirements for a point type. All algorithms
          in Boost.Geometry will check any geometry arguments against the concept
          requirements.
        </p>
<p>
          A point is <span class="emphasis"><em>an entity that has a location in space or on a plane,
          but has no extent</em></span> (<a href="http://en.wikipedia.org/wiki/Point_(geometry)" target="_top">wiki</a>).
          The point is the most basic geometry of Boost.Geometry, most other geometries
          consist of points. <span class="emphasis"><em>(Exceptions are box and segment, which might
          consist of two points but that is not necessarily the case.)</em></span>
        </p>
<h6>
<a name="geometry.reference.concepts.concept_point.h1"></a>
          <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
          Definition</a>
        </h6>
<p>
          The Point Concept is defined as following:
        </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag</span></code>,
              defining <code class="computeroutput"><span class="identifier">point_tag</span></code>
              as type
            </li>
<li class="listitem">
              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>,
              defining the type of its coordinates
            </li>
<li class="listitem">
              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>,
              defining its coordinate system (cartesian, spherical, etc)
            </li>
<li class="listitem">
              there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">dimension</span></code>,
              defining its number of dimensions (2, 3, ...) (hint: derive it conveniently
              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>
              for X Dimensional)
            </li>
<li class="listitem">
              there must be a specialization of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">access</span></code>,
              per dimension, with two functions:
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">get</span></code> to get a
                    coordinate value
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">set</span></code> to set a
                    coordinate value (this one is not checked for ConstPoint)
                  </li>
</ul></div>
            </li>
</ul></div>
<h6>
<a name="geometry.reference.concepts.concept_point.h2"></a>
          <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
          Models</a>
        </h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              <a class="link" href="../models/model_point.html" title="model::point">model::point</a>
            </li>
<li class="listitem">
              <a class="link" href="../models/model_d2_point_xy.html" title="model::d2::point_xy">model::d2::point_xy</a>
            </li>
<li class="listitem">
              a lat long point (currently in an extension)
            </li>
<li class="listitem">
              <a class="link" href="../adapted/c_array.html" title="C array">C array</a>
            </li>
<li class="listitem">
              <a class="link" href="../adapted/boost_array.html" title="Boost.Array">Boost.Array</a>
            </li>
<li class="listitem">
              <a class="link" href="../adapted/boost_fusion.html" title="Boost.Fusion">Boost.Fusion</a>
            </li>
<li class="listitem">
              <a class="link" href="../adapted/boost_polygon.html" title="Boost.Polygon">Boost.Polygon</a>
            </li>
<li class="listitem">
              <a class="link" href="../adapted/boost_tuple.html" title="Boost.Tuple">Boost.Tuple</a>
            </li>
<li class="listitem">
              other point types, adapted e.g. using one of the <a class="link" href="../adapted.html" title="Adapted models">registration
              macro's</a>
            </li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2014 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
      Wulkiewicz, Oracle and/or its affiliates<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        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>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
</body>
</html>