1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>model::referring_segment</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="../models.html" title="Models"> 9<link rel="prev" href="model_segment.html" title="model::segment"> 10<link rel="next" href="../spatial_indexes.html" title="Spatial Indexes"> 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="model_segment.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.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="../spatial_indexes.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.models.model_referring_segment"></a><a class="link" href="model_referring_segment.html" title="model::referring_segment">model::referring_segment</a> 28</h4></div></div></div> 29<p> 30 <a class="indexterm" name="idm45635678002736"></a><a class="indexterm" name="idm45635678002048"></a> 31Class segment: small class containing two (templatized) point references. 32 </p> 33<h6> 34<a name="geometry.reference.models.model_referring_segment.h0"></a> 35 <span class="phrase"><a name="geometry.reference.models.model_referring_segment.description"></a></span><a class="link" href="model_referring_segment.html#geometry.reference.models.model_referring_segment.description">Description</a> 36 </h6> 37<p> 38 From Wikipedia: In geometry, a line segment is a part of a line that is 39 bounded by two distinct end points, and contains every point on the line 40 between its end points. 41 </p> 42<h6> 43<a name="geometry.reference.models.model_referring_segment.h1"></a> 44 <span class="phrase"><a name="geometry.reference.models.model_referring_segment.synopsis"></a></span><a class="link" href="model_referring_segment.html#geometry.reference.models.model_referring_segment.synopsis">Synopsis</a> 45 </h6> 46<p> 47</p> 48<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">ConstOrNonConstPoint</span><span class="special">></span> 49<span class="keyword">class</span> <span class="identifier">model</span><span class="special">::</span><span class="identifier">referring_segment</span> 50<span class="special">{</span> 51 <span class="comment">// ...</span> 52<span class="special">};</span> 53</pre> 54<p> 55 </p> 56<h6> 57<a name="geometry.reference.models.model_referring_segment.h2"></a> 58 <span class="phrase"><a name="geometry.reference.models.model_referring_segment.template_parameter_s_"></a></span><a class="link" href="model_referring_segment.html#geometry.reference.models.model_referring_segment.template_parameter_s_">Template 59 parameter(s)</a> 60 </h6> 61<div class="informaltable"><table class="table"> 62<colgroup> 63<col> 64<col> 65</colgroup> 66<thead><tr> 67<th> 68 <p> 69 Parameter 70 </p> 71 </th> 72<th> 73 <p> 74 Description 75 </p> 76 </th> 77</tr></thead> 78<tbody><tr> 79<td> 80 <p> 81 typename ConstOrNonConstPoint 82 </p> 83 </td> 84<td> 85 <p> 86 point type of the segment, maybe a point or a const point 87 </p> 88 </td> 89</tr></tbody> 90</table></div> 91<h6> 92<a name="geometry.reference.models.model_referring_segment.h3"></a> 93 <span class="phrase"><a name="geometry.reference.models.model_referring_segment.constructor_s_"></a></span><a class="link" href="model_referring_segment.html#geometry.reference.models.model_referring_segment.constructor_s_">Constructor(s)</a> 94 </h6> 95<div class="informaltable"><table class="table"> 96<colgroup> 97<col> 98<col> 99<col> 100</colgroup> 101<thead><tr> 102<th> 103 <p> 104 Function 105 </p> 106 </th> 107<th> 108 <p> 109 Description 110 </p> 111 </th> 112<th> 113 <p> 114 Parameters 115 </p> 116 </th> 117</tr></thead> 118<tbody><tr> 119<td> 120 <p> 121</p> 122<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">referring_segment</span><span class="special">(</span><span class="identifier">point_type</span> <span class="special">&</span> <span class="identifier">p1</span><span class="special">,</span> <span class="identifier">point_type</span> <span class="special">&</span> <span class="identifier">p2</span><span class="special">)</span></pre> 123<p> 124 </p> 125 </td> 126<td> 127 <p> 128 Constructor taking the first and the second point. 129 </p> 130 </td> 131<td> 132 <p> 133 <span class="bold"><strong>point_type &</strong></span>: <span class="emphasis"><em>p1</em></span>: 134 </p> 135 <p> 136 <span class="bold"><strong>point_type &</strong></span>: <span class="emphasis"><em>p2</em></span>: 137 </p> 138 </td> 139</tr></tbody> 140</table></div> 141<h6> 142<a name="geometry.reference.models.model_referring_segment.h4"></a> 143 <span class="phrase"><a name="geometry.reference.models.model_referring_segment.header"></a></span><a class="link" href="model_referring_segment.html#geometry.reference.models.model_referring_segment.header">Header</a> 144 </h6> 145<p> 146 Either 147 </p> 148<p> 149 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</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">geometries</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 150 </p> 151<p> 152 Or 153 </p> 154<p> 155 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</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">segment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 156 </p> 157</div> 158<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 159<td align="left"></td> 160<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 161 Wulkiewicz, Oracle and/or its affiliates<p> 162 Distributed under the Boost Software License, Version 1.0. (See accompanying 163 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>) 164 </p> 165</div></td> 166</tr></table> 167<hr> 168<div class="spirit-nav"> 169<a accesskey="p" href="model_segment.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.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="../spatial_indexes.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 170</div> 171</body> 172</html> 173