NewtonBodySetDestructorCallback

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

NewtonBodySetDestructorCallback

void NewtonBodySetDestructorCallback( const NewtonBody* bodyPtr, NewtonBodyDestructor callback)

Usage

Assign an event function to be called when this body is about to be destroyed.

Parameters

  • const NewtonBody *bodyPtr - pointer to the body to be destroyed.
  • NewtonBodyDestructor callback - pointer to a function callback.

Return

  • Nothing.

Remarks

  • This function NewtonBodyDestructor callback acts like a destruction function in CPP. This function is called when the body and all data joints associated with the body are about to be destroyed. The application could use this function to destroy or release any resource associated with this body. The application should not make reference to this body after this function returns.
  • The destruction of a body will destroy all joints associated with the body.

See also

NewtonBodyGetUserData NewtonBodyGetUserData