diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a03682.html | 618 |
1 files changed, 618 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03682.html b/docs/doxygen/nel/a03682.html new file mode 100644 index 00000000..cc4c06c8 --- /dev/null +++ b/docs/doxygen/nel/a03682.html @@ -0,0 +1,618 @@ +<!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::CVegetableShape 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::CVegetableShape Class Reference</h1><code>#include <<a class="el" href="a06703.html">vegetable_shape.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +A vegetable shape. Ie not deformed by instanciation. <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="a06703.html#l00108">108</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapea0">build</a> (<a class="el" href="a03683.html">CVegetableShapeBuild</a> &vbuild)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapea1">CVegetableShape</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CVegetableShapea1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapea2">loadShape</a> (const std::string &shape)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapea3">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">serial <a href="#NL3D_1_1CVegetableShapea3"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td colspan="2"><div class="groupHeader">Shape def</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_0">AlphaBlend</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03683.html#NL3D_1_1CVegetableShapeBuildw3">CVegetableShapeBuild::TBendCenterMode</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_1">BendCenterMode</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_2">BestSidedPreComputeLighting</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_3">DoubleSided</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of this shape. <a href="#NL3D_1_1CVegetableShapez1130_4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">PreComputeLighting</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a04558.html#a11">uint32</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">TriangleIndices</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">list of triangles index <a href="#NL3D_1_1CVegetableShapez1130_6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03692.html">CVertexBuffer</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a></td></tr> + +<tr><td colspan="2"><div class="groupHeader">Temporary for easy Instanciation (correct size)</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a04558.html#a11">uint32</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1132_0">InstanceVertices</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">For each vertex of the shape, gives the index in the VegetableManager. <a href="#NL3D_1_1CVegetableShapez1132_0"></a><br><br></td></tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetableShapea1" doxytag="NL3D::CVegetableShape::CVegetableShape" ></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::CVegetableShape::CVegetableShape </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> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a06702.html#l00042">42</a> of file <a class="el" href="a06702.html">vegetable_shape.cpp</a>. +<p> +<div class="fragment"><pre>00043 { +00044 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a>= <span class="keyword">false</span>; +00045 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_3">DoubleSided</a>= <span class="keyword">false</span>; +00046 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">PreComputeLighting</a>= <span class="keyword">false</span>; +00047 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_0">AlphaBlend</a>= <span class="keyword">false</span>; +00048 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_2">BestSidedPreComputeLighting</a>= <span class="keyword">false</span>; +00049 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetableShapea0" doxytag="NL3D::CVegetableShape::build" ></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::CVegetableShape::build </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03683.html">CVegetableShapeBuild</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>vbuild</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> +build a vegetable shape, with a standard shape. +<p> +Definition at line <a class="el" href="a06702.html#l00052">52</a> of file <a class="el" href="a06702.html">vegetable_shape.cpp</a>. +<p> +References <a class="el" href="a06703.html#l00074">NL3D::CVegetableShapeBuild::AlphaBlend</a>, <a class="el" href="a06703.html#l00083">NL3D::CVegetableShapeBuild::BendCenterMode</a>, <a class="el" href="a06703.html#l00079">NL3D::CVegetableShapeBuild::BestSidedPreComputeLighting</a>, <a class="el" href="a06703.html#l00070">NL3D::CVegetableShapeBuild::DoubleSided</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a06710.html#l00465">NL3D::CVertexBuffer::getColorPointer()</a>, <a class="el" href="a06710.html#l00449">NL3D::CVertexBuffer::getNormalCoordPointer()</a>, <a class="el" href="a06198.html#l00108">NL3D::CPrimitiveBlock::getNumTri()</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a06710.html#l00497">NL3D::CVertexBuffer::getTexCoordPointer()</a>, <a class="el" href="a06197.html#l00091">NL3D::CPrimitiveBlock::getTriPointer()</a>, <a class="el" href="a06710.html#l00438">NL3D::CVertexBuffer::getVertexCoordPointer()</a>, <a class="el" href="a06711.html#l00319">NL3D::CVertexBuffer::getVertexFormat()</a>, <a class="el" href="a06703.html#l00147">InstanceVertices</a>, <a class="el" href="a06703.html#l00066">NL3D::CVegetableShapeBuild::Lighted</a>, <a class="el" href="a06703.html#l00081">NL3D::CVegetableShapeBuild::MaxBendWeight</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06703.html#l00064">NL3D::CVegetableShapeBuild::PB</a>, <a class="el" href="a06703.html#l00068">NL3D::CVegetableShapeBuild::PreComputeLighting</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06703.html#l00062">NL3D::CVegetableShapeBuild::VB</a>, <a class="el" href="a05646.html#l00236">w</a>, and <a class="el" href="a05646.html#l00236">z</a>. +<p> +<div class="fragment"><pre>00053 { +00054 <span class="comment">// Must have TexCoord0.</span> +00055 <a class="code" href="a04199.html#a6">nlassert</a>( vbuild.VB.getVertexFormat() & CVertexBuffer::TexCoord0Flag ); +00056 +00057 <span class="comment">// Header</span> +00058 <span class="comment">//---------</span> +00059 +00060 <span class="comment">// Lighted ?</span> +00061 <span class="keywordflow">if</span>(vbuild.Lighted && ( vbuild.VB.getVertexFormat() & CVertexBuffer::NormalFlag) ) +00062 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a>= <span class="keyword">true</span>; +00063 <span class="keywordflow">else</span> +00064 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a>= <span class="keyword">false</span>; +00065 +00066 <span class="comment">// DoubleSided</span> +00067 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_3">DoubleSided</a>= vbuild.DoubleSided; +00068 +00069 <span class="comment">// PreComputeLighting.</span> +00070 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">PreComputeLighting</a>= <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a> && vbuild.PreComputeLighting; +00071 +00072 <span class="comment">// AlphaBlend: valid only for 2Sided and Unlit (or similar PreComputeLighting) mode</span> +00073 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_0">AlphaBlend</a>= vbuild.AlphaBlend && <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_3">DoubleSided</a> && (!<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a> || <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">PreComputeLighting</a>); +00074 +00075 <span class="comment">// BestSidedPreComputeLighting</span> +00076 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_2">BestSidedPreComputeLighting</a>= <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">PreComputeLighting</a> && vbuild.BestSidedPreComputeLighting; +00077 +00078 <span class="comment">// BendCenterMode</span> +00079 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_1">BendCenterMode</a>= vbuild.BendCenterMode; +00080 +00081 <span class="comment">// Format of the VB.</span> +00082 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a641">format</a>; +00083 <a class="code" href="a04223.html#a641">format</a>= CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag | CVertexBuffer::TexCoord1Flag; +00084 <span class="comment">// lighted?</span> +00085 <span class="keywordflow">if</span>(<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a>) +00086 <a class="code" href="a04223.html#a641">format</a>|= CVertexBuffer::NormalFlag; +00087 <span class="comment">// set VB.</span> +00088 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.setVertexFormat(format); +00089 +00090 +00091 <span class="comment">// Fill triangles.</span> +00092 <span class="comment">//---------</span> +00093 <a class="code" href="a04558.html#a15">uint</a> i; +00094 <span class="comment">// resisz</span> +00095 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">TriangleIndices</a>.resize(vbuild.PB.getNumTri() * 3); +00096 <a class="code" href="a04558.html#a11">uint32</a> *srcTri= vbuild.PB.getTriPointer(); +00097 <span class="comment">// fill</span> +00098 <span class="keywordflow">for</span>(i=0; i<vbuild.PB.getNumTri(); i++) +00099 { +00100 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">TriangleIndices</a>[i*3+0]= *(srcTri++); +00101 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">TriangleIndices</a>[i*3+1]= *(srcTri++); +00102 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">TriangleIndices</a>[i*3+2]= *(srcTri++); +00103 } +00104 +00105 +00106 <span class="comment">// Fill vertices.</span> +00107 <span class="comment">//---------</span> +00108 <span class="comment">// resize</span> +00109 <a class="code" href="a04558.html#a11">uint32</a> nbVerts= vbuild.VB.getNumVertices(); +00110 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.setNumVertices(nbVerts); +00111 <span class="comment">// if no vertex color, </span> +00112 <span class="keywordtype">float</span> maxZ= 0; +00113 <span class="keywordtype">bool</span> bendFromColor= <span class="keyword">true</span>; +00114 <span class="keywordflow">if</span>(! (vbuild.VB.getVertexFormat() & CVertexBuffer::PrimaryColorFlag) ) +00115 { +00116 <span class="comment">// must compute bendWeight from z.</span> +00117 bendFromColor= <span class="keyword">false</span>; +00118 <span class="comment">// get the maximum Z.</span> +00119 <span class="keywordflow">for</span>(i=0;i<nbVerts;i++) +00120 { +00121 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a574">z</a>= ((CVector*)vbuild.VB.getVertexCoordPointer(i))->z; +00122 maxZ= max(z, maxZ); +00123 } +00124 <span class="comment">// if no positive value, bend will always be 0.</span> +00125 <span class="keywordflow">if</span>(maxZ==0) +00126 maxZ= 1; +00127 } +00128 +00129 <span class="comment">// For all vertices, fill</span> +00130 <span class="keywordflow">for</span>(i=0;i<nbVerts;i++) +00131 { +00132 <span class="comment">// Position.</span> +00133 CVector *srcPos= (CVector*)vbuild.VB.getVertexCoordPointer(i); +00134 CVector *dstPos= (CVector*)<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getVertexCoordPointer(i); +00135 *dstPos= *srcPos; +00136 +00137 <span class="comment">// Normal</span> +00138 <span class="keywordflow">if</span>(<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">Lighted</a>) +00139 { +00140 CVector *srcNormal= (CVector*)vbuild.VB.getNormalCoordPointer(i); +00141 CVector *dstNormal= (CVector*)<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getNormalCoordPointer(i); +00142 *dstNormal= *srcNormal; +00143 } +00144 +00145 <span class="comment">// Texture.</span> +00146 <a class="code" href="a03640.html">CUV</a> *srcUV= (<a class="code" href="a03640.html">CUV</a>*)vbuild.VB.getTexCoordPointer(i, 0); +00147 <a class="code" href="a03640.html">CUV</a> *dstUV= (<a class="code" href="a03640.html">CUV</a>*)<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getTexCoordPointer(i, 0); +00148 *dstUV= *srcUV; +00149 +00150 <span class="comment">// Bend.</span> +00151 <span class="comment">// copy to texture stage 1.</span> +00152 <a class="code" href="a03640.html">CUV</a> *dstUVBend= (<a class="code" href="a03640.html">CUV</a>*)<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getTexCoordPointer(i, 1); +00153 <span class="keywordflow">if</span>(bendFromColor) +00154 { +00155 <a class="code" href="a03337.html">CRGBA</a> *srcColor= (<a class="code" href="a03337.html">CRGBA</a>*)vbuild.VB.getColorPointer(i); +00156 <span class="comment">// Copy and scale by MaxBendWeight</span> +00157 dstUVBend-><a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= (srcColor-><a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> / 255.f) * vbuild.MaxBendWeight; +00158 } +00159 <span class="keywordflow">else</span> +00160 { +00161 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a575">w</a>= srcPos->z / maxZ; +00162 <a class="code" href="a04223.html#a575">w</a>= max(w, 0.f); +00163 <span class="comment">// Copy and scale by MaxBendWeight</span> +00164 dstUVBend-><a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= <a class="code" href="a04223.html#a575">w</a> * vbuild.MaxBendWeight; +00165 } +00166 } +00167 +00168 +00169 <span class="comment">// Misc.</span> +00170 <span class="comment">//---------</span> +00171 <span class="comment">// prepare for instanciation</span> +00172 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1132_0">InstanceVertices</a>.resize(<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getNumVertices()); +00173 +00174 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapea2" doxytag="NL3D::CVegetableShape::loadShape" ></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::CVegetableShape::loadShape </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>shape</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> +load a vegetable shape (.veget), lookup into CPath, and serial +<p> +Definition at line <a class="el" href="a06702.html#l00177">177</a> of file <a class="el" href="a06702.html">vegetable_shape.cpp</a>. +<p> +References <a class="el" href="a06702.html#l00186">serial()</a>. +<p> +Referenced by <a class="el" href="a06698.html#l00781">NL3D::CVegetableManager::getVegetableShape()</a>. +<p> +<div class="fragment"><pre>00178 { +00179 string path= CPath::lookup(shape); +00180 <span class="comment">// read this file</span> +00181 <a class="code" href="a02653.html">CIFile</a> f(path); +00182 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapea3">serial</a>(f); +00183 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapea3" doxytag="NL3D::CVegetableShape::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::CVegetableShape::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> +serial +<p> + +<p> +Definition at line <a class="el" href="a06702.html#l00186">186</a> of file <a class="el" href="a06702.html">vegetable_shape.cpp</a>. +<p> +References <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a06703.html#l00147">InstanceVertices</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00520">NLMISC::IStream::serialCheck()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</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="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a06702.html#l00177">loadShape()</a>. +<p> +<div class="fragment"><pre>00187 { +00188 <span class="comment">/*</span> +00189 <span class="comment"> Version 1: </span> +00190 <span class="comment"> - BestSidedPreComputeLighting</span> +00191 <span class="comment"> */</span> +00192 <a class="code" href="a04558.html#a14">sint</a> ver= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(1); +00193 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_0">serialCheck</a>((<a class="code" href="a04558.html#a11">uint32</a>)'_LEN'); +00194 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_0">serialCheck</a>((<a class="code" href="a04558.html#a11">uint32</a>)'GEV_'); +00195 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_0">serialCheck</a>((<a class="code" href="a04558.html#a11">uint32</a>)'BATE'); +00196 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_0">serialCheck</a>((<a class="code" href="a04558.html#a11">uint32</a>)'__EL'); +00197 +00198 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(Lighted); +00199 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(DoubleSided); +00200 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(PreComputeLighting); +00201 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(AlphaBlend); +00202 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama7">serialEnum</a>(BendCenterMode); +00203 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(VB); +00204 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(TriangleIndices); +00205 +00206 <span class="keywordflow">if</span>(ver>=1) +00207 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(BestSidedPreComputeLighting); +00208 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()) +00209 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_2">BestSidedPreComputeLighting</a>= <span class="keyword">false</span>; +00210 +00211 <span class="comment">// if reading</span> +00212 <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()) +00213 { +00214 <span class="comment">// prepare for instanciation</span> +00215 <a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1132_0">InstanceVertices</a>.resize(<a class="code" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">VB</a>.getNumVertices()); +00216 } +00217 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_0" doxytag="NL3D::CVegetableShape::AlphaBlend" ></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"> bool <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_0">NL3D::CVegetableShape::AlphaBlend</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00132">132</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l00817">NL3D::CVegetableManager::getRdrPassInfoForShape()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_1" doxytag="NL3D::CVegetableShape::BendCenterMode" ></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="a03683.html#NL3D_1_1CVegetableShapeBuildw3">CVegetableShapeBuild::TBendCenterMode</a> <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_1">NL3D::CVegetableShape::BendCenterMode</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00134">134</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_2" doxytag="NL3D::CVegetableShape::BestSidedPreComputeLighting" ></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"> bool <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_2">NL3D::CVegetableShape::BestSidedPreComputeLighting</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00133">133</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_3" doxytag="NL3D::CVegetableShape::DoubleSided" ></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"> bool <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_3">NL3D::CVegetableShape::DoubleSided</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00130">130</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l00817">NL3D::CVegetableManager::getRdrPassInfoForShape()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1132_0" doxytag="NL3D::CVegetableShape::InstanceVertices" ></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::vector<<a class="el" href="a04558.html#a11">uint32</a>> <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1132_0">NL3D::CVegetableShape::InstanceVertices</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +For each vertex of the shape, gives the index in the VegetableManager. +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00147">147</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, <a class="el" href="a06702.html#l00052">build()</a>, <a class="el" href="a06702.html#l00186">serial()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_4" doxytag="NL3D::CVegetableShape::Lighted" ></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"> bool <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_4">NL3D::CVegetableShape::Lighted</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Type of this shape. +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00129">129</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06686.html#l00306">NL3D::CVegetable::generateInstance()</a>, <a class="el" href="a06698.html#l00817">NL3D::CVegetableManager::getRdrPassInfoForShape()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_5" doxytag="NL3D::CVegetableShape::PreComputeLighting" ></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"> bool <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_5">NL3D::CVegetableShape::PreComputeLighting</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00131">131</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l00817">NL3D::CVegetableManager::getRdrPassInfoForShape()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_6" doxytag="NL3D::CVegetableShape::TriangleIndices" ></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::vector<<a class="el" href="a04558.html#a11">uint32</a>> <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_6">NL3D::CVegetableShape::TriangleIndices</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +list of triangles index +<p> + +<p> +Definition at line <a class="el" href="a06703.html#l00140">140</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, and <a class="el" href="a06698.html#l00856">NL3D::CVegetableManager::reserveIgAddInstances()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CVegetableShapez1130_7" doxytag="NL3D::CVegetableShape::VB" ></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="a03692.html">CVertexBuffer</a> <a class="el" href="a03682.html#NL3D_1_1CVegetableShapez1130_7">NL3D::CVegetableShape::VB</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +VertexBuffer of this Shape, ready to be transformed and copied into vegetable manager Format is Pos/Normal/Tex0/Tex1 (no Normal if !Lighted). where Tex1.U==BendWeigth +<p> +Definition at line <a class="el" href="a06703.html#l00138">138</a> of file <a class="el" href="a06703.html">vegetable_shape.h</a>. +<p> +Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, <a class="el" href="a06698.html#l00856">NL3D::CVegetableManager::reserveIgAddInstances()</a>, and <a class="el" href="a06698.html#l02354">NL3D::CVegetableManager::updateInstanceLighting()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06703.html">vegetable_shape.h</a><li><a class="el" href="a06702.html">vegetable_shape.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:22:23 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> |