AngularLimit Class |
Namespace: DigitalRune.Physics.Constraints
The AngularLimit type exposes the following members.
Name | Description | |
---|---|---|
AngularLimit | Initializes a new instance of the AngularLimit class |
Name | Description | |
---|---|---|
ApplyImpulse |
Called by the simulation to apply an impulse that satisfies the constraint.
(Inherited from Constraint.) | |
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.) | |
GetLimitState |
Gets the state of an angular limit about a certain axis.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnAddToSimulation |
Called when this constraint is added to a simulation.
(Inherited from Constraint.) | |
OnApplyImpulse |
Called when the constraint impulse should be applied.
(Overrides ConstraintOnApplyImpulse.) | |
OnChanged |
Called when properties of this constraint were changed.
(Overrides ConstraintOnChanged.) | |
OnRemoveFromSimulation |
Called when this constraint is removed from a simulation.
(Inherited from Constraint.) | |
OnSetup |
Called when constraint should be set-up for a new time step.
(Overrides ConstraintOnSetup.) | |
Setup |
Called by the simulation to prepare this constraint for constraint solving for a new time
step.
(Inherited from Constraint.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AnchorOrientationALocal | ||
AnchorOrientationBLocal | ||
AngularConstraintImpulse |
Gets or sets the angular constraint impulse that was applied.
(Overrides ConstraintAngularConstraintImpulse.) | |
BodyA |
Gets or sets the first body.
(Inherited from Constraint.) | |
BodyB |
Gets or sets the second body.
(Inherited from Constraint.) | |
CollisionEnabled | (Inherited from Constraint.) | |
Enabled |
Gets or sets a value indicating whether this constraint is enabled.
(Inherited from Constraint.) | |
ErrorReduction |
Gets or sets the error reduction parameter.
| |
LinearConstraintImpulse |
Gets or sets the linear constraint impulse that was applied.
(Overrides ConstraintLinearConstraintImpulse.) | |
MaxForce |
Gets or sets the maximal forces for the three rotational constraints.
| |
Maximum |
Gets or sets the maximum movement limit on the three constraint axes (in radians).
| |
Minimum |
Gets or sets the minimum movement limit on the three constraint axes (in radians).
| |
RelativePosition |
Gets the relative rotations about the constraint axes (the three Euler angles).
| |
Restitution |
Gets or sets the coefficients of restitution.
| |
Simulation |
Gets the simulation to which this constraint belongs.
(Inherited from Constraint.) | |
Softness |
Gets or sets the softness.
|
This constraint computes the relative rotation between AnchorOrientationALocal fixed on the first body and AnchorOrientationBLocal fixed on the second body. It computes the three Euler angles for the relative orientation (see GetEulerAngles(Matrix33F)).
Euler Angles: The Euler angles are computed for following order of rotations: The first rotation is about the x-axis. The second rotation is about the rotated y-axis after the first rotation. The last rotation is about the final z-axis.
The Euler angles are unique if the second angle is less than +/- 90°. The limits for the rotation angles are [-180°, 180°] for the first and the third angle. And the limit for the second angle is ]-90°, 90°[. Important: For Minimum and Maximum these angles must be specified in radians not degrees.
Each rotation of the three Euler angle rotations can be restricted using Minimum and Maximum. Important: The second rotation must be fixed in the range ]-90°, 90°[ (otherwise a Gimbal Lock situation occurs).
This constraint can be used to create custom constraints. For example using a minimum and maximum limits of (0, 0, 0) creates a NoRotationConstraint. Combining the AngularLimit with a BallJoint and using a minimum and maximum of (-∞, 0, 0) and (+∞, 0, 0) creates a HingeJoint. Combining the AngularLimit with a BallJoint and using a minimum and maximum of (-π/4, 0, -∞) and (+π/4, 0, +∞) creates a Hinge2Joint where the first rotation axis is the limited steering axis and the third axis is the rolling axis.