Sophie

Sophie

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

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: osgFX::BumpMapping 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="a01631.html">osgFX</a>      </li>
      <li class="navelem"><a class="el" href="a00081.html">BumpMapping</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>  </div>
  <div class="headertitle">
<div class="title">osgFX::BumpMapping Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="osgFX::BumpMapping" --><!-- doxytag: inherits="osgFX::Effect" -->
<p>This effect makes surfaces appear bumpy.  
 <a href="a00081.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for osgFX::BumpMapping:</div>
<div class="dyncontent">
<div class="center"><img src="a02417.png" border="0" usemap="#osgFX_1_1BumpMapping_inherit__map" alt="Inheritance graph"/></div>
<map name="osgFX_1_1BumpMapping_inherit__map" id="osgFX_1_1BumpMapping_inherit__map">
<area shape="rect" id="node2" href="a00240.html" title="The base class for special effects." alt="" coords="31,315,145,344"/><area shape="rect" id="node4" href="a00338.html" title="General group node which maintains a list of children." alt="" coords="41,237,135,267"/><area shape="rect" id="node6" href="a00491.html" title="Base class for all internal nodes in the scene graph." alt="" coords="43,160,133,189"/><area shape="rect" id="node8" href="a00500.html" title="Base class/standard interface for objects which require IO support, cloning and reference counting..." alt="" coords="37,83,139,112"/><area shape="rect" id="node10" href="a00627.html" title="Base class from providing referencing counted objects." alt="" coords="21,5,155,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a02418.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="a00081.html#a48ce45a880027f5d819273288977a3c0">BumpMapping</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a09d005f806b8d31336dc1ef906d94a8d">BumpMapping</a> (const <a class="el" href="a00081.html">BumpMapping</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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#af58d9c2f241a4f817fc339dc976557bd">META_Effect</a> (osgFX, <a class="el" href="a00081.html">BumpMapping</a>,&quot;Bump Mapping&quot;,&quot;This effect makes surfaces appear bumpy. Children nodes must use two textures, &quot;&quot;one for diffuse color and one for the normal map (which can be created &quot;&quot;from a height map with tools like nVIDIA's normal map generator). Furthermore, &quot;&quot;tangent-space basis vectors must be created and assigned to each Geometry; this &quot;&quot;can be done quickly by calling BumpMapping::prepareChildren(). Note that both &quot;&quot;diffuse and normal map textures must have corresponding UV maps defined in &quot;&quot;Geometry objects.\n&quot;&quot;This effect defines a preferred technique which uses ARB vertex &amp; fragment &quot;&quot;programs, and a fallback technique which doesn't use fragment programs. The &quot;&quot;latter is more limited though since it can't handle ambient and specular &quot;&quot;components.&quot;,&quot;Marco Jez&quot;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a09330a2b78cce7f30396aebc50ee17c1">getLightNumber</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the OpenGL light number  <a href="#a09330a2b78cce7f30396aebc50ee17c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a3026e41f3ad7959b2635f5f26164dd77">setLightNumber</a> (int n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set the OpenGL light number that will be used in lighting computations  <a href="#a3026e41f3ad7959b2635f5f26164dd77"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a6c40a401cb6b6725e2acba180027aeb6">getDiffuseTextureUnit</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the texture unit that contains diffuse color texture.  <a href="#a6c40a401cb6b6725e2acba180027aeb6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a07a235d0f9f13111e56ac353ae7d06d7">setDiffuseTextureUnit</a> (int n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set the texture unit that contains diffuse color texture.  <a href="#a07a235d0f9f13111e56ac353ae7d06d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ab326bfb3769d5bd82faa9b4e3d0c2358">getNormalMapTextureUnit</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the texture unit that contains normal map texture.  <a href="#ab326bfb3769d5bd82faa9b4e3d0c2358"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ae442c44ab3ab93067f0854e2197980b2">setNormalMapTextureUnit</a> (int n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set the texture unit that contains normal map texture.  <a href="#ae442c44ab3ab93067f0854e2197980b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a738fb0b14801c36c27287c6874323ebb">getOverrideDiffuseTexture</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the diffuse color texture that overrides children's texture  <a href="#a738fb0b14801c36c27287c6874323ebb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a169ac7f217e83a71bb208e30cbcdf8f7">getOverrideDiffuseTexture</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the const diffuse color texture that overrides children's texture  <a href="#a169ac7f217e83a71bb208e30cbcdf8f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#aaff2a4d884f84a13b2f6a8fb1eaab8c5">setOverrideDiffuseTexture</a> (<a class="el" href="a00898.html">osg::Texture2D</a> *texture)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set the diffuse color texture that overrides children's texture  <a href="#aaff2a4d884f84a13b2f6a8fb1eaab8c5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a66fa1c0d6d53b2712bb7685eea55c164">getOverrideNormalMapTexture</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the normal map texture that overrides children's texture  <a href="#a66fa1c0d6d53b2712bb7685eea55c164"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a898836ed25dd1b1fdd276887df475261">getOverrideNormalMapTexture</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the const normal map texture that overrides children's texture  <a href="#a898836ed25dd1b1fdd276887df475261"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a720fd654f765566d90d75503e2f39e9a">setOverrideNormalMapTexture</a> (<a class="el" href="a00898.html">osg::Texture2D</a> *texture)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set the normal map texture that overrides children's texture  <a href="#a720fd654f765566d90d75503e2f39e9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#af47610a04a2ac368620adcaa9134db03">prepareGeometry</a> (<a class="el" href="a00313.html">osg::Geometry</a> *geo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prepare a Geometry for bump lighting.  <a href="#af47610a04a2ac368620adcaa9134db03"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#aed375110ccc767e60b2148f3981f77c8">prepareNode</a> (<a class="el" href="a00491.html">osg::Node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prepare a Node for bump lighting, calling <a class="el" href="a00081.html#af47610a04a2ac368620adcaa9134db03" title="prepare a Geometry for bump lighting.">prepareGeometry()</a> for each Geometry  <a href="#aed375110ccc767e60b2148f3981f77c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a7005aaac99fd1feaabb5c7a336978e9e">prepareChildren</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prepare children for bump lighting.  <a href="#a7005aaac99fd1feaabb5c7a336978e9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a87aa18a0807c359d0298a3c6ff6f74c7">setUpDemo</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates  <a href="#a87aa18a0807c359d0298a3c6ff6f74c7"></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="a00081.html#ac2a40b79a4c632b4c7ccf5b76c15fac4">~BumpMapping</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00081.html">BumpMapping</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#a14770dbc6ed7535aa68d17b091d684e3">operator=</a> (const <a class="el" href="a00081.html">BumpMapping</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#adb61a15fa1a96248a8c924eb79244ce4">define_techniques</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect.  <a href="#adb61a15fa1a96248a8c924eb79244ce4"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This effect makes surfaces appear bumpy. </p>
<p>Children nodes must use two textures, one for diffuse color and one for the normal map (which can be created from a height map with tools like nVIDIA's normal map generator). Furthermore, tangent-space basis vectors must be created and assigned to each Geometry; this can be done quickly by calling <a class="el" href="a00081.html#a7005aaac99fd1feaabb5c7a336978e9e" title="prepare children for bump lighting.">BumpMapping::prepareChildren()</a>. Note that both diffuse and normal map textures must have corresponding UV maps defined in Geometry objects. This effect defines a preferred technique which uses ARB vertex &amp; fragment programs, and a fallback technique which doesn't use fragment programs. The latter is more limited though since it can't handle ambient and specular components. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a48ce45a880027f5d819273288977a3c0"></a><!-- doxytag: member="osgFX::BumpMapping::BumpMapping" ref="a48ce45a880027f5d819273288977a3c0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osgFX::BumpMapping::BumpMapping </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a09d005f806b8d31336dc1ef906d94a8d"></a><!-- doxytag: member="osgFX::BumpMapping::BumpMapping" ref="a09d005f806b8d31336dc1ef906d94a8d" args="(const BumpMapping &amp;copy, const osg::CopyOp &amp;copyop=osg::CopyOp::SHALLOW_COPY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osgFX::BumpMapping::BumpMapping </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00081.html">BumpMapping</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="ac2a40b79a4c632b4c7ccf5b76c15fac4"></a><!-- doxytag: member="osgFX::BumpMapping::~BumpMapping" ref="ac2a40b79a4c632b4c7ccf5b76c15fac4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual osgFX::BumpMapping::~BumpMapping </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="adb61a15fa1a96248a8c924eb79244ce4"></a><!-- doxytag: member="osgFX::BumpMapping::define_techniques" ref="adb61a15fa1a96248a8c924eb79244ce4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool osgFX::BumpMapping::define_techniques </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect. </p>
<p>You will usually call <a class="el" href="a00240.html#acc6ad2b71579a412c7832196e893fffa" title="add a technique to the Effect">addTechnique()</a> inside this method. </p>

<p>Implements <a class="el" href="a00240.html#a76b13241e1beacb906050721a4eeeb21">osgFX::Effect</a>.</p>

</div>
</div>
<a class="anchor" id="a6c40a401cb6b6725e2acba180027aeb6"></a><!-- doxytag: member="osgFX::BumpMapping::getDiffuseTextureUnit" ref="a6c40a401cb6b6725e2acba180027aeb6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int osgFX::BumpMapping::getDiffuseTextureUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the texture unit that contains diffuse color texture. </p>
<p>Default is 1 </p>

</div>
</div>
<a class="anchor" id="a09330a2b78cce7f30396aebc50ee17c1"></a><!-- doxytag: member="osgFX::BumpMapping::getLightNumber" ref="a09330a2b78cce7f30396aebc50ee17c1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int osgFX::BumpMapping::getLightNumber </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the OpenGL light number </p>

</div>
</div>
<a class="anchor" id="ab326bfb3769d5bd82faa9b4e3d0c2358"></a><!-- doxytag: member="osgFX::BumpMapping::getNormalMapTextureUnit" ref="ab326bfb3769d5bd82faa9b4e3d0c2358" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int osgFX::BumpMapping::getNormalMapTextureUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the texture unit that contains normal map texture. </p>
<p>Default is 0 </p>

</div>
</div>
<a class="anchor" id="a169ac7f217e83a71bb208e30cbcdf8f7"></a><!-- doxytag: member="osgFX::BumpMapping::getOverrideDiffuseTexture" ref="a169ac7f217e83a71bb208e30cbcdf8f7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00898.html">osg::Texture2D</a> * osgFX::BumpMapping::getOverrideDiffuseTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the const diffuse color texture that overrides children's texture </p>

<p>References <a class="el" href="a00624.html#a8e2fbaf91ccaa4b392998e76a3bebae3">osg::ref_ptr&lt; T &gt;::get()</a>.</p>

</div>
</div>
<a class="anchor" id="a738fb0b14801c36c27287c6874323ebb"></a><!-- doxytag: member="osgFX::BumpMapping::getOverrideDiffuseTexture" ref="a738fb0b14801c36c27287c6874323ebb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00898.html">osg::Texture2D</a> * osgFX::BumpMapping::getOverrideDiffuseTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the diffuse color texture that overrides children's texture </p>

<p>References <a class="el" href="a00624.html#a8e2fbaf91ccaa4b392998e76a3bebae3">osg::ref_ptr&lt; T &gt;::get()</a>.</p>

</div>
</div>
<a class="anchor" id="a66fa1c0d6d53b2712bb7685eea55c164"></a><!-- doxytag: member="osgFX::BumpMapping::getOverrideNormalMapTexture" ref="a66fa1c0d6d53b2712bb7685eea55c164" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00898.html">osg::Texture2D</a> * osgFX::BumpMapping::getOverrideNormalMapTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the normal map texture that overrides children's texture </p>

<p>References <a class="el" href="a00624.html#a8e2fbaf91ccaa4b392998e76a3bebae3">osg::ref_ptr&lt; T &gt;::get()</a>.</p>

</div>
</div>
<a class="anchor" id="a898836ed25dd1b1fdd276887df475261"></a><!-- doxytag: member="osgFX::BumpMapping::getOverrideNormalMapTexture" ref="a898836ed25dd1b1fdd276887df475261" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00898.html">osg::Texture2D</a> * osgFX::BumpMapping::getOverrideNormalMapTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the const normal map texture that overrides children's texture </p>

<p>References <a class="el" href="a00624.html#a8e2fbaf91ccaa4b392998e76a3bebae3">osg::ref_ptr&lt; T &gt;::get()</a>.</p>

</div>
</div>
<a class="anchor" id="af58d9c2f241a4f817fc339dc976557bd"></a><!-- doxytag: member="osgFX::BumpMapping::META_Effect" ref="af58d9c2f241a4f817fc339dc976557bd" args="(osgFX, BumpMapping,&quot;Bump Mapping&quot;,&quot;This effect makes surfaces appear bumpy. Children nodes must use two textures, &quot;&quot;one for diffuse color and one for the normal map (which can be created &quot;&quot;from a height map with tools like nVIDIA's normal map generator). Furthermore, &quot;&quot;tangent&#45;space basis vectors must be created and assigned to each Geometry; this &quot;&quot;can be done quickly by calling BumpMapping::prepareChildren(). Note that both &quot;&quot;diffuse and normal map textures must have corresponding UV maps defined in &quot;&quot;Geometry objects.\n&quot;&quot;This effect defines a preferred technique which uses ARB vertex &amp; fragment &quot;&quot;programs, and a fallback technique which doesn't use fragment programs. The &quot;&quot;latter is more limited though since it can't handle ambient and specular &quot;&quot;components.&quot;,&quot;Marco Jez&quot;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osgFX::BumpMapping::META_Effect </td>
          <td>(</td>
          <td class="paramtype">osgFX&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html">BumpMapping</a>&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;Bump Mapping&quot;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;This effect makes surfaces appear bumpy. Children nodes must use two&#160;</td>
          <td class="paramname"><em>textures</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;&quot;one for diffuse color and one for the normal map(which can be created&quot;&quot;from a height map with tools like nVIDIA's normal map generator).&#160;</td>
          <td class="paramname"><em>Furthermore</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;&quot;tangent-space basis vectors must be created and assigned to each Geometry;this&quot;&quot;can be done quickly by calling BumpMapping::prepareChildren().Note that both&quot;&quot;diffuse and normal map textures must have corresponding UV maps defined in&quot;&quot;Geometry objects.\n&quot;&quot;This effect defines a preferred technique which uses ARB vertex &amp;fragment&quot;&quot;&#160;</td>
          <td class="paramname"><em>programs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">and a fallback technique which doesn't use fragment programs.The&quot;&quot;latter is more limited though since it can't handle ambient and specular&quot;&quot;components.&quot;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&quot;Marco Jez&quot;&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a14770dbc6ed7535aa68d17b091d684e3"></a><!-- doxytag: member="osgFX::BumpMapping::operator=" ref="a14770dbc6ed7535aa68d17b091d684e3" args="(const BumpMapping &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00081.html">BumpMapping</a>&amp; osgFX::BumpMapping::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00081.html">BumpMapping</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="a7005aaac99fd1feaabb5c7a336978e9e"></a><!-- doxytag: member="osgFX::BumpMapping::prepareChildren" ref="a7005aaac99fd1feaabb5c7a336978e9e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::prepareChildren </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>prepare children for bump lighting. </p>
<p>Actually calls <a class="el" href="a00081.html#aed375110ccc767e60b2148f3981f77c8" title="prepare a Node for bump lighting, calling prepareGeometry() for each Geometry">prepareNode()</a> for each child </p>

</div>
</div>
<a class="anchor" id="af47610a04a2ac368620adcaa9134db03"></a><!-- doxytag: member="osgFX::BumpMapping::prepareGeometry" ref="af47610a04a2ac368620adcaa9134db03" args="(osg::Geometry *geo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::prepareGeometry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00313.html">osg::Geometry</a> *&#160;</td>
          <td class="paramname"><em>geo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>prepare a Geometry for bump lighting. </p>
<p>Tangent-space basis vectors are generated and attached to the geometry as vertex attribute arrays. </p>

</div>
</div>
<a class="anchor" id="aed375110ccc767e60b2148f3981f77c8"></a><!-- doxytag: member="osgFX::BumpMapping::prepareNode" ref="aed375110ccc767e60b2148f3981f77c8" args="(osg::Node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::prepareNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00491.html">osg::Node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>prepare a Node for bump lighting, calling <a class="el" href="a00081.html#af47610a04a2ac368620adcaa9134db03" title="prepare a Geometry for bump lighting.">prepareGeometry()</a> for each Geometry </p>

</div>
</div>
<a class="anchor" id="a07a235d0f9f13111e56ac353ae7d06d7"></a><!-- doxytag: member="osgFX::BumpMapping::setDiffuseTextureUnit" ref="a07a235d0f9f13111e56ac353ae7d06d7" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setDiffuseTextureUnit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the texture unit that contains diffuse color texture. </p>
<p>Default is 1 </p>

<p>References <a class="el" href="a00240.html#a629ee628dd192951fa5334c9f15d2935">osgFX::Effect::dirtyTechniques()</a>.</p>

</div>
</div>
<a class="anchor" id="a3026e41f3ad7959b2635f5f26164dd77"></a><!-- doxytag: member="osgFX::BumpMapping::setLightNumber" ref="a3026e41f3ad7959b2635f5f26164dd77" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setLightNumber </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the OpenGL light number that will be used in lighting computations </p>

<p>References <a class="el" href="a00240.html#a629ee628dd192951fa5334c9f15d2935">osgFX::Effect::dirtyTechniques()</a>.</p>

</div>
</div>
<a class="anchor" id="ae442c44ab3ab93067f0854e2197980b2"></a><!-- doxytag: member="osgFX::BumpMapping::setNormalMapTextureUnit" ref="ae442c44ab3ab93067f0854e2197980b2" args="(int n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setNormalMapTextureUnit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the texture unit that contains normal map texture. </p>
<p>Default is 0 </p>

<p>References <a class="el" href="a00240.html#a629ee628dd192951fa5334c9f15d2935">osgFX::Effect::dirtyTechniques()</a>.</p>

</div>
</div>
<a class="anchor" id="aaff2a4d884f84a13b2f6a8fb1eaab8c5"></a><!-- doxytag: member="osgFX::BumpMapping::setOverrideDiffuseTexture" ref="aaff2a4d884f84a13b2f6a8fb1eaab8c5" args="(osg::Texture2D *texture)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setOverrideDiffuseTexture </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td>
          <td class="paramname"><em>texture</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the diffuse color texture that overrides children's texture </p>

<p>References <a class="el" href="a00240.html#a629ee628dd192951fa5334c9f15d2935">osgFX::Effect::dirtyTechniques()</a>.</p>

</div>
</div>
<a class="anchor" id="a720fd654f765566d90d75503e2f39e9a"></a><!-- doxytag: member="osgFX::BumpMapping::setOverrideNormalMapTexture" ref="a720fd654f765566d90d75503e2f39e9a" args="(osg::Texture2D *texture)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setOverrideNormalMapTexture </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00898.html">osg::Texture2D</a> *&#160;</td>
          <td class="paramname"><em>texture</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the normal map texture that overrides children's texture </p>

<p>References <a class="el" href="a00240.html#a629ee628dd192951fa5334c9f15d2935">osgFX::Effect::dirtyTechniques()</a>.</p>

</div>
</div>
<a class="anchor" id="a87aa18a0807c359d0298a3c6ff6f74c7"></a><!-- doxytag: member="osgFX::BumpMapping::setUpDemo" ref="a87aa18a0807c359d0298a3c6ff6f74c7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void osgFX::BumpMapping::setUpDemo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates </p>

<p>Reimplemented from <a class="el" href="a00240.html#a4b2d856c4220e962d251d773616723b5">osgFX::Effect</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>osgFX/<a class="el" href="a01386.html">BumpMapping</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:35 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>