Sophie

Sophie

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

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::opengl::CTextMessageCapable 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_1opengl.html">opengl</a>      </li>
      <li class="navelem"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html">CTextMessageCapable</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">mrpt::opengl::CTextMessageCapable Class Reference<div class="ingroups"><a class="el" href="group__mrpt__opengl__grp.html">[mrpt-opengl]</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="mrpt::opengl::CTextMessageCapable" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Keeps a list of text messages which can be rendered to OpenGL contexts by graphic classes. </p>
</div>
<p><code>#include &lt;<a class="el" href="_c_text_message_capable_8h_source.html">mrpt/opengl/CTextMessageCapable.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mrpt::opengl::CTextMessageCapable:</div>
<div class="dyncontent">
<div class="center"><img src="classmrpt_1_1opengl_1_1_c_text_message_capable__inherit__graph.png" border="0" usemap="#mrpt_1_1opengl_1_1_c_text_message_capable_inherit__map" alt="Inheritance graph"/></div>
<map name="mrpt_1_1opengl_1_1_c_text_message_capable_inherit__map" id="mrpt_1_1opengl_1_1_c_text_message_capable_inherit__map">
<area shape="rect" id="node3" href="classmrpt_1_1opengl_1_1_c_f_b_o_render.html" title="A class for rendering 3D scenes off&#45;screen directly into an image using OpenGL extensions (glext)..." alt="" coords="33,80,215,107"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classmrpt_1_1opengl_1_1_c_text_message_capable-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">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#ad91d918a625c369ac43e9cdaa7403ae3">clearTextMessages</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#a37c9a433e1c8b9a10ab05691452ce4a9">addTextMessage</a> (const double x_frac, const double y_frac, const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;text, const <a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;color=<a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a>(1.0, 1.0, 1.0), const size_t unique_index=0, const <a class="el" href="group__mrpt__opengl__grp.html#ga4e54252970d0b0a6dd251335064a2346">mrpt::opengl::TOpenGLFont</a> font=mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_24)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add 2D text messages overlapped to the 3D rendered scene.  <a href="#a37c9a433e1c8b9a10ab05691452ce4a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#a6fd5a543552276952436bed91a792b2c">addTextMessage</a> (const double x_frac, const double y_frac, const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;text, const <a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;color, const <a class="el" href="classstd_1_1string.html">std::string</a> &amp;font_name, const double font_size, const <a class="el" href="namespacemrpt_1_1opengl.html#a2a3950732480ac3cffe2c391a45fb4ef">mrpt::opengl::TOpenGLFontStyle</a> font_style=mrpt::opengl::NICE, const size_t unique_index=0, const double font_spacing=1.5, const double font_kerning=0.1)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#a51ec6dda0394fa178d7841b2565f72b5">render_text_messages</a> (const int w, const int h) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Renders the messages to the current opengl rendering context (to be called OUT of MRPT <a class="el" href="namespacemrpt_1_1opengl.html" title="The namespace for 3D scene representation and rendering.">mrpt::opengl</a> render() methods ).  <a href="#a51ec6dda0394fa178d7841b2565f72b5"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1map.html">std::map</a>&lt; size_t, <br class="typebreak"/>
<a class="el" href="structmrpt_1_1opengl_1_1_t2_d_text_data.html">mrpt::opengl::T2DTextData</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#a47b89e812282c91a4fc0b8d1e08d16fd">m_2D_texts</a></td></tr>
</table>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a37c9a433e1c8b9a10ab05691452ce4a9"></a><!-- doxytag: member="mrpt::opengl::CTextMessageCapable::addTextMessage" ref="a37c9a433e1c8b9a10ab05691452ce4a9" args="(const double x_frac, const double y_frac, const std::string &amp;text, const mrpt::utils::TColorf &amp;color=mrpt::utils::TColorf(1.0, 1.0, 1.0), const size_t unique_index=0, const mrpt::opengl::TOpenGLFont font=mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_24)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::opengl::CTextMessageCapable::addTextMessage </td>
          <td>(</td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>x_frac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>y_frac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em> = <code><a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a>(1.0,&#160;1.0,&#160;1.0)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>unique_index</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__mrpt__opengl__grp.html#ga4e54252970d0b0a6dd251335064a2346">mrpt::opengl::TOpenGLFont</a>&#160;</td>
          <td class="paramname"><em>font</em> = <code>mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_24</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add 2D text messages overlapped to the 3D rendered scene. </p>
<p>The string will remain displayed in the 3D window until it's changed with subsequent calls to this same method, or all the texts are cleared with <a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#ad91d918a625c369ac43e9cdaa7403ae3">clearTextMessages()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>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[. </td></tr>
    <tr><td class="paramname">y</td><td>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[. </td></tr>
    <tr><td class="paramname">text</td><td>The text string to display. </td></tr>
    <tr><td class="paramname">color</td><td>The text color. For example: TColorf(1.0,1.0,1.0) </td></tr>
    <tr><td class="paramname">unique_index</td><td>An "index" for this text message, so that subsequent calls with the same index will overwrite this text message instead of creating new ones.</td></tr>
  </table>
  </dd>
</dl>
<p>You'll need to refresh the display manually with forceRepaint().</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#ad91d918a625c369ac43e9cdaa7403ae3">clearTextMessages</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6fd5a543552276952436bed91a792b2c"></a><!-- doxytag: member="mrpt::opengl::CTextMessageCapable::addTextMessage" ref="a6fd5a543552276952436bed91a792b2c" args="(const double x_frac, const double y_frac, const std::string &amp;text, const mrpt::utils::TColorf &amp;color, const std::string &amp;font_name, const double font_size, const mrpt::opengl::TOpenGLFontStyle font_style=mrpt::opengl::NICE, const size_t unique_index=0, const double font_spacing=1.5, const double font_kerning=0.1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::opengl::CTextMessageCapable::addTextMessage </td>
          <td>(</td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>x_frac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>y_frac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1utils_1_1_t_colorf.html">mrpt::utils::TColorf</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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>font_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>font_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacemrpt_1_1opengl.html#a2a3950732480ac3cffe2c391a45fb4ef">mrpt::opengl::TOpenGLFontStyle</a>&#160;</td>
          <td class="paramname"><em>font_style</em> = <code>mrpt::opengl::NICE</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>unique_index</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>font_spacing</em> = <code>1.5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>font_kerning</em> = <code>0.1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a class="anchor" id="ad91d918a625c369ac43e9cdaa7403ae3"></a><!-- doxytag: member="mrpt::opengl::CTextMessageCapable::clearTextMessages" ref="ad91d918a625c369ac43e9cdaa7403ae3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::opengl::CTextMessageCapable::clearTextMessages </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a51ec6dda0394fa178d7841b2565f72b5"></a><!-- doxytag: member="mrpt::opengl::CTextMessageCapable::render_text_messages" ref="a51ec6dda0394fa178d7841b2565f72b5" args="(const int w, const int h) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::opengl::CTextMessageCapable::render_text_messages </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Renders the messages to the current opengl rendering context (to be called OUT of MRPT <a class="el" href="namespacemrpt_1_1opengl.html" title="The namespace for 3D scene representation and rendering.">mrpt::opengl</a> render() methods ). </p>
<p>(w,h) are the dimensions of the rendering area in pixels. </p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a47b89e812282c91a4fc0b8d1e08d16fd"></a><!-- doxytag: member="mrpt::opengl::CTextMessageCapable::m_2D_texts" ref="a47b89e812282c91a4fc0b8d1e08d16fd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classstd_1_1map.html">std::map</a>&lt;size_t,<a class="el" href="structmrpt_1_1opengl_1_1_t2_d_text_data.html">mrpt::opengl::T2DTextData</a>&gt; <a class="el" href="classmrpt_1_1opengl_1_1_c_text_message_capable.html#a47b89e812282c91a4fc0b8d1e08d16fd">mrpt::opengl::CTextMessageCapable::m_2D_texts</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_text_message_capable_8h_source.html#l00045">45</a> of file <a class="el" href="_c_text_message_capable_8h_source.html">CTextMessageCapable.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>