NewtonDestroyAllBodies

From Newton Wiki
Jump to: navigation, search

NewtonDestroyAllBodies

void NewtonDestroyAllBodies (const NewtonWorld* const newtonWorld)

Usage

Removes all RigidBodies and joints from the NewtonWorld, but keeps the world itself.

Parameters

  • const NewtonWorld *newtonWorld - is a pointer to the Newton world

Description

  • This function will destroy all bodies and all joints in the Newton world, but
  • will retain group IDs (collision shapes).
  • Use this function for when you want to clear the world but preserve all the
  • group IDs and material pairs.

Remarks

  • To destroy the entire NewtonWorld completely (for example on program exit), use the NewtonDestroy command instead.

See also

NewtonMaterialDestroyAllGroupID