<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DFNgen: insertUserRects.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">DFNgen
   &#160;<span id="projectnumber">2.0</span>
   </div>
   <div id="projectbrief">DFN Model Generator</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('insert_user_rects_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">insertUserRects.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="insert_user_rects_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="insert_shape_8h.html">insertShape.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector_functions_8h.html">vectorFunctions.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="math_functions_8h.html">mathFunctions.h</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="computational_geometry_8h.html">computationalGeometry.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="structures_8h.html">structures.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="input_8h.html">input.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="domain_8h.html">domain.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="testing_8h.html">testing.h</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">/***********************************************************************/</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">/********************  Insert User Rectangles  *************************/</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="insert_user_rects_8cpp.html#af69365c2e0148366aabe6751ffc54a79">   22</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="insert_user_rects_8cpp.html#af69365c2e0148366aabe6751ffc54a79">insertUserRects</a>(std::vector&lt;Poly&gt;&amp; acceptedPoly, std::vector&lt;IntPoints&gt; &amp;intpts, <span class="keyword">struct</span> <a class="code" href="struct_stats.html">Stats</a> &amp;pstats, std::vector&lt;Point&gt; &amp;triplePoints) {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    std::cout &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span> &lt;&lt; <a class="code" href="input_8h.html#af1cc6f1970facb5cc2a3c8213ca0831b">nUserRect</a> &lt;&lt; <span class="stringliteral">&quot; User Rectangles Defined\n&quot;</span>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="input_8h.html#af1cc6f1970facb5cc2a3c8213ca0831b">nUserRect</a>; i++) {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        </div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <a class="code" href="struct_poly.html">Poly</a> newPoly;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        newPoly.<a class="code" href="struct_poly.html#ae211dd5368d3b023abc943dc940837af">familyNum</a> = -2; <span class="comment">// Using -2 for all user specified rectangles</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">vertices</a> = <span class="keyword">new</span> <span class="keywordtype">double</span>[12]; <span class="comment">// 4*{x,y,z}</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="comment">// Set number of nodes. Needed for rotations.</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a8cc8d6067e940d33a1b29844b3e8c6ec">numberOfNodes</a> = 4;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordtype">int</span> index = i*3; <span class="comment">// Index to start of vertices/nodes</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        </div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="comment">// initializeRectVertices() sets newpoly.xradius, newpoly.yradius, newpoly.aperture</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="insert_shape_8cpp.html#aed01cfb18a8a6b4ec394783593d5765f">initializeRectVertices</a>(newPoly, <a class="code" href="input_8h.html#aa405ad70b9b0ac6ecd99d129b6bd70c5">urRadii</a>[i], <a class="code" href="input_8h.html#a6525be673f373b6358953ce4f7dc0e51">uraspect</a>[i]);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="comment">// Convert angle to rad if necessary</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordtype">float</span> angle = <a class="code" href="input_8h.html#a3a221080d3c2e62421c789738a9e57bc">urBeta</a>[i];</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="input_8h.html#ac96aa63bd3ea1ada8be7e9e01768f2b9">urAngleOption</a> == 1 ){</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            angle = <a class="code" href="input_8h.html#a3a221080d3c2e62421c789738a9e57bc">urBeta</a>[i] * M_PI/180;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            angle = <a class="code" href="input_8h.html#a3a221080d3c2e62421c789738a9e57bc">urBeta</a>[i];</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        } </div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        </div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="comment">// Initialize normal to {0,0,1}. need initialized for 3D rotation</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[0] = 0; <span class="comment">//x</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[1] = 0; <span class="comment">//y</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[2] = 1; <span class="comment">//z</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="comment">// Apply 2d rotation matrix, twist around origin</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="comment">// Assumes polygon on x-y plane</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="comment">// Angle must be in rad</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="computational_geometry_8cpp.html#a878eeb1b4990cde9d7d12a64f647af4d">applyRotation2D</a>(newPoly, angle);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="comment">// Rotate into 3D from poly.normal to &quot;urnormal&quot;, new normal</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="vector_functions_8h.html#a48bb00fc4195377b229efe044f3bb67e">normalize</a>(&amp;<a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>[index]);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="comment">// Rotate vertices to urnormal[index] (new normal)</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <a class="code" href="computational_geometry_8cpp.html#af7f1ba8a57908229078780a2695e4e46">applyRotation3D</a>(newPoly, &amp;<a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>[index]); </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        </div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="comment">// Save newPoly&#39;s new normal vector</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[0] = <a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>[index];</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[1] = <a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>[index+1];</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">normal</a>[2] = <a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>[index+2];</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="comment">// Translate newPoly to urtranslation </span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <a class="code" href="computational_geometry_8cpp.html#a3098cccf29c7a47d2eae661b0f545224">translate</a>(newPoly, &amp;<a class="code" href="input_8h.html#afe5f83bbc1b394f1fbeccb94b2b682fc">urtranslation</a>[index]); </div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    </div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="domain_8cpp.html#aed3d77c17f33d2024704b479d0885332">domainTruncation</a>(newPoly, <a class="code" href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a>) == 1) {</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="comment">//poly completely outside domain</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            <span class="keyword">delete</span>[] newPoly.<a class="code" href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">vertices</a>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            pstats.<a class="code" href="struct_stats.html#a3c0ec96761b92e70bbb96de0df58cce5">rejectionReasons</a>.<a class="code" href="struct_rejection_reasons.html#a64f92b5fcce897497d067d072443dc60">outside</a>++;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            pstats.<a class="code" href="struct_stats.html#ae78598e8e15f944d358722868f763e32">rejectedPolyCount</a>++;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            std::cout &lt;&lt; <span class="stringliteral">&quot;\nUser Rectangle &quot;</span> &lt;&lt; i+1 &lt;&lt; <span class="stringliteral">&quot; was rejected for being outside the defined domain.\n&quot;</span>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordflow">continue</span>; <span class="comment">// Go to next poly (go to next iteration of for loop)</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        </div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="computational_geometry_8cpp.html#ace23b489a120bc6d6407f7e08e1e009d">createBoundingBox</a>(newPoly);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="comment">// Line of intersection and FRAM                    </span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordtype">int</span> rejectCode = <a class="code" href="computational_geometry_8cpp.html#a38a8c322dba7d8518a4c3206cd55a5f6">intersectionChecking</a>(newPoly, acceptedPoly, intpts, pstats, triplePoints);       </div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordflow">if</span>(rejectCode == 0) {</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="comment">// If intersection is ok</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            <span class="keywordflow">if</span> (newPoly.<a class="code" href="struct_poly.html#a341a2ec25f71c2f58c1af119b3990387">truncated</a> == 1) { </div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                pstats.<a class="code" href="struct_stats.html#a0467673e7585331b1f609c9f7fc1de7a">truncated</a>++;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            }            </div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            </div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="comment">// Incriment counter of accepted polys</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            pstats.<a class="code" href="struct_stats.html#aff2b4f1ca734a438e89ad561b82dd7ea">acceptedPolyCount</a>++;     </div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            </div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="comment">// Calculate poly&#39;s area</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            newPoly.<a class="code" href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">area</a> = <a class="code" href="math_functions_8cpp.html#a78276693aa55fab858a41366e5b4aa73">getArea</a>(newPoly);         </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <span class="comment">// Add new rejectsPerAttempt counter</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            pstats.<a class="code" href="struct_stats.html#ae2c4ebee5152b67185fc4932fa6cca22">rejectsPerAttempt</a>.push_back(0);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;         </div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            std::cout &lt;&lt; <span class="stringliteral">&quot;\nUser Defined Rectangular Fracture &quot;</span> &lt;&lt; (i+1) &lt;&lt; <span class="stringliteral">&quot; Accepted\n&quot;</span>;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            acceptedPoly.push_back(newPoly); <span class="comment">// Save newPoly to accepted polys list</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        }</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            <span class="keyword">delete</span>[] newPoly.<a class="code" href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">vertices</a>; <span class="comment">// Delete manually, created with new[]</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;            pstats.<a class="code" href="struct_stats.html#ae78598e8e15f944d358722868f763e32">rejectedPolyCount</a>++;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            pstats.<a class="code" href="struct_stats.html#ae2c4ebee5152b67185fc4932fa6cca22">rejectsPerAttempt</a>[pstats.<a class="code" href="struct_stats.html#aff2b4f1ca734a438e89ad561b82dd7ea">acceptedPolyCount</a>]++;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            std::cout &lt;&lt; <span class="stringliteral">&quot;\nRejected user defined rectangular fracture &quot;</span> &lt;&lt; i+1 &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            <a class="code" href="insert_shape_8cpp.html#ae9670e906ee5dc43ce3fbc0ce7290dc7">printRejectReason</a>(rejectCode, newPoly);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            </div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor">            #ifdef TESTING</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                exit(1);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="preprocessor">            #endif</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        </div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        }    </div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        </div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }<span class="comment">//end loop</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="input_8h.html#aa405ad70b9b0ac6ecd99d129b6bd70c5">urRadii</a>;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="input_8h.html#a6525be673f373b6358953ce4f7dc0e51">uraspect</a>;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="input_8h.html#a3a221080d3c2e62421c789738a9e57bc">urBeta</a>;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="input_8h.html#afe5f83bbc1b394f1fbeccb94b2b682fc">urtranslation</a>;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                </div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;}</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    </div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    </div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    </div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    </div><div class="ttc" id="input_8h_html_af1cc6f1970facb5cc2a3c8213ca0831b"><div class="ttname"><a href="input_8h.html#af1cc6f1970facb5cc2a3c8213ca0831b">nUserRect</a></div><div class="ttdeci">int nUserRect</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00360">readInput.cpp:360</a></div></div>
<div class="ttc" id="computational_geometry_8cpp_html_a3098cccf29c7a47d2eae661b0f545224"><div class="ttname"><a href="computational_geometry_8cpp.html#a3098cccf29c7a47d2eae661b0f545224">translate</a></div><div class="ttdeci">void translate(Poly &amp;newPoly, double *translation)</div><div class="ttdef"><b>Definition:</b> <a href="computational_geometry_8cpp_source.html#l00047">computationalGeometry.cpp:47</a></div></div>
<div class="ttc" id="input_8h_html_aa405ad70b9b0ac6ecd99d129b6bd70c5"><div class="ttname"><a href="input_8h.html#aa405ad70b9b0ac6ecd99d129b6bd70c5">urRadii</a></div><div class="ttdeci">float * urRadii</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00363">readInput.cpp:363</a></div></div>
<div class="ttc" id="computational_geometry_8h_html"><div class="ttname"><a href="computational_geometry_8h.html">computationalGeometry.h</a></div></div>
<div class="ttc" id="vector_functions_8h_html_a48bb00fc4195377b229efe044f3bb67e"><div class="ttname"><a href="vector_functions_8h.html#a48bb00fc4195377b229efe044f3bb67e">normalize</a></div><div class="ttdeci">void normalize(T *vec)</div><div class="ttdef"><b>Definition:</b> <a href="vector_functions_8h_source.html#l00036">vectorFunctions.h:36</a></div></div>
<div class="ttc" id="input_8h_html"><div class="ttname"><a href="input_8h.html">input.h</a></div></div>
<div class="ttc" id="struct_poly_html_a341a2ec25f71c2f58c1af119b3990387"><div class="ttname"><a href="struct_poly.html#a341a2ec25f71c2f58c1af119b3990387">Poly::truncated</a></div><div class="ttdeci">bool truncated</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00095">structures.h:95</a></div></div>
<div class="ttc" id="struct_poly_html_a8cc8d6067e940d33a1b29844b3e8c6ec"><div class="ttname"><a href="struct_poly.html#a8cc8d6067e940d33a1b29844b3e8c6ec">Poly::numberOfNodes</a></div><div class="ttdeci">int numberOfNodes</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00014">structures.h:14</a></div></div>
<div class="ttc" id="struct_poly_html"><div class="ttname"><a href="struct_poly.html">Poly</a></div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00012">structures.h:12</a></div></div>
<div class="ttc" id="input_8h_html_a3f2127d5667258fc93d264436ab8abd5"><div class="ttname"><a href="input_8h.html#a3f2127d5667258fc93d264436ab8abd5">urnormal</a></div><div class="ttdeci">double * urnormal</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00380">readInput.cpp:380</a></div></div>
<div class="ttc" id="input_8h_html_ac96aa63bd3ea1ada8be7e9e01768f2b9"><div class="ttname"><a href="input_8h.html#ac96aa63bd3ea1ada8be7e9e01768f2b9">urAngleOption</a></div><div class="ttdeci">bool urAngleOption</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00368">readInput.cpp:368</a></div></div>
<div class="ttc" id="vector_functions_8h_html"><div class="ttname"><a href="vector_functions_8h.html">vectorFunctions.h</a></div></div>
<div class="ttc" id="structures_8h_html"><div class="ttname"><a href="structures_8h.html">structures.h</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_a78276693aa55fab858a41366e5b4aa73"><div class="ttname"><a href="math_functions_8cpp.html#a78276693aa55fab858a41366e5b4aa73">getArea</a></div><div class="ttdeci">double getArea(struct Poly &amp;poly)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00110">mathFunctions.cpp:110</a></div></div>
<div class="ttc" id="struct_stats_html_a0467673e7585331b1f609c9f7fc1de7a"><div class="ttname"><a href="struct_stats.html#a0467673e7585331b1f609c9f7fc1de7a">Stats::truncated</a></div><div class="ttdeci">unsigned int truncated</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00311">structures.h:311</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_aed01cfb18a8a6b4ec394783593d5765f"><div class="ttname"><a href="insert_shape_8cpp.html#aed01cfb18a8a6b4ec394783593d5765f">initializeRectVertices</a></div><div class="ttdeci">void initializeRectVertices(struct Poly &amp;newPoly, float radius, float aspectRatio)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00403">insertShape.cpp:403</a></div></div>
<div class="ttc" id="struct_stats_html_a3c0ec96761b92e70bbb96de0df58cce5"><div class="ttname"><a href="struct_stats.html#a3c0ec96761b92e70bbb96de0df58cce5">Stats::rejectionReasons</a></div><div class="ttdeci">struct RejectionReasons rejectionReasons</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00339">structures.h:339</a></div></div>
<div class="ttc" id="math_functions_8h_html"><div class="ttname"><a href="math_functions_8h.html">mathFunctions.h</a></div></div>
<div class="ttc" id="struct_rejection_reasons_html_a64f92b5fcce897497d067d072443dc60"><div class="ttname"><a href="struct_rejection_reasons.html#a64f92b5fcce897497d067d072443dc60">RejectionReasons::outside</a></div><div class="ttdeci">unsigned long long int outside</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00262">structures.h:262</a></div></div>
<div class="ttc" id="insert_user_rects_8cpp_html_af69365c2e0148366aabe6751ffc54a79"><div class="ttname"><a href="insert_user_rects_8cpp.html#af69365c2e0148366aabe6751ffc54a79">insertUserRects</a></div><div class="ttdeci">void insertUserRects(std::vector&lt; Poly &gt; &amp;acceptedPoly, std::vector&lt; IntPoints &gt; &amp;intpts, struct Stats &amp;pstats, std::vector&lt; Point &gt; &amp;triplePoints)</div><div class="ttdef"><b>Definition:</b> <a href="insert_user_rects_8cpp_source.html#l00022">insertUserRects.cpp:22</a></div></div>
<div class="ttc" id="struct_stats_html_ae2c4ebee5152b67185fc4932fa6cca22"><div class="ttname"><a href="struct_stats.html#ae2c4ebee5152b67185fc4932fa6cca22">Stats::rejectsPerAttempt</a></div><div class="ttdeci">std::vector&lt; unsigned int &gt; rejectsPerAttempt</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00371">structures.h:371</a></div></div>
<div class="ttc" id="computational_geometry_8cpp_html_af7f1ba8a57908229078780a2695e4e46"><div class="ttname"><a href="computational_geometry_8cpp.html#af7f1ba8a57908229078780a2695e4e46">applyRotation3D</a></div><div class="ttdeci">void applyRotation3D(Poly &amp;newPoly, double *normalB)</div><div class="ttdef"><b>Definition:</b> <a href="computational_geometry_8cpp_source.html#l00147">computationalGeometry.cpp:147</a></div></div>
<div class="ttc" id="struct_poly_html_a2cb519bcf0553215de907c8fc878a255"><div class="ttname"><a href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">Poly::vertices</a></div><div class="ttdeci">double * vertices</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00070">structures.h:70</a></div></div>
<div class="ttc" id="insert_shape_8h_html"><div class="ttname"><a href="insert_shape_8h.html">insertShape.h</a></div></div>
<div class="ttc" id="input_8h_html_a6525be673f373b6358953ce4f7dc0e51"><div class="ttname"><a href="input_8h.html#a6525be673f373b6358953ce4f7dc0e51">uraspect</a></div><div class="ttdeci">float * uraspect</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00374">readInput.cpp:374</a></div></div>
<div class="ttc" id="computational_geometry_8cpp_html_ace23b489a120bc6d6407f7e08e1e009d"><div class="ttname"><a href="computational_geometry_8cpp.html#ace23b489a120bc6d6407f7e08e1e009d">createBoundingBox</a></div><div class="ttdeci">void createBoundingBox(struct Poly &amp;newPoly)</div><div class="ttdef"><b>Definition:</b> <a href="computational_geometry_8cpp_source.html#l00322">computationalGeometry.cpp:322</a></div></div>
<div class="ttc" id="testing_8h_html"><div class="ttname"><a href="testing_8h.html">testing.h</a></div></div>
<div class="ttc" id="domain_8cpp_html_aed3d77c17f33d2024704b479d0885332"><div class="ttname"><a href="domain_8cpp.html#aed3d77c17f33d2024704b479d0885332">domainTruncation</a></div><div class="ttdeci">bool domainTruncation(Poly &amp;newPoly, double *domainSize)</div><div class="ttdef"><b>Definition:</b> <a href="domain_8cpp_source.html#l00019">domain.cpp:19</a></div></div>
<div class="ttc" id="struct_stats_html"><div class="ttname"><a href="struct_stats.html">Stats</a></div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00277">structures.h:277</a></div></div>
<div class="ttc" id="domain_8h_html"><div class="ttname"><a href="domain_8h.html">domain.h</a></div></div>
<div class="ttc" id="input_8h_html_a3a221080d3c2e62421c789738a9e57bc"><div class="ttname"><a href="input_8h.html#a3a221080d3c2e62421c789738a9e57bc">urBeta</a></div><div class="ttdeci">float * urBeta</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00371">readInput.cpp:371</a></div></div>
<div class="ttc" id="struct_poly_html_a4b92c8fd93db07ccb928298defab1651"><div class="ttname"><a href="struct_poly.html#a4b92c8fd93db07ccb928298defab1651">Poly::normal</a></div><div class="ttdeci">double normal[3]</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00055">structures.h:55</a></div></div>
<div class="ttc" id="struct_poly_html_a26a509e53f5fe73722b1d82443ce1841"><div class="ttname"><a href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">Poly::area</a></div><div class="ttdeci">float area</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00033">structures.h:33</a></div></div>
<div class="ttc" id="computational_geometry_8cpp_html_a38a8c322dba7d8518a4c3206cd55a5f6"><div class="ttname"><a href="computational_geometry_8cpp.html#a38a8c322dba7d8518a4c3206cd55a5f6">intersectionChecking</a></div><div class="ttdeci">int intersectionChecking(struct Poly &amp;newPoly, std::vector&lt; Poly &gt; &amp;acceptedPoly, std::vector&lt; IntPoints &gt; &amp;intPtsList, struct Stats &amp;pstats, std::vector&lt; Point &gt; &amp;triplePoints)</div><div class="ttdef"><b>Definition:</b> <a href="computational_geometry_8cpp_source.html#l00870">computationalGeometry.cpp:870</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_ae9670e906ee5dc43ce3fbc0ce7290dc7"><div class="ttname"><a href="insert_shape_8cpp.html#ae9670e906ee5dc43ce3fbc0ce7290dc7">printRejectReason</a></div><div class="ttdeci">void printRejectReason(int rejectCode, struct Poly newPoly)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00617">insertShape.cpp:617</a></div></div>
<div class="ttc" id="input_8h_html_a5cd62663cb067d79183d8de4dd0224db"><div class="ttname"><a href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a></div><div class="ttdeci">double domainSize[3]</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00018">readInput.cpp:18</a></div></div>
<div class="ttc" id="struct_poly_html_ae211dd5368d3b023abc943dc940837af"><div class="ttname"><a href="struct_poly.html#ae211dd5368d3b023abc943dc940837af">Poly::familyNum</a></div><div class="ttdeci">int familyNum</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00022">structures.h:22</a></div></div>
<div class="ttc" id="input_8h_html_afe5f83bbc1b394f1fbeccb94b2b682fc"><div class="ttname"><a href="input_8h.html#afe5f83bbc1b394f1fbeccb94b2b682fc">urtranslation</a></div><div class="ttdeci">double * urtranslation</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00377">readInput.cpp:377</a></div></div>
<div class="ttc" id="computational_geometry_8cpp_html_a878eeb1b4990cde9d7d12a64f647af4d"><div class="ttname"><a href="computational_geometry_8cpp.html#a878eeb1b4990cde9d7d12a64f647af4d">applyRotation2D</a></div><div class="ttdeci">void applyRotation2D(Poly &amp;newPoly, float angle)</div><div class="ttdef"><b>Definition:</b> <a href="computational_geometry_8cpp_source.html#l00024">computationalGeometry.cpp:24</a></div></div>
<div class="ttc" id="struct_stats_html_aff2b4f1ca734a438e89ad561b82dd7ea"><div class="ttname"><a href="struct_stats.html#aff2b4f1ca734a438e89ad561b82dd7ea">Stats::acceptedPolyCount</a></div><div class="ttdeci">unsigned int acceptedPolyCount</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00300">structures.h:300</a></div></div>
<div class="ttc" id="struct_stats_html_ae78598e8e15f944d358722868f763e32"><div class="ttname"><a href="struct_stats.html#ae78598e8e15f944d358722868f763e32">Stats::rejectedPolyCount</a></div><div class="ttdeci">unsigned long long int rejectedPolyCount</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00304">structures.h:304</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="insert_user_rects_8cpp.html">insertUserRects.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
