Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 8ae69226b18a75c9c1458e97746c673c > files > 77

libnoise-doc-1.0.0-5.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>libnoise: Documentation</title>
  <link rel='stylesheet' type='text/css' href='doxygen.css'>
  <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
 </head>
 <body>
  <table class='layout'>
   <tr>
    <td class='sidebar' rowspan='2'>
     <p>
      Navigation menu
     </p>
     <ul class='toc'>
      <li>
       <a href='http://libnoise.sourceforge.net/index.html'>Main</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/downloads/index.html'>Downloads</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/coherentnoise/index.html'>What is coherent noise?</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/noisegen/index.html'>Generating coherent noise</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/glossary/index.html'>Glossary</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/examples/index.html'>Examples</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/textures/index.html'>Procedural textures</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/complexplanet/index.html'>Complex planetary surface</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/worms/index.html'>Perlin worms</a>
        </li>
       </ul>
      </li>
      <li>
       <strong>Docs</strong>
      </li>
      <li>
       <a href='tutorials/index.html'>Tutorials</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial1.html'>Tutorial 1</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial2.html'>Tutorial 2</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial3.html'>Tutorial 3</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial4.html'>Tutorial 4</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial5.html'>Tutorial 5</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial6.html'>Tutorial 6</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial7.html'>Tutorial 7</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial8.html'>Tutorial 8</a>
        </li>
       </ul>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/cvs/index.html'>CVS</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/links/index.html'>Links</a>
      </li>
     </ul>
    </td>
    <td class='header'>
     <p>
      <img src='libnoise.png' alt='libnoise logo'>
     </p>   
     <p>
      A portable, open-source, coherent noise-generating library for C++
     </p>
     <hr>
    </td>
   </tr>
   <tr>
    <td class='content'>

