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 1. 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">
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>
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>
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>
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>
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
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>
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
51 The Point Concept is defined as following:
53 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
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>
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
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)
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"><</span><span class="identifier">X</span><span class="special">></span></code>
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; ">
78 <code class="computeroutput"><span class="identifier">get</span></code> to get a
82 <code class="computeroutput"><span class="identifier">set</span></code> to set a
83 coordinate value (this one is not checked for ConstPoint)
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
93 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
95 <a class="link" href="../models/model_point.html" title="model::point">model::point</a>
98 <a class="link" href="../models/model_d2_point_xy.html" title="model::d2::point_xy">model::d2::point_xy</a>
100 <li class="listitem">
101 a lat long point (currently in an extension)
103 <li class="listitem">
104 <a class="link" href="../adapted/c_array.html" title="C array">C array</a>
106 <li class="listitem">
107 <a class="link" href="../adapted/boost_array.html" title="Boost.Array">Boost.Array</a>
109 <li class="listitem">
110 <a class="link" href="../adapted/boost_fusion.html" title="Boost.Fusion">Boost.Fusion</a>
112 <li class="listitem">
113 <a class="link" href="../adapted/boost_polygon.html" title="Boost.Polygon">Boost.Polygon</a>
115 <li class="listitem">
116 <a class="link" href="../adapted/boost_tuple.html" title="Boost.Tuple">Boost.Tuple</a>
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
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 © 2009-2017 Barend
127 Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its
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>)
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>