NewtonBodySetAutoSleep

From Newton Wiki
Jump to: navigation, search

NewtonBodySetAutoSleep

Syntax:

void NewtonBodySetAutoSleep(const NewtonBody* body, int state)

Usage

Active or unactive the autosleep mode for a body.

Parameters

  • const NewtonBody *bodyPtr - pointer to the body.
  • int state - Autoactivation state: 1 = auto-activation on. 0 = auto-activation off.

Description

When a body is created, autosleep is active. If the body reach equilibrium it go to sleep (to use less resources) until another body collide with it or forces and torques make it move.

See also

NewtonBodyGetSleepState NewtonBodyGetAutoSleep NewtonBodyGetFreezeState NewtonBodySetFreezeState