<!-- start rich gooey content -->
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>noise::module::Module Class Reference<br>
<small>
[<a class="el" href="group__modules.html">Noise Modules</a>]</small>
</h1><code>#include &lt;<a class="el" href="modulebase_8h-source.html">modulebase.h</a>&gt;</code>
<p>
<p>Inheritance diagram for noise::module::Module:
<p><center><img src="classnoise_1_1module_1_1Module.png" usemap="#noise::module::Module_map" border="0" alt=""></center>
<map name="noise::module::Module_map">
<area href="classnoise_1_1module_1_1Abs.html" alt="noise::module::Abs" shape="rect" coords="185,56,360,80">
<area href="classnoise_1_1module_1_1Add.html" alt="noise::module::Add" shape="rect" coords="185,112,360,136">
<area href="classnoise_1_1module_1_1Billow.html" alt="noise::module::Billow" shape="rect" coords="185,168,360,192">
<area href="classnoise_1_1module_1_1Blend.html" alt="noise::module::Blend" shape="rect" coords="185,224,360,248">
<area href="classnoise_1_1module_1_1Cache.html" alt="noise::module::Cache" shape="rect" coords="185,280,360,304">
<area href="classnoise_1_1module_1_1Checkerboard.html" alt="noise::module::Checkerboard" shape="rect" coords="185,336,360,360">
<area href="classnoise_1_1module_1_1Clamp.html" alt="noise::module::Clamp" shape="rect" coords="185,392,360,416">
<area href="classnoise_1_1module_1_1Const.html" alt="noise::module::Const" shape="rect" coords="185,448,360,472">
<area href="classnoise_1_1module_1_1Curve.html" alt="noise::module::Curve" shape="rect" coords="185,504,360,528">
<area href="classnoise_1_1module_1_1Cylinders.html" alt="noise::module::Cylinders" shape="rect" coords="185,560,360,584">
<area href="classnoise_1_1module_1_1Displace.html" alt="noise::module::Displace" shape="rect" coords="185,616,360,640">
<area href="classnoise_1_1module_1_1Exponent.html" alt="noise::module::Exponent" shape="rect" coords="185,672,360,696">
<area href="classnoise_1_1module_1_1Invert.html" alt="noise::module::Invert" shape="rect" coords="185,728,360,752">
<area href="classnoise_1_1module_1_1Max.html" alt="noise::module::Max" shape="rect" coords="185,784,360,808">
<area href="classnoise_1_1module_1_1Min.html" alt="noise::module::Min" shape="rect" coords="185,840,360,864">
<area href="classnoise_1_1module_1_1Multiply.html" alt="noise::module::Multiply" shape="rect" coords="185,896,360,920">
<area href="classnoise_1_1module_1_1Perlin.html" alt="noise::module::Perlin" shape="rect" coords="185,952,360,976">
<area href="classnoise_1_1module_1_1Power.html" alt="noise::module::Power" shape="rect" coords="185,1008,360,1032">
<area href="classnoise_1_1module_1_1RidgedMulti.html" alt="noise::module::RidgedMulti" shape="rect" coords="185,1064,360,1088">
<area href="classnoise_1_1module_1_1RotatePoint.html" alt="noise::module::RotatePoint" shape="rect" coords="185,1120,360,1144">
<area href="classnoise_1_1module_1_1ScaleBias.html" alt="noise::module::ScaleBias" shape="rect" coords="185,1176,360,1200">
<area href="classnoise_1_1module_1_1ScalePoint.html" alt="noise::module::ScalePoint" shape="rect" coords="185,1232,360,1256">
<area href="classnoise_1_1module_1_1Select.html" alt="noise::module::Select" shape="rect" coords="185,1288,360,1312">
<area href="classnoise_1_1module_1_1Spheres.html" alt="noise::module::Spheres" shape="rect" coords="185,1344,360,1368">
<area href="classnoise_1_1module_1_1Terrace.html" alt="noise::module::Terrace" shape="rect" coords="185,1400,360,1424">
<area href="classnoise_1_1module_1_1TranslatePoint.html" alt="noise::module::TranslatePoint" shape="rect" coords="185,1456,360,1480">
<area href="classnoise_1_1module_1_1Turbulence.html" alt="noise::module::Turbulence" shape="rect" coords="185,1512,360,1536">
<area href="classnoise_1_1module_1_1Voronoi.html" alt="noise::module::Voronoi" shape="rect" coords="185,1568,360,1592">
</map>
<a href="classnoise_1_1module_1_1Module-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract base class for noise modules. 
<p>
A <em>noise module</em> is an object that calculates and outputs a value given a three-dimensional input value.<p>
Each type of noise module uses a specific method to calculate an output value. Some of these methods include:<p>
<ul>
<li>Calculating a value using a coherent-noise function or some other mathematical function.</li><li>Mathematically changing the output value from another noise module in various ways.</li><li>Combining the output values from two noise modules in various ways.</li></ul>
<p>
An application can use the output values from these noise modules in the following ways:<p>
<ul>
<li>It can be used as an elevation value for a terrain height map</li><li>It can be used as a grayscale (or an RGB-channel) value for a procedural texture</li><li>It can be used as a position value for controlling the movement of a simulated lifeform.</li></ul>
<p>
A noise module defines a near-infinite 3-dimensional texture. Each position in this "texture" has a specific value.<p>
<b>Combining noise modules</b><p>
Noise modules can be combined with other noise modules to generate complex output values. A noise module that is used as a source of output values for another noise module is called a <em>source module</em>. Each of these source modules may be connected to other source modules, and so on.<p>
There is no limit to the number of noise modules that can be connected together in this way. However, each connected noise module increases the time required to calculate an output value.<p>
<b>Noise-module categories</b><p>
The noise module classes that are included in libnoise can be roughly divided into five categories.<p>
<em>Generator Modules</em><p>
A generator module outputs a value generated by a coherent-noise function or some other mathematical function.<p>
Examples of generator modules include:<ul>
<li><a class="el" href="classnoise_1_1module_1_1Const.html">noise::module::Const</a>: Outputs a constant value.</li><li><a class="el" href="classnoise_1_1module_1_1Perlin.html">noise::module::Perlin</a>: Outputs a value generated by a Perlin-noise function.</li><li><a class="el" href="classnoise_1_1module_1_1Voronoi.html">noise::module::Voronoi</a>: Outputs a value generated by a Voronoi-cell function.</li></ul>
<p>
<em>Modifier Modules</em><p>
A modifer module mathematically modifies the output value from a source module.<p>
Examples of modifier modules include:<ul>
<li><a class="el" href="classnoise_1_1module_1_1Curve.html">noise::module::Curve</a>: Maps the output value from the source module onto an arbitrary function curve.</li><li><a class="el" href="classnoise_1_1module_1_1Invert.html">noise::module::Invert</a>: Inverts the output value from the source module.</li></ul>
<p>
<em>Combiner Modules</em><p>
A combiner module mathematically combines the output values from two or more source modules together.<p>
Examples of combiner modules include:<ul>
<li><a class="el" href="classnoise_1_1module_1_1Add.html">noise::module::Add</a>: Adds the two output values from two source modules.</li><li><a class="el" href="classnoise_1_1module_1_1Max.html">noise::module::Max</a>: Outputs the larger of the two output values from two source modules.</li></ul>
<p>
<em>Selector Modules</em><p>
A selector module uses the output value from a <em>control module</em> to specify how to combine the output values from its source modules.<p>
Examples of selector modules include:<ul>
<li><a class="el" href="classnoise_1_1module_1_1Blend.html">noise::module::Blend</a>: Outputs a value that is linearly interpolated between the output values from two source modules; the interpolation weight is determined by the output value from the control module.</li><li><a class="el" href="classnoise_1_1module_1_1Select.html">noise::module::Select</a>: Outputs the value selected from one of two source modules chosen by the output value from a control module.</li></ul>
<p>
<em>Transformer Modules</em><p>
A transformer module applies a transformation to the coordinates of the input value before retrieving the output value from the source module. A transformer module does not modify the output value.<p>
Examples of transformer modules include:<ul>
<li><a class="el" href="classnoise_1_1module_1_1RotatePoint.html">RotatePoint</a>: Rotates the coordinates of the input value around the origin before retrieving the output value from the source module.</li><li><a class="el" href="classnoise_1_1module_1_1ScalePoint.html">ScalePoint</a>: Multiplies each coordinate of the input value by a constant value before retrieving the output value from the source module.</li></ul>
<p>
<b>Connecting source modules to a noise module</b><p>
An application connects a source module to a noise module by passing the source module to the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method.<p>
The application must also pass an <em>index value</em> to <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> as well. An index value is a numeric identifier for that source module. Index values are consecutively numbered starting at zero.<p>
To retrieve a reference to a source module, pass its index value to the <a class="el" href="classnoise_1_1module_1_1Module.html#a2">GetSourceModule()</a> method.<p>
Each noise module requires the attachment of a certain number of source modules before it can output a value. For example, the <a class="el" href="classnoise_1_1module_1_1Add.html">noise::module::Add</a> module requires two source modules, while the <a class="el" href="classnoise_1_1module_1_1Perlin.html">noise::module::Perlin</a> module requires none. Call the <a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount()</a> method to retrieve the number of source modules required by that module.<p>
For non-selector modules, it usually does not matter which index value an application assigns to a particular source module, but for selector modules, the purpose of a source module is defined by its index value. For example, consider the <a class="el" href="classnoise_1_1module_1_1Select.html">noise::module::Select</a> noise module, which requires three source modules. The control module is the source module assigned an index value of 2. The control module determines whether the noise module will output the value from the source module assigned an index value of 0 or the output value from the source module assigned an index value of 1.<p>
<b>Generating output values with a noise module</b><p>
Once an application has connected all required source modules to a noise module, the application can now begin to generate output values with that noise module.<p>
To generate an output value, pass the ( <em>x</em>, <em>y</em>, <em>z</em> ) coordinates of an input value to the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> method.<p>
<b>Using a noise module to generate terrain height maps or textures</b><p>
One way to generate a terrain height map or a texture is to first allocate a 2-dimensional array of floating-point values. For each array element, pass the array subscripts as <em>x</em> and <em>y</em> coordinates to the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> method (leaving the <em>z</em> coordinate set to zero) and place the resulting output value into the array element.<p>
<b>Creating your own noise modules</b><p>
Create a class that publicly derives from noise::module::Module.<p>
In the constructor, call the base class' constructor while passing the return value from <a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount()</a> to it.<p>
Override the <a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount()</a> pure virtual method. From this method, return the number of source modules required by your noise module.<p>
Override the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> pure virtual method. For generator modules, calculate and output a value given the coordinates of the input value. For other modules, retrieve the output values from each source module referenced in the protected <em>m_pSourceModule</em> array, mathematically combine those values, and return the combined value.<p>
When developing a noise module, you must ensure that your noise module does not modify any source module or control module connected to it; a noise module can only modify the output value from those source modules. You must also ensure that if an application fails to connect all required source modules via the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method and then attempts to call the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> method, your module will raise an assertion.<p>
It shouldn't be too difficult to create your own noise module. If you still have some problems, take a look at the source code for <a class="el" href="classnoise_1_1module_1_1Add.html">noise::module::Add</a>, which is a very simple noise module. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="noise::module::Module::Module"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a0">Module</a> (int sourceModuleCount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="noise::module::Module::~Module"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a1">~Module</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classnoise_1_1module_1_1Module.html">Module</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a2">GetSourceModule</a> (int index) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a reference to a source module connected to this noise module.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of source modules required by this noise module.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue</a> (double x, double y, double z) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates an output value given the coordinates of the specified input value.  <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule</a> (int index, const <a class="el" href="classnoise_1_1module_1_1Module.html">Module</a> &amp;sourceModule)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connects a source module to this noise module.  <a href="#a5"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0" doxytag="noise::module::Module::m_pSourceModule"></a>
const <a class="el" href="classnoise_1_1module_1_1Module.html">Module</a> **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Module.html#p0">m_pSourceModule</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An array containing the pointers to each source module required by this noise module. <br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="noise::module::Module::GetSourceModule"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual const <a class="el" href="classnoise_1_1module_1_1Module.html">Module</a>&amp; noise::module::Module::GetSourceModule           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>index</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a reference to a source module connected to this noise module. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>The index value assigned to the source module.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A reference to the source module.</dd></dl>
<dl compact><dt><b>Precondition:</b></dt><dd>The index value ranges from 0 to one less than the number of source modules required by this noise module. <p>
A source module with the specified index value has been added to this noise module via a call to <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a>.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>noise::ExceptionNoModule</em>&nbsp;</td><td>See the preconditions for more information.</td></tr>
  </table>
