


<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Program Listing for File TriTriOverlap.m &#8212; Clothoids v2.0.9
</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cloud.css" />
    <link rel="stylesheet" type="text/css" href="../_static/table_styling.css" />
    <link rel="stylesheet" type="text/css" href="../_static/collapsible-lists/css/tree_view.css" />
    <link rel="stylesheet" type="text/css" href="../_static/collapsible-lists/css/tree_view.css" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noticia+Text:400,i,b,bi|Open+Sans:400,i,b,bi|Roboto+Mono:400,i,b,bi&amp;display=swap" type="text/css" />
    
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/collapsible-lists/js/CollapsibleLists.compressed.js"></script>
    <script src="../_static/collapsible-lists/js/apply-collapsible-lists.js"></script>
    <script src="../_static/collapsible-lists/js/CollapsibleLists.compressed.js"></script>
    <script src="../_static/collapsible-lists/js/apply-collapsible-lists.js"></script>

    
    
     
        <script src="../_static/jquery.cookie.js"></script>
    

    
     
        <script src="../_static/cloud.base.js"></script>
    

    
     
        <script src="../_static/cloud.js"></script>
    

    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" /> 
        <meta name="viewport" content="width=device-width, initial-scale=1">
  </head><body>
    <div class="relbar-top">
        
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../index.html" title="Table Of Contents"
             accesskey="C">toc</a> &nbsp; &nbsp;</li>
    <li><a href="../index.html">Clothoids</a> &#187;</li>

        <li class="nav-item nav-item-this"><a href="">Program Listing for File TriTriOverlap.m</a></li> 
      </ul>
    </div>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="program-listing-for-file-tritrioverlap-m">
<span id="program-listing-file-tritrioverlap-m"></span><h1>Program Listing for File TriTriOverlap.m<a class="headerlink" href="#program-listing-for-file-tritrioverlap-m" title="Permalink to this headline">¶</a>
</h1>
<p>↰ <a class="reference internal" href="file_TriTriOverlap.m.html#file-tritrioverlap-m"><span class="std std-ref">Return to documentation for file</span></a> (<code class="docutils literal notranslate"><span class="pre">TriTriOverlap.m</span></code>)</p>
<div class="highlight-MATLAB notranslate">
<div class="highlight"><pre><span></span><span class="c">%&gt; TriTriOverlap:  Check if two triangles overlap</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt; **Usage:**</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt;     intersect = TriTriOverlap( p0, p1, p2, q0, q1, q2 );</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt; **On input:**</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt; - p0, p1, p2 = coordinates of first triangle</span><span class="w"></span>
<span class="c">%&gt; - q0, q1, q2 = coordinates of second triangle</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt; **On output:**</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%&gt; - intersect = true if the triangle overlap</span><span class="w"></span>
<span class="c">%&gt;</span><span class="w"></span>
<span class="c">%======================================================================%</span><span class="w"></span>
<span class="c">%                                                                      %</span><span class="w"></span>
<span class="c">%  Autor: Enrico Bertolazzi                                            %</span><span class="w"></span>
<span class="c">%         Department of Industrial Engineering                         %</span><span class="w"></span>
<span class="c">%         University of Trento                                         %</span><span class="w"></span>
<span class="c">%         enrico.bertolazzi@unitn.it                                   %</span><span class="w"></span>
<span class="c">%                                                                      %</span><span class="w"></span>
<span class="c">%======================================================================%</span><span class="w"></span>
<span class="k">function</span><span class="w"> </span>intersect<span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nf">TriTriOverlap</span><span class="p">(</span> p0, p1, p2, q0, q1, q2 <span class="p">)</span><span class="w"></span>
<span class="w">  </span><span class="nb">error</span><span class="p">(</span><span class="s">'this function is mex only. Run CompileClothoidsLib.m script to build'</span><span class="p">)</span><span class="w"></span>
<span class="k">end</span><span class="w"></span>
</pre></div>
</div>
</section>



            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
        <p class="logo"><a href="../index.html" title="index">
          <img class="logo" src="../_static/logo.png" alt="Logo"/>
        </a></p>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
<div class="sphinx-toc sphinxglobaltoc">
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Matlab_manual.html">Matlab Interface Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../api-cpp/root.html">C++ API</a></li>
<li class="toctree-l1"><a class="reference internal" href="root.html">MATLAB API</a></li>
</ul>
</div>
        </div>
      </div>
    
    
        <div class="sidebar-toggle-group no-js">
            
            <button class="sidebar-toggle" id="sidebar-hide" title="Hide the sidebar menu">
                 «
                <span class="show-for-small">hide menu</span>
                
            </button>
            <button class="sidebar-toggle" id="sidebar-show" title="Show the sidebar menu">
                
                <span class="show-for-small">menu</span>
                <span class="hide-for-small">sidebar</span>
                 »
            </button>
        </div>
    
      <div class="clearer"></div>
    </div>
    <div class="relbar-bottom">
        
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../index.html" title="Table Of Contents"
             >toc</a> &nbsp; &nbsp;</li>
    <li><a href="../index.html">Clothoids</a> &#187;</li>

        <li class="nav-item nav-item-this"><a href="">Program Listing for File TriTriOverlap.m</a></li> 
      </ul>
    </div>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright 2021, Enrico Bertolazzi and Marco Frego.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
    </div>
    <!-- cloud_sptheme 1.4 -->
  </body>
</html>