<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DGtal: exampleSurfaceMesh.cpp File Reference</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>
<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>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.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">DGtal
   &#160;<span id="projectnumber">1.4.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('exampleSurfaceMesh_8cpp.html',''); initResizable(); });
/* @license-end */
</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="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">exampleSurfaceMesh.cpp File Reference<div class="ingroups"><a class="el" href="group__Examples.html">DGtal Examples</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An example file for SurfaceMesh in 3D.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &quot;DGtal/base/Common.h&quot;</code><br />
<code>#include &quot;DGtal/helpers/StdDefs.h&quot;</code><br />
<code>#include &quot;ConfigExamples.h&quot;</code><br />
<code>#include &quot;DGtal/shapes/Mesh.h&quot;</code><br />
<code>#include &quot;DGtal/shapes/SurfaceMesh.h&quot;</code><br />
<code>#include &quot;DGtal/shapes/SurfaceMeshHelper.h&quot;</code><br />
<code>#include &quot;DGtal/shapes/MeshHelpers.h&quot;</code><br />
<code>#include &quot;DGtal/graph/BreadthFirstVisitor.h&quot;</code><br />
<code>#include &quot;DGtal/io/readers/SurfaceMeshReader.h&quot;</code><br />
<code>#include &quot;DGtal/io/writers/SurfaceMeshWriter.h&quot;</code><br />
<code>#include &quot;DGtal/io/viewers/Viewer3D.h&quot;</code><br />
<code>#include &quot;DGtal/io/Color.h&quot;</code><br />
<code>#include &quot;DGtal/io/colormaps/GradientColorMap.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for exampleSurfaceMesh.cpp:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="exampleSurfaceMesh_8cpp__incl.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<p><a href="exampleSurfaceMesh_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="exampleSurfaceMesh_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An example file for SurfaceMesh in 3D. </p>
<dl class="section author"><dt>Author</dt><dd>Jacques-Olivier Lachaud (<code><a href="#" onclick="location.href='mai'+'lto:'+'jac'+'qu'+'es-'+'ol'+'ivi'+'er'+'.la'+'ch'+'aud'+'@u'+'niv'+'-s'+'avo'+'ie'+'.fr'; return false;">jacqu<span style="display: none;">.nosp@m.</span>es-o<span style="display: none;">.nosp@m.</span>livie<span style="display: none;">.nosp@m.</span>r.la<span style="display: none;">.nosp@m.</span>chaud<span style="display: none;">.nosp@m.</span>@uni<span style="display: none;">.nosp@m.</span>v-sav<span style="display: none;">.nosp@m.</span>oie.<span style="display: none;">.nosp@m.</span>fr</a></code> ) Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2020/07/15</dd></dl>
<p>This file is part of the <a class="el" href="namespaceDGtal.html" title="DGtal is the top-level namespace which contains all DGtal functions and types.">DGtal</a> library. </p>

<p class="definition">Definition in file <a class="el" href="exampleSurfaceMesh_8cpp_source.html">exampleSurfaceMesh.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>[exampleSurfaceMesh-typedef]</p>
<p>[exampleSurfaceMesh-typedef]</p>
<p>[exampleSurfaceMesh-read-mesh]</p>
<p>[exampleSurfaceMesh-read-mesh]</p>
<p>[exampleSurfaceMesh-make-torus]</p>
<p>[exampleSurfaceMesh-make-torus]</p>
<p>[exampleSurfaceMesh-make-pyramid]</p>
<p>[exampleSurfaceMesh-make-pyramid]</p>
<p>[exampleSurfaceMesh-graph-bft]</p>
<p>[exampleSurfaceMesh-graph-bft]</p>
<p>[exampleSurfaceMesh-write-obj]</p>
<p>[exampleSurfaceMesh-write-obj]</p>

