Serialization
 
 
Serialization

Serialization









    The engine allows you:

  • Perform serialization of entire physics scene
    • PhysicsScene class provides functions to:
      • Write physics scene to a file, memory or stream
      • Read physics scene from a file, memory or stream
    • Physics scene can be saved in real time, creating a snapshot. Then such snapshot can be loaded and further processed by the engine (from the point where the snapshot was taken)
    • All information describing a physics scene elements are serialized to easily parsable XML files
    • Serialized physics scene elements:
      • Constraints
      • Meshes
      • Physics objects (with materials, cameras, controllers, fog, light and sound sources, contact points, etc)
      • Shapes
    • Physics scene can be saved in one of two modes:
      • Optimized (only scene objects are saved)
      • Complete (all objects existing in object managers are saved)
  • Perform serialization of user-defined controllers through the programmable Archive class
    • Archive class provides functions to:
      • Open a file or stream
      • Save data to a file, memory or stream (supported data types: bool, byte, DateTime, decimal, double, float, int, long, string, object, Matrix, Quaternion, Vector2, Vector3, Vector4)
      • Read data from a file, memory or stream (supported data types: bool, byte, DateTime, decimal, double, float, int, long, string, object, Matrix, Quaternion, Vector2, Vector3, Vector4)
      • Close a file or stream
    • All information describing a user-defined controllers are serialized to easily parsable XML files