NewtonBodySetUserData

From Newton Wiki
Jump to: navigation, search

NewtonBodySetUserData

void NewtonBodySetUserData( const NewtonBody* bodyPtr, void* userDataPtr)

Usage

Store a user defined data value with the body.

Parameters

  • const NewtonBody *bodyPtr - pointer to the body.
  • void *userDataPtr - pointer to the user defined user data value.

Return

  • Nothing.

Remarks

  • The application can store a user defined value with the Body. This value can be the pointer to a structure containing some application data for special effect. if the application allocate some resource to store the user data, the application can register a joint destructor to get rid of the allocated resource when the body is destroyed

See also

NewtonBodyGetUserData NewtonBodySetDestructorCallback UserData