• 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/group__set.xml]
16[section:set_2 set]
17
18'''<indexterm><primary>set</primary></indexterm>'''
19Set coordinate value of a geometry (usually a point)
20
21[heading Description]
22The free functions [*get] and [*set] are two of the most important functions of Boost.Geometry, both within the library, as also for the library user. With these two functions you normally get and set coordinate values from and for a point, box, segment or sphere.
23
24[heading Synopsis]
25``template<std::size_t Dimension, typename Geometry>
26void set(Geometry & geometry, typename coordinate_type< Geometry >::type const & value)``
27
28[heading Parameters]
29
30[table
31[[Type] [Concept] [Name] [Description] ]
32[[Dimension] [Dimension, this template parameter is required. Should contain \[0 .. n-1\] for an n-dimensional geometry ] [ - ] [Must be specified]]
33[[Geometry &] [Any type fulfilling a Geometry Concept (usually a Point Concept) ] [geometry] [A model of the specified concept (usually a point) ]]
34[[typename coordinate_type< Geometry >::type const &] [] [value] [The coordinate value to set]]
35]
36
37
38[heading Header]
39Either
40
41`#include <boost/geometry.hpp>`
42
43
44Or
45
46`#include <boost/geometry/core/access.hpp>`
47
48[include reference/core/set_point.qbk]
49
50
51[endsect]
52
53[section:set_2_with_index set (with index)]
54
55'''<indexterm><primary>set</primary></indexterm>'''
56set coordinate value of a Box / Segment
57
58[heading Description]
59The free functions [*get] and [*set] are two of the most important functions of Boost.Geometry, both within the library, as also for the library user. With these two functions you normally get and set coordinate values from and for a point, box, segment or sphere.
60
61[heading Synopsis]
62``template<std::size_t Index, std::size_t Dimension, typename Geometry>
63void set(Geometry & geometry, typename coordinate_type< Geometry >::type const & value)``
64
65[heading Parameters]
66
67[table
68[[Type] [Concept] [Name] [Description] ]
69[[Index] [Index, this template parameter is required. For a Box: either min_corner or max_corner. For a Segment: either 0 or 1 for first or last point. ] [ - ] [Must be specified]]
70[[Dimension] [Dimension, this template parameter is required. Should contain \[0 .. n-1\] for an n-dimensional geometry ] [ - ] [Must be specified]]
71[[Geometry &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] [A model of the specified concept ]]
72[[typename coordinate_type< Geometry >::type const &] [] [value] [The coordinate value to set]]
73]
74
75
76[heading Header]
77Either
78
79`#include <boost/geometry.hpp>`
80
81
82Or
83
84`#include <boost/geometry/core/access.hpp>`
85
86[include reference/core/set_box.qbk]
87
88
89[endsect]
90
91[section:set_from_radian_2 set_from_radian]
92
93'''<indexterm><primary>set_from_radian</primary></indexterm>'''
94set coordinate value (in radian) to a point
95
96[heading Description]
97Coordinate value will be set correctly, if coordinate system of point is in Degree, Radian value will be converted to Degree
98
99[heading Synopsis]
100``template<std::size_t Dimension, typename Geometry>
101void set_from_radian(Geometry & geometry, typename fp_coordinate_type< Geometry >::type const & radians)``
102
103[heading Parameters]
104
105[table
106[[Type] [Concept] [Name] [Description] ]
107[[Dimension] [dimension ] [ - ] [Must be specified]]
108[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
109[[typename fp_coordinate_type< Geometry >::type const &] [] [radians] [coordinate value to assign ]]
110]
111
112
113[heading Header]
114Either
115
116`#include <boost/geometry.hpp>`
117
118
119Or
120
121`#include <boost/geometry/core/radian_access.hpp>`
122
123
124[endsect]
125
126[section:set_from_radian_2 set_from_radian]
127
128'''<indexterm><primary>set_from_radian</primary></indexterm>'''
129set coordinate value (in radian) to a segment or box
130
131[heading Description]
132Coordinate value will be set correctly, if coordinate system of point is in Degree, Radian value will be converted to Degree
133
134[heading Synopsis]
135``template<std::size_t Index, std::size_t Dimension, typename Geometry>
136void set_from_radian(Geometry & geometry, typename fp_coordinate_type< Geometry >::type const & radians)``
137
138[heading Parameters]
139
140[table
141[[Type] [Concept] [Name] [Description] ]
142[[Index] [index ] [ - ] [Must be specified]]
143[[Dimension] [dimension ] [ - ] [Must be specified]]
144[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
145[[typename fp_coordinate_type< Geometry >::type const &] [] [radians] [coordinate value to assign ]]
146]
147
148
149[heading Header]
150Either
151
152`#include <boost/geometry.hpp>`
153
154
155Or
156
157`#include <boost/geometry/core/radian_access.hpp>`
158
159
160[endsect]
161
162