Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69128 - in trunk/libs/geometry/doc: . doxy reference src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-02-21 17:26:07


Author: barendgehrels
Date: 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
New Revision: 69128
URL: http://svn.boost.org/trac/boost/changeset/69128

Log:
Doc update
Added:
   trunk/libs/geometry/doc/src/examples/algorithms/assign_box_corners.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/assign_point_from_index.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/assign_point_to_index.cpp (contents, props changed)
Text files modified:
   trunk/libs/geometry/doc/doxy/Doxyfile | 3 +
   trunk/libs/geometry/doc/geometry.qbk | 3 +
   trunk/libs/geometry/doc/reference/assign.qbk | 65 ++++++++++++---------------------------
   trunk/libs/geometry/doc/reference/centroid.qbk | 8 ++--
   trunk/libs/geometry/doc/reference/linestring.qbk | 2
   trunk/libs/geometry/doc/reference/multi_point.qbk | 2
   trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 | 3 +
   7 files changed, 35 insertions(+), 51 deletions(-)

Modified: trunk/libs/geometry/doc/doxy/Doxyfile
==============================================================================
--- trunk/libs/geometry/doc/doxy/Doxyfile (original)
+++ trunk/libs/geometry/doc/doxy/Doxyfile 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -64,12 +64,13 @@
                         tparam_numeric="numerical type (int, double, ttmath, ...)" \
                         tparam_out{1}="A valid output iterator type, accepting geometries of \1 Concept" \
                         tparam_point="Any type fulfilling a Point Concept" \
- tparam_point="point type" \
                         tparam_range_point="Any type fulfilling a Range Concept where it range_value type fulfills the Point Concept" \
+ tparam_first_point="point type" \
                         tparam_second_point="second point type" \
                         tparam_segment_point="segment point type" \
                         tparam_strategy{1}="Any type fulfilling a \1 Strategy Concept" \
                         param_box="A model of the specified Box Concept" \
+ param_box_or_segment="A box modelling the specified Box Concept or segment modelling the specified Segment Concept" \
                         param_geometry="A model of the specified concept" \
                         param_out{1}="The output iterator, to which \1 geometries are feeded" \
                         param_point="A model of the specified Point Concept" \

Modified: trunk/libs/geometry/doc/geometry.qbk
==============================================================================
--- trunk/libs/geometry/doc/geometry.qbk (original)
+++ trunk/libs/geometry/doc/geometry.qbk 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -73,8 +73,11 @@
 [import src/examples/algorithms/area_with_strategy.cpp]
 [import src/examples/algorithms/assign_2d_point.cpp]
 [import src/examples/algorithms/assign_3d_point.cpp]
+[import src/examples/algorithms/assign_box_corners.cpp]
 [import src/examples/algorithms/assign_inverse.cpp]
 [import src/examples/algorithms/assign_with_range.cpp]
+[import src/examples/algorithms/assign_point_to_index.cpp]
+[import src/examples/algorithms/assign_point_from_index.cpp]
 [import src/examples/algorithms/for_each_point.cpp]
 [import src/examples/algorithms/for_each_point_const.cpp]
 [import src/examples/algorithms/for_each_segment_const.cpp]

Modified: trunk/libs/geometry/doc/reference/assign.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/assign.qbk (original)
+++ trunk/libs/geometry/doc/reference/assign.qbk 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -155,7 +155,7 @@
 
 [section:assign_box_corners assign_box_corners]
 
-Assign the 4 points of a 2D box.
+Assign the four points of a 2D box.
 
 [heading Synopsis]
 ``template<typename Box, typename Point>
@@ -165,11 +165,11 @@
 
 [table
 [[Type] [Concept] [Name] [Description] ]
-[[Box const &] [Any type fulfilling a Box Concept ] [box] []]
-[[Point &] [] [lower_left] []]
-[[Point &] [] [lower_right] []]
-[[Point &] [] [upper_left] []]
-[[Point &] [] [upper_right] []]
+[[Box const &] [Any type fulfilling a Box Concept ] [box] [A model of the specified Box Concept ]]
+[[Point &] [Any type fulfilling a Point Concept ] [lower_left] [point being assigned to lower left coordinates of the box ]]
+[[Point &] [Any type fulfilling a Point Concept ] [lower_right] [point being assigned to lower right coordinates of the box ]]
+[[Point &] [Any type fulfilling a Point Concept ] [upper_left] [point being assigned to upper left coordinates of the box ]]
+[[Point &] [Any type fulfilling a Point Concept ] [upper_right] [point being assigned to upper right coordinates of the box]]
 ]
 
 
@@ -182,6 +182,9 @@
 
 `#include <boost/geometry/algorithms/assign.hpp>`
 
