Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 807a538c0f4abf81467b8a86879881d9 > files > 718

OpenSceneGraph-devel-2.8.4-2.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenSceneGraph: osgUtil::CubeMapGenerator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenSceneGraph&#160;<span id="projectnumber">2.8.4</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <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="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><a href="dirs.html"><span>Directories</span></a></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="a01640.html">osgUtil</a>      </li>
      <li class="navelem"><a class="el" href="a00176.html">CubeMapGenerator</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-static-methods">Static Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">osgUtil::CubeMapGenerator Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="osgUtil::CubeMapGenerator" --><!-- doxytag: inherits="osg::Referenced" -->
<p>This is the base class for cube map generators.  
 <a href="a00176.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for osgUtil::CubeMapGenerator:</div>
<div class="dyncontent">
<div class="center"><img src="a03331.png" border="0" usemap="#osgUtil_1_1CubeMapGenerator_inherit__map" alt="Inheritance graph"/></div>
<map name="osgUtil_1_1CubeMapGenerator_inherit__map" id="osgUtil_1_1CubeMapGenerator_inherit__map">
<area shape="rect" id="node5" href="a00343.html" title="This cube map generator produces an Half&#45;way vector map, useful for hardware&#45;based specular lighting ..." alt="" coords="457,5,684,35"/><area shape="rect" id="node7" href="a00349.html" title="This cube map generator produces a specular highlight map." alt="" coords="455,59,687,88"/><area shape="rect" id="node9" href="a00630.html" title="This is the most simple cube map generator." alt="" coords="449,112,692,141"/><area shape="rect" id="node2" href="a00627.html" title="Base class from providing referencing counted objects." alt="" coords="7,59,140,88"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a03332.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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a0a796360a1b3d75ae6ef8d3003ddf730">CubeMapGenerator</a> (int texture_size=64)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a6439720d26f2197da9e3ae0db7061149">CubeMapGenerator</a> (const <a class="el" href="a00176.html">CubeMapGenerator</a> &amp;copy, const <a class="el" href="a00169.html">osg::CopyOp</a> &amp;copyop=osg::CopyOp::SHALLOW_COPY)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00353.html">osg::Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a55c4efaf781c59e5d893274d9f596921">getImage</a> (<a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5">osg::TextureCubeMap::Face</a> face)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00353.html">osg::Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a9b1e1e1ad711c31cd43acd0ccc717b38">getImage</a> (<a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5">osg::TextureCubeMap::Face</a> face) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#aaf388ae63679f81cad4fd28216823de0">generateMap</a> (bool use_osg_system=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate the six cube images.  <a href="#aaf388ae63679f81cad4fd28216823de0"></a><br/></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">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#ad1d5053ab49527e0a8068c5ecca4e668">~CubeMapGenerator</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00176.html">CubeMapGenerator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a3cb59670ce82ff8f252255f08240d839">operator=</a> (const <a class="el" href="a00176.html">CubeMapGenerator</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#ad2217251f279082251119f1028d570de">set_pixel</a> (int index, int c, int r, const <a class="el" href="a01074.html">osg::Vec4</a> &amp;color)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a01074.html">osg::Vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#acb56125b5342ef0984cb8be8d3ce8f79">compute_color</a> (const <a class="el" href="a01069.html">osg::Vec3</a> &amp;R) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Override this method to define how colors are computed.  <a href="#acb56125b5342ef0984cb8be8d3ce8f79"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a01074.html">osg::Vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#ae05e9d3a7d0439df27b59575777a7b4b">vector_to_color</a> (const <a class="el" href="a01069.html">osg::Vec3</a> &amp;vec)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This is the base class for cube map generators. </p>
<p>It exposes the necessary interface to access the six generated images; descendants should only override the <a class="el" href="a00176.html#acb56125b5342ef0984cb8be8d3ce8f79" title="Override this method to define how colors are computed.">compute_color()</a> method. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0a796360a1b3d75ae6ef8d3003ddf730"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::CubeMapGenerator" ref="a0a796360a1b3d75ae6ef8d3003ddf730" args="(int texture_size=64)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osgUtil::CubeMapGenerator::CubeMapGenerator </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>texture_size</em> = <code>64</code></td><td>)</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a6439720d26f2197da9e3ae0db7061149"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::CubeMapGenerator" ref="a6439720d26f2197da9e3ae0db7061149" args="(const CubeMapGenerator &amp;copy, const osg::CopyOp &amp;copyop=osg::CopyOp::SHALLOW_COPY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osgUtil::CubeMapGenerator::CubeMapGenerator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00176.html">CubeMapGenerator</a> &amp;&#160;</td>
          <td class="paramname"><em>copy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00169.html">osg::CopyOp</a> &amp;&#160;</td>
          <td class="paramname"><em>copyop</em> = <code>osg::CopyOp::SHALLOW_COPY</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad1d5053ab49527e0a8068c5ecca4e668"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::~CubeMapGenerator" ref="ad1d5053ab49527e0a8068c5ecca4e668" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual osgUtil::CubeMapGenerator::~CubeMapGenerator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acb56125b5342ef0984cb8be8d3ce8f79"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::compute_color" ref="acb56125b5342ef0984cb8be8d3ce8f79" args="(const osg::Vec3 &amp;R) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a01074.html">osg::Vec4</a> osgUtil::CubeMapGenerator::compute_color </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a01069.html">osg::Vec3</a> &amp;&#160;</td>
          <td class="paramname"><em>R</em></td><td>)</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Override this method to define how colors are computed. </p>
