struct LimitConeRange

Inherits: LimitCommon

Represents a joint limit that contraints movement to within an elliptical cone.

Public

Constructors

LimitConeRange

LimitConeRange()

Constructs a limit with a 45 degree cone.

LimitConeRange

LimitConeRange(Radian yLimitAngle, Radian zLimitAngle, float contactDist = -1.F)

Constructs a hard limit.

Once the limit is reached the movement of the attached bodies will come to a stop.

yLimitAngle
Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
zLimitAngle
Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
contactDist
Distance from the limit at which it becomes active. Allows the solver to activate earlier than the limit is reached to avoid breaking the limit. Specify -1 for the default.

LimitConeRange

LimitConeRange(Radian yLimitAngle, Radian zLimitAngle, const Spring &spring, float restitution = 0.F)

Constructs a soft limit.

Once the limit is reached the bodies will bounce back according to the resitution parameter and will be pulled back towards the limit by the provided spring.

yLimitAngle
Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
zLimitAngle
Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
spring
Spring that controls how are the bodies pulled back towards the limit when they breach it.
restitution
Controls how do objects react when the limit is reached, values closer to zero specify non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy) collision. Must be in [0, 1] range.

Fields

YLimitAngle

Radian YLimitAngle

Y angle of the cone.

Movement is constrainted between 0 and this angle on the Y axis.

ZLimitAngle

Radian ZLimitAngle

Z angle of the cone.

Movement is constrainted between 0 and this angle on the Z axis.

ContactDist

float ContactDist

Distance from the limit at which it becomes active.

Allows the solver to activate earlier than the limit is reached to avoid breaking the limit.

Restitution

float Restitution

Controls how do objects react when the limit is reached, values closer to zero specify non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy) collision.

Must be in [0, 1] range.

Spring

Spring that controls how are the bodies pulled back towards the limit when they breach it.

Operators

operator==

bool operator==(const LimitConeRange &other) const