Sophie

Sophie

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

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>CDisplayWindow3D.h Source File</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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><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="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">CDisplayWindow3D.h</div>  </div>
</div>
<div class="contents">
<a href="_c_display_window3_d_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                       http://www.mrpt.org/                                |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2011  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef  CDisplayWindow3D_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define  CDisplayWindow3D_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="_c_base_g_u_i_window_8h.html">mrpt/gui/CBaseGUIWindow.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="opengl_8h.html">mrpt/opengl.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="opengl__fonts_8h.html">mrpt/opengl/opengl_fonts.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_image_8h.html">mrpt/utils/CImage.h</a>&gt;</span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="comment">/*---------------------------------------------------------------</span>
<a name="l00037"></a>00037 <span class="comment">        Class</span>
<a name="l00038"></a>00038 <span class="comment">  ---------------------------------------------------------------*/</span>
<a name="l00039"></a>00039 <span class="keyword">namespace </span>mrpt
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041         <span class="keyword">namespace </span>gui
<a name="l00042"></a>00042         {
<a name="l00043"></a>00043                 <span class="keyword">using namespace </span>mrpt::utils;
<a name="l00044"></a>00044 
<a name="l00045"></a>00045                 <span class="keyword">class </span>C3DWindowDialog;
<a name="l00046"></a>00046                 <span class="keyword">class </span>CMyGLCanvas_DisplayWindow3D;
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="structmrpt_1_1gui_1_1_c_display_window3_d_ptr.html#a4b136e8ab77e4b3ca1dd90c0bf3a6b77">00048</a>                 <a class="code" href="_c_object_8h.html#a0e854723702802213de8c20bf5697bff">DEFINE_MRPT_OBJECT_PRE_CUSTOM_BASE_LINKAGE</a>(<a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a>, <a class="code" href="classmrpt_1_1gui_1_1_c_base_g_u_i_window.html" title="The base class for GUI window classes.">mrpt::gui::CBaseGUIWindow</a>, <a class="code" href="gui_2include_2mrpt_2gui_2link__pragmas_8h.html#a69a861d20c11137851da0fe69a66d7b6">GUI_IMPEXP</a>)
<a name="l00049"></a>00049 
<a name="l00050"></a>00050                 <span class="comment">/** A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.</span>
<a name="l00051"></a>00051 <span class="comment">                  *  This class always contains internally an instance of opengl::COpenGLScene, which</span>
<a name="l00052"></a>00052 <span class="comment">                  *   the objects, viewports, etc. to be rendered.</span>
<a name="l00053"></a>00053 <span class="comment">                  *</span>
<a name="l00054"></a>00054 <span class="comment">                  *  Images can be grabbed automatically to disk for easy creation of videos.</span>
<a name="l00055"></a>00055 <span class="comment">                  *  See CDisplayWindow3D::grabImagesStart  (and for creating videos, mrpt::utils::CVideoFileWriter).</span>
<a name="l00056"></a>00056 <span class="comment">                  *</span>
<a name="l00057"></a>00057 <span class="comment">                  *</span>
<a name="l00058"></a>00058 <span class="comment">                  *  Since the 3D rendering is performed in a detached thread, especial care must be taken</span>
<a name="l00059"></a>00059 <span class="comment">                  *   when updating the 3D scene to be rendered. The process involves an internal critical section</span>
<a name="l00060"></a>00060 <span class="comment">                  *   and it must always consist of these steps:</span>
<a name="l00061"></a>00061 <span class="comment">                  *</span>
<a name="l00062"></a>00062 <span class="comment">                  * \code</span>
<a name="l00063"></a>00063 <span class="comment">                  *   CDisplayWindow3D  win(&quot;My window&quot;);</span>
<a name="l00064"></a>00064 <span class="comment">                  *</span>
<a name="l00065"></a>00065 <span class="comment">                  *   // Adquire the scene:</span>
<a name="l00066"></a>00066 <span class="comment">                  *   opengl::COpenGLScenePtr &amp;ptrScene = win.get3DSceneAndLock();</span>
<a name="l00067"></a>00067 <span class="comment">                  *</span>
<a name="l00068"></a>00068 <span class="comment">                  *   // Modify the scene:</span>
<a name="l00069"></a>00069 <span class="comment">                  *   ptrScene-&gt;...</span>
<a name="l00070"></a>00070 <span class="comment">                  *   // or replace by another scene:</span>
<a name="l00071"></a>00071 <span class="comment">                  *   ptrScene = otherScene;</span>
<a name="l00072"></a>00072 <span class="comment">                  *</span>
<a name="l00073"></a>00073 <span class="comment">                  *   // Unlock it, so the window can use it for redraw:</span>
<a name="l00074"></a>00074 <span class="comment">                  *   win.unlockAccess3DScene();</span>
<a name="l00075"></a>00075 <span class="comment">                  *</span>
<a name="l00076"></a>00076 <span class="comment">                  *   // Update window, if required</span>
<a name="l00077"></a>00077 <span class="comment">                  *   win.forceRepaint();</span>
<a name="l00078"></a>00078 <span class="comment">                  * \endcode</span>
<a name="l00079"></a>00079 <span class="comment">                  *</span>
<a name="l00080"></a>00080 <span class="comment">                  * An alternative way of updating the scene is by creating, before locking the 3D window, a new object</span>
<a name="l00081"></a>00081 <span class="comment">                  *  of class COpenGLScene, then locking the window only for replacing the smart pointer. This may be</span>
<a name="l00082"></a>00082 <span class="comment">                  *  advantageous is generating the 3D scene takes a long time, since while the window</span>
<a name="l00083"></a>00083 <span class="comment">                  *  is locked it will not be responsive to the user input or window redraw.</span>
<a name="l00084"></a>00084 <span class="comment">                  *</span>
<a name="l00085"></a>00085 <span class="comment">                  * The window can also display a set of 2D text messages overlapped to the 3D scene.</span>
<a name="l00086"></a>00086 <span class="comment">                  *  See CDisplayWindow3D::add2DTextMessage</span>
<a name="l00087"></a>00087 <span class="comment">                  *</span>
<a name="l00088"></a>00088 <span class="comment">                  *  For a list of supported events with the observer/observable pattern, see the discussion in mrpt::gui::CBaseGUIWindow.</span>
<a name="l00089"></a>00089 <span class="comment">                  *  In addition to those events, this class introduces mrpt::gui::mrptEvent3DWindowGrabImageFile</span>
<a name="l00090"></a>00090 <span class="comment">                  *</span>
<a name="l00091"></a>00091 <span class="comment">                  *</span>
<a name="l00092"></a>00092 <span class="comment">                  * \sa  The example /samples/display3D, the &lt;a href=&quot;http://www.mrpt.org/Tutorial_3D_Scenes&quot; &gt; tutorial only&lt;/a&gt;.</span>
<a name="l00093"></a>00093 <span class="comment">                  * \ingroup mrpt_gui_grp</span>
<a name="l00094"></a>00094 <span class="comment">                  */</span>
<a name="l00095"></a>00095                 class <a class="code" href="gui_2include_2mrpt_2gui_2link__pragmas_8h.html#a69a861d20c11137851da0fe69a66d7b6">GUI_IMPEXP</a> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a> : public mrpt::gui::<a class="code" href="classmrpt_1_1gui_1_1_c_base_g_u_i_window.html" title="The base class for GUI window classes.">CBaseGUIWindow</a>
<a name="l00096"></a>00096                 {
<a name="l00097"></a>00097                         <span class="comment">// This must be added to any CObject derived class:</span>
<a name="l00098"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#aa9adecc5e844d81664b85845ded2bb1a">00098</a>                         <a class="code" href="_c_object_8h.html#a89a1b701b9898005d954af26d92766fe" title="This declaration must be inserted in all CObject classes definition, within the class declaration...">DEFINE_MRPT_OBJECT</a>( <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a> )
<a name="l00099"></a>00099 
<a name="l00100"></a>00100                 protected:
<a name="l00101"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#af363eff8a66db772f89467af51a862bb">00101</a>                         friend class C3DWindowDialog;
<a name="l00102"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a4bf71221b5cfa6c266d84d73b8a732e9">00102</a>                         friend class CMyGLCanvas_DisplayWindow3D;
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 
<a name="l00105"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a991d65a488fb4e18eda85b415ec616ad">00105</a>                         <span class="keywordtype">float</span> m_FOV;
<a name="l00106"></a>00106 
<a name="l00107"></a>00107 <span class="comment"></span>
<a name="l00108"></a>00108 <span class="comment">                        /** Internal OpenGL object (see general discussion in about usage of this object)</span>
<a name="l00109"></a>00109 <span class="comment">                          */</span>
<a name="l00110"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a68b6c5505a99e263001f0a541bd5d360">00110</a>                         opengl::<a class="code" href="structmrpt_1_1opengl_1_1_c_open_g_l_scene_ptr.html">COpenGLScenePtr</a>                 m_3Dscene;
<a name="l00111"></a>00111 <span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">                        /** Critical section for accesing m_3Dscene</span>
<a name="l00113"></a>00113 <span class="comment">                          */</span>
<a name="l00114"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a85ed58091d40a3a381a9d4f92c1ca9e8">00114</a>                         synch::CCriticalSection         m_csAccess3DScene;
<a name="l00115"></a>00115 <span class="comment"></span>
<a name="l00116"></a>00116 <span class="comment">                        /** Throws an exception on initialization error</span>
<a name="l00117"></a>00117 <span class="comment">                          */</span>
<a name="l00118"></a>00118                         <span class="keywordtype">void</span>  createOpenGLContext();
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ac1b838528ac1483cc6ddbc6db22d1a03">00120</a>                         <a class="code" href="structmrpt_1_1utils_1_1non__copiable__ptr__basic.html">void_ptr_noncopy</a>        m_DisplayDeviceContext;
<a name="l00121"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a416d3d265b7661fdda37fd4165d30138">00121</a>                         <a class="code" href="structmrpt_1_1utils_1_1non__copiable__ptr__basic.html">void_ptr_noncopy</a>        m_GLRenderingContext;
<a name="l00122"></a>00122 
<a name="l00123"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a8ccfc144c2b27b74beb40dddbb60eeb0">00123</a>                         std::<span class="keywordtype">string</span>             m_grab_imgs_prefix;
<a name="l00124"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a2fa49c7fdd4fc6d0ffe492ec207c214b">00124</a>                         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            m_grab_imgs_idx;
<a name="l00125"></a>00125 
<a name="l00126"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ae4bc81ff03353bd2ed307eeb915f35c7">00126</a>                         <span class="keywordtype">bool</span>                            m_is_capturing_imgs;
<a name="l00127"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a721f49a3b7b164868965e18810b55bc7">00127</a>                         <a class="code" href="structmrpt_1_1utils_1_1_c_image_ptr.html">CImagePtr</a>               m_last_captured_img;
<a name="l00128"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#aa561e6d4d8b641c0159f9cf970b2a737">00128</a>                         synch::CCriticalSection         m_last_captured_img_cs;
<a name="l00129"></a>00129 
<a name="l00130"></a>00130                         <span class="keywordtype">void</span>  doRender();
<a name="l00131"></a>00131 
<a name="l00132"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ad227235bebd10d250a73c0e6707e3856">00132</a>                         mrpt::system::<a class="code" href="group__time__date.html#ga42674286d8d56afea013b6329bb7327a" title="A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...">TTimeStamp</a>        m_lastFullScreen;
<a name="l00133"></a>00133 
<a name="l00134"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#aa655c746d5fbebaf414805e2f43f849d">00134</a>                         <span class="keywordtype">double</span>   m_last_FPS; <span class="comment">//!&lt; \sa getRenderingFPS</span>
<a name="l00135"></a>00135 <span class="comment"></span>
<a name="l00136"></a>00136                         <span class="keywordtype">void</span> internalSetMinMaxRange();
<a name="l00137"></a>00137 
<a name="l00138"></a>00138                 public:<span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment">                        /** Constructor</span>
<a name="l00140"></a>00140 <span class="comment">                         */</span>
<a name="l00141"></a>00141                         <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a>(
<a name="l00142"></a>00142                                 const std::<span class="keywordtype">string</span>       &amp;windowCaption = std::<span class="keywordtype">string</span>(),
<a name="l00143"></a>00143                                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            initialWindowWidth = 400,
<a name="l00144"></a>00144                                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            initialWindowHeight = 300 );
<a name="l00145"></a>00145 <span class="comment"></span>
<a name="l00146"></a>00146 <span class="comment">                        /** Class factory returning a smart pointer */</span>
<a name="l00147"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a0962c316dedd404e09c260dfa99c1d84">00147</a>                         static <a class="code" href="structmrpt_1_1gui_1_1_c_display_window3_d_ptr.html">CDisplayWindow3DPtr</a> Create(
<a name="l00148"></a>00148                                 const std::<span class="keywordtype">string</span>       &amp;windowCaption = std::<span class="keywordtype">string</span>(),
<a name="l00149"></a>00149                                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            initialWindowWidth = 400,
<a name="l00150"></a>00150                                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            initialWindowHeight = 300 )
<a name="l00151"></a>00151                         {
<a name="l00152"></a>00152                                 <span class="keywordflow">return</span> <a class="code" href="structmrpt_1_1gui_1_1_c_display_window3_d_ptr.html">CDisplayWindow3DPtr</a>(<span class="keyword">new</span> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a>(windowCaption,initialWindowWidth,initialWindowHeight));
<a name="l00153"></a>00153                         }
<a name="l00154"></a>00154 <span class="comment"></span>
<a name="l00155"></a>00155 <span class="comment">                        /** Destructor</span>
<a name="l00156"></a>00156 <span class="comment">                         */</span>
<a name="l00157"></a>00157                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a>();
<a name="l00158"></a>00158 <span class="comment"></span>
<a name="l00159"></a>00159 <span class="comment">                        /** Gets a reference to the smart shared pointer that holds the internal scene (carefuly read introduction in gui::CDisplayWindow3D before use!)</span>
<a name="l00160"></a>00160 <span class="comment">                          *  This also locks the critical section for accesing the scene, thus the window will not be repainted until it is unlocked.</span>
<a name="l00161"></a>00161 <span class="comment">                          */</span>
<a name="l00162"></a>00162                         opengl<a class="code" href="structmrpt_1_1opengl_1_1_c_open_g_l_scene_ptr.html">::COpenGLScenePtr</a> &amp; get3DSceneAndLock( );
<a name="l00163"></a>00163 <span class="comment"></span>
<a name="l00164"></a>00164 <span class="comment">                        /** Unlocks the access to the internal 3D scene.</span>
<a name="l00165"></a>00165 <span class="comment">                          *  Typically user will want to call forceRepaint after updating the scene.</span>
<a name="l00166"></a>00166 <span class="comment">                          */</span>
<a name="l00167"></a>00167                         <span class="keywordtype">void</span>  unlockAccess3DScene();
<a name="l00168"></a>00168 <span class="comment"></span>
<a name="l00169"></a>00169 <span class="comment">                        /** Repaints the window.</span>
<a name="l00170"></a>00170 <span class="comment">                          * forceRepaint, repaint and updateWindow are all aliases of the same method.</span>
<a name="l00171"></a>00171 <span class="comment">                          */</span>
<a name="l00172"></a>00172                         <span class="keywordtype">void</span>  forceRepaint();
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">                        /** Repaints the window.</span>
<a name="l00175"></a>00175 <span class="comment">                          * forceRepaint, repaint and updateWindow are all aliases of the same method.</span>
<a name="l00176"></a>00176 <span class="comment">                          */</span>
<a name="l00177"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ad7f8e4c6a63a9a6508f987db05083de4">00177</a>                         <span class="keywordtype">void</span>  <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ad7f8e4c6a63a9a6508f987db05083de4" title="Repaints the window.">repaint</a>() { forceRepaint(); }
<a name="l00178"></a>00178 <span class="comment"></span>
<a name="l00179"></a>00179 <span class="comment">                        /** Repaints the window.</span>
<a name="l00180"></a>00180 <span class="comment">                          * forceRepaint, repaint and updateWindow are all aliases of the same method.</span>
<a name="l00181"></a>00181 <span class="comment">                          */</span>
<a name="l00182"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a23d25bf3228caf6480ffbafb602504be">00182</a>                         <span class="keywordtype">void</span>  <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#a23d25bf3228caf6480ffbafb602504be" title="Repaints the window.">updateWindow</a>() { forceRepaint(); }
<a name="l00183"></a>00183 <span class="comment"></span>
<a name="l00184"></a>00184 <span class="comment">                        /** Return the camera field of view (in degrees) (used for gluPerspective).</span>
<a name="l00185"></a>00185 <span class="comment">                          */</span>
<a name="l00186"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#abf4235fe6f2b6c758ecf49e9e255a166">00186</a>                         <span class="keywordtype">float</span> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#abf4235fe6f2b6c758ecf49e9e255a166" title="Return the camera field of view (in degrees) (used for gluPerspective).">getFOV</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_FOV; };
<a name="l00187"></a>00187 <span class="comment"></span>
<a name="l00188"></a>00188 <span class="comment">                        /** Changes the camera min range (z) (used for gluPerspective).</span>
<a name="l00189"></a>00189 <span class="comment">                          *  The window is not updated with this method, call &quot;forceRepaint&quot; to update the 3D view.</span>
<a name="l00190"></a>00190 <span class="comment">                          */</span>
<a name="l00191"></a>00191                         <span class="keywordtype">void</span> setMinRange(<span class="keywordtype">float</span> v);
<a name="l00192"></a>00192 <span class="comment"></span>
<a name="l00193"></a>00193 <span class="comment">                        /** Changes the camera max range (z) (used for gluPerspective).</span>
<a name="l00194"></a>00194 <span class="comment">                          *  The window is not updated with this method, call &quot;forceRepaint&quot; to update the 3D view.</span>
<a name="l00195"></a>00195 <span class="comment">                          */</span>
<a name="l00196"></a>00196                         <span class="keywordtype">void</span> setMaxRange(<span class="keywordtype">float</span> v);
<a name="l00197"></a>00197 <span class="comment"></span>
<a name="l00198"></a>00198 <span class="comment">                        /** Changes the camera field of view (in degrees) (used for gluPerspective).</span>
<a name="l00199"></a>00199 <span class="comment">                          *  The window is not updated with this method, call &quot;forceRepaint&quot; to update the 3D view.</span>
<a name="l00200"></a>00200 <span class="comment">                          */</span>
<a name="l00201"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ac5ad9ed8cabf9bde9789ec361eec9460">00201</a>                         <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#ac5ad9ed8cabf9bde9789ec361eec9460" title="Changes the camera field of view (in degrees) (used for gluPerspective).">setFOV</a>(<span class="keywordtype">float</span> v)  { m_FOV=v; };
<a name="l00202"></a>00202 <span class="comment"></span>
<a name="l00203"></a>00203 <span class="comment">                        /** Resizes the window, stretching the image to fit into the display area.</span>
<a name="l00204"></a>00204 <span class="comment">                         */</span>
<a name="l00205"></a>00205                         <span class="keywordtype">void</span>  resize( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height );
<a name="l00206"></a>00206 <span class="comment"></span>
<a name="l00207"></a>00207 <span class="comment">                        /** Changes the position of the window on the screen.</span>
<a name="l00208"></a>00208 <span class="comment">                         */</span>
<a name="l00209"></a>00209                         <span class="keywordtype">void</span>  setPos( <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a> );
<a name="l00210"></a>00210 <span class="comment"></span>
<a name="l00211"></a>00211 <span class="comment">                        /** Changes the window title.</span>
<a name="l00212"></a>00212 <span class="comment">                          */</span>
<a name="l00213"></a>00213                         <span class="keywordtype">void</span>  setWindowTitle( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;str );
<a name="l00214"></a>00214 <span class="comment"></span>
<a name="l00215"></a>00215 <span class="comment">                        /** Changes the camera parameters programatically</span>
<a name="l00216"></a>00216 <span class="comment">                          */</span>
<a name="l00217"></a>00217                         <span class="keywordtype">void</span> setCameraElevationDeg( <span class="keywordtype">float</span> deg );
<a name="l00218"></a>00218 <span class="comment"></span>
<a name="l00219"></a>00219 <span class="comment">                        /** Changes the camera parameters programatically</span>
<a name="l00220"></a>00220 <span class="comment">                          */</span>
<a name="l00221"></a>00221                         <span class="keywordtype">void</span> setCameraAzimuthDeg( <span class="keywordtype">float</span> deg );
<a name="l00222"></a>00222 <span class="comment"></span>
<a name="l00223"></a>00223 <span class="comment">                        /** Changes the camera parameters programatically</span>
<a name="l00224"></a>00224 <span class="comment">                          */</span>
<a name="l00225"></a>00225                         <span class="keywordtype">void</span> setCameraPointingToPoint( <span class="keywordtype">float</span> x,<span class="keywordtype">float</span> <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>, <span class="keywordtype">float</span> z );
<a name="l00226"></a>00226 <span class="comment"></span>
<a name="l00227"></a>00227 <span class="comment">                        /** Changes the camera parameters programatically</span>
<a name="l00228"></a>00228 <span class="comment">                          */</span>
<a name="l00229"></a>00229                         <span class="keywordtype">void</span> setCameraZoom( <span class="keywordtype">float</span> zoom );
<a name="l00230"></a>00230 <span class="comment"></span>
<a name="l00231"></a>00231 <span class="comment">                        /** Sets the camera as projective, or orthogonal. */</span>
<a name="l00232"></a>00232                         <span class="keywordtype">void</span> setCameraProjective( <span class="keywordtype">bool</span> isProjective );
<a name="l00233"></a>00233 
<a name="l00234"></a>00234 <span class="comment"></span>
<a name="l00235"></a>00235 <span class="comment">                        /** Get camera parameters programatically */</span>
<a name="l00236"></a>00236                         <span class="keywordtype">float</span> getCameraElevationDeg() <span class="keyword">const</span>;
<a name="l00237"></a>00237 <span class="comment"></span>
<a name="l00238"></a>00238 <span class="comment">                        /** Get camera parameters programatically  */</span>
<a name="l00239"></a>00239                         <span class="keywordtype">float</span> getCameraAzimuthDeg() <span class="keyword">const</span>;
<a name="l00240"></a>00240 <span class="comment"></span>
<a name="l00241"></a>00241 <span class="comment">                        /** Get camera parameters programatically  */</span>
<a name="l00242"></a>00242                         <span class="keywordtype">void</span> getCameraPointingToPoint( <span class="keywordtype">float</span> &amp;x,<span class="keywordtype">float</span> &amp;<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>, <span class="keywordtype">float</span> &amp;z ) <span class="keyword">const</span>;
<a name="l00243"></a>00243 <span class="comment"></span>
<a name="l00244"></a>00244 <span class="comment">                        /** Get camera parameters programatically */</span>
<a name="l00245"></a>00245                         <span class="keywordtype">float</span> getCameraZoom() <span class="keyword">const</span>;
<a name="l00246"></a>00246 <span class="comment"></span>
<a name="l00247"></a>00247 <span class="comment">                        /** Sets the camera as projective, or orthogonal. */</span>
<a name="l00248"></a>00248                         <span class="keywordtype">bool</span> isCameraProjective() <span class="keyword">const</span>;
<a name="l00249"></a>00249 <span class="comment"></span>
<a name="l00250"></a>00250 <span class="comment">                        /**  If set to true (default = false), the mouse-based scene navigation will be disabled and the camera position will be determined by the opengl viewports in the 3D scene.</span>
<a name="l00251"></a>00251 <span class="comment">                          */</span>
<a name="l00252"></a>00252                         <span class="keywordtype">void</span> useCameraFromScene(<span class="keywordtype">bool</span> useIt = <span class="keyword">true</span>);
<a name="l00253"></a>00253 <span class="comment"></span>
<a name="l00254"></a>00254 <span class="comment">                        /** Gets the 3D ray for the direction line of the pixel where the mouse cursor is at. \return False if the window is closed. \sa getLastMousePosition */</span>
<a name="l00255"></a>00255                         <span class="keywordtype">bool</span> getLastMousePositionRay(<a class="code" href="structmrpt_1_1math_1_1_t_line3_d.html" title="3D line, represented by a base point and a director vector.">mrpt::math::TLine3D</a> &amp;ray) <span class="keyword">const</span>;
<a name="l00256"></a>00256 <span class="comment"></span>
<a name="l00257"></a>00257 <span class="comment">                        /** Gets the last x,y pixel coordinates of the mouse. \return False if the window is closed. \sa getLastMousePositionRay */</span>
<a name="l00258"></a>00258                         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getLastMousePosition(<span class="keywordtype">int</span> &amp;x, <span class="keywordtype">int</span> &amp;<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) <span class="keyword">const</span>;
<a name="l00259"></a>00259 <span class="comment"></span>
<a name="l00260"></a>00260 <span class="comment">                        /** Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true) \sa getLastMousePositionRay */</span>
<a name="l00261"></a>00261                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setCursorCross(<span class="keywordtype">bool</span> cursorIsCross);
<a name="l00262"></a>00262 <span class="comment"></span>
<a name="l00263"></a>00263 <span class="comment">                        /** Start to save rendered images to disk.</span>
<a name="l00264"></a>00264 <span class="comment">                          *  Images will be saved independently as png files, depending on</span>
<a name="l00265"></a>00265 <span class="comment">                          *   the template path passed to this method. For example:</span>
<a name="l00266"></a>00266 <span class="comment">                          *</span>
<a name="l00267"></a>00267 <span class="comment">                          *  path_prefix: &quot;./video_&quot;</span>
<a name="l00268"></a>00268 <span class="comment">                          *</span>
<a name="l00269"></a>00269 <span class="comment">                          *  Will generate &quot;./video_000001.png&quot;, etc.</span>
<a name="l00270"></a>00270 <span class="comment">                          *</span>
<a name="l00271"></a>00271 <span class="comment">                          *  If this feature is enabled, the window will emit events of the type mrpt::gui::mrptEvent3DWindowGrabImageFile() which you can subscribe to.</span>
<a name="l00272"></a>00272 <span class="comment">                          *</span>
<a name="l00273"></a>00273 <span class="comment">                          *  \sa grabImagesStop</span>
<a name="l00274"></a>00274 <span class="comment">                          */</span>
<a name="l00275"></a>00275                         <span class="keywordtype">void</span> grabImagesStart( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;grab_imgs_prefix = <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>(<span class="stringliteral">&quot;video_&quot;</span>) );
<a name="l00276"></a>00276 <span class="comment"></span>
<a name="l00277"></a>00277 <span class="comment">                        /** Stops image grabbing started by grabImagesStart</span>
<a name="l00278"></a>00278 <span class="comment">                          * \sa grabImagesStart</span>
<a name="l00279"></a>00279 <span class="comment">                          */</span>
<a name="l00280"></a>00280                         <span class="keywordtype">void</span> grabImagesStop();
<a name="l00281"></a>00281 <span class="comment"></span>
<a name="l00282"></a>00282 <span class="comment">                        /** Enables the grabbing of CImage objects from screenshots of the window.</span>
<a name="l00283"></a>00283 <span class="comment">                          *  \sa getLastWindowImage</span>
<a name="l00284"></a>00284 <span class="comment">                          */</span>
<a name="l00285"></a>00285                         <span class="keywordtype">void</span> captureImagesStart();
<a name="l00286"></a>00286 <span class="comment"></span>
<a name="l00287"></a>00287 <span class="comment">                        /** Stop image grabbing</span>
<a name="l00288"></a>00288 <span class="comment">                          * \sa captureImagesStart</span>
<a name="l00289"></a>00289 <span class="comment">                          */</span>
<a name="l00290"></a>00290                         <span class="keywordtype">void</span> captureImagesStop();
<a name="l00291"></a>00291 <span class="comment"></span>
<a name="l00292"></a>00292 <span class="comment">                        /** Retrieve the last captured image from the window.</span>
<a name="l00293"></a>00293 <span class="comment">                          *  You MUST CALL FIRST captureImagesStart to enable image grabbing.</span>
<a name="l00294"></a>00294 <span class="comment">                          * \sa captureImagesStart, getLastWindowImagePtr</span>
<a name="l00295"></a>00295 <span class="comment">                          */</span>
<a name="l00296"></a>00296                         <span class="keywordtype">void</span> getLastWindowImage( <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">mrpt::utils::CImage</a> &amp;out_img) <span class="keyword">const</span>;
<a name="l00297"></a>00297 <span class="comment"></span>
<a name="l00298"></a>00298 <span class="comment">                        /** Retrieve the last captured image from the window, as a smart pointer.</span>
<a name="l00299"></a>00299 <span class="comment">                          *  This method is more efficient than getLastWindowImage since only a copy of the pointer is performed, while</span>
<a name="l00300"></a>00300 <span class="comment">                          *   getLastWindowImage would copy the entire image.</span>
<a name="l00301"></a>00301 <span class="comment">                          *</span>
<a name="l00302"></a>00302 <span class="comment">                          *  You MUST CALL FIRST captureImagesStart to enable image grabbing.</span>
<a name="l00303"></a>00303 <span class="comment">                          * \sa captureImagesStart, getLastWindowImage</span>
<a name="l00304"></a>00304 <span class="comment">                          */</span>
<a name="l00305"></a>00305                         mrpt<a class="code" href="structmrpt_1_1utils_1_1_c_image_ptr.html">::utils::CImagePtr</a> getLastWindowImagePtr() <span class="keyword">const</span>;
<a name="l00306"></a>00306 <span class="comment"></span>
<a name="l00307"></a>00307 <span class="comment">                        /** Increments by one the image counter and return the next image file name (Users normally don&#39;t want to call this method).</span>
<a name="l00308"></a>00308 <span class="comment">                          * \sa grabImagesStart</span>
<a name="l00309"></a>00309 <span class="comment">                          */</span>
<a name="l00310"></a>00310                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> grabImageGetNextFile();
<a name="l00311"></a>00311 
<a name="l00312"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#abb152d83dceb9e581a7b870c3bd6d85f">00312</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#abb152d83dceb9e581a7b870c3bd6d85f">isCapturingImgs</a>()<span class="keyword"> const </span>{  <span class="keywordflow">return</span> m_is_capturing_imgs; }
<a name="l00313"></a>00313 
<a name="l00314"></a>00314 <span class="comment"></span>
<a name="l00315"></a>00315 <span class="comment">                        /** Add 2D text messages overlapped to the 3D rendered scene. The string will remain displayed in the 3D window</span>
<a name="l00316"></a>00316 <span class="comment">                          *   until it&#39;s changed with subsequent calls to this same method, or all the texts are cleared with clearTextMessages().</span>
<a name="l00317"></a>00317 <span class="comment">                          *</span>
<a name="l00318"></a>00318 <span class="comment">                          *  \param x The X position, interpreted as absolute pixels from the left if X&gt;=1, absolute pixels from the left if X&lt;0 or as a width factor if in the range [0,1[.</span>
<a name="l00319"></a>00319 <span class="comment">                          *  \param y The Y position, interpreted as absolute pixels from the bottom if Y&gt;=1, absolute pixels from the top if Y&lt;0 or as a height factor if in the range [0,1[.</span>
<a name="l00320"></a>00320 <span class="comment">                          *  \param text The text string to display.</span>
<a name="l00321"></a>00321 <span class="comment">                          *  \param color The text color. For example: TColorf(1.0,1.0,1.0)</span>
<a name="l00322"></a>00322 <span class="comment">                          *  \param unique_index An &quot;index&quot; for this text message, so that subsequent calls with the same index will overwrite this text message instead of creating new ones.</span>
<a name="l00323"></a>00323 <span class="comment">                          *</span>
<a name="l00324"></a>00324 <span class="comment">                          *  You&#39;ll need to refresh the display manually with forceRepaint().</span>
<a name="l00325"></a>00325 <span class="comment">                          *</span>
<a name="l00326"></a>00326 <span class="comment">                          * \sa clearTextMessages</span>
<a name="l00327"></a>00327 <span class="comment">                          */</span>
<a name="l00328"></a>00328                         <span class="keywordtype">void</span> addTextMessage(
<a name="l00329"></a>00329                                 <span class="keyword">const</span> <span class="keywordtype">double</span> x,
<a name="l00330"></a>00330                                 <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>,
<a name="l00331"></a>00331                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;text,
<a name="l00332"></a>00332                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_t_colorf.html" title="A RGB color - floats in the range [0,1].">mrpt::utils::TColorf</a> &amp;color = <a class="code" href="structmrpt_1_1utils_1_1_t_colorf.html" title="A RGB color - floats in the range [0,1].">mrpt::utils::TColorf</a>(1.0,1.0,1.0),
<a name="l00333"></a>00333                                 <span class="keyword">const</span> <span class="keywordtype">size_t</span> unique_index = 0,
<a name="l00334"></a>00334                                 <span class="keyword">const</span> <a class="code" href="group__mrpt__opengl__grp.html#ga4e54252970d0b0a6dd251335064a2346" title="Existing fonts for 2D texts in mrpt::opengl methods.">TOpenGLFont</a> font = <a class="code" href="group__mrpt__opengl__grp.html#gga4e54252970d0b0a6dd251335064a2346a31ebbbe2889bcca4760b90bba40385b8">MRPT_GLUT_BITMAP_TIMES_ROMAN_24</a>
<a name="l00335"></a>00335                                 );
<a name="l00336"></a>00336 <span class="comment"></span>
<a name="l00337"></a>00337 <span class="comment">                        /// \overload with more font parameters - refer to mrpt::opengl::gl_utils::glDrawText()</span>
<a name="l00338"></a>00338 <span class="comment"></span>                        <span class="keywordtype">void</span> addTextMessage(
<a name="l00339"></a>00339                                 <span class="keyword">const</span> <span class="keywordtype">double</span> x_frac,
<a name="l00340"></a>00340                                 <span class="keyword">const</span> <span class="keywordtype">double</span> y_frac,
<a name="l00341"></a>00341                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;text,
<a name="l00342"></a>00342                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_t_colorf.html" title="A RGB color - floats in the range [0,1].">mrpt::utils::TColorf</a> &amp;color,
<a name="l00343"></a>00343                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>  &amp;font_name,
<a name="l00344"></a>00344                                 <span class="keyword">const</span> <span class="keywordtype">double</span>  font_size,
<a name="l00345"></a>00345                                 <span class="keyword">const</span> <a class="code" href="namespacemrpt_1_1opengl.html#a2a3950732480ac3cffe2c391a45fb4ef" title="Different style for vectorized font rendering.">mrpt::opengl::TOpenGLFontStyle</a> font_style = <a class="code" href="namespacemrpt_1_1opengl.html#a2a3950732480ac3cffe2c391a45fb4efa60e199cb9a72174613c2b15a385bc6e0" title="renders glyphs filled with antialiased outlines">mrpt::opengl::NICE</a>,
<a name="l00346"></a>00346                                 <span class="keyword">const</span> <span class="keywordtype">size_t</span>  unique_index = 0,
<a name="l00347"></a>00347                                 <span class="keyword">const</span> <span class="keywordtype">double</span>  font_spacing = 1.5,
<a name="l00348"></a>00348                                 <span class="keyword">const</span> <span class="keywordtype">double</span>  font_kerning = 0.1
<a name="l00349"></a>00349                                 );
<a name="l00350"></a>00350 <span class="comment"></span>
<a name="l00351"></a>00351 <span class="comment">                        /**  Clear all text messages created with addTextMessage().</span>
<a name="l00352"></a>00352 <span class="comment">                          *  You&#39;ll need to refresh the display manually with forceRepaint().</span>
<a name="l00353"></a>00353 <span class="comment">                          * \sa addTextMessage</span>
<a name="l00354"></a>00354 <span class="comment">                          */</span>
<a name="l00355"></a>00355                         <span class="keywordtype">void</span> clearTextMessages();
<a name="l00356"></a>00356 <span class="comment"></span>
<a name="l00357"></a>00357 <span class="comment">                        /** Get the average Frames Per Second (FPS) value from the last 250 rendering events */</span>
<a name="l00358"></a><a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#afd69c044e6364fc3341dfa3abd3930b5">00358</a>                         <span class="keywordtype">double</span> <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html#afd69c044e6364fc3341dfa3abd3930b5" title="Get the average Frames Per Second (FPS) value from the last 250 rendering events.">getRenderingFPS</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_last_FPS; }
<a name="l00359"></a>00359 
<a name="l00360"></a>00360                 <span class="keyword">protected</span>:
<a name="l00361"></a>00361                         <span class="keywordtype">void</span> internal_setRenderingFPS(<span class="keywordtype">double</span> FPS);  <span class="comment">//!&lt; Set the rendering FPS (users don&#39;t call this, the method is for internal MRPT objects only) \sa getRenderingFPS</span>
<a name="l00362"></a>00362 <span class="comment"></span>                        <span class="keywordtype">void</span> internal_emitGrabImageEvent(<span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;fil); <span class="comment">//!&lt; called by CMyGLCanvas_DisplayWindow3D::OnPostRenderSwapBuffers</span>
<a name="l00363"></a>00363 <span class="comment"></span>
<a name="l00364"></a>00364                 }; <span class="comment">// End of class def.</span>
<a name="l00365"></a>00365 
<a name="l00366"></a>00366 <span class="comment"></span>
<a name="l00367"></a>00367 <span class="comment">                /** @name Events specific to CDisplayWindow3D</span>
<a name="l00368"></a>00368 <span class="comment">                        @{  */</span>
<a name="l00369"></a>00369 <span class="comment"></span>
<a name="l00370"></a>00370 <span class="comment">                /**  An event sent by a CDisplayWindow3D window when an image is saved after enabling this feature with CDisplayWindow3D::grabImagesStart()</span>
<a name="l00371"></a>00371 <span class="comment">                  *</span>
<a name="l00372"></a>00372 <span class="comment">                  *  IMPORTANTE NOTICE: Event handlers in your observer class will be invoked from the wxWidgets internal MRPT thread,</span>
<a name="l00373"></a>00373 <span class="comment">                  *    so all your code in the handler must be thread safe.</span>
<a name="l00374"></a>00374 <span class="comment">                  */</span>
<a name="l00375"></a>00375                 <span class="keyword">class </span><a class="code" href="gui_2include_2mrpt_2gui_2link__pragmas_8h.html#a69a861d20c11137851da0fe69a66d7b6">GUI_IMPEXP</a> mrptEvent3DWindowGrabImageFile : <span class="keyword">public</span> <a class="code" href="classmrpt_1_1utils_1_1mrpt_event.html" title="The basic event type for the observer-observable pattern in MRPT.">mrptEvent</a>
<a name="l00376"></a>00376                 {
<a name="l00377"></a>00377                 <span class="keyword">protected</span>:
<a name="l00378"></a><a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#aae9f0c9c79a47664165f927c9b0f7b7a">00378</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#aae9f0c9c79a47664165f927c9b0f7b7a" title="Just to allow this class to be polymorphic.">do_nothing</a>() { } <span class="comment">//!&lt; Just to allow this class to be polymorphic</span>
<a name="l00379"></a>00379 <span class="comment"></span>                <span class="keyword">public</span>:
<a name="l00380"></a><a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#a9e8469e7f5f6010ce1986ffc3a92faea">00380</a>                         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html" title="An event sent by a CDisplayWindow3D window when an image is saved after enabling this feature with CD...">mrptEvent3DWindowGrabImageFile</a>(
<a name="l00381"></a>00381                                 <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a> *obj,
<a name="l00382"></a>00382                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;_img_file
<a name="l00383"></a>00383                                 ) : source_object(obj), img_file(_img_file) { }
<a name="l00384"></a>00384 
<a name="l00385"></a><a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#a27f2516ee67ecb1461aa8f0fe45603df">00385</a>                         <a class="code" href="classmrpt_1_1gui_1_1_c_display_window3_d.html" title="A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.">CDisplayWindow3D</a>  *<a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#a27f2516ee67ecb1461aa8f0fe45603df">source_object</a>;
<a name="l00386"></a><a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#a48ad56490f47a2ffa8f5fcebdbcc20af">00386</a>                         <span class="keyword">const</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> &amp;<a class="code" href="classmrpt_1_1gui_1_1mrpt_event3_d_window_grab_image_file.html#a48ad56490f47a2ffa8f5fcebdbcc20af" title="The absolute path of the file that has been just saved.">img_file</a>;    <span class="comment">//!&lt; The absolute path of the file that has been just saved.</span>
<a name="l00387"></a>00387 <span class="comment"></span>                }; <span class="comment">// End of class def.</span>
<a name="l00388"></a>00388 <span class="comment"></span>
<a name="l00389"></a>00389 <span class="comment">                /** @} */</span>
<a name="l00390"></a>00390 
<a name="l00391"></a>00391 
<a name="l00392"></a>00392         } <span class="comment">// End of namespace</span>
<a name="l00393"></a>00393 } <span class="comment">// End of namespace</span>
<a name="l00394"></a>00394 
<a name="l00395"></a>00395 <span class="preprocessor">#endif</span>
</pre></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>