mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-10 07:34:03 +00:00
120 lines
4.0 KiB
Plaintext
120 lines
4.0 KiB
Plaintext
[/============================================================================
|
|
Boost.Geometry (aka GGL, Generic Geometry Library)
|
|
|
|
Copyright (c) 2009-2011 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
|
|
Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net)
|
|
Copyright (c) 2009-2011 Bruno Lalande, Paris, France.
|
|
|
|
Use, modification and distribution is subject to the Boost Software License,
|
|
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
|
http://www.boost.org/LICENSE_1_0.txt)
|
|
=============================================================================/]
|
|
|
|
|
|
[/ Generated by doxygen_xml2qbk, don't change, will be overwritten automatically]
|
|
[/ Generated from doxy/doxygen_output/xml/group__set.xml]
|
|
[section:set_3_with_index set (with index)]
|
|
|
|
set coordinate value of a Box / Segment
|
|
|
|
[heading Description]
|
|
The 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.
|
|
|
|
[heading Synopsis]
|
|
``template<std::size_t Index, std::size_t Dimension, typename Geometry>
|
|
void set(Geometry & geometry, typename coordinate_type< Geometry >::type const & value)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[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]]
|
|
[[Dimension] [Dimension, this template parameter is required. Should contain \[0 .. n-1\] for an n-dimensional geometry ] [ - ] [Must be specified]]
|
|
[[Geometry &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] [A model of the specified concept ]]
|
|
[[typename coordinate_type< Geometry >::type const &] [] [value] [The coordinate value to set ]]
|
|
]
|
|
|
|
|
|
[heading Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/access.hpp>`
|
|
|
|
[include ref/core/set_box.qbk]
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:set_3 set]
|
|
|
|
Set coordinate value of a geometry (usually a point).
|
|
|
|
[heading Description]
|
|
The 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.
|
|
|
|
[heading Synopsis]
|
|
``template<std::size_t Dimension, typename Geometry>
|
|
void set(Geometry & geometry, typename coordinate_type< Geometry >::type const & value)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[Dimension] [Dimension, this template parameter is required. Should contain \[0 .. n-1\] for an n-dimensional geometry ] [ - ] [Must be specified]]
|
|
[[Geometry &] [Any type fulfilling a Geometry Concept (usually a Point Concept) ] [geometry] [A model of the specified concept (usually a point) ]]
|
|
[[typename coordinate_type< Geometry >::type const &] [] [value] [The coordinate value to set ]]
|
|
]
|
|
|
|
|
|
[heading Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/access.hpp>`
|
|
|
|
[include ref/core/set_point.qbk]
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:set_from_radian set_from_radian]
|
|
|
|
set coordinate value (in radian) to a point
|
|
|
|
[heading Description]
|
|
Coordinate value will be set correctly, if coordinate system of point is in Degree, Radian value will be converted to Degree
|
|
|
|
[heading Synopsis]
|
|
``template<std::size_t Dimension, typename Geometry>
|
|
void set_from_radian(Geometry & geometry, typename fp_coordinate_type< Geometry >::type const & radians)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[Dimension] [dimension ] [ - ] [Must be specified]]
|
|
[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
|
|
[[typename fp_coordinate_type< Geometry >::type const &] [] [radians] [coordinate value to assign ]]
|
|
]
|
|
|
|
|
|
[heading Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/radian_access.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|