aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03168.html
blob: 5778e5015d43463085338621b22046c28fe183ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!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::CPSConstraintMesh::CMeshDisplayShare 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CPSConstraintMesh::CMeshDisplayShare Class Reference</h1><code>#include &lt;<a class="el" href="a06251.html">ps_mesh.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class manage sharing between several mesh displays. There can be a limited number of them at a given time.
<p>

<p>
Definition at line <a class="el" href="a06251.html#l00480">480</a> of file <a class="el" href="a06251.html">ps_mesh.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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharea0">CMeshDisplayShare</a> (<a class="el" href="a04558.html#a15">uint</a> maxNumMD)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ctor giving the max number of CDipslayMesh structures to be kept simultaneously.  <a href="#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharea0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03167.html">CMeshDisplay</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharea1">getMeshDisplay</a> (<a class="el" href="a02857.html">CMesh</a> *mesh, <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a641">format</a>)</td></tr>

<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh0">buildRdrPassSet</a> (<a class="el" href="a03161.html#NL3D_1_1CPSConstraintMeshx4">TRdrPassSet</a> &amp;dest, const <a class="el" href="a02857.html">CMesh</a> &amp;mesh)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">build a set of render pass from a mesh  <a href="#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh1">buildVB</a> (<a class="el" href="a03692.html">CVertexBuffer</a> &amp;dest, const <a class="el" href="a02857.html">CMesh</a> &amp;mesh, <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a641">format</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build a vb from a shape. The format can add an additionnal color.  <a href="#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh1"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::list&lt; <a class="el" href="a03169.html">CMDEntry</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer1">_MaxNumMD</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">_NumMD</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharea0" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::CMeshDisplayShare" ></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::CPSConstraintMesh::CMeshDisplayShare::CMeshDisplayShare </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>maxNumMD</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
ctor giving the max number of CDipslayMesh structures to be kept simultaneously. 
<p>

<p>
Definition at line <a class="el" href="a06251.html#l00484">484</a> of file <a class="el" href="a06251.html">ps_mesh.h</a>.
<p>
References <a class="el" href="a06251.html#l00496">_MaxNumMD</a>, <a class="el" href="a06251.html#l00497">_NumMD</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00484 : <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer1">_MaxNumMD</a>(maxNumMD), <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">_NumMD</a>(0) {}
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh0" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::buildRdrPassSet" ></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::CPSConstraintMesh::CMeshDisplayShare::buildRdrPassSet </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03161.html#NL3D_1_1CPSConstraintMeshx4">TRdrPassSet</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02857.html">CMesh</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mesh</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static, private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
build a set of render pass from a mesh 
<p>

