SleepingSettings Class |
Namespace: DigitalRune.Physics.Settings
The SleepingSettings type exposes the following members.
Name | Description | |
---|---|---|
SleepingSettings |
Initializes a new instance of the SleepingSettings class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AngularVelocityThreshold |
Gets or sets the angular sleeping velocity threshold.
| |
LinearVelocityThreshold |
Gets or sets the linear sleeping velocity threshold.
| |
TimeThreshold |
Gets or sets the sleeping time threshold in seconds.
|
Sleeping: Sleeping is also known as deactivation: Rigid bodies that do not move for a certain amount of time are deactivated ("put to sleep"). The simulation will do less work for sleeping bodies which results in a performance gain. Bodies are also put to sleep if they have a very low velocity for a certain period. For sleeping bodies the velocity is clamped to zero, which means that sleeping also improves the simulation stability by removing small (possible erroneous) velocities.
Rigid bodies will start to sleep if their LinearVelocity is below LinearVelocityThreshold and their AngularVelocity is below AngularVelocityThreshold for a time larger than TimeThreshold.
The RigidBody class also has several sleep related methods and properties, see CanSleep, IsSleeping, Sleep and WakeUp.
Simulation Islands: A SimulationIsland can only sleep as a whole. It is not possible that some bodies in an island are sleeping and others are awake. If one object is awake all objects are awake because the movement of the awake body can propagate to the other bodies. In unfortunate configurations a jittering body can keep a whole island awake.