<p class="definition">Definition at line <a class="el" href="exampleSurfaceMesh_8cpp_source.html#l00076">76</a> of file <a class="el" href="exampleSurfaceMesh_8cpp_source.html">exampleSurfaceMesh.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;{</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="comment">// The following typedefs are useful</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="structDGtal_1_1SurfaceMesh.html">SurfaceMesh&lt; RealPoint, RealVector &gt;</a>       <a class="code" href="dgtalCalculus-bunny_8cpp.html#a0da7de0f9d769404c143f3d032eaa496">SurfMesh</a>;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="structDGtal_1_1SurfaceMeshHelper.html">SurfaceMeshHelper&lt; RealPoint, RealVector &gt;</a> Helper;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="structDGtal_1_1SurfaceMesh.html#a26bfbda7e780e4104ac3781dfbc785df">SurfMesh::Vertices</a>                         <a class="code" href="fullConvexitySphereGeodesics_8cpp.html#a9b69eb98bda12d4cfd17ccc15a223abc">Vertices</a>;</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;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a> ( <span class="stringliteral">&quot;Reading a mesh OBJ file&quot;</span> );</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <a class="code" href="structDGtal_1_1SurfaceMesh.html">SurfMesh</a>    smesh;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  std::string S = examplesPath + <span class="stringliteral">&quot;samples/spot.obj&quot;</span>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  std::ifstream input( S.c_str() );</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordtype">bool</span> ok_read  =  <a class="code" href="structDGtal_1_1SurfaceMeshReader.html">SurfaceMeshReader&lt; RealPoint, RealVector &gt;::readOBJ</a>( input, smesh );</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  input.close();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">info</a>() &lt;&lt; <span class="stringliteral">&quot;Read &quot;</span> &lt;&lt; ( ok_read ? <span class="stringliteral">&quot;OK&quot;</span> : <span class="stringliteral">&quot;ERROR&quot;</span> )</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;               &lt;&lt; <span class="stringliteral">&quot; mesh=&quot;</span> &lt;&lt; smesh &lt;&lt; std::endl;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a> ( <span class="stringliteral">&quot;Building a torus&quot;</span> );</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="keyword">auto</span> torus_mesh = Helper::makeTorus</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    ( 2.5, 0.5, <a class="code" href="classDGtal_1_1PointVector.html">RealPoint</a> { 0.0, 0.0, 0.0 }, 40, 40, 0, Helper::NormalsType::NO_NORMALS );</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a> ( <span class="stringliteral">&quot;Building a pyramid&quot;</span> );</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  std::vector&lt; RealPoint &gt; positions =</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    { { 0, 0, 5 }, { 1, 1, 3 }, { -1, 1, 3 }, { -1, -1, 3 }, { 1, -1, 3 } };</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  std::vector&lt; Vertices  &gt; faces =</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    { { 0, 1, 2 }, { 0, 2, 3 }, { 0, 3, 4 }, { 0, 4, 1 }, { 4, 3, 2, 1 } };</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <span class="keyword">auto</span> pyramid_mesh = <a class="code" href="dgtalCalculus-bunny_8cpp.html#a0da7de0f9d769404c143f3d032eaa496">SurfMesh</a>( positions.cbegin(), positions.cend(),</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                                faces.cbegin(), faces.cend() );</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a> ( <span class="stringliteral">&quot;Traversing a mesh by BF&quot;</span> );</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <a class="code" href="classDGtal_1_1BreadthFirstVisitor.html">BreadthFirstVisitor&lt; SurfMesh &gt;</a> visitor( smesh, 0 );</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  std::vector&lt;double&gt;             distances( smesh.<a class="code" href="structDGtal_1_1SurfaceMesh.html#ad32cc734fe88ed61b14c03632d2cde31">nbVertices</a>() );</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="keywordtype">double</span> biggest_d = 0.0;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="keywordflow">while</span> ( ! visitor.finished() )</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      <span class="keyword">auto</span> v = visitor.current().first;  <span class="comment">// current vertex</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;      <span class="keyword">auto</span> d = visitor.current().second; <span class="comment">// current distance</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      biggest_d      = (double) d;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      distances[ v ] = biggest_d;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      visitor.expand();</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</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;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a> ( <span class="stringliteral">&quot;Colored output of BF traversal&quot;</span> );</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="comment">// Displaying faces colored by their distance to vertex 0.</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keyword">auto</span> face_distances = smesh.<a class="code" href="structDGtal_1_1SurfaceMesh.html#a545b0f5cb95a0ff1958fe890ee2735a6">computeFaceValuesFromVertexValues</a>( distances );</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keyword">auto</span> cmap = <a class="code" href="classDGtal_1_1GradientColorMap.html">GradientColorMap&lt; double &gt;</a>( 0.0, biggest_d, CMAP_JET );</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  std::vector&lt;Color&gt; face_colors( smesh.<a class="code" href="structDGtal_1_1SurfaceMesh.html#aac6df23e1b3e15f57df733bb6db40a81">nbFaces</a>() );</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="keywordflow">for</span> ( <a class="code" href="structDGtal_1_1SurfaceMesh.html#aa1fa77b6fe00fc9e213be5e71ecf282a">SurfMesh::Face</a> j = 0; j &lt; smesh.<a class="code" href="structDGtal_1_1SurfaceMesh.html#aac6df23e1b3e15f57df733bb6db40a81">nbFaces</a>(); ++j )</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    face_colors[ j ] = cmap( face_distances[ j ] );      </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="structDGtal_1_1SurfaceMeshWriter.html">SurfaceMeshWriter&lt; RealPoint, RealVector &gt;</a> Writer;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  Writer::writeOBJ( <span class="stringliteral">&quot;spot-bft.obj&quot;</span>, smesh, face_colors );</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="comment">// Displaying three isolines.</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  Writer::writeIsoLinesOBJ( <span class="stringliteral">&quot;spot-iso-0_25.obj&quot;</span>, smesh,</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                            face_distances, distances, distances.back() * 0.25, 0.2 );</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  Writer::writeIsoLinesOBJ( <span class="stringliteral">&quot;spot-iso-0_5.obj&quot;</span>,  smesh,</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                            face_distances, distances, distances.back() * 0.5,  0.2 );</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  Writer::writeIsoLinesOBJ( <span class="stringliteral">&quot;spot-iso-0_75.obj&quot;</span>, smesh,</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                            face_distances, distances, distances.back() * 0.75, 0.2 );</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  <a class="code" href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">trace</a>.<a class="code" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <span class="comment">// Conversion to Mesh for easy display.</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <a class="code" href="classDGtal_1_1Mesh.html">Mesh&lt; RealPoint &gt;</a> viewmesh(<span class="keyword">true</span>);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <a class="code" href="classDGtal_1_1Mesh.html">Mesh&lt; RealPoint &gt;</a>  viewmesh2, viewmesh3;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  MeshHelpers::surfaceMesh2Mesh( smesh,      viewmesh , face_colors );</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  MeshHelpers::surfaceMesh2Mesh( torus_mesh, viewmesh2 );</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  MeshHelpers::surfaceMesh2Mesh( pyramid_mesh, viewmesh3 );</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  QApplication application(argc,argv);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <a class="code" href="classDGtal_1_1Viewer3D.html">Viewer3D&lt;&gt;</a> viewer;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  viewer.<a class="code" href="classDGtal_1_1Viewer3D.html#a1ea1c9cf781ce6940db02c352cf24e6f">show</a>();</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  viewer &lt;&lt; viewmesh &lt;&lt; viewmesh2 &lt;&lt; viewmesh3;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  viewer &lt;&lt; Viewer3D&lt;&gt;::updateDisplay;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  application.exec();</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;}</div>
<div class="ttc" id="aclassDGtal_1_1BreadthFirstVisitor_html"><div class="ttname"><a href="classDGtal_1_1BreadthFirstVisitor.html">DGtal::BreadthFirstVisitor</a></div><div class="ttdoc">Aim: This class is useful to perform a breadth-first exploration of a graph given a starting point or...</div><div class="ttdef"><b>Definition:</b> <a href="BreadthFirstVisitor_8h_source.html#l00094">BreadthFirstVisitor.h:95</a></div></div>
<div class="ttc" id="aclassDGtal_1_1GradientColorMap_html"><div class="ttname"><a href="classDGtal_1_1GradientColorMap.html">DGtal::GradientColorMap</a></div><div class="ttdoc">Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...</div><div class="ttdef"><b>Definition:</b> <a href="GradientColorMap_8h_source.html#l00119">GradientColorMap.h:120</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Mesh_html"><div class="ttname"><a href="classDGtal_1_1Mesh.html">DGtal::Mesh</a></div><div class="ttdoc">Aim: This class is defined to represent a surface mesh through a set of vertices and faces....</div><div class="ttdef"><b>Definition:</b> <a href="Mesh_8h_source.html#l00091">Mesh.h:92</a></div></div>
<div class="ttc" id="aclassDGtal_1_1PointVector_html"><div class="ttname"><a href="classDGtal_1_1PointVector.html">DGtal::PointVector</a></div><div class="ttdoc">Aim: Implements basic operations that will be used in Point and Vector classes.</div><div class="ttdef"><b>Definition:</b> <a href="PointVector_8h_source.html#l00592">PointVector.h:593</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_a352b7160bf722e2f0bcbee5d0bad6ef3"><div class="ttname"><a href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">DGtal::Trace::beginBlock</a></div><div class="ttdeci">void beginBlock(const std::string &amp;keyword=&quot;&quot;)</div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_ad054990834d2763627166540087a2980"><div class="ttname"><a href="classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">DGtal::Trace::info</a></div><div class="ttdeci">std::ostream &amp; info()</div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_afa3a2874289734884107b1ce68ccb93d"><div class="ttname"><a href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">DGtal::Trace::endBlock</a></div><div class="ttdeci">double endBlock()</div></div>
<div class="ttc" id="aclassDGtal_1_1Viewer3D_html"><div class="ttname"><a href="classDGtal_1_1Viewer3D.html">DGtal::Viewer3D</a></div><div class="ttdef"><b>Definition:</b> <a href="Viewer3D_8h_source.html#l00131">Viewer3D.h:132</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Viewer3D_html_a1ea1c9cf781ce6940db02c352cf24e6f"><div class="ttname"><a href="classDGtal_1_1Viewer3D.html#a1ea1c9cf781ce6940db02c352cf24e6f">DGtal::Viewer3D::show</a></div><div class="ttdeci">virtual void show()</div><div class="ttdoc">Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...</div></div>
<div class="ttc" id="adgtalCalculus-bunny_8cpp_html_a0da7de0f9d769404c143f3d032eaa496"><div class="ttname"><a href="dgtalCalculus-bunny_8cpp.html#a0da7de0f9d769404c143f3d032eaa496">SurfMesh</a></div><div class="ttdeci">SurfaceMesh&lt; RealPoint, RealVector &gt; SurfMesh</div><div class="ttdef"><b>Definition:</b> <a href="dgtalCalculus-bunny_8cpp_source.html#l00052">dgtalCalculus-bunny.cpp:52</a></div></div>
<div class="ttc" id="afullConvexitySphereGeodesics_8cpp_html_a9b69eb98bda12d4cfd17ccc15a223abc"><div class="ttname"><a href="fullConvexitySphereGeodesics_8cpp.html#a9b69eb98bda12d4cfd17ccc15a223abc">Vertices</a></div><div class="ttdeci">SMesh::Vertices Vertices</div><div class="ttdef"><b>Definition:</b> <a href="fullConvexitySphereGeodesics_8cpp_source.html#l00118">fullConvexitySphereGeodesics.cpp:118</a></div></div>
<div class="ttc" id="anamespaceDGtal_html_a8fc7012708b0416880a5c8b12dfdf9dd"><div class="ttname"><a href="namespaceDGtal.html#a8fc7012708b0416880a5c8b12dfdf9dd">DGtal::trace</a></div><div class="ttdeci">Trace trace</div><div class="ttdef"><b>Definition:</b> <a href="Common_8h_source.html#l00153">Common.h:153</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMeshHelper_html"><div class="ttname"><a href="structDGtal_1_1SurfaceMeshHelper.html">DGtal::SurfaceMeshHelper</a></div><div class="ttdoc">Aim: An helper class for building classical meshes.</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMeshHelper_8h_source.html#l00063">SurfaceMeshHelper.h:64</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMeshReader_html"><div class="ttname"><a href="structDGtal_1_1SurfaceMeshReader.html">DGtal::SurfaceMeshReader</a></div><div class="ttdoc">Aim: An helper class for reading mesh files (Wavefront OBJ at this point) and creating a SurfaceMesh.</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMeshReader_8h_source.html#l00063">SurfaceMeshReader.h:64</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMeshWriter_html"><div class="ttname"><a href="structDGtal_1_1SurfaceMeshWriter.html">DGtal::SurfaceMeshWriter</a></div><div class="ttdoc">Aim: An helper class for writing mesh file formats (Waverfront OBJ at this point) and creating a Surf...</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMeshWriter_8h_source.html#l00064">SurfaceMeshWriter.h:65</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html">DGtal::SurfaceMesh</a></div><div class="ttdoc">Aim: Represents an embedded mesh as faces and a list of vertices. Vertices may be shared among faces ...</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMesh_8h_source.html#l00091">SurfaceMesh.h:92</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html_a26bfbda7e780e4104ac3781dfbc785df"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html#a26bfbda7e780e4104ac3781dfbc785df">DGtal::SurfaceMesh::Vertices</a></div><div class="ttdeci">std::vector&lt; Vertex &gt; Vertices</div><div class="ttdoc">The type that defines a list/range of vertices (e.g. to define faces)</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMesh_8h_source.html#l00112">SurfaceMesh.h:112</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html_a545b0f5cb95a0ff1958fe890ee2735a6"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html#a545b0f5cb95a0ff1958fe890ee2735a6">DGtal::SurfaceMesh::computeFaceValuesFromVertexValues</a></div><div class="ttdeci">std::vector&lt; AnyRing &gt; computeFaceValuesFromVertexValues(const std::vector&lt; AnyRing &gt; &amp;vvalues) const</div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html_aa1fa77b6fe00fc9e213be5e71ecf282a"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html#aa1fa77b6fe00fc9e213be5e71ecf282a">DGtal::SurfaceMesh::Face</a></div><div class="ttdeci">Index Face</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMesh_8h_source.html#l00106">SurfaceMesh.h:106</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html_aac6df23e1b3e15f57df733bb6db40a81"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html#aac6df23e1b3e15f57df733bb6db40a81">DGtal::SurfaceMesh::nbFaces</a></div><div class="ttdeci">Size nbFaces() const</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMesh_8h_source.html#l00296">SurfaceMesh.h:296</a></div></div>
<div class="ttc" id="astructDGtal_1_1SurfaceMesh_html_ad32cc734fe88ed61b14c03632d2cde31"><div class="ttname"><a href="structDGtal_1_1SurfaceMesh.html#ad32cc734fe88ed61b14c03632d2cde31">DGtal::SurfaceMesh::nbVertices</a></div><div class="ttdeci">Size nbVertices() const</div><div class="ttdef"><b>Definition:</b> <a href="SurfaceMesh_8h_source.html#l00288">SurfaceMesh.h:288</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">DGtal::Trace::beginBlock()</a>, <a class="el" href="GradientColorMap_8h_source.html#l00069">DGtal::CMAP_JET</a>, <a class="el" href="structDGtal_1_1SurfaceMesh.html#a545b0f5cb95a0ff1958fe890ee2735a6">DGtal::SurfaceMesh&lt; TRealPoint, TRealVector &gt;::computeFaceValuesFromVertexValues()</a>, <a class="el" href="classDGtal_1_1BreadthFirstVisitor.html#a5efcfaf0fdae476bf45b29afa8ad5750">DGtal::BreadthFirstVisitor&lt; TGraph, TMarkSet &gt;::current()</a>, <a class="el" href="classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">DGtal::Trace::endBlock()</a>, <a class="el" href="classDGtal_1_1BreadthFirstVisitor.html#af171f17c5465cfbf942cda0d33e3fd11">DGtal::BreadthFirstVisitor&lt; TGraph, TMarkSet &gt;::expand()</a>, <a class="el" href="classDGtal_1_1BreadthFirstVisitor.html#a48377795ac51a1ce842cf3644d659341">DGtal::BreadthFirstVisitor&lt; TGraph, TMarkSet &gt;::finished()</a>, <a class="el" href="classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">DGtal::Trace::info()</a>, <a class="el" href="SurfaceMesh_8h_source.html#l00296">DGtal::SurfaceMesh&lt; TRealPoint, TRealVector &gt;::nbFaces()</a>, <a class="el" href="SurfaceMesh_8h_source.html#l00288">DGtal::SurfaceMesh&lt; TRealPoint, TRealVector &gt;::nbVertices()</a>, <a class="el" href="classDGtal_1_1Viewer3D.html#a1ea1c9cf781ce6940db02c352cf24e6f">DGtal::Viewer3D&lt; TSpace, TKSpace &gt;::show()</a>, and <a class="el" href="Common_8h_source.html#l00153">DGtal::trace</a>.</p>

</div>
</div>
</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="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="dir_32ab1f958902d9c5e3abd707b0dd90f4.html">shapes</a></li><li class="navelem"><a class="el" href="exampleSurfaceMesh_8cpp.html">exampleSurfaceMesh.cpp</a></li>
    <li class="footer">Generated on Mon Dec 23 2024 13:18:54 for DGtal by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>