PxSerialization.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 
14 #ifndef PX_SERIALIZATION_H
15 #define PX_SERIALIZATION_H
16 
20 #include "PxPhysXConfig.h"
21 #include "common/PxBase.h"
22 #include "cooking/PxCooking.h"
23 #include "foundation/PxIO.h"
25 #include "common/PxTypeInfo.h"
26 #include "common/PxStringTable.h"
27 
28 //
29 // Important: if you adjust the comment about binary compatible versions below, don't forget to adjust the compatibility list in
30 // sBinaryCompatibleVersionsbinary as well
31 //
44 #define PX_BINARY_SERIAL_VERSION 0
45 
46 
47 #ifndef PX_DOXYGEN
48 namespace physx
49 {
50 #endif
51 
58 {
59 public:
68  {
73 
78 
79  PxXmlMiscParameter() : upVector(0) {}
80  PxXmlMiscParameter(PxVec3& inUpVector, PxTolerancesScale inScale) : upVector(inUpVector), scale(inScale) {}
81  };
82 
107  static bool isSerializable(PxCollection& collection, PxSerializationRegistry& sr, const PxCollection* externalReferences = NULL);
108 
137  static void complete(PxCollection& collection, PxSerializationRegistry& sr, const PxCollection* exceptFor = NULL, bool followJoints = false);
138 
149  static void createSerialObjectIds(PxCollection& collection, const PxSerialObjectId base);
150 
164  static PxCollection* createCollectionFromXml(PxInputData& inputData, PxCooking& cooking, PxSerializationRegistry& sr, const PxCollection* externalRefs = NULL, PxStringTable* stringTable = NULL, PxXmlMiscParameter* outArgs = NULL);
165 
183  static PxCollection* createCollectionFromBinary(void* memBlock, PxSerializationRegistry& sr, const PxCollection* externalRefs = NULL);
184 
203  static bool serializeCollectionToXml(PxOutputStream& outputStream, PxCollection& collection, PxSerializationRegistry& sr, PxCooking* cooking = NULL, const PxCollection* externalRefs = NULL, PxXmlMiscParameter* inArgs = NULL);
204 
227  static bool serializeCollectionToBinary(PxOutputStream& outputStream, PxCollection& collection, PxSerializationRegistry& sr, const PxCollection* externalRefs = NULL, bool exportNames = false );
228 
243  static void dumpBinaryMetaData(PxOutputStream& outputStream, PxSerializationRegistry& sr);
244 
250  static PxBinaryConverter* createBinaryConverter();
251 
261 
271  static PxSerializationRegistry* createSerializationRegistry(PxPhysics& physics);
272 };
273 
274 #ifndef PX_DOXYGEN
275 } // namespace physx
276 #endif
277 
279 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com