NewtonMaterialCreateGroupID
Contents
NewtonMaterialCreateGroupID
Syntax:
int NewtonMaterialCreateGroupID(const NewtonWorld* newtonWorld)
Usage
Creates a new material group.
Parameters
- const NewtonWorld *newtonWorld - is the pointer to the Newton world
Return
- The ID of a new GroupID.
Description
Creates a new Material Group and returns returns the ID (in the form of an integer). This returned ID will then be used for all subsequent Material functions involving that particular Material such asNewtonMaterialSetCollisionCallback.
Remarks
- Group IDs can be interpreted as the nodes of a dense graph. The edges of the graph are the physics materials. When the Newton world is created, the default Group ID is created by the engine. When bodies are created the application assigns a group ID to the body.
- The only way to destroy a Group ID after its creation is by destroying all the bodies and calling the function NewtonMaterialDestroyAllGroupID.