diff options
Diffstat (limited to 'docs/doxygen/nel/a03671.html')
-rw-r--r-- | docs/doxygen/nel/a03671.html | 1807 |
1 files changed, 1807 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03671.html b/docs/doxygen/nel/a03671.html new file mode 100644 index 00000000..74e6aca5 --- /dev/null +++ b/docs/doxygen/nel/a03671.html @@ -0,0 +1,1807 @@ +<!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>NeL: NL3D::CVegetable class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CVegetable Class Reference</h1><code>#include <<a class="el" href="a06687.html">vegetable.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +A vegetable descriptor. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00054">54</a> of file <a class="el" href="a06687.html">vegetable.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Density Angle Factor</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">TAngleType</a> { <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew2">AngleGround</a> = 0, +<a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew1">AngleCeiling</a>, +<a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew3">AngleWall</a> + }</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">TAngleType</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_1">getAngleType</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_2">getCosAngleMax</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_3">getCosAngleMin</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_4">setAngleCeiling</a> (float cosAngleMax)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_5">setAngleGround</a> (float cosAngleMin)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_6">setAngleWall</a> (float cosAngleMin, float cosAngleMax)</td></tr> + +<tr><td colspan=2><br><h2>posInWorldAround 4 position on 4 edges around the center in folowing order:</h2></td></tr> +<tr><td colspan=2>same as generateGroup, but with smoother density effects on border with desnity==0<p> +(0,0.5), (1,0.5), (0.5,0), (0.5,1) (in instance UV coordinates space (as returned in "instances"). <br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_0">generateGroupBiLinear</a> (const <a class="el" href="a03128.html">CVector</a> &posInWorld, const <a class="el" href="a03128.html">CVector</a> posInWorldBorder[4], const <a class="el" href="a03128.html">CVector</a> &surfaceNormal, float area, <a class="el" href="a04558.html#a15">uint</a> vegetSeed, std::vector< <a class="el" href="a03660.html">CVector2f</a> > &instances) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_1">generateInstance</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, const <a class="el" href="a02851.html">NLMISC::CMatrix</a> &posInWorld, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &modulateAmbientColor, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &modulateDiffuseColor, float blendDistMax, <a class="el" href="a03671.html#NL3D_1_1CVegetablew5">TVegetableWater</a> vegetWaterState, <a class="el" href="a03685.html">CVegetableUV8</a> dlmUV) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_2">reserveIgAddInstances</a> (<a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &vegetIgReserve, <a class="el" href="a03671.html#NL3D_1_1CVegetablew5">TVegetableWater</a> vegetWaterState, <a class="el" href="a04558.html#a15">uint</a> numInstances) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_3">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_4">generateGroupEx</a> (float nbInst, const <a class="el" href="a03128.html">CVector</a> &posInWorld, const <a class="el" href="a03128.html">CVector</a> &surfaceNormal, <a class="el" href="a04558.html#a15">uint</a> vegetSeed, std::vector< <a class="el" href="a03660.html">CVector2f</a> > &instances) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Do the generateGroup, but take nbInst unmodulated by normal. <a href="#NL3D_1_1CVegetablez1100_4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">TAngleType</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_5">_AngleType</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">angle type setuped with setAngleMin etc... <a href="#NL3D_1_1CVegetablez1100_5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03680.html">CVegetableManager</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">the manager <a href="#NL3D_1_1CVegetablez1100_9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03682.html">CVegetableShape</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">shape in the manager <a href="#NL3D_1_1CVegetablez1100_11"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_12">easeInEaseOut</a> (float <a class="el" href="a04223.html#a572">x</a>)</td></tr> + +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablew5">TVegetableWater</a> { <a class="el" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew0">AboveWater</a> = 0, +<a class="el" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew6">UnderWater</a>, +<a class="el" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew4">IntersectWater</a>, +<a class="el" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew7">VegetInfoLast</a> + }</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Micro vegetation position against Water. Above water is the default. <a href="#NL3D_1_1CVegetablew5">More...</a><br><br></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablea0">CVegetable</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablea1">generateGroup</a> (const <a class="el" href="a03128.html">CVector</a> &posInWorld, const <a class="el" href="a03128.html">CVector</a> &surfaceNormal, float area, <a class="el" href="a04558.html#a15">uint</a> vegetSeed, std::vector< <a class="el" href="a03660.html">CVector2f</a> > &instances) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetablea2">registerToManager</a> (<a class="el" href="a03680.html">CVegetableManager</a> *manager)</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo0">BendFactor</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Bend factor. <a href="#NL3D_1_1CVegetableo0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo1">BendFrequencyFactor</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Fixed Bend FrequencyFactor. NB: rounded during addInstance to the nearest NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC. <a href="#NL3D_1_1CVegetableo1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo2">BendPhase</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Bend Phase. <a href="#NL3D_1_1CVegetableo2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02989.html">NLMISC::CNoiseColorGradient</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo3">Color</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">The color to modulate the instance. <a href="#NL3D_1_1CVegetableo3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo4">Density</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Density== Number of instance to create / mē. <a href="#NL3D_1_1CVegetableo4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo5">DistType</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo6">MaxDensity</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">the maximum density computed. if <0, no maximum. -1 by default. <a href="#NL3D_1_1CVegetableo6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo7">Rx</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Orientation. <a href="#NL3D_1_1CVegetableo7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo8">Ry</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Orientation. <a href="#NL3D_1_1CVegetableo8"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo9">Rz</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Orientation. <a href="#NL3D_1_1CVegetableo9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo10">ShapeName</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the shape to use. <a href="#NL3D_1_1CVegetableo10"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Scale. <a href="#NL3D_1_1CVegetableo11"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02990.html">NLMISC::CNoiseValue</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Random Scale. <a href="#NL3D_1_1CVegetableo12"></a><br><br></td></tr> +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetablez1099_0" doxytag="NL3D::CVegetable::TAngleType" ></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"> enum <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">NL3D::CVegetable::TAngleType</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew2" doxytag="AngleGround" ></a>AngleGround</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew1" doxytag="AngleCeiling" ></a>AngleCeiling</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew3" doxytag="AngleWall" ></a>AngleWall</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06687.html#l00090">90</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06687.html#l00109">getAngleType()</a>. +<p> +<div class="fragment"><pre>00090 {<a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew2">AngleGround</a>=0, <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew1">AngleCeiling</a>, <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew3">AngleWall</a>}; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablew5" doxytag="NL3D::CVegetable::TVegetableWater" ></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"> enum <a class="el" href="a03671.html#NL3D_1_1CVegetablew5">NL3D::CVegetable::TVegetableWater</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Micro vegetation position against Water. Above water is the default. +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablew5NL3D_1_1CVegetablew0" doxytag="AboveWater" ></a>AboveWater</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablew5NL3D_1_1CVegetablew6" doxytag="UnderWater" ></a>UnderWater</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablew5NL3D_1_1CVegetablew4" doxytag="IntersectWater" ></a>IntersectWater</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetablew5NL3D_1_1CVegetablew7" doxytag="VegetInfoLast" ></a>VegetInfoLast</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06687.html#l00058">58</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +<div class="fragment"><pre>00058 { <a class="code" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew0">AboveWater</a> = 0, <a class="code" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew6">UnderWater</a>, <a class="code" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew4">IntersectWater</a>, <a class="code" href="a03671.html#NL3D_1_1CVegetablew5NL3D_1_1CVegetablew7">VegetInfoLast</a> }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetablea0" doxytag="NL3D::CVegetable::CVegetable" ></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"> NL3D::CVegetable::CVegetable </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06686.html#l00048">48</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00183">_Manager</a>, <a class="el" href="a06106.html#l00052">NLMISC::CNoiseValue::Abs</a>, <a class="el" href="a06687.html#l00072">BendFactor</a>, <a class="el" href="a06687.html#l00076">BendFrequencyFactor</a>, <a class="el" href="a06687.html#l00082">DistType</a>, <a class="el" href="a06687.html#l00066">MaxDensity</a>, <a class="el" href="a06106.html#l00053">NLMISC::CNoiseValue::Rand</a>, <a class="el" href="a06687.html#l00070">Rx</a>, <a class="el" href="a06687.html#l00070">Ry</a>, <a class="el" href="a06687.html#l00070">Rz</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, <a class="el" href="a06687.html#l00068">Sxy</a>, and <a class="el" href="a06687.html#l00068">Sz</a>. +<p> +<div class="fragment"><pre>00049 { +00050 <span class="comment">// Ground style density.</span> +00051 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_5">setAngleGround</a>(0); +00052 +00053 <span class="comment">// Density not maximised.</span> +00054 <a class="code" href="a03671.html#NL3D_1_1CVegetableo6">MaxDensity</a>= -1; +00055 +00056 <span class="comment">// No scale.</span> +00057 <a class="code" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= 1; +00058 <a class="code" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= 0; +00059 <span class="comment">// No rotation.</span> +00060 <a class="code" href="a03671.html#NL3D_1_1CVegetableo7">Rx</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo8">Ry</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo9">Rz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= 0; +00061 <a class="code" href="a03671.html#NL3D_1_1CVegetableo7">Rx</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo8">Ry</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetableo9">Rz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= 0; +00062 <span class="comment">// No BendFactor.</span> +00063 <a class="code" href="a03671.html#NL3D_1_1CVegetableo0">BendFactor</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>= 1; +00064 <a class="code" href="a03671.html#NL3D_1_1CVegetableo0">BendFactor</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>= 0; +00065 <a class="code" href="a03671.html#NL3D_1_1CVegetableo1">BendFrequencyFactor</a>= 1; +00066 +00067 <span class="comment">// Appear at 0.</span> +00068 <a class="code" href="a03671.html#NL3D_1_1CVegetableo5">DistType</a>= 0; +00069 +00070 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a>= NULL; +00071 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetablez1100_12" doxytag="NL3D::CVegetable::easeInEaseOut" ></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"> float NL3D::CVegetable::easeInEaseOut </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>x</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, static, private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00193">193</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +References <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00190">generateGroupBiLinear()</a>. +<p> +<div class="fragment"><pre>00194 { +00195 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a573">y</a>; +00196 <span class="comment">// cubic such that f(0)=0, f'(0)=0, f(1)=1, f'(1)=0.</span> +00197 <span class="keywordtype">float</span> x2=<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a572">x</a>; +00198 <span class="keywordtype">float</span> x3=x2*<a class="code" href="a04223.html#a572">x</a>; +00199 <a class="code" href="a04223.html#a573">y</a>= -2*x3 + 3*x2; +00200 <span class="keywordflow">return</span> <a class="code" href="a04223.html#a573">y</a>; +00201 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablea1" doxytag="NL3D::CVegetable::generateGroup" ></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"> void NL3D::CVegetable::generateGroup </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>posInWorld</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>surfaceNormal</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>area</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>vegetSeed</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< <a class="el" href="a03660.html">CVector2f</a> > & </td> + <td class="mdname" nowrap> <em>instances</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +generate a list of instance to create on a small ground element, according to density and noise. result is a list of instance to create, with random 2d position. 2d position are in range [0..1]. caller should scale, or use it to compute real world position, and then use <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_1">generateInstance()</a> to really compute the instances.<p> +Warning! Use OptFastFloor()! So call must be enclosed with a OptFastFloorBegin()/OptFastFloorEnd().<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>posInWorld</em> </td><td>center (approx) of the surface which generate group of vegetable </td></tr> + <tr><td valign=top><em>surfaceNormal</em> </td><td>UNIT up vector of the surface to compare with (0,0,1), to modulate density </td></tr> + <tr><td valign=top><em>area</em> </td><td>area of the surface, to know number of elements to generate for this surface </td></tr> + <tr><td valign=top><em>vegetSeed</em> </td><td>"random" value which Should be different for all vegetables in the same area. usefull if lot of different vegetable generated in same area: positions won't be generated at same place. </td></tr> + <tr><td valign=top><em>instances</em> </td><td>the generated position of instances.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06686.html#l00176">176</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00064">Density</a>, <a class="el" href="a06105.html#l00276">NLMISC::CNoiseValue::eval()</a>, <a class="el" href="a06686.html#l00132">generateGroupEx()</a>, <a class="el" href="a06687.html#l00066">MaxDensity</a>, <a class="el" href="a05484.html#l00038">min</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00177 { +00178 <span class="comment">// number of instances to generate</span> +00179 <span class="keywordtype">float</span> dens= <a class="code" href="a03671.html#NL3D_1_1CVegetableo4">Density</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(posInWorld); +00180 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetableo6">MaxDensity</a> >= 0) +00181 dens= <a class="code" href="a04061.html#a0">min</a>(dens, MaxDensity); +00182 <span class="keywordtype">float</span> nbInst= area * dens; +00183 +00184 <span class="comment">// modulate by normal and generate them.</span> +00185 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_4">generateGroupEx</a>(nbInst, posInWorld, surfaceNormal, vegetSeed, instances); +00186 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_0" doxytag="NL3D::CVegetable::generateGroupBiLinear" ></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"> void NL3D::CVegetable::generateGroupBiLinear </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>posInWorld</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> </td> + <td class="mdname" nowrap> <em>posInWorldBorder</em>[4], </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>surfaceNormal</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>area</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>vegetSeed</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< <a class="el" href="a03660.html">CVector2f</a> > & </td> + <td class="mdname" nowrap> <em>instances</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06686.html#l00190">190</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00064">Density</a>, <a class="el" href="a06687.html#l00193">easeInEaseOut()</a>, <a class="el" href="a06105.html#l00276">NLMISC::CNoiseValue::eval()</a>, <a class="el" href="a06105.html#l00285">NLMISC::CNoiseValue::evalOneLevelRandom()</a>, <a class="el" href="a06686.html#l00132">generateGroupEx()</a>, <a class="el" href="a06687.html#l00066">MaxDensity</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05363.html#a330">NL3D::RandomGenerator</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. +<p> +<div class="fragment"><pre>00191 { +00192 <a class="code" href="a04558.html#a14">sint</a> i; +00193 <span class="keyword">const</span> <span class="keywordtype">float</span> evenDistribFact= 12.25f; <span class="comment">// an arbitrary value to have a higher frequency for random.</span> +00194 +00195 <span class="comment">// compute how many instances to generate on borders of the patch</span> +00196 <span class="comment">// ==================</span> +00197 <span class="keywordtype">float</span> edgeDensity[4]; +00198 <span class="keywordflow">for</span>(i=0; i<4; i++) +00199 { +00200 <span class="comment">// Get number of instances generated on edges</span> +00201 edgeDensity[i]= area * <a class="code" href="a03671.html#NL3D_1_1CVegetableo4">Density</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(posInWorldBorder[i]); +00202 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetableo6">MaxDensity</a> >= 0) +00203 edgeDensity[i]= <a class="code" href="a04061.html#a0">min</a>(edgeDensity[i], area * MaxDensity); +00204 edgeDensity[i]= max(0.f, edgeDensity[i]); +00205 } +00206 <span class="comment">// Average on center of the patch for each direction.</span> +00207 <span class="keywordtype">float</span> edgeDensityCenterX; +00208 <span class="keywordtype">float</span> edgeDensityCenterY; +00209 edgeDensityCenterX= 0.5f * (edgeDensity[0] + edgeDensity[1]); +00210 edgeDensityCenterY= 0.5f * (edgeDensity[2] + edgeDensity[3]); +00211 +00212 +00213 <span class="comment">// Average for all the patch</span> +00214 <span class="keywordtype">float</span> nbInstAverage= 0.5f * (edgeDensityCenterX + edgeDensityCenterY); +00215 +00216 +00217 <span class="comment">// generate instances on the patch</span> +00218 <span class="comment">// ==================</span> +00219 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_4">generateGroupEx</a>(nbInstAverage, posInWorld, surfaceNormal, vegetSeed, instances); +00220 +00221 +00222 +00223 <span class="comment">// move instances x/y to follow edge repartition</span> +00224 <span class="comment">// ==================</span> +00225 <span class="comment">// If on a direction, both edges are 0 density, then must do a special formula</span> +00226 <span class="keywordtype">bool</span> middleX= edgeDensityCenterX<=1; +00227 <span class="keywordtype">bool</span> middleY= edgeDensityCenterY<=1; +00228 <span class="keywordtype">float</span> OOEdgeDCX=0.0; +00229 <span class="keywordtype">float</span> OOEdgeDCY=0.0; +00230 <span class="keywordflow">if</span>(!middleX) OOEdgeDCX= 1.0f / edgeDensityCenterX; +00231 <span class="keywordflow">if</span>(!middleY) OOEdgeDCY= 1.0f / edgeDensityCenterY; +00232 <span class="comment">// for all instances</span> +00233 <span class="keywordflow">for</span>(i=0; i<(<a class="code" href="a04558.html#a14">sint</a>)instances.size(); i++) +00234 { +00235 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a572">x</a>= instances[i].x; +00236 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a573">y</a>= instances[i].y; +00237 <span class="comment">// a seed for random.</span> +00238 CVector randSeed(x*evenDistribFact, y*evenDistribFact, 0); +00239 +00240 <span class="comment">// X change.</span> +00241 <span class="keywordflow">if</span>(middleX) +00242 { +00243 <span class="comment">// instances are grouped at middle. this is the bijection of easeInEaseOut</span> +00244 <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04223.html#a572">x</a>+<a class="code" href="a04223.html#a572">x</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_12">easeInEaseOut</a>(x); +00245 <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04223.html#a572">x</a>+<a class="code" href="a04223.html#a572">x</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_12">easeInEaseOut</a>(x); +00246 instances[i].x= <a class="code" href="a04223.html#a572">x</a>; +00247 } +00248 <span class="keywordflow">else</span> +00249 { +00250 <span class="comment">// Swap X, randomly. swap more on border</span> +00251 <span class="comment">// evaluate the density in X direction we have at this point.</span> +00252 <span class="keywordtype">float</span> densX= edgeDensity[0]*(1-<a class="code" href="a04223.html#a572">x</a>) + edgeDensity[1]* <a class="code" href="a04223.html#a572">x</a> ; +00253 <span class="comment">// If on the side of the lowest density</span> +00254 <span class="keywordflow">if</span>(densX < edgeDensityCenterX) +00255 { +00256 <span class="comment">// may swap the position </span> +00257 <span class="keywordtype">float</span> rdSwap= (densX * OOEdgeDCX ); +00258 <span class="comment">// (densX * OOEdgeDCX) E [0..1[. The more it is near 0, the more is has chance to be swapped.</span> +00259 rdSwap+= <a class="code" href="a05363.html#a330">RandomGenerator</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea3">evalOneLevelRandom</a>( randSeed ); +00260 <span class="keywordflow">if</span>(rdSwap<1) +00261 instances[i].x= 1 - instances[i].x; +00262 } +00263 } +00264 +00265 <span class="comment">// Y change.</span> +00266 <span class="keywordflow">if</span>(middleY) +00267 { +00268 <span class="comment">// instances are grouped at middle. this is the bijection of easeInEaseOut</span> +00269 <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04223.html#a573">y</a>+<a class="code" href="a04223.html#a573">y</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_12">easeInEaseOut</a>(y); +00270 <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04223.html#a573">y</a>+<a class="code" href="a04223.html#a573">y</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_12">easeInEaseOut</a>(y); +00271 instances[i].y= <a class="code" href="a04223.html#a573">y</a>; +00272 } +00273 <span class="keywordflow">else</span> +00274 { +00275 <span class="comment">// Swap Y, randomly. swap more on border</span> +00276 <span class="comment">// evaluate the density in Y direction we have at this point.</span> +00277 <span class="keywordtype">float</span> densY= edgeDensity[2]*(1-<a class="code" href="a04223.html#a573">y</a>) + edgeDensity[3]* <a class="code" href="a04223.html#a573">y</a> ; +00278 <span class="comment">// If on the side of the lowest density</span> +00279 <span class="keywordflow">if</span>(densY < edgeDensityCenterY) +00280 { +00281 <span class="comment">// may swap the position </span> +00282 <span class="keywordtype">float</span> rdSwap= (densY * OOEdgeDCY); +00283 <span class="comment">// (densY * OOEdgeDCY) E [0..1[. The more it is near 0, the more is has chance to be swapped.</span> +00284 rdSwap+= <a class="code" href="a05363.html#a330">RandomGenerator</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea3">evalOneLevelRandom</a>( randSeed ); +00285 <span class="keywordflow">if</span>(rdSwap<1) +00286 instances[i].y= 1 - instances[i].y; +00287 } +00288 } +00289 +00290 } +00291 +00292 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_4" doxytag="NL3D::CVegetable::generateGroupEx" ></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"> void NL3D::CVegetable::generateGroupEx </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname" nowrap> <em>nbInst</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>posInWorld</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>surfaceNormal</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>vegetSeed</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>std::vector< <a class="el" href="a03660.html">CVector2f</a> > & </td> + <td class="mdname" nowrap> <em>instances</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Do the generateGroup, but take nbInst unmodulated by normal. +<p> + +<p> +Definition at line <a class="el" href="a06686.html#l00132">132</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00177">_CosAngleMiddle</a>, <a class="el" href="a06687.html#l00177">_OOCosAngleDist</a>, <a class="el" href="a06105.html#l00285">NLMISC::CNoiseValue::evalOneLevelRandom()</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05363.html#a330">NL3D::RandomGenerator</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00176">generateGroup()</a>, and <a class="el" href="a06686.html#l00190">generateGroupBiLinear()</a>. +<p> +<div class="fragment"><pre>00133 { +00134 +00135 <span class="comment">// Density modulation.</span> +00136 <span class="comment">//===================</span> +00137 +00138 <span class="comment">// compute cos of angle between surfaceNormal and K(0,0,1).</span> +00139 <span class="keywordtype">float</span> cosAngle= surfaceNormal.z; +00140 <span class="comment">// compute angleFactor density. Use a quadratic, because f'(_CosAngleMiddle)==0.</span> +00141 <span class="keywordtype">float</span> angleFact= 1 - <a class="code" href="a05378.html#a373">sqr</a>((cosAngle - _CosAngleMiddle) * _OOCosAngleDist); +00142 angleFact= max(0.f, angleFact); +00143 <span class="comment">// modulate density with angleFactor.</span> +00144 nbInst*= angleFact; +00145 +00146 <span class="comment">// Now, 0<=nbInst<+oo. If we have 0.1, it means that we have 10% chance to spawn an instance.</span> +00147 <span class="comment">// So add a "random" value (with help of a noise with High frequency)</span> +00148 <span class="comment">// if nbInst==0, we should never have any instance (which may arise if evalOneLevelRandom()==1).</span> +00149 <span class="comment">// hence the 0.99f* which ensure that we do nbInst+= [0..1[.</span> +00150 nbInst+= 0.99f * <a class="code" href="a05363.html#a330">RandomGenerator</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea3">evalOneLevelRandom</a>(posInWorld); +00151 +00152 <span class="comment">// and then get only the integral part.</span> +00153 <a class="code" href="a04558.html#a14">sint</a> nbInstances= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(nbInst); +00154 nbInstances= max(0, nbInstances); +00155 +00156 <span class="comment">// resize the instances</span> +00157 instances.resize(nbInstances); +00158 +00159 <span class="comment">// Position generation.</span> +00160 <span class="comment">//===================</span> +00161 <span class="comment">// For now, generate them randomly.</span> +00162 <span class="keyword">static</span> <a class="code" href="a03660.html">CVector2f</a> dSeed(0.513f, 0.267f); <span class="comment">// random values.</span> +00163 CVector seed= posInWorld; +00164 seed.z+= vegetSeed * 0.723f; <span class="comment">// 0.723f is a random value.</span> +00165 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i<nbInstances; i++) +00166 { +00167 instances[i].x= <a class="code" href="a05363.html#a330">RandomGenerator</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea3">evalOneLevelRandom</a>(seed); +00168 seed.x+= dSeed.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>; +00169 instances[i].y= <a class="code" href="a05363.html#a330">RandomGenerator</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea3">evalOneLevelRandom</a>(seed); +00170 seed.y+= dSeed.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>; +00171 } +00172 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_1" doxytag="NL3D::CVegetable::generateInstance" ></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"> void NL3D::CVegetable::generateInstance </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> * </td> + <td class="mdname" nowrap> <em>ig</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a02851.html">NLMISC::CMatrix</a> & </td> + <td class="mdname" nowrap> <em>posInWorld</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> & </td> + <td class="mdname" nowrap> <em>modulateAmbientColor</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> & </td> + <td class="mdname" nowrap> <em>modulateDiffuseColor</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>blendDistMax</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03671.html#NL3D_1_1CVegetablew5">TVegetableWater</a> </td> + <td class="mdname" nowrap> <em>vegetWaterState</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03685.html">CVegetableUV8</a> </td> + <td class="mdname" nowrap> <em>dlmUV</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +posInWorld should be a matrix of position + rotation (typically for surface alignement). FinalPos= posInWorld * noiseMatrix(scale/rot) If shape is Lighted: FinalAmbientColor= vegetManager->Ambient * modulateAmbientColor * randomColor. FinalDiffuseColor= vegetManager->Diffuse * modulateDiffuseColor * randomColor. else FinalAmbientColor= randomColor. FinalDiffuseColor= randomColor. If instance is in AlphaBlend/ZSort, blendDistMax is the distance where the instance is invisible (alpha==0). instance is added to the manager, under the instance group ig. This one must have been generated by the VegetableManager. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>dlmUV</em> </td><td>is the dynamic lightmap UV for this vegetable.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06686.html#l00306">306</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00183">_Manager</a>, <a class="el" href="a06687.html#l00185">_VegetableShape</a>, <a class="el" href="a06106.html#l00052">NLMISC::CNoiseValue::Abs</a>, <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, <a class="el" href="a06687.html#l00072">BendFactor</a>, <a class="el" href="a06687.html#l00076">BendFrequencyFactor</a>, <a class="el" href="a06687.html#l00074">BendPhase</a>, <a class="el" href="a06105.html#l00309">NLMISC::CNoiseColorGradient::eval()</a>, <a class="el" href="a06105.html#l00276">NLMISC::CNoiseValue::eval()</a>, <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a06703.html#l00129">NL3D::CVegetableShape::Lighted</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06106.html#l00053">NLMISC::CNoiseValue::Rand</a>, <a class="el" href="a06687.html#l00070">Rx</a>, <a class="el" href="a06687.html#l00070">Ry</a>, <a class="el" href="a06687.html#l00070">Rz</a>, <a class="el" href="a05972.html#l00644">NLMISC::CMatrix::scale()</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a06687.html#l00068">Sxy</a>, <a class="el" href="a06687.html#l00068">Sz</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. +<p> +<div class="fragment"><pre>00309 { +00310 <a class="code" href="a04199.html#a6">nlassert</a>(_Manager); +00311 +00312 +00313 CVector seed= posInWorld.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1963_6">getPos</a>(); +00314 +00315 <span class="comment">// Generate Matrix.</span> +00316 <span class="comment">// ===============</span> +00317 +00318 <span class="comment">// Generate a random Scale / Rotation matrix.</span> +00319 <a class="code" href="a02851.html">CMatrix</a> randomMat; +00320 <span class="comment">// setup rotation</span> +00321 CVector rot; +00322 rot.x= <a class="code" href="a03671.html#NL3D_1_1CVegetableo7">Rx</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00323 rot.y= <a class="code" href="a03671.html#NL3D_1_1CVegetableo8">Ry</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00324 rot.z= <a class="code" href="a03671.html#NL3D_1_1CVegetableo9">Rz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00325 randomMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_10">setRot</a>(rot, CMatrix::ZXY); +00326 <span class="comment">// scale.</span> +00327 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>!=0 || <a class="code" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>!=0 || <a class="code" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo0">Abs</a>!=0 || <a class="code" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValueo2">Rand</a>!=0) +00328 { +00329 CVector scale; +00330 scale.x= scale.y= <a class="code" href="a03671.html#NL3D_1_1CVegetableo11">Sxy</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00331 scale.z= <a class="code" href="a03671.html#NL3D_1_1CVegetableo12">Sz</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00332 randomMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1965_6">scale</a>(scale); +00333 } +00334 +00335 <span class="comment">// Final Matrix.</span> +00336 <a class="code" href="a02851.html">CMatrix</a> finalMatrix; +00337 finalMatrix= posInWorld * randomMat; +00338 +00339 <span class="comment">// Generate Color and factor</span> +00340 <span class="comment">// ===============</span> +00341 <a class="code" href="a03338.html">CRGBAF</a> materialColor(1,1,1,1); +00342 <span class="comment">// evaluate gradients. If none, color not modified.</span> +00343 <a class="code" href="a03671.html#NL3D_1_1CVegetableo3">Color</a>.<a class="code" href="a02989.html#NLMISC_1_1CNoiseColorGradienta0">eval</a>(seed, materialColor); +00344 <span class="comment">// modulate with user</span> +00345 <a class="code" href="a03338.html">CRGBAF</a> ambient, diffuse; +00346 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a> && <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a>->Lighted) +00347 { +00348 ambient= modulateAmbientColor * materialColor; +00349 diffuse= modulateDiffuseColor * materialColor; +00350 } +00351 <span class="keywordflow">else</span> +00352 { +00353 ambient= materialColor; +00354 diffuse= materialColor; +00355 } +00356 +00357 <span class="comment">// Generate a bendFactor</span> +00358 <span class="keywordtype">float</span> bendFactor= <a class="code" href="a03671.html#NL3D_1_1CVegetableo0">BendFactor</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00359 <span class="comment">// Generate a bendPhase</span> +00360 <span class="keywordtype">float</span> bendPhase= <a class="code" href="a03671.html#NL3D_1_1CVegetableo2">BendPhase</a>.<a class="code" href="a02990.html#NLMISC_1_1CNoiseValuea2">eval</a>(seed); +00361 +00362 +00363 <span class="comment">// Append to the vegetableManager</span> +00364 <span class="comment">// ===============</span> +00365 <span class="keywordflow">if</span> (<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a>) +00366 { +00367 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a>->addInstance(ig, _VegetableShape, finalMatrix, ambient, diffuse, +00368 bendFactor, bendPhase, BendFrequencyFactor, blendDistMax, +00369 (CVegetableManager::TVegetableWater)vegetWaterState, dlmUV); +00370 } +00371 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_1" doxytag="NL3D::CVegetable::getAngleType" ></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"> <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">TAngleType</a> NL3D::CVegetable::getAngleType </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00109">109</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +References <a class="el" href="a06687.html#l00179">_AngleType</a>, and <a class="el" href="a06687.html#l00090">TAngleType</a>. +<p> +<div class="fragment"><pre>00109 {<span class="keywordflow">return</span> <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_5">_AngleType</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_2" doxytag="NL3D::CVegetable::getCosAngleMax" ></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"> float NL3D::CVegetable::getCosAngleMax </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00108">108</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +References <a class="el" href="a06687.html#l00177">_CosAngleMax</a>. +<p> +<div class="fragment"><pre>00108 {<span class="keywordflow">return</span> <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_3" doxytag="NL3D::CVegetable::getCosAngleMin" ></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"> float NL3D::CVegetable::getCosAngleMin </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00107">107</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +References <a class="el" href="a06687.html#l00177">_CosAngleMin</a>. +<p> +<div class="fragment"><pre>00107 {<span class="keywordflow">return</span> <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablea2" doxytag="NL3D::CVegetable::registerToManager" ></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"> void NL3D::CVegetable::registerToManager </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03680.html">CVegetableManager</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>manager</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +register the vegetable to the vegetable manager. do it first. used by <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_1">generateInstance()</a>. Manager will load the shape needed for this vegetable. +<p> +Definition at line <a class="el" href="a06686.html#l00123">123</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00183">_Manager</a>, <a class="el" href="a06687.html#l00185">_VegetableShape</a>, <a class="el" href="a06698.html#l00781">NL3D::CVegetableManager::getVegetableShape()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06687.html#l00062">ShapeName</a>. +<p> +<div class="fragment"><pre>00124 { +00125 <a class="code" href="a04199.html#a6">nlassert</a>(manager); +00126 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a>= manager; +00127 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a>->getVegetableShape(ShapeName); +00128 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_2" doxytag="NL3D::CVegetable::reserveIgAddInstances" ></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"> void NL3D::CVegetable::reserveIgAddInstances </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> & </td> + <td class="mdname" nowrap> <em>vegetIgReserve</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03671.html#NL3D_1_1CVegetablew5">TVegetableWater</a> </td> + <td class="mdname" nowrap> <em>vegetWaterState</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>numInstances</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Fast allocation reservation: you must call this before generating all your instances in an Ig: Add N instances of Vegetable to the reservation system. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numInstances</em> </td><td>number of instances to generate (as "returned" by <a class="el" href="a03671.html#NL3D_1_1CVegetablea1">generateGroup()</a>). </td></tr> + </table> +</dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">CVegetableManager::reserveIgCompile()</a>.</dd></dl> + +<p> +Definition at line <a class="el" href="a06686.html#l00296">296</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00183">_Manager</a>, <a class="el" href="a06687.html#l00185">_VegetableShape</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06698.html#l00856">NL3D::CVegetableManager::reserveIgAddInstances()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. +<p> +<div class="fragment"><pre>00297 { +00298 <a class="code" href="a04199.html#a6">nlassert</a>(_Manager); +00299 +00300 <span class="keywordflow">if</span> (<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_11">_VegetableShape</a>) +00301 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_9">_Manager</a>->reserveIgAddInstances(vegetIgReserve, _VegetableShape, (CVegetableManager::TVegetableWater)vegetWaterState, numInstances); +00302 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_3" doxytag="NL3D::CVegetable::serial" ></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"> void NL3D::CVegetable::serial </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06686.html#l00375">375</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00179">_AngleType</a>, <a class="el" href="a06687.html#l00177">_CosAngleMax</a>, <a class="el" href="a06687.html#l00177">_CosAngleMiddle</a>, <a class="el" href="a06687.html#l00177">_CosAngleMin</a>, <a class="el" href="a06687.html#l00177">_OOCosAngleDist</a>, <a class="el" href="a06687.html#l00072">BendFactor</a>, <a class="el" href="a06687.html#l00076">BendFrequencyFactor</a>, <a class="el" href="a06687.html#l00074">BendPhase</a>, <a class="el" href="a06687.html#l00064">Density</a>, <a class="el" href="a06687.html#l00082">DistType</a>, <a class="el" href="a06687.html#l00066">MaxDensity</a>, <a class="el" href="a06687.html#l00070">Rx</a>, <a class="el" href="a06687.html#l00070">Ry</a>, <a class="el" href="a06687.html#l00070">Rz</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00261">NLMISC::IStream::serialEnum()</a>, <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>, <a class="el" href="a06687.html#l00062">ShapeName</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06687.html#l00068">Sxy</a>, and <a class="el" href="a06687.html#l00068">Sz</a>. +<p> +<div class="fragment"><pre>00376 { +00377 <span class="comment">/*</span> +00378 <span class="comment"> Version 1:</span> +00379 <span class="comment"> - add BendFrequencyFactor</span> +00380 <span class="comment"> Version 0:</span> +00381 <span class="comment"> - base version</span> +00382 <span class="comment"> */</span> +00383 <a class="code" href="a04558.html#a14">sint</a> ver= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(1); +00384 +00385 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(ShapeName); +00386 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(Density); +00387 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(MaxDensity); +00388 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_CosAngleMin, _CosAngleMax, _CosAngleMiddle, _OOCosAngleDist); +00389 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama7">serialEnum</a>(_AngleType); +00390 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(Sxy, Sz); +00391 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(Rx, Ry, Rz); +00392 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(BendFactor); +00393 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(BendPhase); +00394 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(Color); +00395 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(DistType); +00396 +00397 <span class="keywordflow">if</span>(ver>=1) +00398 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(BendFrequencyFactor); +00399 <span class="keywordflow">else</span> +00400 <a class="code" href="a03671.html#NL3D_1_1CVegetableo1">BendFrequencyFactor</a>= 1; +00401 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_4" doxytag="NL3D::CVegetable::setAngleCeiling" ></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"> void NL3D::CVegetable::setAngleCeiling </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>cosAngleMax</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +set an Angle setup such that max density is when normal= -K, and 0 density is when normalAngle= cosAngleMax. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>cosAngleMinLimit</em> </td><td>should be a cosinus angle between -1 and 1.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06686.html#l00091">91</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00179">_AngleType</a>, <a class="el" href="a06687.html#l00177">_CosAngleMax</a>, <a class="el" href="a06687.html#l00177">_CosAngleMiddle</a>, <a class="el" href="a06687.html#l00177">_CosAngleMin</a>, <a class="el" href="a06687.html#l00177">_OOCosAngleDist</a>, and <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew1">AngleCeiling</a>. +<p> +<div class="fragment"><pre>00092 { +00093 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_5">_AngleType</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew1">AngleCeiling</a>; +00094 +00095 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>= cosAngleMax; +00096 <span class="comment">// We must be at densityFactor==1, when cosAngle==-1, keeping the same formula.</span> +00097 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a>= -1 - (cosAngleMax-(-1)); +00098 +00099 <span class="comment">// precalc</span> +00100 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>= (<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a> + <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>)/2; +00101 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>; +00102 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>) +00103 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= 1.0f / <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>; +00104 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_5" doxytag="NL3D::CVegetable::setAngleGround" ></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"> void NL3D::CVegetable::setAngleGround </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname1" valign="top" nowrap> <em>cosAngleMin</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +set an Angle setup such that max density is when normal== K, and 0 density is when normalAngle= cosAngleMin. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>cosAngleMinLimit</em> </td><td>should be a cosinus angle between -1 and 1.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06686.html#l00075">75</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00179">_AngleType</a>, <a class="el" href="a06687.html#l00177">_CosAngleMax</a>, <a class="el" href="a06687.html#l00177">_CosAngleMiddle</a>, <a class="el" href="a06687.html#l00177">_CosAngleMin</a>, <a class="el" href="a06687.html#l00177">_OOCosAngleDist</a>, and <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew2">AngleGround</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>. +<p> +<div class="fragment"><pre>00076 { +00077 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_5">_AngleType</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew2">AngleGround</a>; +00078 +00079 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a>= cosAngleMin; +00080 <span class="comment">// We must be at densityFactor==1, when cosAngle==1, keeping the same formula.</span> +00081 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>= 1 + (1-cosAngleMin); +00082 +00083 <span class="comment">// precalc</span> +00084 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>= (<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a> + <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>)/2; +00085 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>; +00086 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>) +00087 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= 1.0f / <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>; +00088 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1099_6" doxytag="NL3D::CVegetable::setAngleWall" ></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"> void NL3D::CVegetable::setAngleWall </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname" nowrap> <em>cosAngleMin</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>cosAngleMax</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +set an Angle setup such that max density is when normal is at (cosAngleMin+cosAngleMax)/2, and 0 density is when cosAngle= one of the cosAngleMin or cosAngleMax. +<p> +Definition at line <a class="el" href="a06686.html#l00107">107</a> of file <a class="el" href="a06686.html">vegetable.cpp</a>. +<p> +References <a class="el" href="a06687.html#l00179">_AngleType</a>, <a class="el" href="a06687.html#l00177">_CosAngleMax</a>, <a class="el" href="a06687.html#l00177">_CosAngleMiddle</a>, <a class="el" href="a06687.html#l00177">_CosAngleMin</a>, <a class="el" href="a06687.html#l00177">_OOCosAngleDist</a>, and <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew3">AngleWall</a>. +<p> +<div class="fragment"><pre>00108 { +00109 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_5">_AngleType</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1099_0NL3D_1_1CVegetablew3">AngleWall</a>; +00110 +00111 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a>= cosAngleMin; +00112 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>= cosAngleMax; +00113 +00114 <span class="comment">// precalc</span> +00115 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>= (<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_8">_CosAngleMin</a> + <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a>)/2; +00116 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_6">_CosAngleMax</a> - <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_7">_CosAngleMiddle</a>; +00117 <span class="keywordflow">if</span>(<a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>) +00118 <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>= 1.0f / <a class="code" href="a03671.html#NL3D_1_1CVegetablez1100_10">_OOCosAngleDist</a>; +00119 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetablez1100_5" doxytag="NL3D::CVegetable::_AngleType" ></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"> <a class="el" href="a03671.html#NL3D_1_1CVegetablez1099_0">TAngleType</a> <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_5">NL3D::CVegetable::_AngleType</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +angle type setuped with setAngleMin etc... +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00179">179</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06687.html#l00109">getAngleType()</a>, <a class="el" href="a06686.html#l00375">serial()</a>, <a class="el" href="a06686.html#l00091">setAngleCeiling()</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, and <a class="el" href="a06686.html#l00107">setAngleWall()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_6" doxytag="NL3D::CVegetable::_CosAngleMax" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_6">NL3D::CVegetable::_CosAngleMax</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +density is multiplied by a function f(cos angle with verticalVector), such that f(CosAngleMiddle)==1, and f(CosAngleMin)==f(CosAngleMax)== 0 +<p> +Definition at line <a class="el" href="a06687.html#l00177">177</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06687.html#l00108">getCosAngleMax()</a>, <a class="el" href="a06686.html#l00375">serial()</a>, <a class="el" href="a06686.html#l00091">setAngleCeiling()</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, and <a class="el" href="a06686.html#l00107">setAngleWall()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_7" doxytag="NL3D::CVegetable::_CosAngleMiddle" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_7">NL3D::CVegetable::_CosAngleMiddle</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +density is multiplied by a function f(cos angle with verticalVector), such that f(CosAngleMiddle)==1, and f(CosAngleMin)==f(CosAngleMax)== 0 +<p> +Definition at line <a class="el" href="a06687.html#l00177">177</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00132">generateGroupEx()</a>, <a class="el" href="a06686.html#l00375">serial()</a>, <a class="el" href="a06686.html#l00091">setAngleCeiling()</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, and <a class="el" href="a06686.html#l00107">setAngleWall()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_8" doxytag="NL3D::CVegetable::_CosAngleMin" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_8">NL3D::CVegetable::_CosAngleMin</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +density is multiplied by a function f(cos angle with verticalVector), such that f(CosAngleMiddle)==1, and f(CosAngleMin)==f(CosAngleMax)== 0 +<p> +Definition at line <a class="el" href="a06687.html#l00177">177</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06687.html#l00107">getCosAngleMin()</a>, <a class="el" href="a06686.html#l00375">serial()</a>, <a class="el" href="a06686.html#l00091">setAngleCeiling()</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, and <a class="el" href="a06686.html#l00107">setAngleWall()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_9" doxytag="NL3D::CVegetable::_Manager" ></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"> <a class="el" href="a03680.html">CVegetableManager</a>* <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_9">NL3D::CVegetable::_Manager</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +the manager +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00183">183</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, <a class="el" href="a06686.html#l00123">registerToManager()</a>, and <a class="el" href="a06686.html#l00296">reserveIgAddInstances()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_10" doxytag="NL3D::CVegetable::_OOCosAngleDist" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_10">NL3D::CVegetable::_OOCosAngleDist</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +density is multiplied by a function f(cos angle with verticalVector), such that f(CosAngleMiddle)==1, and f(CosAngleMin)==f(CosAngleMax)== 0 +<p> +Definition at line <a class="el" href="a06687.html#l00177">177</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00132">generateGroupEx()</a>, <a class="el" href="a06686.html#l00375">serial()</a>, <a class="el" href="a06686.html#l00091">setAngleCeiling()</a>, <a class="el" href="a06686.html#l00075">setAngleGround()</a>, and <a class="el" href="a06686.html#l00107">setAngleWall()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetablez1100_11" doxytag="NL3D::CVegetable::_VegetableShape" ></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"> <a class="el" href="a03682.html">CVegetableShape</a>* <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_11">NL3D::CVegetable::_VegetableShape</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +shape in the manager +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00185">185</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00306">generateInstance()</a>, <a class="el" href="a06686.html#l00123">registerToManager()</a>, and <a class="el" href="a06686.html#l00296">reserveIgAddInstances()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo0" doxytag="NL3D::CVegetable::BendFactor" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo0">NL3D::CVegetable::BendFactor</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Bend factor. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00072">72</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo1" doxytag="NL3D::CVegetable::BendFrequencyFactor" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetableo1">NL3D::CVegetable::BendFrequencyFactor</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Fixed Bend FrequencyFactor. NB: rounded during addInstance to the nearest NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00076">76</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo2" doxytag="NL3D::CVegetable::BendPhase" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo2">NL3D::CVegetable::BendPhase</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Bend Phase. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00074">74</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo3" doxytag="NL3D::CVegetable::Color" ></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"> <a class="el" href="a02989.html">NLMISC::CNoiseColorGradient</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo3">NL3D::CVegetable::Color</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +The color to modulate the instance. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00078">78</a> of file <a class="el" href="a06687.html">vegetable.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo4" doxytag="NL3D::CVegetable::Density" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo4">NL3D::CVegetable::Density</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Density== Number of instance to create / mē. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00064">64</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00176">generateGroup()</a>, <a class="el" href="a06686.html#l00190">generateGroupBiLinear()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo5" doxytag="NL3D::CVegetable::DistType" ></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"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo5">NL3D::CVegetable::DistType</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +At which distance this vegetable will be rendered. NB: DistType is not managed by <a class="el" href="a03680.html">CVegetableManager</a>, but by user (eg <a class="el" href="a02702.html">CLandscape</a>). +<p> +Definition at line <a class="el" href="a06687.html#l00082">82</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo6" doxytag="NL3D::CVegetable::MaxDensity" ></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"> float <a class="el" href="a03671.html#NL3D_1_1CVegetableo6">NL3D::CVegetable::MaxDensity</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +the maximum density computed. if <0, no maximum. -1 by default. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00066">66</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00176">generateGroup()</a>, <a class="el" href="a06686.html#l00190">generateGroupBiLinear()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo7" doxytag="NL3D::CVegetable::Rx" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo7">NL3D::CVegetable::Rx</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Orientation. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00070">70</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo8" doxytag="NL3D::CVegetable::Ry" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo8">NL3D::CVegetable::Ry</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Orientation. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00070">70</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo9" doxytag="NL3D::CVegetable::Rz" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo9">NL3D::CVegetable::Rz</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Orientation. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00070">70</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo10" doxytag="NL3D::CVegetable::ShapeName" ></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"> std::string <a class="el" href="a03671.html#NL3D_1_1CVegetableo10">NL3D::CVegetable::ShapeName</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Name of the shape to use. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00062">62</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00123">registerToManager()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo11" doxytag="NL3D::CVegetable::Sxy" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo11">NL3D::CVegetable::Sxy</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Scale. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00068">68</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableo12" doxytag="NL3D::CVegetable::Sz" ></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"> <a class="el" href="a02990.html">NLMISC::CNoiseValue</a> <a class="el" href="a03671.html#NL3D_1_1CVegetableo12">NL3D::CVegetable::Sz</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Random Scale. +<p> + +<p> +Definition at line <a class="el" href="a06687.html#l00068">68</a> of file <a class="el" href="a06687.html">vegetable.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00048">CVegetable()</a>, <a class="el" href="a06686.html#l00306">generateInstance()</a>, and <a class="el" href="a06686.html#l00375">serial()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06687.html">vegetable.h</a><li><a class="el" href="a06686.html">vegetable.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:19:28 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |