Struct BodyActivityDescription
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
Describes the thresholds for a body going to sleep.
public struct BodyActivityDescription
- Inherited Members
Constructors
BodyActivityDescription(float, byte)
Creates a body activity description.
public BodyActivityDescription(float sleepThreshold, byte minimumTimestepCountUnderThreshold = 32)
Parameters
sleepThreshold
floatThreshold of squared velocity under which the body is allowed to go to sleep. This is compared against dot(linearVelocity, linearVelocity) + dot(angularVelocity, angularVelocity).
minimumTimestepCountUnderThreshold
byteThe number of time steps that the body must be under the sleep threshold before the body becomes a sleep candidate. Note that the body is not guaranteed to go to sleep immediately after meeting this minimum.
Fields
MinimumTimestepCountUnderThreshold
The number of time steps that the body must be under the sleep threshold before the body becomes a sleep candidate. Note that the body is not guaranteed to go to sleep immediately after meeting this minimum.
public byte MinimumTimestepCountUnderThreshold
Field Value
SleepThreshold
Threshold of squared velocity under which the body is allowed to go to sleep. This is compared against dot(linearVelocity, linearVelocity) + dot(angularVelocity, angularVelocity).
public float SleepThreshold
Field Value
Operators
implicit operator BodyActivityDescription(float)
Creates a body activity description. Uses a MinimumTimestepCountUnderThreshold of 32.
public static implicit operator BodyActivityDescription(float sleepThreshold)
Parameters
sleepThreshold
floatThreshold of squared velocity under which the body is allowed to go to sleep. This is compared against dot(linearVelocity, linearVelocity) + dot(angularVelocity, angularVelocity). Note that the body is not guaranteed to go to sleep immediately after meeting this minimum.