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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxCollection Class Reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="images/PhysXlogo.png" align="middle"> <br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<a class="qindex" href="hierarchy.html">Class Hierarchy</a>
<a class="qindex" href="annotated.html">Compound List</a>
<a class="qindex" href="functions.html">Compound Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1>PxCollection Class Reference<br>
<small>
[<a class="el" href="group__common.html">Common</a>]</small>
</h1><!-- doxytag: class="PxCollection" -->Collection class for serialization.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="PxCollection_8h-source.html">PxCollection.h</a>></code>
<p>
<p>
<a href="classPxCollection-members.html">List of all members.</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">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#d201723a5d59909e3a8c7b68204e1d49">add</a> (<a class="el" href="classPxBase.html">PxBase</a> &object, <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> id=PX_SERIAL_OBJECT_ID_INVALID)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object to the collection. <a href="#d201723a5d59909e3a8c7b68204e1d49"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#195f984e3dd4d33b09712452b550c382">remove</a> (<a class="el" href="classPxBase.html">PxBase</a> &object)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> member object from the collection. <a href="#195f984e3dd4d33b09712452b550c382"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#cb3a641713d42126264b88fc47cd9fc4">contains</a> (<a class="el" href="classPxBase.html">PxBase</a> &object) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the collection contains a certain <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object. <a href="#cb3a641713d42126264b88fc47cd9fc4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#d53f79454edff13a2a2d648ad6b21492">addId</a> (<a class="el" href="classPxBase.html">PxBase</a> &object, <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> id)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds an id to a member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object. <a href="#d53f79454edff13a2a2d648ad6b21492"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#ed9ec331226d0aa2156efa6bec0e3ecb">removeId</a> (<a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> id)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes id from a contained <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object. <a href="#ed9ec331226d0aa2156efa6bec0e3ecb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#ef86f7f33db62840e237e6881363501b">add</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &collection)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds all <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects and their ids of collection to this collection. <a href="#ef86f7f33db62840e237e6881363501b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#b06fbb729d1b88190672da888e330a34">remove</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &collection)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes all <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects of collection from this collection. <a href="#b06fbb729d1b88190672da888e330a34"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#5642c14ef12fe69f887f829e47e133a1">getNbObjects</a> () const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets number of <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects in this collection. <a href="#5642c14ef12fe69f887f829e47e133a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classPxBase.html">PxBase</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#eed5696e38989d4c4bd0293c45f625e9">getObject</a> (<a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> index) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object of this collection given its index. <a href="#eed5696e38989d4c4bd0293c45f625e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#f245a69b1af2a7c50bbf79bbfab5e516">getObjects</a> (<a class="el" href="classPxBase.html">PxBase</a> **userBuffer, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> bufferSize, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> startIndex=0) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copies member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> pointers to a user specified buffer. <a href="#f245a69b1af2a7c50bbf79bbfab5e516"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classPxBase.html">PxBase</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#9ed25e50544a1ef14870fb7bfc1187ed">find</a> (<a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> id) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Looks for a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object given a PxSerialObjectId value. <a href="#9ed25e50544a1ef14870fb7bfc1187ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#082b4d10a5cc5c1fafb9f94f59f0923f">getNbIds</a> () const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets number of PxSerialObjectId names in this collection. <a href="#082b4d10a5cc5c1fafb9f94f59f0923f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#cd8ba2bfe77bae84d578ff9335f342fd">getIds</a> (<a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> *userBuffer, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> bufferSize, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> startIndex=0) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copies member PxSerialObjectId values to a user specified buffer. <a href="#cd8ba2bfe77bae84d578ff9335f342fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#a59a87c2ed2a69552f43c83dcbc3c6e2">getId</a> (const <a class="el" href="classPxBase.html">PxBase</a> &object) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the PxSerialObjectId name of a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object within the collection. <a href="#a59a87c2ed2a69552f43c83dcbc3c6e2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#ebf358855b8e054c907f49f85288a68d">release</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a collection object. <a href="#ebf358855b8e054c907f49f85288a68d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#3cf81c15b4dcd6e16f56c1d0bc383ba3">PxCollection</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollection.html#3d6a12201cf8a03da20c74c1c1cb548c">~PxCollection</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Collection class for serialization.
<p>
A collection is a set of <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects. <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects can be added to the collection regardless of other objects they depend on. Objects may be named using PxSerialObjectId values in order to resolve dependencies between objects of different collections.<p>
Serialization and deserialization only work through collections.<p>
A scene is typically serialized using the following steps:<p>
<ol type=1>
<li>create a serialization registry</li><li>create a collection for scene objects</li><li>complete the scene objects (adds all dependent objects, e.g. meshes)</li><li>serialize collection</li><li>release collection</li><li>release serialization registry</li></ol>
<p>
For example the code may look like this:<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a>* physics; <span class="comment">// The physics</span>
<a class="code" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>* scene; <span class="comment">// The physics scene</span>
SerialStream s; <span class="comment">// The user-defined stream doing the actual write to disk</span>
<a class="code" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a>* registry = <a class="code" href="classPxSerialization.html#33d7707fb8d82862773a6b9ae1d4782e" title="Creates an application managed registry for serialization.">PxSerialization::createSerializationRegistry</a>(*physics); <span class="comment">// step 1)</span>
<a class="code" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>* collection = PxSerialization::createCollection(*scene); <span class="comment">// step 2)</span>
<a class="code" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization::complete</a>(*collection, *registry); <span class="comment">// step 3)</span>
<a class="code" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>(s, *collection, *registry); <span class="comment">// step 4)</span>
collection-><a class="code" href="classPxCollection.html#ebf358855b8e054c907f49f85288a68d" title="Deletes a collection object.">release</a>(); <span class="comment">// step 5)</span>
registry-><a class="code" href="classPxSerializationRegistry.html#1d9214872d09d3c148e2ff721971acb8" title="Releases PxSerializationRegistry instance.">release</a>(); <span class="comment">// step 6)</span>
</pre></div><p>
A scene is typically deserialized using the following steps:<p>
<ol type=1>
<li>load a serialized collection into memory</li><li>create a serialization registry</li><li>create a collection by passing the serialized memory block</li><li>add collected objects to scene</li><li>release collection</li><li>release serialization registry</li></ol>
<p>
For example the code may look like this:<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a>* physics; <span class="comment">// The physics</span>
<a class="code" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>* scene; <span class="comment">// The physics scene</span>
<span class="keywordtype">void</span>* memory128; <span class="comment">// a 128-byte aligned buffer previously loaded from disk by the user - step 1)</span>
<a class="code" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a>* registry = <a class="code" href="classPxSerialization.html#33d7707fb8d82862773a6b9ae1d4782e" title="Creates an application managed registry for serialization.">PxSerialization::createSerializationRegistry</a>(*physics); <span class="comment">// step 2)</span>
<a class="code" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>* collection = <a class="code" href="classPxSerialization.html#6c64dc9a55f7ae9ffc8c1802855134ed" title="Deserializes a PxCollection from memory.">PxSerialization::createCollectionFromBinary</a>(memory128, *registry); <span class="comment">// step 3)</span>
scene-><a class="code" href="classPxScene.html#6b61683d8acb5e73b2ffb41ebecae589" title="Adds objects in the collection to this scene.">addCollection</a>(*collection); <span class="comment">// step 4)</span>
collection-><a class="code" href="classPxCollection.html#ebf358855b8e054c907f49f85288a68d" title="Deletes a collection object.">release</a>(); <span class="comment">// step 5)</span>
registry-><a class="code" href="classPxSerializationRegistry.html#1d9214872d09d3c148e2ff721971acb8" title="Releases PxSerializationRegistry instance.">release</a>(); <span class="comment">// step 6)</span>
</pre></div><p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a>, <a class="el" href="group__common.html#ga3979f24ebe59e173e262c7155b1a489" title="Creates a collection object.">PxCreateCollection()</a> </dd></dl>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="3cf81c15b4dcd6e16f56c1d0bc383ba3"></a><!-- doxytag: member="PxCollection::PxCollection" ref="3cf81c15b4dcd6e16f56c1d0bc383ba3" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PxCollection::PxCollection </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="3d6a12201cf8a03da20c74c1c1cb548c"></a><!-- doxytag: member="PxCollection::~PxCollection" ref="3d6a12201cf8a03da20c74c1c1cb548c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual PxCollection::~PxCollection </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline, protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ef86f7f33db62840e237e6881363501b"></a><!-- doxytag: member="PxCollection::add" ref="ef86f7f33db62840e237e6881363501b" args="(PxCollection &collection)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em> </td>
<td> ) </td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds all <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects and their ids of collection to this collection.
<p>
<a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects already in this collection are ignored. Object ids need to be conflict free, i.e. the same object may not have two different ids within the two collections.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>collection</em> </td><td>Collection to be added </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="d201723a5d59909e3a8c7b68204e1d49"></a><!-- doxytag: member="PxCollection::add" ref="d201723a5d59909e3a8c7b68204e1d49" args="(PxBase &object, PxSerialObjectId id=PX_SERIAL_OBJECT_ID_INVALID)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxBase.html">PxBase</a> & </td>
<td class="paramname"> <em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td>
<td class="paramname"> <em>id</em> = <code>PX_SERIAL_OBJECT_ID_INVALID</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object to the collection.
<p>
Adds a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object to the collection. Optionally a PxSerialObjectId can be provided in order to resolve dependencies between collections. A PxSerialObjectId value of PX_SERIAL_OBJECT_ID_INVALID means the object remains without id. Objects can be added regardless of other objects they require. If the object is already in the collection, the ID will be set if it was PX_SERIAL_OBJECT_ID_INVALID previously, otherwise the operation fails.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>object</em> </td><td>Object to be added to the collection </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>id</em> </td><td>Optional PxSerialObjectId id </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="d53f79454edff13a2a2d648ad6b21492"></a><!-- doxytag: member="PxCollection::addId" ref="d53f79454edff13a2a2d648ad6b21492" args="(PxBase &object, PxSerialObjectId id)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::addId </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxBase.html">PxBase</a> & </td>
<td class="paramname"> <em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td>
<td class="paramname"> <em>id</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds an id to a member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object.
<p>
If the object is already associated with an id within the collection, the id is replaced. May only be called for objects that are members of the collection. The id needs to be unique within the collection.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>object</em> </td><td>Member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>id</em> </td><td>PxSerialObjectId id to be given to the object </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="cb3a641713d42126264b88fc47cd9fc4"></a><!-- doxytag: member="PxCollection::contains" ref="cb3a641713d42126264b88fc47cd9fc4" args="(PxBase &object) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool PxCollection::contains </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxBase.html">PxBase</a> & </td>
<td class="paramname"> <em>object</em> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether the collection contains a certain <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>object</em> </td><td><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether object is contained. </dd></dl>
</div>
</div><p>
<a class="anchor" name="9ed25e50544a1ef14870fb7bfc1187ed"></a><!-- doxytag: member="PxCollection::find" ref="9ed25e50544a1ef14870fb7bfc1187ed" args="(PxSerialObjectId id) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classPxBase.html">PxBase</a>* PxCollection::find </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td>
<td class="paramname"> <em>id</em> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Looks for a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object given a PxSerialObjectId value.
<p>
If there is no <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object in the collection with the given id, NULL is returned.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>id</em> </td><td>PxSerialObjectId value to look for </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object with the given id value or NULL </dd></dl>
</div>
</div><p>
<a class="anchor" name="a59a87c2ed2a69552f43c83dcbc3c6e2"></a><!-- doxytag: member="PxCollection::getId" ref="a59a87c2ed2a69552f43c83dcbc3c6e2" args="(const PxBase &object) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> PxCollection::getId </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classPxBase.html">PxBase</a> & </td>
<td class="paramname"> <em>object</em> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the PxSerialObjectId name of a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object within the collection.
<p>
The <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object needs to be a member of the collection.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>object</em> </td><td><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object to get id for </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>PxSerialObjectId name of the object or PX_SERIAL_OBJECT_ID_INVALID if the object is unnamed </dd></dl>
</div>
</div><p>
<a class="anchor" name="cd8ba2bfe77bae84d578ff9335f342fd"></a><!-- doxytag: member="PxCollection::getIds" ref="cd8ba2bfe77bae84d578ff9335f342fd" args="(PxSerialObjectId *userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxCollection::getIds </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> * </td>
<td class="paramname"> <em>userBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>bufferSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>startIndex</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Copies member PxSerialObjectId values to a user specified buffer.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>userBuffer</em> </td><td>Array of PxSerialObjectId values </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>bufferSize</em> </td><td>Capacity of userBuffer </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>startIndex</em> </td><td>Offset into list of member PxSerialObjectId values </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of members PxSerialObjectId values that have been written to the userBuffer </dd></dl>
</div>
</div><p>
<a class="anchor" name="082b4d10a5cc5c1fafb9f94f59f0923f"></a><!-- doxytag: member="PxCollection::getNbIds" ref="082b4d10a5cc5c1fafb9f94f59f0923f" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxCollection::getNbIds </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets number of PxSerialObjectId names in this collection.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of PxSerialObjectId names in this collection </dd></dl>
</div>
</div><p>
<a class="anchor" name="5642c14ef12fe69f887f829e47e133a1"></a><!-- doxytag: member="PxCollection::getNbObjects" ref="5642c14ef12fe69f887f829e47e133a1" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxCollection::getNbObjects </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets number of <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects in this collection.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of objects in this collection </dd></dl>
</div>
</div><p>
<a class="anchor" name="eed5696e38989d4c4bd0293c45f625e9"></a><!-- doxytag: member="PxCollection::getObject" ref="eed5696e38989d4c4bd0293c45f625e9" args="(PxU32 index) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classPxBase.html">PxBase</a>& PxCollection::getObject </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object of this collection given its index.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>index</em> </td><td><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> index in [0, <a class="el" href="classPxCollection.html#5642c14ef12fe69f887f829e47e133a1" title="Gets number of PxBase objects in this collection.">getNbObjects()</a>) </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object at index index </dd></dl>
</div>
</div><p>
<a class="anchor" name="f245a69b1af2a7c50bbf79bbfab5e516"></a><!-- doxytag: member="PxCollection::getObjects" ref="f245a69b1af2a7c50bbf79bbfab5e516" args="(PxBase **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxCollection::getObjects </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxBase.html">PxBase</a> ** </td>
<td class="paramname"> <em>userBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>bufferSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>startIndex</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Copies member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> pointers to a user specified buffer.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>userBuffer</em> </td><td>Array of <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> pointers </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>bufferSize</em> </td><td>Capacity of userBuffer </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>startIndex</em> </td><td>Offset into list of member <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of members <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects that have been written to the userBuffer </dd></dl>
</div>
</div><p>
<a class="anchor" name="ebf358855b8e054c907f49f85288a68d"></a><!-- doxytag: member="PxCollection::release" ref="ebf358855b8e054c907f49f85288a68d" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::release </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Deletes a collection object.
<p>
This function only deletes the collection object, i.e. the container class. It doesn't delete objects that are part of the collection.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__common.html#ga3979f24ebe59e173e262c7155b1a489" title="Creates a collection object.">PxCreateCollection()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="b06fbb729d1b88190672da888e330a34"></a><!-- doxytag: member="PxCollection::remove" ref="b06fbb729d1b88190672da888e330a34" args="(PxCollection &collection)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::remove </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em> </td>
<td> ) </td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes all <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects of collection from this collection.
<p>
<a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> objects not present in this collection are ignored. Ids of objects which are removed are also removed.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>collection</em> </td><td>Collection to be removed </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="195f984e3dd4d33b09712452b550c382"></a><!-- doxytag: member="PxCollection::remove" ref="195f984e3dd4d33b09712452b550c382" args="(PxBase &object)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::remove </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxBase.html">PxBase</a> & </td>
<td class="paramname"> <em>object</em> </td>
<td> ) </td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes a <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> member object from the collection.
<p>
Object needs to be contained by the collection.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>object</em> </td><td><a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object to be removed </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="ed9ec331226d0aa2156efa6bec0e3ecb"></a><!-- doxytag: member="PxCollection::removeId" ref="ed9ec331226d0aa2156efa6bec0e3ecb" args="(PxSerialObjectId id)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void PxCollection::removeId </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td>
<td class="paramname"> <em>id</em> </td>
<td> ) </td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes id from a contained <a class="el" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection.">PxBase</a> object.
<p>
May only be called for ids that are associated with an object in the collection.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>id</em> </td><td>PxSerialObjectId value </td></tr>
</table>
</dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxCollection_8h-source.html">PxCollection.h</a></ul>
</div>
<hr style="width: 100%; height: 2px;"><br>
Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</body>
</html>
|