void NewtonCollisionSerialize (const NewtonWorld* newtonWorld, const NewtonCollision* collision, NewtonSerialize serializeFunction, void* serializeHandle);
Serialize a general collision shape.
- const NewtonWorld *newtonWorld - is the pointer to the Newton world.
- const NewtonCollision* collision - is the collision object to serialize.
- NewtonSerialize callback - pointer to the event function that will do the serialization.
- void *serializeHandle - user data that will be passed to the NewtonSerialize callback.
- Small and medium size collision objects (under 50000 polygons) can be constructed at application startup without significant processing overhead. However, for very large polygons sets (over 50000 polygons) it is recommended that the application serialize the collisions in an off-line tool. Then the application can call this function to store the collision to a file or any file packer system the application is using. At run time the application can use the function NewtonCreateCollisionFromSerialization to create and load a pre-made collision object.