NewtonCollision* NewtonCreateNull(const NewtonWorld* newtonWorld)
Create a transparent collision primitive.
- const NewtonWorld *newtonWorld - is the pointer to the Newton world.
- Pointer to the collision object.
- Some times the application needs to create helper rigid bodies that will never collide with other bodies, for example the neck of a rag doll, or an internal part of an articulated structure. This can be done by using the material system but it too much work and it will increase unnecessarily the material count, and therefore the project complexity. The Null collision is a collision object that satisfy all this conditions without having to change the engine philosophy.
- Collision primitives are reference counted objects. The application should call NewtonReleaseCollision in order to release references to the objects. Neglecting to release references to collision primitives is a common cause of memory leaks. Collision primitives can be reused with more than one body. This will reduce the amount of memory used by the engine, as well as speed up some calculations.