Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71153 - in trunk/libs/geometry/doc: . doxy/doxygen_output/html html/img/algorithms other reference/algorithms src/docutils/tools/implementation_status src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-04-09 16:31:38


Author: barendgehrels
Date: 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
New Revision: 71153
URL: http://svn.boost.org/trac/boost/changeset/71153

Log:
Added and updated documentation of correct, transform, distance, comparable_distance
Added:
   trunk/libs/geometry/doc/html/img/algorithms/return_envelope.png
      - copied unchanged from r71149, /trunk/libs/geometry/doc/html/img/algorithms/make_envelope.png
   trunk/libs/geometry/doc/reference/algorithms/comparable_distance.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/algorithms/correct.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/algorithms/distance.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/algorithms/transform.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/algorithms/transform_with_strategy.qbk (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/comparable_distance.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/correct.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/transform.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/transform_with_strategy.cpp (contents, props changed)
Removed:
   trunk/libs/geometry/doc/html/img/algorithms/make_envelope.png
Binary files modified:
   trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.png
   trunk/libs/geometry/doc/other/status.xls
Text files modified:
   trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.css | 380 ++++-----------------------------------
   trunk/libs/geometry/doc/doxy/doxygen_output/html/tabs.css | 132 +++++++++----
   trunk/libs/geometry/doc/imports.qbk | 4
   trunk/libs/geometry/doc/quickref.xml | 2
   trunk/libs/geometry/doc/reference.qbk | 32 --
   trunk/libs/geometry/doc/reference/algorithms/clear.qbk | 2
   trunk/libs/geometry/doc/reference/algorithms/difference.qbk | 6
   trunk/libs/geometry/doc/reference/algorithms/expand.qbk | 2
   trunk/libs/geometry/doc/reference/algorithms/intersection.qbk | 6
   trunk/libs/geometry/doc/reference/algorithms/reverse.qbk | 2
   trunk/libs/geometry/doc/reference/algorithms/sym_difference.qbk | 6
   trunk/libs/geometry/doc/reference/algorithms/union.qbk | 6
   trunk/libs/geometry/doc/reference/algorithms/unique.qbk | 2
   trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp | 8
   trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 | 22 ++
   trunk/libs/geometry/doc/src/examples/algorithms/distance.cpp | 13
   16 files changed, 193 insertions(+), 432 deletions(-)

Modified: trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.css
==============================================================================
--- trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.css (original)
+++ trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.css 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -8,15 +8,10 @@
 /* @group Heading Levels */
 
 h1 {
+ text-align: center;
         font-size: 150%;
 }
 
-.title {
- font-size: 150%;
- font-weight: bold;
- margin: 10px 2px;
-}
-
 h2 {
         font-size: 120%;
 }
@@ -69,8 +64,8 @@
 }
 
 div.qindex, div.navtab{
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
         text-align: center;
         margin: 2px;
         padding: 2px;
@@ -88,13 +83,13 @@
 /* @group Link Styling */
 
 a {
- color: #3D578C;
+ color: #153788;
         font-weight: normal;
         text-decoration: none;
 }
 
 .contents a:visited {
- color: #4665A2;
+ color: #1b77c5;
 }
 
 a:hover {
@@ -107,9 +102,9 @@
 
 a.qindexHL {
         font-weight: bold;
- background-color: #9CAFD4;
+ background-color: #6666cc;
         color: #ffffff;
- border: 1px double #869DCA;
+ border: 1px double #9295C2;
 }
 
 .contents a.qindexHL:visited {
@@ -124,11 +119,11 @@
 }
 
 a.code {
- color: #4665A2;
+ color: #3030f0;
 }
 
 a.codeRef {
- color: #4665A2;
+ color: #3030f0;
 }
 
 /* @end */
@@ -143,8 +138,8 @@
 }
 
 pre.fragment {
- border: 1px solid #C4CFE5;
- background-color: #FBFCFD;
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
         padding: 4px 6px;
         margin: 4px 8px 4px 2px;
         overflow: auto;
@@ -158,22 +153,13 @@
         font-weight: bold;
         color: #ffffff;
         margin-bottom: 3px;
- margin-top: 3px;
- padding: 0.2em;
- border: solid thin #333;
- border-radius: 0.5em;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- box-shadow: 2px 2px 3px #999;
- -webkit-box-shadow: 2px 2px 3px #999;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
- background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+ margin-top: 3px
 }
 
 div.groupHeader {
         margin-left: 16px;
         margin-top: 12px;
+ margin-bottom: 6px;
         font-weight: bold;
 }
 
@@ -185,32 +171,27 @@
 body {
         background: white;
         color: black;
- margin: 0;
-}
-
-div.contents {
- margin-top: 10px;
- margin-left: 10px;
- margin-right: 5px;
+ margin-right: 20px;
+ margin-left: 20px;
 }
 
 td.indexkey {
- background-color: #EBEFF6;
+ background-color: #e8eef2;
         font-weight: bold;
- border: 1px solid #C4CFE5;
+ border: 1px solid #CCCCCC;
         margin: 2px 0px 2px 0;
         padding: 2px 10px;
 }
 
 td.indexvalue {
- background-color: #EBEFF6;
- border: 1px solid #C4CFE5;
+ background-color: #e8eef2;
+ border: 1px solid #CCCCCC;
         padding: 2px 10px;
         margin: 2px 0px;
 }
 
 tr.memlist {
- background-color: #EEF1F7;
+ background-color: #f0f0f0;
 }
 
 p.formulaDsp {
@@ -236,11 +217,6 @@
         border: 0px;
 }
 
-address.footer {
- text-align: right;
- padding-right: 12px;
-}
-
 img.footer {
         border: 0px;
         vertical-align: middle;
@@ -294,7 +270,6 @@
 
 /* @end */
 
-/*
 .search {
         color: #003399;
         font-weight: bold;
@@ -311,7 +286,6 @@
         font-weight: normal;
         background-color: #e8eef2;
 }
-*/
 
 td.tiny {
         font-size: 75%;
@@ -320,18 +294,18 @@
 .dirtab {
         padding: 4px;
         border-collapse: collapse;
- border: 1px solid #A3B4D7;
+ border: 1px solid #84b0c7;
 }
 
 th.dirtab {
- background: #EBEFF6;
+ background: #e8eef2;
         font-weight: bold;
 }
 
 hr {
         height: 0px;
         border: none;
- border-top: 1px solid #4A6AAA;
+ border-top: 1px solid #666;
 }
 
 hr.footer {
@@ -340,15 +314,10 @@
 
 /* @group Member Descriptions */
 
-table.memberdecls {
- border-spacing: 0px;
- padding: 0px;
-}
-
 .mdescLeft, .mdescRight,
 .memItemLeft, .memItemRight,
 .memTemplItemLeft, .memTemplItemRight, .memTemplParams {
- background-color: #F9FAFC;
+ background-color: #FAFAFA;
         border: none;
         margin: 4px;
         padding: 1px 0 0 8px;
@@ -360,19 +329,15 @@
 }
 
 .memItemLeft, .memItemRight, .memTemplParams {
- border-top: 1px solid #C4CFE5;
+ border-top: 1px solid #ccc;
 }
 
 .memItemLeft, .memTemplItemLeft {
         white-space: nowrap;
 }
 
-.memItemRight {
- width: 100%;
-}
-
 .memTemplParams {
- color: #4665A2;
+ color: #606060;
         white-space: nowrap;
 }
 
@@ -384,28 +349,23 @@
 
 .memtemplate {
         font-size: 80%;
- color: #4665A2;
+ color: #606060;
         font-weight: normal;
- margin-left: 9px;
+ margin-left: 3px;
 }
 
 .memnav {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
         text-align: center;
         margin: 2px;
         margin-right: 15px;
         padding: 2px;
 }
 
-.mempage {
- width: 100%;
-}
-
 .memitem {
         padding: 0;
         margin-bottom: 10px;
- margin-right: 5px;
 }
 
 .memname {
@@ -415,52 +375,40 @@
 }
 
 .memproto {
- border-top: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
- padding: 6px 0px 6px 0px;
- color: #253555;
+ border-top: 1px solid #84b0c7;
+ border-left: 1px solid #84b0c7;
+ border-right: 1px solid #84b0c7;
+ padding: 0;
+ background-color: #d5e1e8;
         font-weight: bold;
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- /* opera specific markup */
- box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- border-top-right-radius: 8px;
- border-top-left-radius: 8px;
         /* firefox specific markup */
+ background-image: -moz-linear-gradient(rgba(228, 233, 245, 1.0) 0%, rgba(193, 205, 232, 1.0) 100%);
         -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
         -moz-border-radius-topright: 8px;
         -moz-border-radius-topleft: 8px;
         /* webkit specific markup */
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(228, 233, 245, 1.0)), to(rgba(193, 205, 232, 1.0)));
         -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
         -webkit-border-top-right-radius: 8px;
         -webkit-border-top-left-radius: 8px;
- background-image:url('nav_f.png');
- background-repeat:repeat-x;
- background-color: #E2E8F2;
 
 }
 
 .memdoc {
- border-bottom: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
+ border-bottom: 1px solid #84b0c7;
+ border-left: 1px solid #84b0c7;
+ border-right: 1px solid #84b0c7;
         padding: 2px 5px;
- background-color: #FBFCFD;
+ background-color: #eef3f5;
         border-top-width: 0;
- /* opera specific markup */
- border-bottom-left-radius: 8px;
- border-bottom-right-radius: 8px;
- box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
         /* firefox specific markup */
         -moz-border-radius-bottomleft: 8px;
         -moz-border-radius-bottomright: 8px;
         -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
- background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
         /* webkit specific markup */
         -webkit-border-bottom-left-radius: 8px;
         -webkit-border-bottom-right-radius: 8px;
         -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
 }
 
 .paramkey {
@@ -479,28 +427,6 @@
         font-style: normal;
 }
 
-.params, .retval, .exception, .tparams {
- border-spacing: 6px 2px;
-}
-
-.params .paramname, .retval .paramname {
- font-weight: bold;
- vertical-align: top;
-}
-
-.params .paramtype {
- font-style: italic;
- vertical-align: top;
-}
-
-.params .paramdir {
- font-family: "courier new",courier,monospace;
- vertical-align: top;
-}
-
-
-
-
 /* @end */
 
 /* @group Directory (tree) */
@@ -509,7 +435,7 @@
 
 .ftvtree {
         font-family: sans-serif;
- margin: 0px;
+ margin: 0.5em;
 }
 
 /* these are for tree view when used as main index */
@@ -517,7 +443,6 @@
 .directory {
         font-size: 9pt;
         font-weight: bold;
- margin: 5px;
 }
 
 .directory h3 {
@@ -595,13 +520,9 @@
 
 /* @end */
 
-div.dynheader {
- margin-top: 8px;
-}
-
 address {
         font-style: normal;
- color: #2A3D61;
+ color: #333;
 }
 
 table.doxtable {
@@ -609,12 +530,12 @@
 }
 
 table.doxtable td, table.doxtable th {
- border: 1px solid #2D4068;
+ border: 1px solid #153788;
         padding: 3px 7px 2px;
 }
 
 table.doxtable th {
- background-color: #374F7F;
+ background-color: #254798;
         color: #FFFFFF;
         font-size: 110%;
         padding-bottom: 4px;
@@ -622,214 +543,3 @@
         text-align:left;
 }
 
-.tabsearch {
- top: 0px;
- left: 10px;
- height: 36px;
- background-image: url('tab_b.png');
- z-index: 101;
- overflow: hidden;
- font-size: 13px;
-}
-
-.navpath ul
-{
- font-size: 11px;
- background-image:url('tab_b.png');
- background-repeat:repeat-x;
- height:30px;
- line-height:30px;
- color:#8AA0CC;
- border:solid 1px #C2CDE4;
- overflow:hidden;
- margin:0px;
- padding:0px;
-}
-
-.navpath li
-{
- list-style-type:none;
- float:left;
- padding-left:10px;
- padding-right:15px;
- background-image:url('bc_s.png');
- background-repeat:no-repeat;
- background-position:right;
- color:#364D7C;
-}
-
-.navpath li.navelem a
-{
- height:32px;
- display:block;
- text-decoration: none;
- outline: none;
-}
-
-.navpath li.navelem a:hover
-{
- color:#6884BD;
-}
-
-.navpath li.footer
-{
- list-style-type:none;
- float:right;
- padding-left:10px;
- padding-right:15px;
- background-image:none;
- background-repeat:no-repeat;
- background-position:right;
- color:#364D7C;
- font-size: 8pt;
-}
-
-
-div.summary
-{
- float: right;
- font-size: 8pt;
- padding-right: 5px;
- width: 50%;
- text-align: right;
-}
-
-div.summary a
-{
- white-space: nowrap;
-}
-
-div.ingroups
-{
- font-size: 8pt;
- padding-left: 5px;
- width: 50%;
- text-align: left;
-}
-
-div.ingroups a
-{
- white-space: nowrap;
-}
-
-div.header
-{
- background-image:url('nav_h.png');
- background-repeat:repeat-x;
- background-color: #F9FAFC;
- margin: 0px;
- border-bottom: 1px solid #C4CFE5;
-}
-
-div.headertitle
-{
- padding: 5px 5px 5px 10px;
-}
-
-dl
-{
- padding: 0 0 0 10px;
-}
-
-dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
-{
- border-left:4px solid;
- padding: 0 0 0 6px;
-}
-
-dl.note
-{
- border-color: #D0C000;
-}
-
-dl.warning, dl.attention
-{
- border-color: #FF0000;
-}
-
-dl.pre, dl.post, dl.invariant
-{
- border-color: #00D000;
-}
-
-dl.deprecated
-{
- border-color: #505050;
-}
-
-dl.todo
-{
- border-color: #00C0E0;
-}
-
-dl.test
-{
- border-color: #3030E0;
-}
-
-dl.bug
-{
- border-color: #C08050;
-}
-
-#projectlogo
-{
- text-align: center;
- vertical-align: bottom;
- border-collapse: separate;
-}
-
-#projectlogo img
-{
- border: 0px none;
-}
-
-#projectname
-{
- font: 300% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 2px 0px;
-}
-
-#projectbrief
-{
- font: 120% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 0px;
-}
-
-#projectnumber
-{
- font: 50% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 0px;
-}
-
-#titlearea
-{
- padding: 0px;
- margin: 0px;
- width: 100%;
- border-bottom: 1px solid #5373B4;
-}
-
-.image
-{
- text-align: center;
-}
-
-.dotgraph
-{
- text-align: center;
-}
-
-.mscgraph
-{
- text-align: center;
-}
-
-.caption
-{
- font-weight: bold;
-}
-

Modified: trunk/libs/geometry/doc/doxy/doxygen_output/html/doxygen.png
==============================================================================
Binary files. No diff available.

Modified: trunk/libs/geometry/doc/doxy/doxygen_output/html/tabs.css
==============================================================================
--- trunk/libs/geometry/doc/doxy/doxygen_output/html/tabs.css (original)
+++ trunk/libs/geometry/doc/doxy/doxygen_output/html/tabs.css 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -1,59 +1,105 @@
-.tabs, .tabs2, .tabs3 {
- background-image: url('tab_b.png');
- width: 100%;
- z-index: 101;
- font-size: 13px;
+/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
+
+DIV.tabs
+{
+ float : left;
+ width : 100%;
+ background : url("tab_b.gif") repeat-x bottom;
+ margin-bottom : 4px;
+}
+
+DIV.tabs UL
+{
+ margin : 0px;
+ padding-left : 10px;
+ list-style : none;
+}
+
+DIV.tabs LI, DIV.tabs FORM
+{
+ display : inline;
+ margin : 0px;
+ padding : 0px;
+}
+
+DIV.tabs FORM
+{
+ float : right;
 }
 
-.tabs2 {
- font-size: 10px;
+DIV.tabs A
+{
+ float : left;
+ background : url("tab_r.gif") no-repeat right top;
+ border-bottom : 1px solid #84B0C7;
+ font-size : 80%;
+ font-weight : bold;
+ text-decoration : none;
 }
-.tabs3 {
- font-size: 9px;
+
+DIV.tabs A:hover
+{
+ background-position: 100% -150px;
 }
 
-.tablist {
- margin: 0;
- padding: 0;
- display: table;
+DIV.tabs A:link, DIV.tabs A:visited,
+DIV.tabs A:active, DIV.tabs A:hover
+{
+ color: #1A419D;
 }
 
-.tablist li {
- float: left;
- display: table-cell;
- background-image: url('tab_b.png');
- line-height: 36px;
- list-style: none;
+DIV.tabs SPAN
+{
+ float : left;
+ display : block;
+ background : url("tab_l.gif") no-repeat left top;
+ padding : 5px 9px;
+ white-space : nowrap;
 }
 
-.tablist a {
- display: block;
- padding: 0 20px;
- font-weight: bold;
- background-image:url('tab_s.png');
- background-repeat:no-repeat;
- background-position:right;
- color: #283A5D;
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- text-decoration: none;
- outline: none;
+DIV.tabs #MSearchBox
+{
+ float : right;
+ display : inline;
+ font-size : 1em;
+}
+
+DIV.tabs TD
+{
+ font-size : 80%;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+DIV.tabs SPAN {float : none;}
+/* End IE5-Mac hack */
+
+DIV.tabs A:hover SPAN
+{
+ background-position: 0% -150px;
 }
 
-.tabs3 .tablist a {
- padding: 0 10px;
+DIV.tabs LI.current A
+{
+ background-position: 100% -150px;
+ border-width : 0px;
 }
 
-.tablist a:hover {
- background-image: url('tab_h.png');
- background-repeat:repeat-x;
- color: #fff;
- text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
- text-decoration: none;
+DIV.tabs LI.current SPAN
+{
+ background-position: 0% -150px;
+ padding-bottom : 6px;
 }
 
-.tablist li.current a {
- background-image: url('tab_a.png');
- background-repeat:repeat-x;
- color: #fff;
- text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+DIV.navpath
+{
+ background : none;
+ border : none;
+ border-bottom : 1px solid #84B0C7;
+ text-align : center;
+ margin : 2px;
+ padding : 2px;
 }

Deleted: trunk/libs/geometry/doc/html/img/algorithms/make_envelope.png
==============================================================================
Binary file. No diff available.

Modified: trunk/libs/geometry/doc/imports.qbk
==============================================================================
--- trunk/libs/geometry/doc/imports.qbk (original)
+++ trunk/libs/geometry/doc/imports.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -23,6 +23,8 @@
 [import src/examples/algorithms/assign_point_from_index.cpp]
 [import src/examples/algorithms/clear.cpp]
 [import src/examples/algorithms/centroid.cpp]
+[import src/examples/algorithms/comparable_distance.cpp]
+[import src/examples/algorithms/correct.cpp]
 [import src/examples/algorithms/distance.cpp]
 [import src/examples/algorithms/difference.cpp]
 [import src/examples/algorithms/envelope.cpp]
@@ -47,6 +49,8 @@
 [import src/examples/algorithms/return_envelope.cpp]
 [import src/examples/algorithms/simplify.cpp]
 [import src/examples/algorithms/sym_difference.cpp]
+[import src/examples/algorithms/transform.cpp]
+[import src/examples/algorithms/transform_with_strategy.cpp]
 [import src/examples/algorithms/union.cpp]
 [import src/examples/algorithms/unique.cpp]
 [import src/examples/algorithms/within.cpp]

Modified: trunk/libs/geometry/doc/other/status.xls
==============================================================================
Binary files. No diff available.

Modified: trunk/libs/geometry/doc/quickref.xml
==============================================================================
--- trunk/libs/geometry/doc/quickref.xml (original)
+++ trunk/libs/geometry/doc/quickref.xml 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -387,7 +387,7 @@
     </simplelist>
     <bridgehead renderas="sect3">Union</bridgehead>
     <simplelist type="vert" columns="1">
- <member><link linkend="geometry.reference.algorithms.union">union</link></member>
+ <member><link linkend="geometry.reference.algorithms.union_">union</link></member>
     </simplelist>
     <bridgehead renderas="sect3">Unique</bridgehead>
     <simplelist type="vert" columns="1">

Modified: trunk/libs/geometry/doc/reference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference.qbk (original)
+++ trunk/libs/geometry/doc/reference.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -65,25 +65,12 @@
 [include generated/centroid.qbk]
 [endsect]
 
-[section:clear clear]
 [include generated/clear.qbk]
-[endsect]
-
-[section:convex_hull convex_hull]
 [include generated/convex_hull.qbk]
-[endsect]
-
 [include generated/correct.qbk]
 
-
-[section:difference difference]
 [include generated/difference.qbk]
-[endsect]
-
-[section:disjoint disjoint]
 [include generated/disjoint.qbk]
-[endsect]
-
 
 [section:distance distance]
 [include generated/distance.qbk]
@@ -93,21 +80,16 @@
 [include generated/envelope.qbk]
 [endsect]
 
-[section:equals equals]
 [include generated/equals.qbk]
-[endsect]
-
-[section:expand expand]
 [include generated/expand.qbk]
-[endsect]
 
 [section:for_each for_each]
 [include generated/for_each.qbk]
 [endsect]
 
-[section:intersection intersection]
+[/section:intersection intersection]
 [include generated/intersection.qbk]
-[endsect]
+[/endsect]
 
 [section:intersects intersects]
 [include generated/intersects.qbk]
@@ -126,9 +108,7 @@
 [include generated/num_points.qbk]
 
 
-[section:overlaps overlaps]
 [include generated/overlaps.qbk]
-[endsect]
 
 [section:perimeter perimeter]
 [include generated/perimeter.qbk]
@@ -140,18 +120,18 @@
 [include generated/simplify.qbk]
 [endsect]
 
-[section:sym_difference sym_difference]
+[/section:sym_difference sym_difference]
 [include generated/sym_difference.qbk]
-[endsect]
+[/endsect]
 
 [section:transform transform]
 [include generated/transform.qbk]
 [endsect]
 
 
-[section:union union]
+[/section:union union]
 [include generated/union.qbk]
-[endsect]
+[/endsect]
 
 [include generated/unique.qbk]
 

Modified: trunk/libs/geometry/doc/reference/algorithms/clear.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/clear.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/clear.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -29,7 +29,7 @@
 [heading Complexity]
 Constant
 
-[heading Examples]
+[heading Example]
 [clear]
 [clear_output]
 

Added: trunk/libs/geometry/doc/reference/algorithms/comparable_distance.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/algorithms/comparable_distance.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,25 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-2011 Barend Gehrels, Amsterdam, the Netherlands.
+ Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
+ 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)
+=============================================================================/]
+
+[heading Behaviour]
+There is no (not yet) version with a strategy.
+
+It depends on the coordinate system of the geometry's point type if there is
+a strategy available which can determine (more efficient than the standard
+strategy) a measure of comparable distance.
+
+[heading Complexity]
+Linear
+
+[heading Example]
+[comparable_distance]
+[comparable_distance_output]

Added: trunk/libs/geometry/doc/reference/algorithms/correct.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/algorithms/correct.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,33 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-2011 Barend Gehrels, Amsterdam, the Netherlands.
+ Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
+ 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)
+=============================================================================/]
+
+[def __corrected__ is corrected]
+
+[heading Behavior]
+[table
+[[Case] [Behavior] ]
+[[__ring__][__ring__ __corrected__]]
+[[__polygon__][__polygon__ __corrected__]]
+[[__multi_polygon__][__multi_polygon__ __corrected__]]
+[[__box__][__box__ __corrected__ with respect to minimal and maximal corners]]
+[[__other__][__does_nothing__]]
+]
+
+[tip Correct is not defined within OGC or ISO]
+
+[heading Complexity]
+Linear
+
+[heading Example]
+[correct]
+[correct_output]
+

Modified: trunk/libs/geometry/doc/reference/algorithms/difference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/difference.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/difference.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -14,7 +14,7 @@
 [difference] [difference_output]
 
 [heading See also]
-* [link geometry.reference.algorithms.sym_difference.sym_difference sym_difference (symmetric difference)]
-* [link geometry.reference.algorithms.intersection.intersection intersection]
-* [link geometry.reference.algorithms.union.union_ union]
+* [link geometry.reference.algorithms.sym_difference sym_difference (symmetric difference)]
+* [link geometry.reference.algorithms.intersection intersection]
+* [link geometry.reference.algorithms.union_ union]
 

Added: trunk/libs/geometry/doc/reference/algorithms/distance.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/algorithms/distance.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,21 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-2011 Barend Gehrels, Amsterdam, the Netherlands.
+ Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
+ 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)
+=============================================================================/]
+
+[include generated/distance_status.qbk]
+
+[heading Complexity]
+Linear
+For multi-geometry to multi-geometry: currently quadratic
+
+[heading Example]
+[distance]
+[distance_output]

Modified: trunk/libs/geometry/doc/reference/algorithms/expand.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/expand.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/expand.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -26,7 +26,7 @@
 [heading Complexity]
 Linear
 
-[heading Examples]
+[heading Example]
 [expand]
 [expand_output]
 

Modified: trunk/libs/geometry/doc/reference/algorithms/intersection.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/intersection.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/intersection.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -23,6 +23,6 @@
 [intersection_output]
 
 [heading See also]
-* [link geometry.reference.algorithms.union.union_ union]
-* [link geometry.reference.algorithms.difference.difference difference]
-* [link geometry.reference.algorithms.sym_difference.sym_difference sym_difference (symmetric difference)]
+* [link geometry.reference.algorithms.union_ union]
+* [link geometry.reference.algorithms.difference difference]
+* [link geometry.reference.algorithms.sym_difference sym_difference (symmetric difference)]

Modified: trunk/libs/geometry/doc/reference/algorithms/reverse.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/reverse.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/reverse.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -32,7 +32,7 @@
 [heading Complexity]
 Linear
 
-[heading Examples]
+[heading Example]
 [reverse]
 [reverse_output]
 

Modified: trunk/libs/geometry/doc/reference/algorithms/sym_difference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/sym_difference.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/sym_difference.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -23,7 +23,7 @@
 [sym_difference_output]
 
 [heading See also]
-* [link geometry.reference.algorithms.difference.difference difference]
-* [link geometry.reference.algorithms.intersection.intersection intersection]
-* [link geometry.reference.algorithms.union.union_ union]
+* [link geometry.reference.algorithms.difference difference]
+* [link geometry.reference.algorithms.intersection intersection]
+* [link geometry.reference.algorithms.union_ union]
 

Added: trunk/libs/geometry/doc/reference/algorithms/transform.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/algorithms/transform.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,28 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-2011 Barend Gehrels, Amsterdam, the Netherlands.
+ Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
+ 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)
+=============================================================================/]
+
+[heading Behavior]
+[table
+[[Case] [Behavior] ]
+[[__sph__ (degree) / __sph__ (radian)][Transforms coordinates from degree to radian, or vice versa]]
+[[__sph__ / __cart__ (3D)][Transforms coordinates from spherical coordinates to X,Y,Z, or vice versa, on a unit sphere]]
+[[__sph__ (degree, with radius) / __sph__ (radian, with radius)][Transforms coordinates from degree to radian, or vice versa. Third coordinate (radius) is untouched]]
+[[__sph__ (with radius) / __cart__ (3D)][Transforms coordinates from spherical coordinates to X,Y,Z, or vice versa, on a unit sphere. Third coordinate (radius) is taken into account]]
+]
+
+[heading Complexity]
+Linear
+
+[heading Example]
+[transform]
+[transform_output]
+

Added: trunk/libs/geometry/doc/reference/algorithms/transform_with_strategy.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/algorithms/transform_with_strategy.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,19 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-2011 Barend Gehrels, Amsterdam, the Netherlands.
+ Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
+ 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)
+=============================================================================/]
+
+[heading Complexity]
+Linear
+
+[heading Example]
+[transform_with_strategy]
+[transform_with_strategy_output]
+

Modified: trunk/libs/geometry/doc/reference/algorithms/union.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/union.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/union.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -20,6 +20,6 @@
 [union_output]
 
 [heading See also]
-* [link geometry.reference.algorithms.intersection.intersection intersection]
-* [link geometry.reference.algorithms.difference.difference difference]
-* [link geometry.reference.algorithms.sym_difference.sym_difference sym_difference (symmetric difference)]
+* [link geometry.reference.algorithms.intersection intersection]
+* [link geometry.reference.algorithms.difference difference]
+* [link geometry.reference.algorithms.sym_difference sym_difference (symmetric difference)]

Modified: trunk/libs/geometry/doc/reference/algorithms/unique.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/algorithms/unique.qbk (original)
+++ trunk/libs/geometry/doc/reference/algorithms/unique.qbk 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -31,7 +31,7 @@
 [heading Complexity]
 Linear
 
-[heading Examples]
+[heading Example]
 [unique]
 [unique_output]
 

Modified: trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/implementation_status/implementation_status.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -71,8 +71,9 @@
             command << "u";
         }
 
- command << "implementation_status.hpp tmp/t.cpp > tmp/t.out";
- // For debugging: << type1 << "_" << type2 << ".out";
+ command << "implementation_status.hpp tmp/t.cpp > tmp/t" //.out";
+ // For debugging:
+ << type1 << "_" << type2 << ".out";
 
         int failed = system(command.str().c_str());
         return failed == 0;
@@ -300,7 +301,8 @@
     algorithms.push_back(algorithm("correct"));
     algorithms.push_back(algorithm("distance", 2));
     algorithms.push_back(algorithm("centroid", 2));
- //algorithms.push_back(algorithm("within", 2));
+ algorithms.push_back(algorithm("intersects", 2));
+ algorithms.push_back(algorithm("within", 2));
 
     typedef std::vector<cs> cs_type;
     cs_type css;

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-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -13,6 +13,8 @@
     : # requirements
     ;
 
+exe append : append.cpp ;
+
 exe area : area.cpp ;
 exe area_with_strategy : area_with_strategy.cpp ;
 
@@ -26,9 +28,15 @@
 
 exe centroid : centroid.cpp ;
 exe clear : clear.cpp ;
+exe comparable_distance : comparable_distance.cpp ;
+exe correct : correct.cpp ;
 
+exe difference : difference.cpp ;
 exe distance : distance.cpp ;
 
+exe envelope : envelope.cpp ;
+exe expand : expand.cpp ;
+
 exe for_each_point : for_each_point.cpp ;
 exe for_each_point_const : for_each_point_const.cpp ;
 exe for_each_segment_const : for_each_segment_const.cpp ;
@@ -38,6 +46,9 @@
 
 exe intersects_linestring : intersects_linestring.cpp ;
 
+exe length : length.cpp ;
+exe length_with_strategy : length_with_strategy.cpp ;
+
 exe make_2d_point : make_2d_point.cpp ;
 exe make_3d_point : make_3d_point.cpp ;
 exe make_inverse : make_inverse.cpp ;
@@ -47,10 +58,17 @@
 exe num_interior_rings : num_interior_rings.cpp ;
 exe num_points : num_points.cpp ;
 
+exe return_envelope : return_envelope.cpp ;
 
-exe length : length.cpp ;
-exe length_with_strategy : length_with_strategy.cpp ;
+exe reverse : reverse.cpp ;
 
 exe simplify : length.cpp ;
+exe sym_difference : sym_difference.cpp ;
+
+exe transform : transform.cpp ;
+exe transform_with_strategy : transform_with_strategy.cpp ;
+
+exe union : union.cpp ;
+exe unique : unique.cpp ;
 
 exe within : within.cpp ;

Added: trunk/libs/geometry/doc/src/examples/algorithms/comparable_distance.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/comparable_distance.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,66 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 2011 Barend Gehrels, 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)
+
+//[comparable_distance
+//` Shows how to efficiently get the closest point
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+
+#include <boost/numeric/conversion/bounds.hpp>
+#include <boost/foreach.hpp>
+
+int main()
+{
+ typedef boost::geometry::model::d2::point_xy<double> point_type;
+
+ point_type p(1.4, 2.6);
+
+ std::vector<point_type> v;
+ for (double x = 0.0; x <= 4.0; x++)
+ {
+ for (double y = 0.0; y <= 4.0; y++)
+ {
+ v.push_back(point_type(x, y));
+ }
+ }
+
+ point_type min_p;
+ double min_d = boost::numeric::bounds<double>::highest();
+ BOOST_FOREACH(point_type const& pv, v)
+ {
+ double d = boost::geometry::comparable_distance(p, pv);
+ if (d < min_d)
+ {
+ min_d = d;
+ min_p = pv;
+ }
+ }
+
+ std::cout
+ << "Closest: " << boost::geometry::dsv(minp) << std::endl
+ << "At: " << boost::geometry::distance(p, minp) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[comparable_distance_output
+/*`
+Output:
+[pre
+Closest: (1, 3)
+At: 0.565685
+]
+*/
+//]
+

Added: trunk/libs/geometry/doc/src/examples/algorithms/correct.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/correct.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,65 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 2011 Barend Gehrels, 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)
+
+//[correct
+//` Shows how to correct a polygon with respect to its orientation and closure
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
+
+#include <boost/assign.hpp>
+
+int main()
+{
+ using boost::assign::tuple_list_of;
+
+ typedef boost::geometry::model::polygon
+ <
+ boost::tuple<int, int>
+ > clockwise_closed_polygon;
+
+ clockwise_closed_polygon cwcp;
+
+ // Fill it counterclockwise (so wrongly), forgetting the closing point
+ boost::geometry::exterior_ring(cwcp) = tuple_list_of(0, 0)(10, 10)(0, 9);
+
+ // Add a counterclockwise closed inner ring (this is correct)
+ boost::geometry::interior_rings(cwcp).push_back(tuple_list_of(1, 2)(4, 6)(2, 8)(1, 2));
+
+ // Its area should be negative (because of wrong orientation)
+ // and wrong (because of omitted closing point)
+ double area_before = boost::geometry::area(cwcp);
+
+ // Correct it!
+ boost::geometry::correct(cwcp);
+
+ // Check its new area
+ double area_after = boost::geometry::area(cwcp);
+
+ // And output it
+ std::cout << boost::geometry::dsv(cwcp) << std::endl;
+ std::cout << area_before << " -> " << area_after << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[correct_output
+/*`
+Output:
+[pre
+(((0, 0), (0, 9), (10, 10), (0, 0)), ((1, 2), (4, 6), (2, 8), (1, 2)))
+-7 -> 38
+]
+*/
+//]

Modified: trunk/libs/geometry/doc/src/examples/algorithms/distance.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/examples/algorithms/distance.cpp (original)
+++ trunk/libs/geometry/doc/src/examples/algorithms/distance.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -41,9 +41,10 @@
     mp.push_back(point_type(0,0));
     mp.push_back(point_type(3,3));
 
- std::cout << "distance: " << boost::geometry::distance(p, poly) << std::endl;
- std::cout << "distance: " << boost::geometry::distance(p, line) << std::endl;
- std::cout << "distance: " << boost::geometry::distance(p, mp) << std::endl;
+ std::cout
+ << "Point-Poly: " << boost::geometry::distance(p, poly) << std::endl
+ << "Point-Line: " << boost::geometry::distance(p, line) << std::endl
+ << "Point-MultiPoint: " << boost::geometry::distance(p, mp) << std::endl;
 
     return 0;
 }
@@ -55,9 +56,9 @@
 /*`
 Output:
 [pre
-distance: 1.22066
-distance: 1
-distance: 2.23607
+Point-Poly: 1.22066
+Point-Line: 1
+Point-MultiPoint: 2.23607
 ]
 */
 //]

Added: trunk/libs/geometry/doc/src/examples/algorithms/transform.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/transform.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,53 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 2011 Barend Gehrels, 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)
+
+//[transform
+//` Shows how points can be transformed using the default strategy
+
+#include <iostream>
+#include <boost/geometry/geometry.hpp>
+
+
+int main()
+{
+ namespace bg = boost::geometry;
+
+ bg::model::point<long double, 2, bg::cs::spherical<bg::degree> > p1(5.0, 52.0);
+
+ // Transform from degree to radian. Default strategy is automatically selected,
+ // it will convert from degree to radian
+ bg::model::point<long double, 2, bg::cs::spherical<bg::radian> > p2;
+ bg::transform(p1, p2);
+
+ // Transform from degree (lon-lat) to 3D (x,y,z). Default strategy is automatically selected,
+ // it will consider points on a unit sphere
+ bg::model::point<long double, 3, bg::cs::cartesian> p3;
+ bg::transform(p1, p3);
+
+ std::cout
+ << "p1: " << bg::dsv(p1) << std::endl
+ << "p2: " << bg::dsv(p2) << std::endl
+ << "p3: " << bg::dsv(p3) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[transform_output
+/*`
+Output:
+[pre
+p1: (5, 52)
+p2: (0.0872665, 0.907571)
+p3: (0.785012, 0.0686797, 0.615661)
+]
+*/
+//]

Added: trunk/libs/geometry/doc/src/examples/algorithms/transform_with_strategy.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/transform_with_strategy.cpp 2011-04-09 16:31:35 EDT (Sat, 09 Apr 2011)
@@ -0,0 +1,63 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 2011 Barend Gehrels, 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)
+
+//[transform_with_strategy
+//` Shows how points can be scaled, translated or rotated
+
+#include <iostream>
+#include <boost/geometry/geometry.hpp>
+
+
+int main()
+{
+ namespace trans = boost::geometry::strategy::transform;
+ using boost::geometry::dsv;
+
+ typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> point_type;
+
+ point_type p1(1.0, 1.0);
+
+ // Translate over (1.5, 1.5)
+ point_type p2;
+ trans::translate_transformer<point_type, point_type> translate(1.5, 1.5);
+ boost::geometry::transform(p1, p2, translate);
+
+ // Scale with factor 3.0
+ point_type p3;
+ trans::scale_transformer<point_type, point_type> scale(3.0);
+ boost::geometry::transform(p1, p3, scale);
+
+ // Rotate with respect to the origin (0,0) over 90 degrees (clockwise)
+ point_type p4;
+ trans::rotate_transformer<point_type, point_type, boost::geometry::degree> rotate(90.0);
+ boost::geometry::transform(p1, p4, rotate);
+
+ std::cout
+ << "p1: " << dsv(p1) << std::endl
+ << "p2: " << dsv(p2) << std::endl
+ << "p3: " << dsv(p3) << std::endl
+ << "p4: " << dsv(p4) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[transform_with_strategy_output
+/*`
+Output:
+[pre
+p1: (1, 1)
+p2: (2.5, 2.5)
+p3: (3, 3)
+p4: (1, -1)
+]
+*/
+//]


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