Click or drag to resize
DigitalRuneSleepingSettings Class
Defines sleeping-related simulation settings.
Inheritance Hierarchy
SystemObject
  DigitalRune.Physics.SettingsSleepingSettings

Namespace: DigitalRune.Physics.Settings
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public class SleepingSettings

The SleepingSettings type exposes the following members.

Constructors
  NameDescription
Public methodSleepingSettings
Initializes a new instance of the SleepingSettings class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAngularVelocityThreshold
Gets or sets the angular sleeping velocity threshold.
Public propertyLinearVelocityThreshold
Gets or sets the linear sleeping velocity threshold.
Public propertyTimeThreshold
Gets or sets the sleeping time threshold in seconds.
Top
Remarks

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.

See Also