</dl>
Each noise module requires the attachment of a certain number of source modules before an application can call the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> method.     </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="noise::module::Module::GetSourceModuleCount"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int noise::module::Module::GetSourceModuleCount           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the number of source modules required by this noise module. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The number of source modules required by this noise module. </dd></dl>

<p>
Implemented in <a class="el" href="classnoise_1_1module_1_1Abs.html#a1">noise::module::Abs</a>, <a class="el" href="classnoise_1_1module_1_1Add.html#a1">noise::module::Add</a>, <a class="el" href="classnoise_1_1module_1_1Billow.html#a7">noise::module::Billow</a>, <a class="el" href="classnoise_1_1module_1_1Blend.html#a2">noise::module::Blend</a>, <a class="el" href="classnoise_1_1module_1_1Cache.html#a1">noise::module::Cache</a>, <a class="el" href="classnoise_1_1module_1_1Checkerboard.html#a1">noise::module::Checkerboard</a>, <a class="el" href="classnoise_1_1module_1_1Clamp.html#a2">noise::module::Clamp</a>, <a class="el" href="classnoise_1_1module_1_1Const.html#a2">noise::module::Const</a>, <a class="el" href="classnoise_1_1module_1_1Curve.html#a6">noise::module::Curve</a>, <a class="el" href="classnoise_1_1module_1_1Cylinders.html#a2">noise::module::Cylinders</a>, <a class="el" href="classnoise_1_1module_1_1Displace.html#a1">noise::module::Displace</a>, <a class="el" href="classnoise_1_1module_1_1Exponent.html#a2">noise::module::Exponent</a>, <a class="el" href="classnoise_1_1module_1_1Invert.html#a1">noise::module::Invert</a>, <a class="el" href="classnoise_1_1module_1_1Max.html#a1">noise::module::Max</a>, <a class="el" href="classnoise_1_1module_1_1Min.html#a1">noise::module::Min</a>, <a class="el" href="classnoise_1_1module_1_1Multiply.html#a1">noise::module::Multiply</a>, <a class="el" href="classnoise_1_1module_1_1Perlin.html#a7">noise::module::Perlin</a>, <a class="el" href="classnoise_1_1module_1_1Power.html#a1">noise::module::Power</a>, <a class="el" href="classnoise_1_1module_1_1RidgedMulti.html#a6">noise::module::RidgedMulti</a>, <a class="el" href="classnoise_1_1module_1_1RotatePoint.html#a1">noise::module::RotatePoint</a>, <a class="el" href="classnoise_1_1module_1_1ScaleBias.html#a3">noise::module::ScaleBias</a>, <a class="el" href="classnoise_1_1module_1_1ScalePoint.html#a1">noise::module::ScalePoint</a>, <a class="el" href="classnoise_1_1module_1_1Select.html#a4">noise::module::Select</a>, <a class="el" href="classnoise_1_1module_1_1Spheres.html#a2">noise::module::Spheres</a>, <a class="el" href="classnoise_1_1module_1_1Terrace.html#a6">noise::module::Terrace</a>, <a class="el" href="classnoise_1_1module_1_1TranslatePoint.html#a1">noise::module::TranslatePoint</a>, <a class="el" href="classnoise_1_1module_1_1Turbulence.html#a5">noise::module::Turbulence</a>, and <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a4">noise::module::Voronoi</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="noise::module::Module::GetValue"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual double noise::module::Module::GetValue           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>z</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Generates an output value given the coordinates of the specified input value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The <em>x</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>The <em>y</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>z</em>&nbsp;</td><td>The <em>z</em> coordinate of the input value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The output value.</dd></dl>
<dl compact><dt><b>Precondition:</b></dt><dd>All source modules required by this noise module have been passed to the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method.</dd></dl>
Before an application can call this method, it must first connect all required source modules via the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method. If these source modules are not connected to this noise module, this method raises a debug assertion.<p>
To determine the number of source modules required by this noise module, call the <a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount()</a> method. 
<p>
Implemented in <a class="el" href="classnoise_1_1module_1_1Abs.html#a2">noise::module::Abs</a>, <a class="el" href="classnoise_1_1module_1_1Add.html#a2">noise::module::Add</a>, <a class="el" href="classnoise_1_1module_1_1Billow.html#a8">noise::module::Billow</a>, <a class="el" href="classnoise_1_1module_1_1Blend.html#a3">noise::module::Blend</a>, <a class="el" href="classnoise_1_1module_1_1Cache.html#a2">noise::module::Cache</a>, <a class="el" href="classnoise_1_1module_1_1Checkerboard.html#a2">noise::module::Checkerboard</a>, <a class="el" href="classnoise_1_1module_1_1Clamp.html#a4">noise::module::Clamp</a>, <a class="el" href="classnoise_1_1module_1_1Const.html#a3">noise::module::Const</a>, <a class="el" href="classnoise_1_1module_1_1Curve.html#a7">noise::module::Curve</a>, <a class="el" href="classnoise_1_1module_1_1Cylinders.html#a3">noise::module::Cylinders</a>, <a class="el" href="classnoise_1_1module_1_1Displace.html#a2">noise::module::Displace</a>, <a class="el" href="classnoise_1_1module_1_1Exponent.html#a3">noise::module::Exponent</a>, <a class="el" href="classnoise_1_1module_1_1Invert.html#a2">noise::module::Invert</a>, <a class="el" href="classnoise_1_1module_1_1Max.html#a2">noise::module::Max</a>, <a class="el" href="classnoise_1_1module_1_1Min.html#a2">noise::module::Min</a>, <a class="el" href="classnoise_1_1module_1_1Multiply.html#a2">noise::module::Multiply</a>, <a class="el" href="classnoise_1_1module_1_1Perlin.html#a8">noise::module::Perlin</a>, <a class="el" href="classnoise_1_1module_1_1Power.html#a2">noise::module::Power</a>, <a class="el" href="classnoise_1_1module_1_1RidgedMulti.html#a7">noise::module::RidgedMulti</a>, <a class="el" href="classnoise_1_1module_1_1RotatePoint.html#a2">noise::module::RotatePoint</a>, <a class="el" href="classnoise_1_1module_1_1ScaleBias.html#a4">noise::module::ScaleBias</a>, <a class="el" href="classnoise_1_1module_1_1ScalePoint.html#a2">noise::module::ScalePoint</a>, <a class="el" href="classnoise_1_1module_1_1Select.html#a6">noise::module::Select</a>, <a class="el" href="classnoise_1_1module_1_1Spheres.html#a3">noise::module::Spheres</a>, <a class="el" href="classnoise_1_1module_1_1Terrace.html#a9">noise::module::Terrace</a>, <a class="el" href="classnoise_1_1module_1_1TranslatePoint.html#a2">noise::module::TranslatePoint</a>, <a class="el" href="classnoise_1_1module_1_1Turbulence.html#a6">noise::module::Turbulence</a>, and <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a7">noise::module::Voronoi</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="noise::module::Module::SetSourceModule"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual void noise::module::Module::SetSourceModule           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="classnoise_1_1module_1_1Module.html">Module</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>sourceModule</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Connects a source module to this noise module. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An index value to assign to this source module. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceModule</em>&nbsp;</td><td>The source module to attach.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Precondition:</b></dt><dd>The index value ranges from 0 to one less than the number of source modules required by this noise module.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>noise::ExceptionInvalidParam</em>&nbsp;</td><td>An invalid parameter was specified; see the preconditions for more information.</td></tr>
  </table>
