• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>min_corner</title>
5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Chapter 1. Geometry">
8<link rel="up" href="../constants.html" title="Constants">
9<link rel="prev" href="../constants.html" title="Constants">
10<link rel="next" href="max_corner.html" title="max_corner">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../constants.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../constants.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="max_corner.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="geometry.reference.constants.min_corner"></a><a class="link" href="min_corner.html" title="min_corner">min_corner</a>
28</h4></div></div></div>
29<p>
30          Indicates the minimal corner (lower left) of a box to be get, set or processed
31        </p>
32<h6>
33<a name="geometry.reference.constants.min_corner.h0"></a>
34          <span class="phrase"><a name="geometry.reference.constants.min_corner.synopsis"></a></span><a class="link" href="min_corner.html#geometry.reference.constants.min_corner.synopsis">Synopsis</a>
35        </h6>
36<p>
37</p>
38<pre class="programlisting"><span class="keyword">int</span> <span class="keyword">const</span> <span class="identifier">min_corner</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span></pre>
39<p>
40        </p>
41<h6>
42<a name="geometry.reference.constants.min_corner.h1"></a>
43          <span class="phrase"><a name="geometry.reference.constants.min_corner.header"></a></span><a class="link" href="min_corner.html#geometry.reference.constants.min_corner.header">Header</a>
44        </h6>
45<p>
46          Either
47        </p>
48<p>
49          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
50        </p>
51<p>
52          Or
53        </p>
54<p>
55          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">core</span><span class="special">/</span><span class="identifier">access</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
56        </p>
57<div class="note"><table border="0" summary="Note">
58<tr>
59<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
60<th align="left">Note</th>
61</tr>
62<tr><td align="left" valign="top"><p>
63            min_corner and max_corner are only applicable for boxes and not for,
64            e.g., a segment
65          </p></td></tr>
66</table></div>
67<div class="note"><table border="0" summary="Note">
68<tr>
69<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
70<th align="left">Note</th>
71</tr>
72<tr><td align="left" valign="top"><p>
73            min_corner should be the minimal corner of a box, but that is not guaranteed.
74            Use correct to make min_corner the minimal corner. The same applies for
75            max_corner.
76          </p></td></tr>
77</table></div>
78<h6>
79<a name="geometry.reference.constants.min_corner.h2"></a>
80          <span class="phrase"><a name="geometry.reference.constants.min_corner.example"></a></span><a class="link" href="min_corner.html#geometry.reference.constants.min_corner.example">Example</a>
81        </h6>
82<p>
83          Get the coordinate of a box
84        </p>
85<p>
86</p>
87<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
88
89<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
90<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">point_xy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
91
92<span class="keyword">namespace</span> <span class="identifier">bg</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span>
93
94<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
95<span class="special">{</span>
96    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special">&lt;</span><span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">d2</span><span class="special">::</span><span class="identifier">point_xy</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">box</span><span class="special">;</span>
97
98    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">assign_values</span><span class="special">(</span><span class="identifier">box</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">3</span><span class="special">,</span> <span class="number">5</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span>
99
100    <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Box:"</span>
101        <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">bg</span><span class="special">::</span><span class="identifier">min_corner</span><span class="special">,</span> <span class="number">0</span><span class="special">&gt;(</span><span class="identifier">box</span><span class="special">)</span>
102        <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">bg</span><span class="special">::</span><span class="identifier">min_corner</span><span class="special">,</span> <span class="number">1</span><span class="special">&gt;(</span><span class="identifier">box</span><span class="special">)</span>
103        <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">bg</span><span class="special">::</span><span class="identifier">max_corner</span><span class="special">,</span> <span class="number">0</span><span class="special">&gt;(</span><span class="identifier">box</span><span class="special">)</span>
104        <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">bg</span><span class="special">::</span><span class="identifier">max_corner</span><span class="special">,</span> <span class="number">1</span><span class="special">&gt;(</span><span class="identifier">box</span><span class="special">)</span>
105        <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
106
107    <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
108<span class="special">}</span>
109</pre>
110<p>
111        </p>
112<p>
113          Output:
114        </p>
115<pre class="programlisting">Box: 1 3 5 6
116</pre>
117<h6>
118<a name="geometry.reference.constants.min_corner.h3"></a>
119          <span class="phrase"><a name="geometry.reference.constants.min_corner.see_also"></a></span><a class="link" href="min_corner.html#geometry.reference.constants.min_corner.see_also">See
120          also</a>
121        </h6>
122<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
123<li class="listitem">
124              <a class="link" href="max_corner.html" title="max_corner">max_corner</a>
125            </li>
126<li class="listitem">
127              <a class="link" href="../access/get/get_1_with_index.html" title="get (with index)">get
128              with index</a>
129            </li>
130<li class="listitem">
131              <a class="link" href="../access/set/set_2_with_index.html" title="set (with index)">set
132              with index</a>
133            </li>
134</ul></div>
135</div>
136<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
137<td align="left"></td>
138<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
139      Wulkiewicz, Oracle and/or its affiliates<p>
140        Distributed under the Boost Software License, Version 1.0. (See accompanying
141        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
142      </p>
143</div></td>
144</tr></table>
145<hr>
146<div class="spirit-nav">
147<a accesskey="p" href="../constants.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../constants.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="max_corner.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
148</div>
149</body>
150</html>
151