diff options
Diffstat (limited to 'docs/doxygen/nel/ps__shockwave_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/ps__shockwave_8cpp-source.html | 547 |
1 files changed, 547 insertions, 0 deletions
diff --git a/docs/doxygen/nel/ps__shockwave_8cpp-source.html b/docs/doxygen/nel/ps__shockwave_8cpp-source.html new file mode 100644 index 00000000..e88b9430 --- /dev/null +++ b/docs/doxygen/nel/ps__shockwave_8cpp-source.html @@ -0,0 +1,547 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.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">Compound List</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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>ps_shockwave.cpp</h1><a href="ps__shockwave_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font> +00008 <font class="comment"> *</font> +00009 <font class="comment"> * This file is part of NEVRAX NEL.</font> +00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font> +00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00013 <font class="comment"> * any later version.</font> +00014 <font class="comment"></font> +00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font> +00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00018 <font class="comment"> * General Public License for more details.</font> +00019 <font class="comment"></font> +00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font> +00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00023 <font class="comment"> * MA 02111-1307, USA.</font> +00024 <font class="comment"> */</font> +00025 +00026 <font class="preprocessor">#include "<a class="code" href="std3d_8h.html">std3d.h</a>"</font> +00027 +00028 <font class="preprocessor">#include "<a class="code" href="ps__macro_8h.html">3d/ps_macro.h</a>"</font> +00029 <font class="preprocessor">#include "<a class="code" href="ps__shockwave_8h.html">3d/ps_shockwave.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="driver_8h.html">3d/driver.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="texture__grouped_8h.html">3d/texture_grouped.h</a>"</font> +00032 <font class="preprocessor">#include "<a class="code" href="ps__iterator_8h.html">3d/ps_iterator.h</a>"</font> +00033 <font class="preprocessor">#include "<a class="code" href="particle__system_8h.html">3d/particle_system.h</a>"</font> +00034 +00035 +00036 <font class="keyword">namespace </font>NL3D +00037 { +00038 +00040 <font class="comment">// constant definition //</font> +00042 <font class="comment"></font> +00043 <font class="comment">// max number of shockwave to be processed at once</font> +00044 <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a> = 128; +00045 +00046 <font class="comment">// the number of vertices we want in a vertex buffer</font> +00047 <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="namespaceNL3D.html#a191">NumVertsInBuffer</a> = 8 * <a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>; +00048 +00049 +<a name="l00050"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#r0">00050</a> CPSShockWave::TPBMap CPSShockWave::_PBMap; <font class="comment">// the primitive blocks</font> +<a name="l00051"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#r1">00051</a> CPSShockWave::TVBMap CPSShockWave::_VBMap; <font class="comment">// vb ith unanimated texture</font> +<a name="l00052"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#r2">00052</a> CPSShockWave::TVBMap CPSShockWave::_AnimTexVBMap; <font class="comment">// vb ith unanimated texture</font> +<a name="l00053"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#r3">00053</a> CPSShockWave::TVBMap CPSShockWave::_ColoredVBMap; <font class="comment">// vb ith unanimated texture</font> +<a name="l00054"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#r4">00054</a> CPSShockWave::TVBMap CPSShockWave::_ColoredAnimTexVBMap; <font class="comment">// vb ith unanimated texture</font> +00056 <font class="comment">// CPSShockWave implementation //</font> +00058 <font class="comment"></font> +00059 +<a name="l00065"></a><a class="code" href="classNL3D_1_1CPSShockWaveHelper.html">00065</a> <font class="keyword">class </font>CPSShockWaveHelper +00066 { +00067 <font class="keyword">public</font>: +00068 <font class="keyword">template</font> <<font class="keyword">class</font> T> +<a name="l00069"></a><a class="code" href="classNL3D_1_1CPSShockWaveHelper.html#d0">00069</a> <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSShockWaveHelper.html#d0">drawShockWave</a>(T posIt, CPSShockWave &<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint size, uint32 srcStep) +00070 { +00071 PARTICLES_CHECK_MEM; +00072 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Owner); +00073 +00074 <font class="comment">// get / build the vertex buffer and the primitive block</font> +00075 CVertexBuffer *vb; +00076 CPrimitiveBlock *pb; +00077 <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.getVBnPB(vb, pb); +00078 +00079 <font class="keyword">const</font> uint32 vSize = vb->getVertexSize(); +00080 IDriver *driver = <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.getDriver(); +00081 <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Owner->incrementNbDrawnParticles(size); <font class="comment">// for benchmark purpose </font> +00082 <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.setupDriverModelMatrix(); +00083 <font class="keyword">const</font> uint numShockWaveToDealWith = <a class="code" href="bit__set_8cpp.html#a0">std::min</a>(<a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.getNumShockWavesInVB()); +00084 driver->activeVertexBuffer(*vb); +00085 +00086 <font class="keyword">static</font> CPlaneBasis planeBasis[<a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>]; +00087 <font class="keywordtype">float</font> sizes[<a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>]; +00088 <font class="keywordtype">float</font> angles[<a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>]; +00089 +00090 uint leftToDo = size, toProcess; +00091 T endIt; +00092 uint8 *currVertex; +00093 uint k ; +00094 +00095 <font class="keyword">const</font> <font class="keywordtype">float</font> angleStep = 256.f / <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._NbSeg; +00096 <font class="keywordtype">float</font> currAngle; +00097 +00098 CPlaneBasis *ptCurrBasis; +00099 uint32 ptCurrBasisIncrement = <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._PlaneBasisScheme ? 1 : 0; +00100 +00101 <font class="keywordtype">float</font> *ptCurrSize; +00102 uint32 ptCurrSizeIncrement = <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._SizeScheme ? 1 : 0; +00103 +00104 <font class="keywordtype">float</font> *ptCurrAngle; +00105 uint32 ptCurrAngleIncrement = <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Angle2DScheme ? 1 : 0; +00106 +00107 CVector radVect, innerVect; +00108 <font class="keywordtype">float</font> radiusRatio; +00109 +00110 <font class="keywordflow">do</font> +00111 { +00112 currVertex = (uint8 *) vb->getVertexCoordPointer(); +00113 toProcess = leftToDo > numShockWaveToDealWith ? numShockWaveToDealWith : leftToDo; +00114 endIt = posIt + toProcess; +00115 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._SizeScheme) +00116 { +00117 ptCurrSize = (<font class="keywordtype">float</font> *) (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._SizeScheme->make(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Owner, size - leftToDo, (<font class="keywordtype">void</font> *) sizes, <font class="keyword">sizeof</font>(<font class="keywordtype">float</font>), toProcess, <font class="keyword">true</font>, srcStep)); +00118 } +00119 <font class="keywordflow">else</font> +00120 { +00121 ptCurrSize = &<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._ParticleSize; +00122 } +00123 +00124 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._PlaneBasisScheme) +00125 { +00126 ptCurrBasis = (CPlaneBasis *) (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._PlaneBasisScheme->make(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Owner, size - leftToDo, (<font class="keywordtype">void</font> *) planeBasis, <font class="keyword">sizeof</font>(CPlaneBasis), toProcess, <font class="keyword">true</font>, srcStep)); +00127 } +00128 <font class="keywordflow">else</font> +00129 { +00130 ptCurrBasis = &<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._PlaneBasis; +00131 } +00132 +00133 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Angle2DScheme) +00134 { +00135 ptCurrAngle = (<font class="keywordtype">float</font> *) (<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Angle2DScheme->make(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Owner, size - leftToDo, (<font class="keywordtype">void</font> *) angles, <font class="keyword">sizeof</font>(<font class="keywordtype">float</font>), toProcess, <font class="keyword">true</font>, srcStep)); +00136 } +00137 <font class="keywordflow">else</font> +00138 { +00139 ptCurrAngle = &<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Angle2D; +00140 } +00141 +00142 +00143 <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.updateVbColNUVForRender(size - leftToDo, toProcess, srcStep, *vb); +00144 <font class="keywordflow">do</font> +00145 { +00146 currAngle = *ptCurrAngle; +00147 <font class="keywordflow">if</font> (fabsf(*ptCurrSize) > 10E-6) +00148 { +00149 radiusRatio = (*ptCurrSize - <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._RadiusCut) / *ptCurrSize; +00150 } +00151 <font class="keywordflow">else</font> +00152 { +00153 radiusRatio = 0.f; +00154 } +00155 +00156 <font class="keywordflow">for</font> (k = 0; k <= <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._NbSeg; ++k) +00157 { +00158 radVect = *ptCurrSize * (CPSUtil::getCos((sint32) currAngle) * ptCurrBasis->X + CPSUtil::getSin((sint32) currAngle) * ptCurrBasis->Y); +00159 innerVect = radiusRatio * radVect; +00160 <a class="code" href="ps__macro_8h.html#a0">CHECK_VERTEX_BUFFER</a>(*vb, currVertex); +00161 * (CVector *) currVertex = *posIt + radVect; +00162 currVertex += vSize; +00163 <a class="code" href="ps__macro_8h.html#a0">CHECK_VERTEX_BUFFER</a>(*vb, currVertex); +00164 * (CVector *) currVertex = *posIt + innerVect; +00165 currVertex += vSize; +00166 currAngle += angleStep; +00167 } +00168 +00169 ++posIt; +00170 ptCurrBasis += ptCurrBasisIncrement; +00171 ptCurrSize += ptCurrSizeIncrement; +00172 ptCurrAngle += ptCurrAngleIncrement; +00173 } +00174 <font class="keywordflow">while</font> (posIt != endIt); +00175 +00176 pb->setNumQuad(toProcess * <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._NbSeg); +00177 driver->render(*pb, <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>._Mat); +00178 leftToDo -= toProcess; +00179 } +00180 <font class="keywordflow">while</font> (leftToDo); +00181 PARTICLES_CHECK_MEM; +00182 } +00183 }; +00184 +<a name="l00186"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a0">00186</a> CPSShockWave::CPSShockWave(uint nbSeg, <font class="keywordtype">float</font> radiusCut, CSmartPtr<ITexture> tex) +00187 : _NbSeg(nbSeg) +00188 , _RadiusCut(radiusCut) +00189 , _UFactor(1.f) +00190 +00191 { +00192 <a class="code" href="debug_8h.html#a6">nlassert</a>(nbSeg > 2 && nbSeg <= 64); +00193 <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#a8">setTexture</a>(tex); +00194 <a class="code" href="classNL3D_1_1CPSShockWave.html#c4">init</a>(); +00195 <a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n3">_Name</a> = std::string(<font class="stringliteral">"ShockWave"</font>); +00196 } +00197 +<a name="l00199"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a10">00199</a> uint32 CPSShockWave::getMaxNumFaces(<font class="keywordtype">void</font>)<font class="keyword"> const</font> +00200 <font class="keyword"></font>{ +00201 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>); +00202 <font class="keywordflow">return</font> (<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getMaxSize() * <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>) << 1 ; +00203 } +00204 +<a name="l00206"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a8">00206</a> <font class="keywordtype">bool</font> CPSShockWave::hasTransparentFaces(<font class="keywordtype">void</font>) +00207 { +00208 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSMaterial.html#a3">getBlendingMode</a>() != CPSMaterial::alphaTest ; +00209 } +00210 +<a name="l00212"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a9">00212</a> <font class="keywordtype">bool</font> CPSShockWave::hasOpaqueFaces(<font class="keywordtype">void</font>) +00213 { +00214 <font class="keywordflow">return</font> !<a class="code" href="classNL3D_1_1CPSShockWave.html#a8">hasTransparentFaces</a>(); +00215 } +00216 +<a name="l00218"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a1">00218</a> <font class="keywordtype">void</font> CPSShockWave::setNbSegs(uint nbSeg) +00219 { +00220 <a class="code" href="debug_8h.html#a6">nlassert</a>(nbSeg > 2 && nbSeg <= 64); +00221 <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> = nbSeg; +00222 <font class="keywordflow">if</font> (_Owner) +00223 { +00224 <a class="code" href="classNL3D_1_1CPSShockWave.html#b5">resize</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getMaxSize()); +00225 <a class="code" href="classNL3D_1_1CPSParticle.html#b0">notifyOwnerMaxNumFacesChanged</a>(); +00226 } +00227 } +00228 +<a name="l00230"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a3">00230</a> <font class="keywordtype">void</font> CPSShockWave::setRadiusCut(<font class="keywordtype">float</font> radiusCut) +00231 { +00232 <a class="code" href="classNL3D_1_1CPSShockWave.html#o1">_RadiusCut</a> = radiusCut; +00233 <font class="keywordflow">if</font> (_Owner) +00234 { +00235 <a class="code" href="classNL3D_1_1CPSShockWave.html#b5">resize</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getMaxSize()); +00236 } +00237 } +00238 +<a name="l00240"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a11">00240</a> <font class="keywordtype">void</font> CPSShockWave::setUFactor(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>) +00241 { +00242 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>); <font class="comment">// must be attached to an owner before to call this method</font> +00243 <a class="code" href="classNL3D_1_1CPSShockWave.html#o2">_UFactor</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>; +00244 <a class="code" href="classNL3D_1_1CPSShockWave.html#b5">resize</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getSize()); <font class="comment">// resize also recomputes the UVs..</font> +00245 } +00246 +<a name="l00248"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a5">00248</a> <font class="keywordtype">void</font> CPSShockWave::serial(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(NLMISC::EStream) +00249 { +00250 sint ver = f.serialVersion(2); +00251 CPSParticle::serial(f); +00252 CPSColoredParticle::serialColorScheme(f); +00253 CPSSizedParticle::serialSizeScheme(f); +00254 CPSTexturedParticle::serialTextureScheme(f); +00255 CPSRotated3DPlaneParticle::serialPlaneBasisScheme(f); +00256 CPSRotated2DParticle::serialAngle2DScheme(f); +00257 serialMaterial(f); +00258 f.serial(_NbSeg, _RadiusCut); +00259 <font class="keywordflow">if</font> (ver > 1) +00260 { +00261 f.serial(_UFactor); +00262 } +00263 init(); +00264 } +00265 +<a name="l00267"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#c2">00267</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> CPSShockWave::setupUFactor() +00268 { +00269 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSShockWave.html#o2">_UFactor</a> != 1.f) +00270 { +00271 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.enableUserTexMat(0); +00272 CMatrix texMat; +00273 texMat.setRot(<a class="code" href="classNL3D_1_1CPSShockWave.html#o2">_UFactor</a> * <a class="code" href="classNLMISC_1_1CVector.html#p1">NLMISC::CVector::I</a>, +00274 <a class="code" href="classNLMISC_1_1CVector.html#p2">NLMISC::CVector::J</a>, +00275 <a class="code" href="classNLMISC_1_1CVector.html#p3">NLMISC::CVector::K</a> +00276 ); +00277 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setUserTexMat(0, texMat); +00278 } +00279 <font class="keywordflow">else</font> +00280 { +00281 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.enableUserTexMat(0, <font class="keyword">false</font>); +00282 } +00283 } +00284 +<a name="l00286"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#c3">00286</a> <font class="keywordtype">void</font> CPSShockWave::draw(<font class="keywordtype">bool</font> opaque) +00287 { +00288 PARTICLES_CHECK_MEM; +00289 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getSize()) <font class="keywordflow">return</font>; +00290 +00291 uint32 <a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a>; +00292 uint numToProcess; +00293 <a class="code" href="classNL3D_1_1CPSParticle.html#b4">computeSrcStep</a>(<a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a>, numToProcess); +00294 <font class="keywordflow">if</font> (!numToProcess) <font class="keywordflow">return</font>; +00295 +00296 +00297 +00299 CParticleSystem &ps = *(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getOwner()); +00301 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSColoredParticle.html#n1">_ColorScheme</a> != NULL && ps.getColorAttenuationScheme() != NULL) +00302 { +00303 CPSMaterial::forceModulateConstantColor(<font class="keyword">true</font>, ps.getGlobalColor()); +00304 } +00305 <font class="keywordflow">else</font> +00306 { +00307 <a class="code" href="classNL3D_1_1CPSMaterial.html#a4">forceModulateConstantColor</a>(<font class="keyword">false</font>); +00308 <font class="keywordflow">if</font> (!ps.getColorAttenuationScheme()) +00309 { +00310 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setColor(<a class="code" href="classNL3D_1_1CPSColoredParticle.html#n0">_Color</a>); +00311 } +00312 <font class="keywordflow">else</font> +00313 { +00314 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> col; +00315 col.<a class="code" href="classNLMISC_1_1CRGBA.html#a9">modulateFromColor</a>(ps.getGlobalColor(), <a class="code" href="classNL3D_1_1CPSColoredParticle.html#n0">_Color</a>); +00316 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setColor(col); +00317 } +00318 } +00320 +00321 <a class="code" href="classNL3D_1_1CPSShockWave.html#c2">setupUFactor</a>(); +00322 +00323 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a> == (1 << 16)) +00324 { +00325 CPSShockWaveHelper::drawShockWave(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getPos().begin(), +00326 *<font class="keyword">this</font>, +00327 numToProcess, +00328 <a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a> +00329 ); +00330 } +00331 <font class="keywordflow">else</font> +00332 { +00333 CPSShockWaveHelper::drawShockWave(<a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getPos().begin(), 0, <a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a>), +00334 *<font class="keyword">this</font>, +00335 numToProcess, +00336 <a class="code" href="classNL3D_1_1CPSParticle.html#a4">step</a> +00337 ); +00338 } +00339 +00340 PARTICLES_CHECK_MEM; +00341 } +00342 +<a name="l00344"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#a7">00344</a> <font class="keywordtype">bool</font> CPSShockWave::completeBBox(<a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> &box)<font class="keyword"> const</font> +00345 <font class="keyword"></font>{ +00346 <font class="comment">// TODO : implement this</font> +00347 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00348 } +00349 +<a name="l00351"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#c4">00351</a> <font class="keywordtype">void</font> CPSShockWave::init(<font class="keywordtype">void</font>) +00352 { +00353 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setLighting(<font class="keyword">false</font>); +00354 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setZFunc(CMaterial::less); +00355 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setDoubleSided(<font class="keyword">true</font>); +00356 <a class="code" href="classNL3D_1_1CPSShockWave.html#b1">updateMatAndVbForColor</a>(); +00357 <a class="code" href="classNL3D_1_1CPSShockWave.html#b2">updateMatAndVbForTexture</a>(); +00358 } +00359 +<a name="l00361"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b0">00361</a> <font class="keywordtype">void</font> CPSShockWave::updateVbColNUVForRender(uint32 startIndex, uint32 size, uint32 srcStep, CVertexBuffer &vb) +00362 { +00363 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>); +00364 <font class="keywordflow">if</font> (!size) <font class="keywordflow">return</font>; +00365 <font class="keywordflow">if</font> (_ColorScheme) +00366 { +00367 <font class="comment">// compute the colors, each color is replicated n times...</font> +00368 <a class="code" href="classNL3D_1_1CPSColoredParticle.html#n1">_ColorScheme</a>->makeN(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>, startIndex, vb.getColorPointer(), vb.getVertexSize(), size, (<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1) << 1, srcStep); +00369 } +00370 +00371 <font class="keywordflow">if</font> (_TexGroup) <font class="comment">// if it has a constant texture we are sure it has been setupped before...</font> +00372 { +00373 sint32 textureIndex[<a class="code" href="namespaceNL3D.html#a219">ShockWaveBufSize</a>]; +00374 <font class="keyword">const</font> uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> = vb.getVertexSize(), stride2 = <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> << 1; +00375 uint8 *currUV = (uint8 *) vb.getTexCoordPointer(); +00376 uint k; +00377 +00378 uint32 currIndexIncr; +00379 <font class="keyword">const</font> sint32 *currIndex; +00380 +00381 <font class="keywordflow">if</font> (_TextureIndexScheme) +00382 { +00383 currIndex = (sint32 *) (<a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n2">_TextureIndexScheme</a>->make(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>, startIndex, textureIndex, <font class="keyword">sizeof</font>(sint32), size, <font class="keyword">true</font>, srcStep)); +00384 currIndexIncr = 1; +00385 } +00386 <font class="keywordflow">else</font> +00387 { +00388 currIndex = &<a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n3">_TextureIndex</a>; +00389 currIndexIncr = 0; +00390 } +00391 +00392 <font class="keywordflow">while</font> (size--) +00393 { +00394 <font class="comment">// for now, we don't make texture index wrapping</font> +00395 <font class="keyword">const</font> CTextureGrouped::TFourUV &uvGroup = <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n1">_TexGroup</a>->getUVQuad((uint32) *currIndex); +00396 +00397 k = <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1; +00398 +00399 <font class="keywordflow">for</font> (k = 0; k <= <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>; ++k) +00400 { +00401 +00402 *(CUV *) currUV = uvGroup.uv0 + CUV(k * <a class="code" href="classNL3D_1_1CPSShockWave.html#o2">_UFactor</a>, 0); +00403 *(CUV *) (currUV + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = uvGroup.uv3 + CUV(k * <a class="code" href="classNL3D_1_1CPSShockWave.html#o2">_UFactor</a>, 0); +00404 <font class="comment">// point the next quad</font> +00405 currUV += stride2; +00406 } +00407 <font class="keywordflow">while</font> (--k); +00408 +00409 currIndex += currIndexIncr; +00410 } +00411 } +00412 } +00413 +<a name="l00415"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b1">00415</a> <font class="keywordtype">void</font> CPSShockWave::updateMatAndVbForColor(<font class="keywordtype">void</font>) +00416 { +00417 +00418 <font class="keywordflow">if</font> (_Owner) +00419 { +00420 <a class="code" href="classNL3D_1_1CPSShockWave.html#b5">resize</a>(<a class="code" href="classNL3D_1_1CPSLocatedBindable.html#n0">_Owner</a>->getMaxSize()); +00421 } +00422 } +00423 +<a name="l00425"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b2">00425</a> <font class="keywordtype">void</font> CPSShockWave::updateMatAndVbForTexture(<font class="keywordtype">void</font>) +00426 { +00427 <a class="code" href="classNL3D_1_1CPSMaterial.html#n0">_Mat</a>.setTexture(0, <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n1">_TexGroup</a> ? (ITexture *) <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n1">_TexGroup</a> : (ITexture *) <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n0">_Tex</a>); +00428 } +00429 +<a name="l00431"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b3">00431</a> <font class="keywordtype">void</font> CPSShockWave::newElement(CPSLocated *emitterLocated, uint32 emitterIndex) +00432 { +00433 <a class="code" href="classNL3D_1_1CPSColoredParticle.html#b2">newColorElement</a>(emitterLocated, emitterIndex); +00434 <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#b2">newTextureIndexElement</a>(emitterLocated, emitterIndex); +00435 <a class="code" href="classNL3D_1_1CPSSizedParticle.html#b1">newSizeElement</a>(emitterLocated, emitterIndex); +00436 <a class="code" href="classNL3D_1_1CPSRotated2DParticle.html#b1">newAngle2DElement</a>(emitterLocated, emitterIndex); +00437 } +00438 +<a name="l00440"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b4">00440</a> <font class="keywordtype">void</font> CPSShockWave::deleteElement(uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) +00441 { +00442 <a class="code" href="classNL3D_1_1CPSColoredParticle.html#b3">deleteColorElement</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>); +00443 <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#b3">deleteTextureIndexElement</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>); +00444 <a class="code" href="classNL3D_1_1CPSSizedParticle.html#b2">deleteSizeElement</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>); +00445 <a class="code" href="classNL3D_1_1CPSRotated2DParticle.html#b2">deleteAngle2DElement</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>); +00446 } +00447 +<a name="l00449"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#b5">00449</a> <font class="keywordtype">void</font> CPSShockWave::resize(uint32 aSize) +00450 { +00451 <a class="code" href="debug_8h.html#a6">nlassert</a>(aSize < (1 << 16)); +00452 <a class="code" href="classNL3D_1_1CPSColoredParticle.html#b4">resizeColor</a>(aSize); +00453 <a class="code" href="classNL3D_1_1CPSTexturedParticle.html#b4">resizeTextureIndex</a>(aSize); +00454 <a class="code" href="classNL3D_1_1CPSSizedParticle.html#b3">resizeSize</a>(aSize); +00455 <a class="code" href="classNL3D_1_1CPSRotated2DParticle.html#b3">resizeAngle2D</a>(aSize); +00456 } +00457 +<a name="l00459"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#c0">00459</a> <font class="keywordtype">void</font> CPSShockWave::getVBnPB(CVertexBuffer *&retVb, CPrimitiveBlock *&retPb) +00460 { +00461 <a class="code" href="classNL3D_1_1CPSShockWave.html#u0">TVBMap</a> &vbMap = <a class="code" href="classNL3D_1_1CPSColoredParticle.html#n1">_ColorScheme</a> == NULL ? (<a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n1">_TexGroup</a> == NULL ? <a class="code" href="classNL3D_1_1CPSShockWave.html#r1">_VBMap</a> : <a class="code" href="classNL3D_1_1CPSShockWave.html#r2">_AnimTexVBMap</a>) +00462 : (<a class="code" href="classNL3D_1_1CPSTexturedParticle.html#n1">_TexGroup</a> == NULL ? <a class="code" href="classNL3D_1_1CPSShockWave.html#r3">_ColoredVBMap</a> : <a class="code" href="classNL3D_1_1CPSShockWave.html#r4">_ColoredAnimTexVBMap</a>); +00463 +00464 +00465 TVBMap::iterator vbIt = vbMap.find(<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>); +00466 <font class="keywordflow">if</font> (vbIt != vbMap.end()) +00467 { +00468 retVb = &(vbIt->second); +00469 TPBMap::iterator pbIt = <a class="code" href="classNL3D_1_1CPSShockWave.html#r0">_PBMap</a>.find(<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>); +00470 <a class="code" href="debug_8h.html#a6">nlassert</a>(pbIt != <a class="code" href="classNL3D_1_1CPSShockWave.html#r0">_PBMap</a>.end()); +00471 retPb = &(pbIt->second); +00472 } +00473 <font class="keywordflow">else</font> <font class="comment">// we need to create the vb</font> +00474 { +00475 <font class="comment">// create an entry (we setup the primitive block at the same time, this could be avoided, but doesn't make much difference) </font> +00476 CVertexBuffer &vb = vbMap[<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>]; <font class="comment">// create a vb</font> +00477 CPrimitiveBlock &pb = <a class="code" href="classNL3D_1_1CPSShockWave.html#r0">_PBMap</a>[<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>]; <font class="comment">// eventually create a pb</font> +00478 <font class="keyword">const</font> uint32 size = <a class="code" href="classNL3D_1_1CPSShockWave.html#c1">getNumShockWavesInVB</a>(); +00479 vb.setVertexFormat(CVertexBuffer::PositionFlag | +00480 CVertexBuffer::TexCoord0Flag | +00481 (<a class="code" href="classNL3D_1_1CPSColoredParticle.html#n1">_ColorScheme</a> != NULL ? CVertexBuffer::PrimaryColorFlag : 0) +00482 ); +00483 vb.setNumVertices((size * (<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1)) << 1 ); +00484 pb.reserveQuad(size * <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>); +00485 <font class="keywordflow">for</font> (uint32 k = 0; k < size; ++k) +00486 { +00487 <font class="keywordflow">for</font> (uint32 <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> = 0; <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> < <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>; ++<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>) +00488 { +00489 <font class="keyword">const</font> uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> = ((k * (<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1)) + <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>) << 1; +00490 pb.setQuad(<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> + (k * <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>) , <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> , <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + 2, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + 3, <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + 1); +00491 vb.setTexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, 0, CUV((<font class="keywordtype">float</font>) <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>, 0)); +00492 vb.setTexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + 1, 0, CUV((<font class="keywordtype">float</font>) <a class="code" href="namespaceNLAISCRIPT.html#a20">l</a>, 1)); +00493 } +00494 <font class="keyword">const</font> uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> = ((k * (<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1)) + <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>) << 1; +00495 vb.setTexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, 0, CUV((<font class="keywordtype">float</font>) <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>, 0)); +00496 vb.setTexCoord(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> + 1, 0, CUV((<font class="keywordtype">float</font>) <a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a>, 1)); +00497 } +00498 retVb = &vb; +00499 retPb = &pb; +00500 } +00501 } +00502 +<a name="l00504"></a><a class="code" href="classNL3D_1_1CPSShockWave.html#c1">00504</a> uint CPSShockWave::getNumShockWavesInVB()<font class="keyword"> const</font> +00505 <font class="keyword"></font>{ +00506 <font class="keyword">const</font> uint numRib = <a class="code" href="namespaceNL3D.html#a191">NumVertsInBuffer</a> / ((<a class="code" href="classNL3D_1_1CPSShockWave.html#o0">_NbSeg</a> + 1) << 1); +00507 <font class="keywordflow">return</font> std::max(1u, numRib); +00508 } +00509 +00510 } <font class="comment">// NL3D</font> +</pre></div> + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |