Added boost/geometry.hpp

Doc update (metafunctions coordinate type, system, dimensions, point_order, closure, tags degree/radian, constans min_corner, max_corner)


[SVN r71325]
This commit is contained in:
Barend Gehrels 2011-04-16 18:00:03 +00:00
parent f4e8438ccb
commit 68fd8869c5
7 changed files with 67 additions and 42 deletions

View File

@ -0,0 +1,19 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
// 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)
#ifndef BOOST_GEOMETRY_HPP
#define BOOST_GEOMETRY_HPP
#include <boost/geometry/geometry.hpp>
#endif // BOOST_GEOMETRY_HPP

View File

@ -149,14 +149,11 @@ struct closure<polygon_tag, Polygon>
/*!
\brief Meta-function which defines closure of a geometry type
\brief \brief_meta{value, closure (clockwise\, counterclockwise), \meta_geometry_type}
\tparam Geometry \tparam_geometry
\ingroup core
\details
\qbk{
[heading See also]
[link geometry.reference.enumerations.order_selector The order_selector enumeration]
}
\qbk{[include reference/core/closure.qbk]}
*/
template <typename Geometry>
struct closure

View File

@ -65,53 +65,56 @@ struct dimension<point_tag, P> : traits::dimension<P> {};
#endif
/*!
\brief Meta-function which defines coordinate dimensions, i.e. the number of axes of any geometry
\ingroup core
\brief \brief_meta{value, number of coordinates (the number of axes of any geometry), \meta_point_type}
\tparam Geometry \tparam_geometry
\ingroup core
\qbk{[include reference/core/coordinate_dimension.qbk]}
*/
template <typename G>
template <typename Geometry>
struct dimension
: core_dispatch::dimension
<
typename tag<G>::type,
typename boost::remove_const<G>::type
typename tag<Geometry>::type,
typename boost::remove_const<Geometry>::type
>
{};
/*!
\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
\ingroup utility
\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
\ingroup utility
*/
template <typename G, int D>
template <typename Geometry, int Dimensions>
inline void assert_dimension()
{
BOOST_STATIC_ASSERT((
boost::mpl::equal_to
<
geometry::dimension<G>,
boost::mpl::int_<D>
geometry::dimension<Geometry>,
boost::mpl::int_<Dimensions>
>::type::value
));
}
/*!
\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
\ingroup utility
\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
\ingroup utility
*/
template <typename G, int D>
template <typename Geometry, int Dimensions>
inline void assert_dimension_less_equal()
{
BOOST_STATIC_ASSERT(( dimension<G>::type::value <= D ));
BOOST_STATIC_ASSERT(( dimension<Geometry>::type::value <= Dimensions ));
}
template <typename G, int D>
template <typename Geometry, int Dimensions>
inline void assert_dimension_greater_equal()
{
BOOST_STATIC_ASSERT(( dimension<G>::type::value >= D ));
BOOST_STATIC_ASSERT(( dimension<Geometry>::type::value >= Dimensions ));
}
/*!
\brief assert_dimension_equal, enables compile-time checking if coordinate dimensions of two geometries are equal
\ingroup utility
\brief assert_dimension_equal, enables compile-time checking if coordinate dimensions of two geometries are equal
\ingroup utility
*/
template <typename G1, typename G2>
inline void assert_dimension_equal()

View File

@ -73,16 +73,19 @@ namespace core_dispatch
/*!
\brief Meta-function which defines coordinate system for any geometry
\ingroup core
\brief \brief_meta{type, coordinate system (cartesian\, spherical\, etc), \meta_point_type}
\tparam Geometry \tparam_geometry
\ingroup core
\qbk{[include reference/core/coordinate_system.qbk]}
*/
template <typename G>
template <typename Geometry>
struct coordinate_system
{
typedef typename boost::remove_const<G>::type ncg;
typedef typename boost::remove_const<Geometry>::type ncg;
typedef typename core_dispatch::coordinate_system
<
typename tag<G>::type,
typename tag<Geometry>::type,
ncg
>::type type;
};

View File

@ -70,8 +70,11 @@ struct coordinate_type<point_tag, Point>
#endif // DOXYGEN_NO_DISPATCH
/*!
\brief Meta-function which defines coordinate type (int, float, double, etc) of any geometry
\ingroup core
\brief \brief_meta{type, coordinate type (int\, float\, double\, etc), \meta_point_type}
\tparam Geometry \tparam_geometry
\ingroup core
\qbk{[include reference/core/coordinate_type.qbk]}
*/
template <typename Geometry>
struct coordinate_type

View File

@ -27,16 +27,20 @@ namespace boost { namespace geometry
/*!
\brief Unit of plane angle: Degrees
\ingroup cs
\note Might be replaced by Boost.Units
\details Tag defining the unit of plane angle for spherical coordinate systems.
This tag specifies that coordinates are defined in degrees (-180 .. 180).
It has to be specified for some coordinate systems.
\qbk{[include reference/core/degree_radian.qbk]}
*/
struct degree {};
/*!
\brief Unit of plane angle: Radians
\ingroup cs
\note Might be replaced by Boost.Units
\details Tag defining the unit of plane angle for spherical coordinate systems.
This tag specifies that coordinates are defined in radians (-PI .. PI).
It has to be specified for some coordinate systems.
\qbk{[include reference/core/degree_radian.qbk]}
*/
struct radian {};

View File

@ -138,19 +138,15 @@ struct point_order<polygon_tag, Polygon>
/*!
\brief Metafunction which defines point order of a geometry type
\brief \brief_meta{value, point order (clockwise\, counterclockwise), \meta_geometry_type}
\tparam Geometry \tparam_geometry
\ingroup core
\details
\qbk{
[heading See also]
[link geometry.reference.enumerations.closure_selector The closure_selector enumeration]
}
\qbk{[include reference/core/point_order.qbk]}
*/
template <typename Geometry>
struct point_order
{
/// metafunction implementation
static const order_selector value = core_dispatch::point_order
<
typename tag<Geometry>::type,