• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/============================================================================
2  Boost.Geometry (aka GGL, Generic Geometry Library)
3
4  Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
5  Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
6  Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
7
8  Use, modification and distribution is subject to the Boost Software License,
9  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10  http://www.boost.org/LICENSE_1_0.txt)
11=============================================================================/]
12
13
14[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
15[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1model_1_1segment.xml]
16[section:model_segment model::segment]
17
18'''<indexterm><primary>model</primary></indexterm><indexterm><primary>segment</primary></indexterm>'''
19Class segment: small class containing two points.
20
21[heading Description]
22From Wikipedia: In geometry, a line segment is a part of a line that is bounded by two distinct end points, and contains every point on the line between its end points.
23
24[heading Model of]
25[link geometry.reference.concepts.concept_segment Segment Concept]
26
27[heading Synopsis]
28``template<typename Point>
29class model::segment
30      : public std::pair< Point, Point >
31{
32  // ...
33};
34``
35
36[heading Template parameter(s)]
37[table
38[[Parameter] [Description]]
39[[typename Point] []]
40]
41
42[heading Constructor(s)]
43[table
44[[Function] [Description] [Parameters] ]
45[[``segment()``
46
47] [Default constructor, no initialization. ] [
48
49]]
50[[``segment(Point const & p1, Point const & p2)``
51
52] [Constructor taking the first and the second point. ] [[* Point const &]: ['p1]:
53
54[* Point const &]: ['p2]:
55
56
57
58]]
59]
60
61[heading Header]
62Either
63
64`#include <boost/geometry/geometries/geometries.hpp>`
65
66
67Or
68
69`#include <boost/geometry/geometries/segment.hpp>`
70
71[include reference/geometries/segment.qbk]
72
73[endsect]
74
75