Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 5423

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!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>mrpt::utils::PLY_Exporter Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacemrpt.html">mrpt</a>      </li>
      <li class="navelem"><a class="el" href="namespacemrpt_1_1utils.html">utils</a>      </li>
      <li class="navelem"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html">PLY_Exporter</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">mrpt::utils::PLY_Exporter Class Reference<div class="ingroups"><a class="el" href="group__mrpt__base__grp.html">[mrpt-base]</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="mrpt::utils::PLY_Exporter" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.mrpt.org/Support_for_the_Stanford_3D_models_file_format_PLY">http://www.mrpt.org/Support_for_the_Stanford_3D_models_file_format_PLY</a> </dd>
<dd>
<a class="el" href="classmrpt_1_1utils_1_1_p_l_y___importer.html" title="A virtual base class that implements the capability of importing 3D point clouds and faces from a fil...">PLY_Importer</a> </dd></dl>
</div>
<p><code>#include &lt;<a class="el" href="_p_l_y__import__export_8h_source.html">mrpt/utils/PLY_import_export.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mrpt::utils::PLY_Exporter:</div>
<div class="dyncontent">
<div class="center"><img src="classmrpt_1_1utils_1_1_p_l_y___exporter__inherit__graph.png" border="0" usemap="#mrpt_1_1utils_1_1_p_l_y___exporter_inherit__map" alt="Inheritance graph"/></div>
<map name="mrpt_1_1utils_1_1_p_l_y___exporter_inherit__map" id="mrpt_1_1utils_1_1_p_l_y___exporter_inherit__map">
<area shape="rect" id="node3" href="classmrpt_1_1opengl_1_1_c_point_cloud.html" title="A cloud of points, all with the same color or each depending on its value along a particular coordina..." alt="" coords="251,5,427,32"/><area shape="rect" id="node5" href="classmrpt_1_1opengl_1_1_c_point_cloud_coloured.html" title="A cloud of points, each one with an individual colour (R,G,B)." alt="" coords="225,56,453,83"/><area shape="rect" id="node7" href="classmrpt_1_1slam_1_1_c_points_map.html" title="A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors..." alt="" coords="257,107,421,133"/><area shape="rect" id="node9" href="classmrpt_1_1slam_1_1_c_coloured_points_map.html" title="A map of 2D/3D points with individual colours (RGB)." alt="" coords="503,56,719,83"/><area shape="rect" id="node11" href="classmrpt_1_1slam_1_1_c_simple_points_map.html" title="A cloud of points in 2D or 3D, which can be built from a sequence of laser scans." alt="" coords="509,107,713,133"/><area shape="rect" id="node13" href="classmrpt_1_1slam_1_1_c_weighted_points_map.html" title="A cloud of points in 2D or 3D, which can be built from a sequence of laser scans." alt="" coords="501,157,720,184"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classmrpt_1_1utils_1_1_p_l_y___exporter-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a849c09483bdcf2414834af8a06bd84d6">saveToPlyFile</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;filename, bool save_in_binary=false, const <a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a> &amp;file_comments=<a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a>(), const <a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a> &amp;file_obj_info=<a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a>()) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves to a PLY file.  <a href="#a849c09483bdcf2414834af8a06bd84d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a9ee5f77b023b7ef39f935f14ce624650">getSavePLYErrorString</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.  <a href="#a9ee5f77b023b7ef39f935f14ce624650"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">PLY Export virtual methods to implement in base classes</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a638a8dcf29de2572efd56407f47553e4">PLY_export_get_vertex_count</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">In a base class, return the number of vertices.  <a href="#a638a8dcf29de2572efd56407f47553e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a59156777ea6e9a293b2f0928d85b1731">PLY_export_get_face_count</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">In a base class, return the number of faces.  <a href="#a59156777ea6e9a293b2f0928d85b1731"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#aaa23c01ae028a91a515f61adf6bcf8b7">PLY_export_get_vertex</a> (const size_t idx, <a class="el" href="structmrpt_1_1math_1_1_t_point3_df.html">mrpt::math::TPoint3Df</a> &amp;pt, bool &amp;pt_has_color, <a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;pt_color) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">In a base class, will be called after <a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a638a8dcf29de2572efd56407f47553e4" title="In a base class, return the number of vertices.">PLY_export_get_vertex_count()</a> once for each exported point.  <a href="#aaa23c01ae028a91a515f61adf6bcf8b7"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#af8af1bdaaf999433998ce8ea1e51dcc6">m_ply_export_last_error</a></td></tr>
</table>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9ee5f77b023b7ef39f935f14ce624650"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::getSavePLYErrorString" ref="a9ee5f77b023b7ef39f935f14ce624650" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> mrpt::utils::PLY_Exporter::getSavePLYErrorString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems. </p>

<p>Definition at line <a class="el" href="_p_l_y__import__export_8h_source.html#l00106">106</a> of file <a class="el" href="_p_l_y__import__export_8h_source.html">PLY_import_export.h</a>.</p>

