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
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxSerialization 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>PxSerialization Class Reference<br>
<small>
[<a class="el" href="group__extensions.html">Extensions</a>]</small>
</h1><!-- doxytag: class="PxSerialization" -->Utility functions for serialization.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="PxSerialization_8h-source.html">PxSerialization.h</a>></code>
<p>
<p>
<a href="classPxSerialization-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html">PxXmlMiscParameter</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Additional <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a> and <a class="el" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a> options stored in XML serialized data. <a href="structPxSerialization_1_1PxXmlMiscParameter.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#d9f930bc95e3372c46bac3347742068f">isSerializable</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &collection, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, const <a class="el" href="classPxCollection.html">PxCollection</a> *externalReferences=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the collection is serializable with the externalReferences collection. <a href="#d9f930bc95e3372c46bac3347742068f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094">complete</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &collection, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, const <a class="el" href="classPxCollection.html">PxCollection</a> *exceptFor=NULL, bool followJoints=false)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds to a collection all objects such that it can be successfully serialized. <a href="#0cf59eda36c56e9e66bac0c2b5168094"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#84d55e6e21727087653a70cc20557765">createSerialObjectIds</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &collection, const <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> base)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates PxSerialObjectId values for unnamed objects in a collection. <a href="#84d55e6e21727087653a70cc20557765"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxCollection.html">PxCollection</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#e2eafca38332e6d7dff642641317e90a">createCollectionFromXml</a> (<a class="el" href="classPxInputData.html">PxInputData</a> &inputData, <a class="el" href="classPxCooking.html">PxCooking</a> &cooking, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, const <a class="el" href="classPxCollection.html">PxCollection</a> *externalRefs=NULL, <a class="el" href="classPxStringTable.html">PxStringTable</a> *stringTable=NULL, <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html">PxXmlMiscParameter</a> *outArgs=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> from XML data. <a href="#e2eafca38332e6d7dff642641317e90a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxCollection.html">PxCollection</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#6c64dc9a55f7ae9ffc8c1802855134ed">createCollectionFromBinary</a> (void *memBlock, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, const <a class="el" href="classPxCollection.html">PxCollection</a> *externalRefs=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deserializes a <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> from memory. <a href="#6c64dc9a55f7ae9ffc8c1802855134ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#cbb99dac3e71e78338ab3eec4ab0ab75">serializeCollectionToXml</a> (<a class="el" href="classPxOutputStream.html">PxOutputStream</a> &outputStream, <a class="el" href="classPxCollection.html">PxCollection</a> &collection, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, <a class="el" href="classPxCooking.html">PxCooking</a> *cooking=NULL, const <a class="el" href="classPxCollection.html">PxCollection</a> *externalRefs=NULL, <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html">PxXmlMiscParameter</a> *inArgs=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Serializes a physics collection to an XML output stream. <a href="#cbb99dac3e71e78338ab3eec4ab0ab75"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03">serializeCollectionToBinary</a> (<a class="el" href="classPxOutputStream.html">PxOutputStream</a> &outputStream, <a class="el" href="classPxCollection.html">PxCollection</a> &collection, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr, const <a class="el" href="classPxCollection.html">PxCollection</a> *externalRefs=NULL, bool exportNames=false)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Serializes a collection to a binary stream. <a href="#1d6242bea0c7513bfbfb24670e5cfb03"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#86026f68eb651de87e4a7720bc708893">dumpBinaryMetaData</a> (<a class="el" href="classPxOutputStream.html">PxOutputStream</a> &outputStream, <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> &sr)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dumps the binary meta-data to a stream. <a href="#86026f68eb651de87e4a7720bc708893"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxBinaryConverter.html">PxBinaryConverter</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#9014b476bfd9e3e9bc7ea755df232bfd">createBinaryConverter</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates binary converter for re-targeting binary-serialized data. <a href="#9014b476bfd9e3e9bc7ea755df232bfd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxSerialization.html#33d7707fb8d82862773a6b9ae1d4782e">createSerializationRegistry</a> (<a class="el" href="classPxPhysics.html">PxPhysics</a> &physics)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an application managed registry for serialization. <a href="#33d7707fb8d82862773a6b9ae1d4782e"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Utility functions for serialization.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0cf59eda36c56e9e66bac0c2b5168094"></a><!-- doxytag: member="PxSerialization::complete" ref="0cf59eda36c56e9e66bac0c2b5168094" args="(PxCollection &collection, PxSerializationRegistry &sr, const PxCollection *exceptFor=NULL, bool followJoints=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void PxSerialization::complete </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>exceptFor</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>followJoints</em> = <code>false</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds to a collection all objects such that it can be successfully serialized.
<p>
A collection C is complete relative to an other collection D if every object required by C is either in C or D. This function adds objects to a collection, such that it becomes complete with respect to the exceptFor collection. Completeness is needed for serialization. See <a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>, <a class="el" href="classPxSerialization.html#cbb99dac3e71e78338ab3eec4ab0ab75" title="Serializes a physics collection to an XML output stream.">PxSerialization::serializeCollectionToXml</a>.<p>
Sdk objects require other sdk object according to the following rules:<ul>
<li>joints require their actors and constraint</li><li>rigid actors require their shapes</li><li>shapes require their material(s) and mesh (triangle mesh, convex mesh or height field), if any</li><li>articulations require their links and joints</li><li>aggregates require their actors</li><li>cloth actors require their cloth fabric</li></ul>
<p>
If followJoints is specified another rule is added:<ul>
<li>actors require their joints</li></ul>
<p>
Specifying followJoints will make whole jointed actor chains being added to the collection. Following chains is interrupted whenever a object in exceptFor is encountered.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>collection</em> </td><td>Collection which is completed </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>exceptFor</em> </td><td>Optional exemption collection </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>followJoints</em> </td><td>Specifies whether joints should be added for jointed actors </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>, <a class="el" href="classPxSerialization.html#cbb99dac3e71e78338ab3eec4ab0ab75" title="Serializes a physics collection to an XML output stream.">PxSerialization::serializeCollectionToXml</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="9014b476bfd9e3e9bc7ea755df232bfd"></a><!-- doxytag: member="PxSerialization::createBinaryConverter" ref="9014b476bfd9e3e9bc7ea755df232bfd" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxBinaryConverter.html">PxBinaryConverter</a>* PxSerialization::createBinaryConverter </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates binary converter for re-targeting binary-serialized data.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Binary converter instance. </dd></dl>
</div>
</div><p>
<a class="anchor" name="6c64dc9a55f7ae9ffc8c1802855134ed"></a><!-- doxytag: member="PxSerialization::createCollectionFromBinary" ref="6c64dc9a55f7ae9ffc8c1802855134ed" args="(void *memBlock, PxSerializationRegistry &sr, const PxCollection *externalRefs=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxCollection.html">PxCollection</a>* PxSerialization::createCollectionFromBinary </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>memBlock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>externalRefs</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Deserializes a <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> from memory.
<p>
Creates a collection from memory. If the collection has external dependencies another collection can be provided to resolve these.<p>
The memory block provided has to be 128 bytes aligned and contain a contiguous serialized collection as written by <a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>. The contained binary data needs to be compatible with the current binary format version which is defined by "PX_PHYSICS_VERSION_MAJOR.PX_PHYSICS_VERSION_MINOR.PX_PHYSICS_VERSION_BUGFIX-PX_BINARY_SERIAL_VERSION". For a list of compatible sdk releases refer to the documentation of PX_BINARY_SERIAL_VERSION.<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>memBlock</em> </td><td>Pointer to memory block containing the serialized collection </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>externalRefs</em> </td><td>Collection to resolve external dependencies</td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization::complete</a>, <a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a>, <a class="el" href="group__extensions.html#gced14ebcd90bf2d866b38867cde959ae">PX_BINARY_SERIAL_VERSION</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="e2eafca38332e6d7dff642641317e90a"></a><!-- doxytag: member="PxSerialization::createCollectionFromXml" ref="e2eafca38332e6d7dff642641317e90a" args="(PxInputData &inputData, PxCooking &cooking, PxSerializationRegistry &sr, const PxCollection *externalRefs=NULL, PxStringTable *stringTable=NULL, PxXmlMiscParameter *outArgs=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxCollection.html">PxCollection</a>* PxSerialization::createCollectionFromXml </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxInputData.html">PxInputData</a> & </td>
<td class="paramname"> <em>inputData</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxCooking.html">PxCooking</a> & </td>
<td class="paramname"> <em>cooking</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>externalRefs</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxStringTable.html">PxStringTable</a> * </td>
<td class="paramname"> <em>stringTable</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html">PxXmlMiscParameter</a> * </td>
<td class="paramname"> <em>outArgs</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> from XML data.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>inputData</em> </td><td>The input data containing the XML collection. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>cooking</em> </td><td><a class="el" href="classPxCooking.html">PxCooking</a> instance used for sdk object instantiation. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>externalRefs</em> </td><td><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> used to resolve external references. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>stringTable</em> </td><td><a class="el" href="classPxStringTable.html" title="a table to manage strings. Strings allocated through this object are expected to...">PxStringTable</a> instance used for storing object names. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>outArgs</em> </td><td>Optional parameters of physics and scene deserialized from XML. See <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html" title="Additional PxScene and PxPhysics options stored in XML serialized data.">PxSerialization::PxXmlMiscParameter</a> </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a pointer to a <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> if successful or NULL if it failed.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a>, <a class="el" href="classPxInputData.html" title="Input data class for I/O which provides random read access.">PxInputData</a>, <a class="el" href="classPxStringTable.html" title="a table to manage strings. Strings allocated through this object are expected to...">PxStringTable</a>, <a class="el" href="classPxCooking.html">PxCooking</a>, <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html" title="Additional PxScene and PxPhysics options stored in XML serialized data.">PxSerialization::PxXmlMiscParameter</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="33d7707fb8d82862773a6b9ae1d4782e"></a><!-- doxytag: member="PxSerialization::createSerializationRegistry" ref="33d7707fb8d82862773a6b9ae1d4782e" args="(PxPhysics &physics)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a>* PxSerialization::createSerializationRegistry </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxPhysics.html">PxPhysics</a> & </td>
<td class="paramname"> <em>physics</em> </td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates an application managed registry for serialization.
<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>physics</em> </td><td>Physics SDK to generate create serialization registry</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="84d55e6e21727087653a70cc20557765"></a><!-- doxytag: member="PxSerialization::createSerialObjectIds" ref="84d55e6e21727087653a70cc20557765" args="(PxCollection &collection, const PxSerialObjectId base)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void PxSerialization::createSerialObjectIds </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__common.html#gb2ccfb663643cd2d66b59908189d88cd">PxSerialObjectId</a> </td>
<td class="paramname"> <em>base</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates PxSerialObjectId values for unnamed objects in a collection.
<p>
Creates PxSerialObjectId names for unnamed objects in a collection starting at a base value and incrementing, skipping values that are already assigned to objects 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,out]</tt> </td><td valign="top"><em>collection</em> </td><td>Collection for which names are created </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>base</em> </td><td>Start address for PxSerialObjectId names </td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="86026f68eb651de87e4a7720bc708893"></a><!-- doxytag: member="PxSerialization::dumpBinaryMetaData" ref="86026f68eb651de87e4a7720bc708893" args="(PxOutputStream &outputStream, PxSerializationRegistry &sr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void PxSerialization::dumpBinaryMetaData </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxOutputStream.html">PxOutputStream</a> & </td>
<td class="paramname"> <em>outputStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Dumps the binary meta-data to a stream.
<p>
A meta-data file contains information about the SDK's internal classes and about custom user types ready for serialization. Such a file is needed to convert binary-serialized data from one platform to another (re-targeting). The converter needs meta-data files for the source and target platforms to perform conversions.<p>
Custom user types can be supported with <a class="el" href="classPxSerializationRegistry.html#10e39bebee808707bff3c73f01d60f07" title="Register binary meta data callback.">PxSerializationRegistry::registerBinaryMetaDataCallback</a> (see the guide for more information).<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>outputStream</em> </td><td>Stream to write meta data to </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes used for conversion.</td></tr>
</table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxOutputStream.html" title="Output stream class for I/O.">PxOutputStream</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="d9f930bc95e3372c46bac3347742068f"></a><!-- doxytag: member="PxSerialization::isSerializable" ref="d9f930bc95e3372c46bac3347742068f" args="(PxCollection &collection, PxSerializationRegistry &sr, const PxCollection *externalReferences=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool PxSerialization::isSerializable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>externalReferences</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether the collection is serializable with the externalReferences collection.
<p>
Some definitions to explain whether a collection can be serialized or not:<p>
For definitions of <b>requires</b> and <b>complete</b> see <a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization::complete</a><p>
A serializable object is <b>subordinate</b> if it cannot be serialized on its own The following objects are subordinate:<ul>
<li>articulation links</li><li>articulation joints</li><li>joints</li></ul>
<p>
A collection C can be serialized with external references collection D iff<ul>
<li>C is complete relative to D (no dangling references)</li><li>Every object in D required by an object in C has a valid ID (no unnamed references)</li><li>Every subordinate object in C is required by another object in C (no orphans)</li></ul>
<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 checked </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>externalReferences</em> </td><td>the external References collection </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether the collection is serializable </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization::complete</a>, <a class="el" href="classPxSerialization.html#1d6242bea0c7513bfbfb24670e5cfb03" title="Serializes a collection to a binary stream.">PxSerialization::serializeCollectionToBinary</a>, <a class="el" href="classPxSerialization.html#cbb99dac3e71e78338ab3eec4ab0ab75" title="Serializes a physics collection to an XML output stream.">PxSerialization::serializeCollectionToXml</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="1d6242bea0c7513bfbfb24670e5cfb03"></a><!-- doxytag: member="PxSerialization::serializeCollectionToBinary" ref="1d6242bea0c7513bfbfb24670e5cfb03" args="(PxOutputStream &outputStream, PxCollection &collection, PxSerializationRegistry &sr, const PxCollection *externalRefs=NULL, bool exportNames=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool PxSerialization::serializeCollectionToBinary </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxOutputStream.html">PxOutputStream</a> & </td>
<td class="paramname"> <em>outputStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>externalRefs</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>exportNames</em> = <code>false</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Serializes a collection to a binary stream.
<p>
Serializes a collection to a stream. In order to resolve external dependencies the externalReferences collection has to be provided. Optionally names of objects that where set for example with <a class="el" href="classPxActor.html#fdcfb185892a5c8311fd0d825b0ce758" title="Sets a name string for the object that can be retrieved with getName().">PxActor::setName</a> are serialized along with the objects.<p>
The collection can be successfully serialized if isSerializable(collection) returns true. See <a class="el" href="classPxSerialization.html#d9f930bc95e3372c46bac3347742068f" title="Returns whether the collection is serializable with the externalReferences collection...">isSerializable</a>.<p>
The implementation of the output stream needs to fulfill the requirements on the memory block input taken by <a class="el" href="classPxSerialization.html#6c64dc9a55f7ae9ffc8c1802855134ed" title="Deserializes a PxCollection from memory.">PxSerialization::createCollectionFromBinary</a>.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.</dd></dl>
<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>outputStream</em> </td><td>into which the collection is serialized </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>collection</em> </td><td>Collection to be serialized </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>externalRefs</em> </td><td>Collection used to resolve external dependencies </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>exportNames</em> </td><td>Specifies whether object names are serialized </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether serialization was successful</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxOutputStream.html" title="Output stream class for I/O.">PxOutputStream</a>, <a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization::complete</a>, <a class="el" href="classPxSerialization.html#6c64dc9a55f7ae9ffc8c1802855134ed" title="Deserializes a PxCollection from memory.">PxSerialization::createCollectionFromBinary</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="cbb99dac3e71e78338ab3eec4ab0ab75"></a><!-- doxytag: member="PxSerialization::serializeCollectionToXml" ref="cbb99dac3e71e78338ab3eec4ab0ab75" args="(PxOutputStream &outputStream, PxCollection &collection, PxSerializationRegistry &sr, PxCooking *cooking=NULL, const PxCollection *externalRefs=NULL, PxXmlMiscParameter *inArgs=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool PxSerialization::serializeCollectionToXml </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPxOutputStream.html">PxOutputStream</a> & </td>
<td class="paramname"> <em>outputStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> & </td>
<td class="paramname"> <em>collection</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxSerializationRegistry.html">PxSerializationRegistry</a> & </td>
<td class="paramname"> <em>sr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classPxCooking.html">PxCooking</a> * </td>
<td class="paramname"> <em>cooking</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxCollection.html">PxCollection</a> * </td>
<td class="paramname"> <em>externalRefs</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html">PxXmlMiscParameter</a> * </td>
<td class="paramname"> <em>inArgs</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Serializes a physics collection to an XML output stream.
<p>
The collection to be serialized needs to be complete <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization.complete</a>. Optionally the XML may contain meshes in binary cooked format for fast loading. It does this when providing a valid non-null <a class="el" href="classPxCooking.html">PxCooking</a> pointer.</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>outputStream</em> </td><td>Stream to save collection to. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>collection</em> </td><td><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a> instance which is serialized. The collection needs to be complete with respect to the externalRefs collection. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sr</em> </td><td><a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a> instance with information about registered classes. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>cooking</em> </td><td>Optional pointer to cooking instance. If provided, cooked mesh data is cached for fast loading. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>externalRefs</em> </td><td>Collection containing external references. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inArgs</em> </td><td>Optional parameters of physics and scene serialized to XML along with the collection. See <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html" title="Additional PxScene and PxPhysics options stored in XML serialized data.">PxSerialization::PxXmlMiscParameter</a> </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the collection is successfully serialized.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxOutputStream.html" title="Output stream class for I/O.">PxOutputStream</a>, <a class="el" href="classPxSerializationRegistry.html" title="Class serving as a registry for XML (RepX) and binary serializable types.">PxSerializationRegistry</a>, <a class="el" href="classPxCooking.html">PxCooking</a>, <a class="el" href="structPxSerialization_1_1PxXmlMiscParameter.html" title="Additional PxScene and PxPhysics options stored in XML serialized data.">PxSerialization::PxXmlMiscParameter</a> </dd></dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxSerialization_8h-source.html">PxSerialization.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>
|