+[heading Example]
+[assign_box_corners] [assign_box_corners_output]
+
 
 [endsect]
 
@@ -200,7 +203,7 @@
 
 [table
 [[Type] [Concept] [Name] [Description] ]
-[[Geometry &] [Any type fulfilling a Geometry Concept] [geometry] []]
+[[Geometry &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept]]
 ]
 
 
@@ -235,8 +238,8 @@
 [table
 [[Type] [Concept] [Name] [Description] ]
 [[Index] [indicates which box-corner, min_corner (0) or max_corner (1) or which point of segment (0/1) ] [ - ] [Must be specified]]
-[[Geometry const &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] []]
-[[Point &] [] [point] []]
+[[Geometry const &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] [A box modelling the specified Box Concept or segment modelling the specified Segment Concept ]]
+[[Point &] [Any type fulfilling a Point Concept ] [point] [A model of the specified Point Concept]]
 ]
 
 
@@ -249,6 +252,9 @@
 
 `#include <boost/geometry/algorithms/assign.hpp>`
 
+[heading Example]
+[assign_point_from_index] [assign_point_from_index_output]
+
 
 [endsect]
 
@@ -265,8 +271,8 @@
 [table
 [[Type] [Concept] [Name] [Description] ]
 [[Index] [indicates which box-corner, min_corner (0) or max_corner (1) or which point of segment (0/1) ] [ - ] [Must be specified]]
-[[Point const &] [] [point] []]
-[[Geometry &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] []]
+[[Point const &] [Any type fulfilling a Point Concept ] [point] [A model of the specified Point Concept ]]
+[[Geometry &] [Any type fulfilling a Box Concept or a Segment Concept ] [geometry] [A box modelling the specified Box Concept or segment modelling the specified Segment Concept]]
 ]
 
 
@@ -279,6 +285,9 @@
 
 `#include <boost/geometry/algorithms/assign.hpp>`
 
+[heading Example]
+[assign_point_to_index] [assign_point_to_index_output]
+
 
 [endsect]
 