</div>
</div>
<a class="anchor" id="a59156777ea6e9a293b2f0928d85b1731"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::PLY_export_get_face_count" ref="a59156777ea6e9a293b2f0928d85b1731" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t mrpt::utils::PLY_Exporter::PLY_export_get_face_count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>In a base class, return the number of faces. </p>

<p>Implemented in <a class="el" href="classmrpt_1_1slam_1_1_c_points_map.html#aea9230b8985aa6eb82d55110049343e8">mrpt::slam::CPointsMap</a>, <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud_coloured.html#a4a178f785a52da76b515af82e5f26e03">mrpt::opengl::CPointCloudColoured</a>, and <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud.html#a5b0c4cf909975c345ee4545312f9b024">mrpt::opengl::CPointCloud</a>.</p>

</div>
</div>
<a class="anchor" id="aaa23c01ae028a91a515f61adf6bcf8b7"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::PLY_export_get_vertex" ref="aaa23c01ae028a91a515f61adf6bcf8b7" args="(const size_t idx, mrpt::math::TPoint3Df &amp;pt, bool &amp;pt_has_color, mrpt::utils::TColorf &amp;pt_color) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::utils::PLY_Exporter::PLY_export_get_vertex </td>
          <td>(</td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmrpt_1_1math_1_1_t_point3_df.html">mrpt::math::TPoint3Df</a> &amp;&#160;</td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>pt_has_color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;&#160;</td>
          <td class="paramname"><em>pt_color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>In a base class, will be called after <a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a638a8dcf29de2572efd56407f47553e4" title="In a base class, return the number of vertices.">PLY_export_get_vertex_count()</a> once for each exported point. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pt_color</td><td>Will be NULL if the loaded file does not provide color info. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmrpt_1_1slam_1_1_c_points_map.html#a17b10cad494a23c6917661fb345b0014">mrpt::slam::CPointsMap</a>, <a class="el" href="classmrpt_1_1slam_1_1_c_coloured_points_map.html#ad74a038bf1e4f9d71d021c9256e39555">mrpt::slam::CColouredPointsMap</a>, <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud_coloured.html#af50a9b21e0624c6f06c2ff805ca21ffa">mrpt::opengl::CPointCloudColoured</a>, and <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud.html#ad154553d93c6c6446ec551108c7eb6db">mrpt::opengl::CPointCloud</a>.</p>

</div>
</div>
<a class="anchor" id="a638a8dcf29de2572efd56407f47553e4"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::PLY_export_get_vertex_count" ref="a638a8dcf29de2572efd56407f47553e4" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t mrpt::utils::PLY_Exporter::PLY_export_get_vertex_count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>In a base class, return the number of vertices. </p>

<p>Implemented in <a class="el" href="classmrpt_1_1slam_1_1_c_points_map.html#aa59022a6966dca11b5cc417c00b1b553">mrpt::slam::CPointsMap</a>, <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud_coloured.html#a0f9d908f2ddf9e749be4dbb979f9106b">mrpt::opengl::CPointCloudColoured</a>, and <a class="el" href="classmrpt_1_1opengl_1_1_c_point_cloud.html#a488d45a1ee3718e8e876384498731fc4">mrpt::opengl::CPointCloud</a>.</p>

</div>
</div>
<a class="anchor" id="a849c09483bdcf2414834af8a06bd84d6"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::saveToPlyFile" ref="a849c09483bdcf2414834af8a06bd84d6" args="(const std::string &amp;filename, bool save_in_binary=false, const CStringList &amp;file_comments=CStringList(), const CStringList &amp;file_obj_info=CStringList()) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mrpt::utils::PLY_Exporter::saveToPlyFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>save_in_binary</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a> &amp;&#160;</td>
          <td class="paramname"><em>file_comments</em> = <code><a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a> &amp;&#160;</td>
          <td class="paramname"><em>file_obj_info</em> = <code><a class="el" href="classmrpt_1_1utils_1_1_c_string_list.html">CStringList</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Saves to a PLY file. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>The filename to be saved. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">file_comments</td><td>If provided (!=NULL) the list of comment strings stored in the file will be returned. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">file_obj_info</td><td>If provided (!=NULL) the list of "object info" strings stored in the file will be returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false on any error writing the file. To obtain more details on the error you can call <a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#a9ee5f77b023b7ef39f935f14ce624650" title="Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file...">getSavePLYErrorString()</a> </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="af8af1bdaaf999433998ce8ea1e51dcc6"></a><!-- doxytag: member="mrpt::utils::PLY_Exporter::m_ply_export_last_error" ref="af8af1bdaaf999433998ce8ea1e51dcc6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> <a class="el" href="classmrpt_1_1utils_1_1_p_l_y___exporter.html#af8af1bdaaf999433998ce8ea1e51dcc6">mrpt::utils::PLY_Exporter::m_ply_export_last_error</a><code> [mutable, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_p_l_y__import__export_8h_source.html#l00130">130</a> of file <a class="el" href="_p_l_y__import__export_8h_source.html">PLY_import_export.h</a>.</p>

</div>
</div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>