Difference between revisions of "NewtonBodySetAutoSleep"

From Newton Wiki
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:02, 10 June 2019

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