@@ -297,7 +306,7 @@
 
 [table
 [[Type] [Concept] [Name] [Description] ]
-[[Geometry &] [Any type fulfilling a Geometry Concept ] [geometry] []]
+[[Geometry &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
 ]
 
 
@@ -313,35 +322,3 @@
 
 [endsect]
 
-[section:copy_coordinates copy_coordinates]
-
-Copies coordinates from source to destination point.
-
-[heading Description]
-The function copy_coordinates copies coordinates from one point to another point. Source point and destination point might be of different types.
-
-[heading Synopsis]
-``template<typename Src, typename Dst>
-void copy_coordinates(Src const & source, Dst & dest)``
-
-[heading Parameters]
-
-[table
-[[Type] [Concept] [Name] [Description] ]
-[[Src const &] [] [source] [Source point ]]
-[[Dst &] [] [dest] [Destination point ]]
-]
-
-
-[heading Header]
-Either
-
-`#include <boost/geometry/geometry.hpp>`
-
-Or
-
-`#include <boost/geometry/util/copy.hpp>`
-
-
-[endsect]
-

Modified: trunk/libs/geometry/doc/reference/centroid.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/centroid.qbk (original)
+++ trunk/libs/geometry/doc/reference/centroid.qbk 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -29,7 +29,7 @@
 [table
 [[Type] [Concept] [Name] [Description] ]
 [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
-[[Point &] [point type ] [c] [the calculated centroid will be assigned to this point reference]]
+[[Point &] [Any type fulfilling a Point Concept ] [c] [the calculated centroid will be assigned to this point reference]]
 ]
 
 
@@ -63,7 +63,7 @@
 [table
 [[Type] [Concept] [Name] [Description] ]
 [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
-[[Point &] [point type ] [c] [A model of the specified Point Concept which is set to the centroid ]]
+[[Point &] [Any type fulfilling a Point Concept ] [c] [A model of the specified Point Concept which is set to the centroid ]]
 [[Strategy const &] [Any type fulfilling a Centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations]]
 ]
 
@@ -99,7 +99,7 @@
 
 [table
 [[Type] [Concept] [Name] [Description] ]
-[[Point] [point type ] [ - ] [Must be specified]]
+[[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
 [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
 [[Strategy const &] [Any type fulfilling a centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations ]]
 ]
@@ -139,7 +139,7 @@
 
 [table
 [[Type] [Concept] [Name] [Description] ]
-[[Point] [point type ] [ - ] [Must be specified]]
+[[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
 [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
 ]
 

Modified: trunk/libs/geometry/doc/reference/linestring.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/linestring.qbk (original)
+++ trunk/libs/geometry/doc/reference/linestring.qbk 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -31,7 +31,7 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Default] [Description]]
-[[typename Point] [] [point type ]]
+[[typename Point] [] [Any type fulfilling a Point Concept ]]
 [[template< typename, typename > class Container] [std::vector] [container type, for example std::vector, std::deque ]]
 [[template< typename > class Allocator] [std::allocator] [container-allocator-type]]
 ]

Modified: trunk/libs/geometry/doc/reference/multi_point.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/multi_point.qbk (original)
+++ trunk/libs/geometry/doc/reference/multi_point.qbk 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -31,7 +31,7 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Default] [Description]]
-[[typename Point] [] [point type ]]
+[[typename Point] [] [Any type fulfilling a Point Concept ]]
 [[template< typename, typename > class Container] [std::vector] [container type, for example std::vector, std::deque ]]
 [[template< typename > class Allocator] [std::allocator] [container-allocator-type]]
 ]

Modified: trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 (original)
+++ trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -18,6 +18,9 @@
 exe assign_3d_point : assign_3d_point.cpp ;
 exe assign_inverse : assign_inverse.cpp ;
 exe assign_with_range : assign_with_range.cpp ;
+exe assign_box_corners : assign_box_corners.cpp ;
+exe assign_point_from_index : assign_point_from_index.cpp ;
+exe assign_point_to_index : assign_point_to_index.cpp ;
 
 exe for_each_point : for_each_point.cpp ;
 exe for_each_point_const : for_each_point_const.cpp ;

Added: trunk/libs/geometry/doc/src/examples/algorithms/assign_box_corners.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/assign_box_corners.cpp 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -0,0 +1,59 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, 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)
+//
+// Quickbook Example
+
+//[assign_box_corners
+//` Shows how four point can be assigned from a 2D box
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+using namespace boost::geometry;
+
+int main()
+{
+ typedef model::d2::point_xy<double> point;
+ typedef model::box<point> box;
+
+ box b;
+ assign(b, 2, 2, 5, 5);
+
+ point ll, lr, ul, ur;
+ assign_box_corners(b, ll, lr, ul, ur);
+
+ std::cout << "box: " << dsv(b) << std::endl << std::endl;
+
+ std::cout << dsv(ul) << " --- " << dsv(ur) << std::endl;
+ for (int i = 0; i < 3; i++)
+ {
+ std::cout << " | |" << std::endl;
+ }
+ std::cout << dsv(ll) << " --- " << dsv(lr) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[assign_box_corners_output
+/*`
+Output:
+[pre
+box: ((2, 2), (5, 5))
+
+(2, 5) --- (5, 5)
+ | |
+ | |
+ | |
+(2, 2) --- (5, 2)
+]
+*/
+//]

Added: trunk/libs/geometry/doc/src/examples/algorithms/assign_point_from_index.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/assign_point_from_index.cpp 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -0,0 +1,51 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, 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)
+//
+// Quickbook Example
+
+//[assign_point_from_index
+//` Shows how to retrieve one point from a box (either lower-left or upper-right) or segment
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+using namespace boost::geometry;
+
+int main()
+{
+ typedef model::d2::point_xy<double> point;
+ typedef model::segment<point> segment;
+
+ segment s;
+ assign(s, 1, 1, 2, 2);
+
+ point first, second;
+ assign_point_from_index<0>(s, first);
+ assign_point_from_index<1>(s, second);
+ std::cout
+ << "segment: " << dsv(s) << std::endl
+ << "first: " << dsv(first) << std::endl
+ << "second: " << dsv(second) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[assign_point_from_index_output
+/*`
+Output:
+[pre
+segment: ((1, 1), (2, 2))
+first: (1, 1)
+second: (2, 2)
+]
+*/
+//]

Added: trunk/libs/geometry/doc/src/examples/algorithms/assign_point_to_index.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/assign_point_to_index.cpp 2011-02-21 17:26:05 EST (Mon, 21 Feb 2011)
@@ -0,0 +1,45 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, 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)
+//
+// Quickbook Example
+
+//[assign_point_to_index
+//` Shows how to assign the lower-left or upper-right point from a box
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+using namespace boost::geometry;
+
+int main()
+{
+ typedef model::d2::point_xy<int> point;
+ typedef model::box<point> box;
+
+ point lower_left(0, 0), upper_right(2, 2);
+
+ box b;
+ assign_point_to_index<0>(lower_left, b);
+ assign_point_to_index<1>(upper_right, b);
+ std::cout << "box: " << dsv(b) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[assign_point_to_index_output
+/*`
+Output:
+[pre
+box: ((0, 0), (2, 2))
+]
+*/
+//]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk