Defined in include/common/PxSerializer.h

Inheritance Relationships

Base Type

template<class T>
class PxSerializerDefaultAdapter : public PxSerializer

Default PxSerializer implementation.

Basics needed for Binary- and RepX-Serialization

inline PxSerializerDefaultAdapter(const char *name)
inline virtual const char *getConcreteTypeName() const

Returns string name of dynamic type.


Class name of most derived type of this object.

inline virtual void requiresObjects(PxBase &obj, PxProcessPxBaseCallback &c) const

Adds required objects to the collection.

This method does not add the required objects recursively, e.g. objects required by required objects.

inline virtual bool isSubordinate() const

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.


Whether the class is subordinate

Functionality needed for Binary Serialization only

inline virtual void exportExtraData(PxBase &obj, PxSerializationContext &s) const

Exports object’s extra data to stream.

inline virtual void exportData(PxBase &obj, PxSerializationContext &s) const

Exports object’s data to stream.

inline virtual void registerReferences(PxBase &obj, PxSerializationContext &s) const

Register references that the object maintains to other objects.

inline virtual size_t getClassSize() const

Returns size needed to create the class instance.


sizeof class instance.

inline virtual PxBase *createObject(PxU8 *&address, PxDeserializationContext &context) const

Create object at a given address, resolve references and import extra data.

  • address – Location at which object is created. Address is increased by the size of the created object.

  • context – Context for reading external data and resolving references.


Created PxBase pointer (needs to be identical to address before increment).