Xors3d Engine
Sleeping

Functions

BBDECL void BBCALL xEntityDisableSleeping (Entity *entity, int state=1)
 Disables or enables sleeping of an entity.
BBDECL float BBCALL xEntityGetAngularSleepingThreshold (Entity *entity)
 Returns an angular velocity threshold of an entity.
BBDECL float BBCALL xEntityGetLinearSleepingThreshold (Entity *entity)
 Returns a linear velocity threshold of an entity.
BBDECL int BBCALL xEntityIsSleeping (Entity *entity)
 Returns true if entity is sleeping.
BBDECL void BBCALL xEntitySetSleepingThresholds (Entity *entity, float linearThreshold, float angularThreshold)
 Sets the threshold of the linear and angular velocities below which an entity falls asleep.
BBDECL void BBCALL xEntitySleep (Entity *entity)
 Force an entity to sleep.
BBDECL void BBCALL xEntityWakeUp (Entity *entity)
 Force an entity to wake up.

Function Documentation

BBDECL int BBCALL xEntityIsSleeping ( Entity *  entity)

Returns true if entity is sleeping.

Parameters:
entityEntity handle
BBDECL void BBCALL xEntityDisableSleeping ( Entity *  entity,
int  state = 1 
)

Disables or enables sleeping of an entity.

If sleeping is disable an entity's body is never go to sleep.

Parameters:
entityEntity handle
state1 (true) to disable sleeping. 0 (false) to enable sleeping. Default value is 1 (true)
BBDECL void BBCALL xEntityWakeUp ( Entity *  entity)

Force an entity to wake up.

Parameters:
entityEntity handle
BBDECL void BBCALL xEntitySleep ( Entity *  entity)

Force an entity to sleep.

Parameters:
entityEntity handle
BBDECL void BBCALL xEntitySetSleepingThresholds ( Entity *  entity,
float  linearThreshold,
float  angularThreshold 
)

Sets the threshold of the linear and angular velocities below which an entity falls asleep.

Initially linear threshold is 0.8, angular threshold is 1.0.

Parameters:
entityEntity handle
linearThresholdLinear velocity threshold
angularThresholdAngular velocity threshold
BBDECL float BBCALL xEntityGetLinearSleepingThreshold ( Entity *  entity)

Returns a linear velocity threshold of an entity.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityGetAngularSleepingThreshold ( Entity *  entity)

Returns an angular velocity threshold of an entity.

Parameters:
entityEntity handle