mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-12 14:01:47 +00:00
141 lines
9.4 KiB
HTML
141 lines
9.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
<title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
|
||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||
</head>
|
||
|
||
<table cellpadding="2" width="100%">
|
||
<tbody>
|
||
<tr>
|
||
<td valign="top">
|
||
<img alt="Boost.Geometry" src="images/ggl-logo-big.png" height="80" width="200">
|
||
|
||
</td>
|
||
<td valign="top" align="right">
|
||
<a href="http://www.boost.org">
|
||
<img alt="Boost C++ Libraries" src="images/accepted_by_boost.png" height="80" width="230" border="0">
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<!-- Generated by Doxygen 1.5.9 -->
|
||
<div class="navigation" id="top">
|
||
<div class="tabs">
|
||
<ul>
|
||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
<li><a href="modules.html"><span>Modules</span></a></li>
|
||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
<li><a href="examples.html"><span>Examples</span></a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="tabs">
|
||
<ul>
|
||
<li><a href="files.html"><span>File List</span></a></li>
|
||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||
</ul>
|
||
</div>
|
||
<h1>boost/geometry/algorithms/intersects.hpp</h1><a href="intersects_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Boost.Geometry (aka GGL, Generic Geometry Library)</span>
|
||
<a name="l00002"></a>00002 <span class="comment">//</span>
|
||
<a name="l00003"></a>00003 <span class="comment">// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands.</span>
|
||
<a name="l00004"></a>00004 <span class="comment">// Copyright Bruno Lalande 2008, 2009</span>
|
||
<a name="l00005"></a>00005 <span class="comment">// Use, modification and distribution is subject to the Boost Software License,</span>
|
||
<a name="l00006"></a>00006 <span class="comment">// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at</span>
|
||
<a name="l00007"></a>00007 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
|
||
<a name="l00008"></a>00008
|
||
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef BOOST_GEOMETRY_ALGORITHMS_INTERSECTS_HPP</span>
|
||
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_GEOMETRY_ALGORITHMS_INTERSECTS_HPP</span>
|
||
<a name="l00011"></a>00011 <span class="preprocessor"></span>
|
||
<a name="l00012"></a>00012
|
||
<a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="geometries_2concepts_2check_8hpp.html">boost/geometry/geometries/concepts/check.hpp</a>></span>
|
||
<a name="l00034"></a>00034
|
||
<a name="l00035"></a>00035
|
||
<a name="l00036"></a>00036 <span class="preprocessor">#include <<a class="code" href="get__intersection__points_8hpp.html">boost/geometry/algorithms/overlay/get_intersection_points.hpp</a>></span>
|
||
<a name="l00037"></a>00037 <span class="preprocessor">#include <<a class="code" href="self__intersection__points_8hpp.html">boost/geometry/algorithms/overlay/self_intersection_points.hpp</a>></span>
|
||
<a name="l00038"></a>00038 <span class="preprocessor">#include <<a class="code" href="adapt__turns_8hpp.html">boost/geometry/algorithms/overlay/adapt_turns.hpp</a>></span>
|
||
<a name="l00039"></a>00039 <span class="preprocessor">#include <<a class="code" href="enrich__intersection__points_8hpp.html">boost/geometry/algorithms/overlay/enrich_intersection_points.hpp</a>></span>
|
||
<a name="l00040"></a>00040 <span class="preprocessor">#include <<a class="code" href="traverse_8hpp.html">boost/geometry/algorithms/overlay/traverse.hpp</a>></span>
|
||
<a name="l00041"></a>00041
|
||
<a name="l00042"></a>00042 <span class="preprocessor">#include <<a class="code" href="disjoint_8hpp.html">boost/geometry/algorithms/disjoint.hpp</a>></span>
|
||
<a name="l00043"></a>00043
|
||
<a name="l00044"></a>00044
|
||
<a name="l00045"></a>00045
|
||
<a name="l00046"></a>00046 <span class="keyword">namespace </span>boost { <span class="keyword">namespace </span>geometry
|
||
<a name="l00047"></a>00047 {
|
||
<a name="l00048"></a>00048
|
||
<a name="l00059"></a>00059 <span class="keyword">template</span> <<span class="keyword">typename</span> Geometry>
|
||
<a name="l00060"></a><a class="code" href="group__intersects.html#g24d9754b52dce625f3e3cfafb9c3957b">00060</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="group__intersects.html#g24d9754b52dce625f3e3cfafb9c3957b" title="Determine if there is at least one intersection (crossing or self-tangency).">intersects</a>(Geometry <span class="keyword">const</span>& geometry)
|
||
<a name="l00061"></a>00061 {
|
||
<a name="l00062"></a>00062 concept::check<const Geometry>();
|
||
<a name="l00063"></a>00063
|
||
<a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::remove_const<Geometry>::type ncg_type;
|
||
<a name="l00065"></a>00065
|
||
<a name="l00066"></a>00066 <span class="keyword">typedef</span> geometry::detail::intersection::intersection_point
|
||
<a name="l00067"></a>00067 <<span class="keyword">typename</span> <a class="code" href="structboost_1_1geometry_1_1point__type.html" title="Meta-function which defines point type of any geometry.">geometry::point_type<Geometry>::type</a>> ip;
|
||
<a name="l00068"></a>00068 <span class="keyword">typedef</span> std::vector<ip> ip_vector;
|
||
<a name="l00069"></a>00069
|
||
<a name="l00070"></a>00070 ip_vector ips;
|
||
<a name="l00071"></a>00071
|
||
<a name="l00072"></a>00072 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structboost_1_1geometry_1_1strategy__intersection.html">strategy_intersection</a>
|
||
<a name="l00073"></a>00073 <
|
||
<a name="l00074"></a>00074 <span class="keyword">typename</span> <a class="code" href="structboost_1_1geometry_1_1cs__tag.html" title="Meta-function returning coordinate system tag (cs family) of any geometry.">cs_tag<Geometry>::type</a>,
|
||
<a name="l00075"></a>00075 Geometry,
|
||
<a name="l00076"></a>00076 Geometry,
|
||
<a name="l00077"></a>00077 ip
|
||
<a name="l00078"></a>00078 >::segment_intersection_strategy_type segment_intersection_strategy_type;
|
||
<a name="l00079"></a>00079
|
||
<a name="l00080"></a>00080 dispatch::self_intersection_points
|
||
<a name="l00081"></a>00081 <
|
||
<a name="l00082"></a>00082 <span class="keyword">typename</span> <a class="code" href="structboost_1_1geometry_1_1geometry__not__recognized__tag.html" title="&quot;default&quot; tag">tag<ncg_type>::type</a>,
|
||
<a name="l00083"></a>00083 <a class="code" href="structboost_1_1geometry_1_1is__multi.html" title="Meta-function defining &quot;true&quot; for multi geometries (multi_point, etc).">is_multi<ncg_type>::type::value</a>,
|
||
<a name="l00084"></a>00084 ncg_type,
|
||
<a name="l00085"></a>00085 ip_vector, segment_intersection_strategy_type
|
||
<a name="l00086"></a>00086 >::apply(geometry, <span class="keyword">true</span>, ips);
|
||
<a name="l00087"></a>00087 <span class="keywordflow">return</span> ips.size() > 0;
|
||
<a name="l00088"></a>00088 }
|
||
<a name="l00089"></a>00089
|
||
<a name="l00090"></a>00090
|
||
<a name="l00100"></a>00100 <span class="keyword">template</span> <<span class="keyword">typename</span> Geometry1, <span class="keyword">typename</span> Geometry2>
|
||
<a name="l00101"></a><a class="code" href="group__intersects.html#gc04415b986998e25000ce69fd9804e2d">00101</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="group__intersects.html#g24d9754b52dce625f3e3cfafb9c3957b" title="Determine if there is at least one intersection (crossing or self-tangency).">intersects</a>(Geometry1 <span class="keyword">const</span>& geometry1, Geometry2 <span class="keyword">const</span>& geometry2)
|
||
<a name="l00102"></a>00102 {
|
||
<a name="l00103"></a>00103 concept::check<const Geometry1>();
|
||
<a name="l00104"></a>00104 concept::check<const Geometry2>();
|
||
<a name="l00105"></a>00105
|
||
<a name="l00106"></a>00106 <span class="keywordflow">return</span> ! <a class="code" href="group__disjoint.html#g2341f78c70cac1e3e0650848e642fcd1" title="Calculate if two geometries are disjoint.">geometry::disjoint</a>(geometry1, geometry2);
|
||
<a name="l00107"></a>00107 }
|
||
<a name="l00108"></a>00108
|
||
<a name="l00109"></a>00109
|
||
<a name="l00110"></a>00110
|
||
<a name="l00111"></a>00111 }} <span class="comment">// namespace boost::geometry</span>
|
||
<a name="l00112"></a>00112
|
||
<a name="l00113"></a>00113 <span class="preprocessor">#endif //GGL_ALGORITHMS_INTERSECTS_HPP</span>
|
||
</pre></div></div>
|
||
<hr size="1">
|
||
<table width="100%">
|
||
<tbody>
|
||
<tr>
|
||
<td align="left"><small>
|
||
<p>December 1, 2009</p>
|
||
</small></td>
|
||
<td align="right">
|
||
<small>Copyright <20> 1995-2009 Barend Gehrels, Geodan, Amsterdam<br>
|
||
Copyright <20> 2008-2009 Bruno Lalande, Paris<br>
|
||
Copyright <20> 2009 Mateusz Loskot, Cadcorp, London<br>
|
||
</small>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<address style="text-align: right;"><small>
|
||
Documentation is generated by <a href="http://www.doxygen.org/index.html">Doxygen</a>
|
||
</small></address>
|
||
</body>
|
||
</html>
|