NewtonBodyGetWorld

From Newton Wiki
Jump to: navigation, search

NewtonBodyGetWorld

NewtonWorld* NewtonBodyGetWorld(const NewtonBody* bodyPtr)

Usage

Retrieve get the pointer to the world from the body.

Parameters

  • const NewtonBody *bodyPtr - pointer to the body.

Return

  • the world that own this body.

Remarks

  • The application can use this function to determine what world own this body. If the application have to get the world from a joint, it can do so by getting one of the bodies attached to the joint and getting the world from that body.