<p>The parameter R is the reflection vector, pointing from the center of the cube. The return value should be the RGBA color associated with that reflection ray. </p>

<p>Implemented in <a class="el" href="a00343.html#ae351515975517c49200f300572f5ff5c">osgUtil::HalfWayMapGenerator</a>, <a class="el" href="a00349.html#af8023cd833865fdba54bc487b2cc979a">osgUtil::HighlightMapGenerator</a>, and <a class="el" href="a00630.html#a96aabaded807f6d6457590af85b56bab">osgUtil::ReflectionMapGenerator</a>.</p>

</div>
</div>
<a class="anchor" id="aaf388ae63679f81cad4fd28216823de0"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::generateMap" ref="aaf388ae63679f81cad4fd28216823de0" args="(bool use_osg_system=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgUtil::CubeMapGenerator::generateMap </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>use_osg_system</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generate the six cube images. </p>
<p>If use_osg_system is true, then the OSG's coordinate system is used instead of the default OpenGL one. </p>

</div>
</div>
<a class="anchor" id="a9b1e1e1ad711c31cd43acd0ccc717b38"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::getImage" ref="a9b1e1e1ad711c31cd43acd0ccc717b38" args="(osg::TextureCubeMap::Face face) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00353.html">osg::Image</a> * osgUtil::CubeMapGenerator::getImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5">osg::TextureCubeMap::Face</a>&#160;</td>
          <td class="paramname"><em>face</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a6e1bb220be33f3ce9b19e8bc929b4026">osg::TextureCubeMap::NEGATIVE_X</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a51aa7ef36df00b6db6f057c81fa9caf9">osg::TextureCubeMap::NEGATIVE_Y</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5aef2db9b3c2fd911b8e628817a70972e9">osg::TextureCubeMap::NEGATIVE_Z</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a4e1c387a19590648e232849596d9a022">osg::TextureCubeMap::POSITIVE_X</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a6a99345f4a21515208424624a89260ed">osg::TextureCubeMap::POSITIVE_Y</a>, and <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5ac560e5a8715cb8b066cf574758951951">osg::TextureCubeMap::POSITIVE_Z</a>.</p>

</div>
</div>
<a class="anchor" id="a55c4efaf781c59e5d893274d9f596921"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::getImage" ref="a55c4efaf781c59e5d893274d9f596921" args="(osg::TextureCubeMap::Face face)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00353.html">osg::Image</a> * osgUtil::CubeMapGenerator::getImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5">osg::TextureCubeMap::Face</a>&#160;</td>
          <td class="paramname"><em>face</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a6e1bb220be33f3ce9b19e8bc929b4026">osg::TextureCubeMap::NEGATIVE_X</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a51aa7ef36df00b6db6f057c81fa9caf9">osg::TextureCubeMap::NEGATIVE_Y</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5aef2db9b3c2fd911b8e628817a70972e9">osg::TextureCubeMap::NEGATIVE_Z</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a4e1c387a19590648e232849596d9a022">osg::TextureCubeMap::POSITIVE_X</a>, <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5a6a99345f4a21515208424624a89260ed">osg::TextureCubeMap::POSITIVE_Y</a>, and <a class="el" href="a00903.html#adc2983772bc9ecbeeec04870b13198c5ac560e5a8715cb8b066cf574758951951">osg::TextureCubeMap::POSITIVE_Z</a>.</p>

</div>
</div>
<a class="anchor" id="a3cb59670ce82ff8f252255f08240d839"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::operator=" ref="a3cb59670ce82ff8f252255f08240d839" args="(const CubeMapGenerator &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00176.html">CubeMapGenerator</a>&amp; osgUtil::CubeMapGenerator::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00176.html">CubeMapGenerator</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad2217251f279082251119f1028d570de"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::set_pixel" ref="ad2217251f279082251119f1028d570de" args="(int index, int c, int r, const osg::Vec4 &amp;color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgUtil::CubeMapGenerator::set_pixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a01074.html">osg::Vec4</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="a01628.html#af4436eae8b1fec7ea0da00e1869c3290">osg::clampBetween()</a>, <a class="el" href="a00353.html#a8bef977725cdff25fc0304df301cbfd1">osg::Image::data()</a>, <a class="el" href="a01628.html#a9d7b8fb9d25855a45e4507f8449ab596">osg::notify()</a>, <a class="el" href="a01074.html#aa5164a2160d8bdecf8a5ecaa050198c9">osg::Vec4f::w()</a>, <a class="el" href="a01628.html#a32e50146c0f96ef6dc821cbc3c0e41d3a1bc96fe6de8f81f8dfdd779e2b8f2c08">osg::WARN</a>, <a class="el" href="a01074.html#a333880c5e31aa9fe412981580c274f9d">osg::Vec4f::x()</a>, <a class="el" href="a01074.html#afd00ee85b990ee64fe48496540f6913e">osg::Vec4f::y()</a>, and <a class="el" href="a01074.html#a693389c793f293a09a7330457507a6a6">osg::Vec4f::z()</a>.</p>

</div>
</div>
<a class="anchor" id="ae05e9d3a7d0439df27b59575777a7b4b"></a><!-- doxytag: member="osgUtil::CubeMapGenerator::vector_to_color" ref="ae05e9d3a7d0439df27b59575777a7b4b" args="(const osg::Vec3 &amp;vec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a01074.html">osg::Vec4</a> osgUtil::CubeMapGenerator::vector_to_color </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a01069.html">osg::Vec3</a> &amp;&#160;</td>
          <td class="paramname"><em>vec</em></td><td>)</td>
          <td><code> [inline, static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>References <a class="el" href="a01069.html#a875996d2b29bbe3f0577aafb5b990698">osg::Vec3f::length()</a>, <a class="el" href="a01069.html#ada7f7e4e4bd49548810f44ab65467922">osg::Vec3f::x()</a>, <a class="el" href="a01069.html#ac47d54fae36f0b3f7e42e7511724a763">osg::Vec3f::y()</a>, and <a class="el" href="a01069.html#acd32305f069ee7825014659ab07ab912">osg::Vec3f::z()</a>.</p>

<p>Referenced by <a class="el" href="a00630.html#a96aabaded807f6d6457590af85b56bab">osgUtil::ReflectionMapGenerator::compute_color()</a>, and <a class="el" href="a00343.html#ae351515975517c49200f300572f5ff5c">osgUtil::HalfWayMapGenerator::compute_color()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>osgUtil/<a class="el" href="a01551.html">CubeMapGenerator</a></li>
</ul>
</div>
<hr>
<table border="0"><tr><td>
  <img src="osg32-32.png" alt="osg logo" />
</td><td>
  <address><small>Generated at Tue May 31 2011 04:19:37 for the <a href="http://www.openscenegraph.org/">OpenSceneGraph</a>
by <a href="http://www.doxygen.org">doxygen</a> 1.7.4.</small></address>
<!-- Dimitri van Heesch's e-mail address removed, lest he get messages on the OpenSceneGraph -->
</td></tr></table>
</body>
</html>