mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Added and updated documentation of correct, transform, distance, comparable_distance
[SVN r71153]
This commit is contained in:
parent
9f6bf428bb
commit
a8d62ccbaf
@ -8,15 +8,10 @@ body, table, div, p, dl {
|
||||
/* @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 @@ h3.version {
|
||||
}
|
||||
|
||||
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 @@ div.navtab {
|
||||
/* @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.qindex {
|
||||
|
||||
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.elRef {
|
||||
}
|
||||
|
||||
a.code {
|
||||
color: #4665A2;
|
||||
color: #3030f0;
|
||||
}
|
||||
|
||||
a.codeRef {
|
||||
color: #4665A2;
|
||||
color: #3030f0;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
@ -143,8 +138,8 @@ dl.el {
|
||||
}
|
||||
|
||||
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 @@ div.ah {
|
||||
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 @@ div.groupText {
|
||||
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 @@ div.center img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
img.footer {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
@ -294,7 +270,6 @@ span.vhdllogic {
|
||||
|
||||
/* @end */
|
||||
|
||||
/*
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
@ -311,7 +286,6 @@ input.search {
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
*/
|
||||
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
@ -320,18 +294,18 @@ td.tiny {
|
||||
.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 @@ hr.footer {
|
||||
|
||||
/* @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 @@ table.memberdecls {
|
||||
}
|
||||
|
||||
.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 @@ table.memberdecls {
|
||||
|
||||
.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 @@ table.memberdecls {
|
||||
}
|
||||
|
||||
.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 @@ table.memberdecls {
|
||||
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 @@ table.memberdecls {
|
||||
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin: 0px;
|
||||
margin: 0.5em;
|
||||
}
|
||||
|
||||
/* these are for tree view when used as main index */
|
||||
@ -517,7 +443,6 @@ table.memberdecls {
|
||||
.directory {
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.directory h3 {
|
||||
@ -595,13 +520,9 @@ proper pixel height of your image.
|
||||
|
||||
/* @end */
|
||||
|
||||
div.dynheader {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: #2A3D61;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
@ -609,12 +530,12 @@ table.doxtable {
|
||||
}
|
||||
|
||||
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 @@ table.doxtable th {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.3 KiB |
@ -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;
|
||||
}
|
||||
|
||||
.tabs2 {
|
||||
font-size: 10px;
|
||||
}
|
||||
.tabs3 {
|
||||
font-size: 9px;
|
||||
DIV.tabs UL
|
||||
{
|
||||
margin : 0px;
|
||||
padding-left : 10px;
|
||||
list-style : none;
|
||||
}
|
||||
|
||||
.tablist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: table;
|
||||
DIV.tabs LI, DIV.tabs FORM
|
||||
{
|
||||
display : inline;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
}
|
||||
|
||||
.tablist li {
|
||||
float: left;
|
||||
display: table-cell;
|
||||
background-image: url('tab_b.png');
|
||||
line-height: 36px;
|
||||
list-style: none;
|
||||
DIV.tabs FORM
|
||||
{
|
||||
float : right;
|
||||
}
|
||||
|
||||
.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 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 .tablist a {
|
||||
padding: 0 10px;
|
||||
DIV.tabs A:hover
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
}
|
||||
|
||||
.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 A:link, DIV.tabs A:visited,
|
||||
DIV.tabs A:active, DIV.tabs A:hover
|
||||
{
|
||||
color: #1A419D;
|
||||
}
|
||||
|
||||
.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.tabs SPAN
|
||||
{
|
||||
float : left;
|
||||
display : block;
|
||||
background : url("tab_l.gif") no-repeat left top;
|
||||
padding : 5px 9px;
|
||||
white-space : nowrap;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
DIV.tabs LI.current A
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
border-width : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs LI.current SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
padding-bottom : 6px;
|
||||
}
|
||||
|
||||
DIV.navpath
|
||||
{
|
||||
background : none;
|
||||
border : none;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
text-align : center;
|
||||
margin : 2px;
|
||||
padding : 2px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -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]
|
||||
|
Binary file not shown.
@ -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">
|
||||
|
@ -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]
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
[heading Complexity]
|
||||
Constant
|
||||
|
||||
[heading Examples]
|
||||
[heading Example]
|
||||
[clear]
|
||||
[clear_output]
|
||||
|
||||
|
25
doc/reference/algorithms/comparable_distance.qbk
Normal file
25
doc/reference/algorithms/comparable_distance.qbk
Normal file
@ -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]
|
33
doc/reference/algorithms/correct.qbk
Normal file
33
doc/reference/algorithms/correct.qbk
Normal file
@ -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]
|
||||
|
@ -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]
|
||||
|
||||
|
21
doc/reference/algorithms/distance.qbk
Normal file
21
doc/reference/algorithms/distance.qbk
Normal file
@ -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]
|
@ -26,7 +26,7 @@
|
||||
[heading Complexity]
|
||||
Linear
|
||||
|
||||
[heading Examples]
|
||||
[heading Example]
|
||||
[expand]
|
||||
[expand_output]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -32,7 +32,7 @@
|
||||
[heading Complexity]
|
||||
Linear
|
||||
|
||||
[heading Examples]
|
||||
[heading Example]
|
||||
[reverse]
|
||||
[reverse_output]
|
||||
|
||||
|
@ -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]
|
||||
|
||||
|
28
doc/reference/algorithms/transform.qbk
Normal file
28
doc/reference/algorithms/transform.qbk
Normal file
@ -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]
|
||||
|
19
doc/reference/algorithms/transform_with_strategy.qbk
Normal file
19
doc/reference/algorithms/transform_with_strategy.qbk
Normal file
@ -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]
|
||||
|
@ -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)]
|
||||
|
@ -31,7 +31,7 @@
|
||||
[heading Complexity]
|
||||
Linear
|
||||
|
||||
[heading Examples]
|
||||
[heading Example]
|
||||
[unique]
|
||||
[unique_output]
|
||||
|
||||
|
@ -71,8 +71,9 @@ struct compile_msvc
|
||||
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 @@ int main(int argc, char** argv)
|
||||
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;
|
||||
|
@ -13,6 +13,8 @@ project boost-geometry-doc-example-algorithms
|
||||
: # requirements
|
||||
;
|
||||
|
||||
exe append : append.cpp ;
|
||||
|
||||
exe area : area.cpp ;
|
||||
exe area_with_strategy : area_with_strategy.cpp ;
|
||||
|
||||
@ -26,9 +28,15 @@ exe assign_point_to_index : assign_point_to_index.cpp ;
|
||||
|
||||
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 intersection_segment : intersection_segment.cpp ;
|
||||
|
||||
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_geometries : num_geometries.cpp ;
|
||||
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 ;
|
||||
|
66
doc/src/examples/algorithms/comparable_distance.cpp
Normal file
66
doc/src/examples/algorithms/comparable_distance.cpp
Normal file
@ -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
|
||||
]
|
||||
*/
|
||||
//]
|
||||
|
65
doc/src/examples/algorithms/correct.cpp
Normal file
65
doc/src/examples/algorithms/correct.cpp
Normal file
@ -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
|
||||
]
|
||||
*/
|
||||
//]
|
@ -41,9 +41,10 @@ int main()
|
||||
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 @@ int main()
|
||||
/*`
|
||||
Output:
|
||||
[pre
|
||||
distance: 1.22066
|
||||
distance: 1
|
||||
distance: 2.23607
|
||||
Point-Poly: 1.22066
|
||||
Point-Line: 1
|
||||
Point-MultiPoint: 2.23607
|
||||
]
|
||||
*/
|
||||
//]
|
||||
|
53
doc/src/examples/algorithms/transform.cpp
Normal file
53
doc/src/examples/algorithms/transform.cpp
Normal file
@ -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)
|
||||
]
|
||||
*/
|
||||
//]
|
63
doc/src/examples/algorithms/transform_with_strategy.cpp
Normal file
63
doc/src/examples/algorithms/transform_with_strategy.cpp
Normal file
@ -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)
|
||||
]
|
||||
*/
|
||||
//]
|
Loading…
x
Reference in New Issue
Block a user