<p>
Definition at line <a class="el" href="a06250.html#l02064">2064</a> of file <a class="el" href="a06250.html">ps_mesh.cpp</a>.
<p>
References <a class="el" href="a06251.html#l00064">NL3D::ConstraintMeshBufSize</a>, <a class="el" href="a06250.html#l01937">NL3D::DuplicatePrimitiveBlock()</a>, <a class="el" href="a05992.html#l00179">NL3D::CMeshBase::getMaterial()</a>, <a class="el" href="a05989.html#l02437">NL3D::CMesh::getNbMatrixBlock()</a>, <a class="el" href="a05989.html#l02442">NL3D::CMesh::getNbRdrPass()</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a05989.html#l02452">NL3D::CMesh::getRdrPassMaterial()</a>, <a class="el" href="a05989.html#l02447">NL3D::CMesh::getRdrPassPrimitiveBlock()</a>, <a class="el" href="a05989.html#l02432">NL3D::CMesh::getVertexBuffer()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06251.html#l00444">NL3D::CPSConstraintMesh::TRdrPassSet</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06250.html#l02033">getMeshDisplay()</a>.
<p>
<div class="fragment"><pre>02065 {               
02066         <span class="comment">// we don't support skinning for mesh particles, so there must be only one matrix block </span>
02067         <a class="code" href="a04199.html#a6">nlassert</a>(m.getNbMatrixBlock() == 1);  <span class="comment">// SKINNING UNSUPPORTED</span>
02068         
02069         dest.resize(m.getNbRdrPass(0));
02070         <span class="keyword">const</span> CVertexBuffer &amp;srcVb = m.getVertexBuffer();
02071         
02072         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; m.getNbRdrPass(0); ++k)
02073         {
02074                 dest[k].Mat = m.getMaterial(m.getRdrPassMaterial(0, k));
02075                 dest[k].SourceMat = dest[k].Mat;
02076                 <a class="code" href="a05363.html#a498">DuplicatePrimitiveBlock</a>(m.getRdrPassPrimitiveBlock(0, k), dest[k].Pb, <a class="code" href="a05363.html#a264">ConstraintMeshBufSize</a>, srcVb.getNumVertices() );          
02077         }       
02078 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh1" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::buildVB" ></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::CPSConstraintMesh::CMeshDisplayShare::buildVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03692.html">CVertexBuffer</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02857.html">CMesh</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mesh</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>destFormat</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static, private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Build a vb from a shape. The format can add an additionnal color. 
<p>
we duplicate the original mesh data's 'ConstraintMeshBufSize' times, eventually adding a color 
<p>
Definition at line <a class="el" href="a06250.html#l02081">2081</a> of file <a class="el" href="a06250.html">ps_mesh.cpp</a>.
<p>
References <a class="el" href="a06251.html#l00064">NL3D::ConstraintMeshBufSize</a>, <a class="el" href="a06711.html#l00340">NL3D::CVertexBuffer::getColorOff()</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a06711.html#l00504">NL3D::CVertexBuffer::getUVRouting()</a>, <a class="el" href="a05989.html#l02432">NL3D::CMesh::getVertexBuffer()</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="a06711.html#l00473">NL3D::CVertexBuffer::getVertexSize()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06711.html#l00505">NL3D::CVertexBuffer::setUVRouting()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l00237">v</a>.
<p>
Referenced by <a class="el" href="a06250.html#l02033">getMeshDisplay()</a>.
<p>
<div class="fragment"><pre>02082 {
02084         <span class="keyword">const</span> CVertexBuffer &amp;meshVb = mesh.getVertexBuffer();   
02085         <a class="code" href="a04199.html#a6">nlassert</a>(destFormat == meshVb.getVertexFormat() || destFormat == (meshVb.getVertexFormat() | (<a class="code" href="a04558.html#a11">uint32</a>) CVertexBuffer::PrimaryColorFlag) );
02086         dest.setVertexFormat(destFormat);       
02087         dest.setNumVertices(ConstraintMeshBufSize * meshVb.getNumVertices());
02088         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; CVertexBuffer::MaxStage; ++k)
02089         {
02090                 dest.setUVRouting((<a class="code" href="a04558.html#a7">uint8</a>) k, meshVb.getUVRouting()[k]);
02091         }
02092 
02093 
02094         <a class="code" href="a04558.html#a7">uint8</a> *outPtr = (<a class="code" href="a04558.html#a7">uint8</a> *) dest.getVertexCoordPointer();
02095         <a class="code" href="a04558.html#a7">uint8</a> *inPtr = (<a class="code" href="a04558.html#a7">uint8</a> *)  meshVb.getVertexCoordPointer();
02096         <a class="code" href="a04558.html#a15">uint</a>  meshSize  = dest.getVertexSize() * meshVb.getNumVertices();
02097 
02098         <span class="keywordflow">if</span> (destFormat == meshVb.getVertexFormat()) <span class="comment">// no color added</span>
02099         {               
02100                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a05363.html#a264">ConstraintMeshBufSize</a>; ++k)
02101                 {
02102                         ::memcpy((<span class="keywordtype">void</span> *) (outPtr + k * meshSize), (<span class="keywordtype">void</span> *) inPtr, meshSize);                   
02103                 }
02104         }
02105         <span class="keywordflow">else</span> <span class="comment">// color added, but not available in src </span>
02106         {
02107                 <a class="code" href="a04558.html#a14">sint</a> colorOff = dest.getColorOff();
02108                 <a class="code" href="a04558.html#a15">uint</a> inVSize    = meshVb.getVertexSize();
02109                 <a class="code" href="a04558.html#a15">uint</a> outVSize   = dest.getVertexSize();         
02110                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a05363.html#a264">ConstraintMeshBufSize</a>; ++k)
02111                 {
02112                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a> = 0; <a class="code" href="a04223.html#a576">v</a> &lt; meshVb.getNumVertices(); ++<a class="code" href="a04223.html#a576">v</a>)
02113                         {
02114                                 <span class="comment">// copy until color</span>
02115                                 ::memcpy((<span class="keywordtype">void</span> *) (outPtr + k * meshSize + <a class="code" href="a04223.html#a576">v</a> * outVSize), (<span class="keywordtype">void</span> *) (inPtr + <a class="code" href="a04223.html#a576">v</a> * inVSize), colorOff);
02116                                 <span class="comment">// copy datas after color</span>
02117                                 ::memcpy((<span class="keywordtype">void</span> *) (outPtr + k * meshSize + <a class="code" href="a04223.html#a576">v</a> * outVSize + colorOff + <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a7">uint8</a>[4])), (<span class="keywordtype">void</span> *) (inPtr + <a class="code" href="a04223.html#a576">v</a> * inVSize + colorOff), inVSize - colorOff);
02118                         }
02119                 }
02120         }
02121 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharea1" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::getMeshDisplay" ></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="a03167.html">CPSConstraintMesh::CMeshDisplay</a> &amp; NL3D::CPSConstraintMesh::CMeshDisplayShare::getMeshDisplay </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02857.html">CMesh</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>mesh</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>format</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06250.html#l02033">2033</a> of file <a class="el" href="a06250.html">ps_mesh.cpp</a>.
<p>
References <a class="el" href="a06251.html#l00498">_Cache</a>, <a class="el" href="a06251.html#l00496">_MaxNumMD</a>, <a class="el" href="a06251.html#l00497">_NumMD</a>, <a class="el" href="a06250.html#l02064">buildRdrPassSet()</a>, <a class="el" href="a06250.html#l02081">buildVB()</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06250.html#l02238">NL3D::CPSConstraintMesh::restoreMaterials()</a>.
<p>
<div class="fragment"><pre>02034 {
02035         <a class="code" href="a04199.html#a6">nlassert</a>(mesh); 
02036         <span class="comment">// linear search is ok because of small size</span>
02037         <span class="keywordflow">for</span>(std::list&lt;CMDEntry&gt;::iterator it = <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.begin(); it != <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.end(); ++it)
02038         {
02039                 <span class="keywordflow">if</span> (it-&gt;Format == <a class="code" href="a04223.html#a641">format</a> &amp;&amp; it-&gt;Mesh == mesh)
02040                 {
02041                         <span class="comment">// relink at start (most recent use)</span>
02042                         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.splice(<a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.begin(), <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>, it);
02043                         <span class="keywordflow">return</span> it-&gt;MD;
02044                 }
02045         }
02046         <span class="keywordflow">if</span> (<a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">_NumMD</a> == <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer1">_MaxNumMD</a>)
02047         {
02048                 <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.pop_back(); <span class="comment">// remove least recently used mesh</span>
02049                 -- <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">_NumMD</a>;
02050         }
02051         <span class="comment">//NLMISC::TTicks start = NLMISC::CTime::getPerformanceTime();   </span>
02052         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.push_front(CMDEntry());
02053         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.front().Mesh = mesh;
02054         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.front().Format = <a class="code" href="a04223.html#a641">format</a>;
02055         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh0">buildRdrPassSet</a>(<a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.front().MD.RdrPasses, *mesh);
02056         <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplayShareh1">buildVB</a>(<a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.front().MD.VB, *mesh, <a class="code" href="a04223.html#a641">format</a>);
02057         ++ <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">_NumMD</a>;
02058         <span class="comment">/*NLMISC::TTicks end = NLMISC::CTime::getPerformanceTime();</span>
02059 <span class="comment">        nlinfo("mesh setup time = %.2f", (float) (1000 * NLMISC::CTime::ticksToSecond(end - start)));   */</span>
02060         <span class="keywordflow">return</span> <a class="code" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">_Cache</a>.front().MD;
02061 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::_Cache" ></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::list&lt;<a class="el" href="a03169.html">CMDEntry</a>&gt; <a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer0">NL3D::CPSConstraintMesh::CMeshDisplayShare::_Cache</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06251.html#l00498">498</a> of file <a class="el" href="a06251.html">ps_mesh.h</a>.
<p>
Referenced by <a class="el" href="a06250.html#l02033">getMeshDisplay()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer1" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::_MaxNumMD" ></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#a15">uint</a> <a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer1">NL3D::CPSConstraintMesh::CMeshDisplayShare::_MaxNumMD</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06251.html#l00496">496</a> of file <a class="el" href="a06251.html">ps_mesh.h</a>.
<p>
Referenced by <a class="el" href="a06251.html#l00484">CMeshDisplayShare()</a>, and <a class="el" href="a06250.html#l02033">getMeshDisplay()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2" doxytag="NL3D::CPSConstraintMesh::CMeshDisplayShare::_NumMD" ></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#a15">uint</a> <a class="el" href="a03168.html#NL3D_1_1CPSConstraintMesh_1_1CMeshDisplaySharer2">NL3D::CPSConstraintMesh::CMeshDisplayShare::_NumMD</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06251.html#l00497">497</a> of file <a class="el" href="a06251.html">ps_mesh.h</a>.
<p>
Referenced by <a class="el" href="a06251.html#l00484">CMeshDisplayShare()</a>, and <a class="el" href="a06250.html#l02033">getMeshDisplay()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06251.html">ps_mesh.h</a><li><a class="el" href="a06250.html">ps_mesh.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:06: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>