</dl>
A noise module mathematically combines the output values from the source modules to generate the value returned by <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a>.<p>
The index value to assign a source module is a unique identifier for that source module. If an index value has already been assigned to a source module, this noise module replaces the old source module with the new source module.<p>
Before an application can call the <a class="el" href="classnoise_1_1module_1_1Module.html#a4">GetValue()</a> method, it must first connect all required source modules. To determine the number of source modules required by this noise module, call the <a class="el" href="classnoise_1_1module_1_1Module.html#a3">GetSourceModuleCount()</a> method.<p>
This source module must exist throughout the lifetime of this noise module unless another source module replaces that source module.<p>
A noise module does not modify a source module; it only modifies its output values. 
<p>
Reimplemented in <a class="el" href="classnoise_1_1module_1_1Cache.html#a3">noise::module::Cache</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="modulebase_8h-source.html">modulebase.h</a><li>modulebase.cpp</ul>
<!-- end rich gooey content -->

    </td>
   </tr>
   <tr>
    <td class='footer' colspan='2'>
     <p>
      &copy; 2003-2005 Jason Bevins
     </p>
     <p>
      <a href='http://www.doxygen.org/'><img src='doxygen.png' alt='Doxygen logo'></a>
      <br>
      The libnoise source documentation was generated by <a href='http://www.doxygen.org/'>doxygen</a> 1.3.9.1
     </p>
    </td>
   </tr>
  </table>
 </body>
</html>