NewtonCreateNull

From Newton Wiki
Revision as of 08:02, 10 June 2019 by WikiSysop (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NewtonCreateNull

Syntax:

NewtonCollision* NewtonCreateNull(const NewtonWorld* newtonWorld)

Usage

Create a transparent collision primitive.

Parameters

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

Return

  • Pointer to the collision object.

Remarks

  • 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.

See also

NewtonReleaseCollision Newton SDK API reference#Category:convex_collision_primitives_creation_functions