Click or drag to resize
DigitalRuneEulerMotor Class
Defines a motor that controls the relative orientation of two constrained bodies using Euler angle.
Inheritance Hierarchy

Namespace: DigitalRune.Physics.Constraints
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public class EulerMotor : Constraint

The EulerMotor type exposes the following members.

Constructors
  NameDescription
Public methodEulerMotor
Initializes a new instance of the EulerMotor class
Top
Methods
  NameDescription
Public methodApplyImpulse
Called by the simulation to apply an impulse that satisfies the constraint.
(Inherited from Constraint.)
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.)
Protected methodOnAddToSimulation
Called when this constraint is added to a simulation.
(Inherited from Constraint.)
Protected methodOnApplyImpulse
Called when the constraint impulse should be applied.
(Overrides ConstraintOnApplyImpulse.)
Protected methodOnChanged
Called when properties of this constraint were changed.
(Overrides ConstraintOnChanged.)
Protected methodOnRemoveFromSimulation
Called when this constraint is removed from a simulation.
(Inherited from Constraint.)
Protected methodOnSetup
Called when constraint should be set-up for a new time step.
(Overrides ConstraintOnSetup.)
Public methodSetup
Called by the simulation to prepare this constraint for constraint solving for a new time step.
(Inherited from Constraint.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAnchorOrientationALocal
Gets or sets the constraint anchor orientation on BodyA in local space of BodyA.
Public propertyAnchorOrientationBLocal
Gets or sets the constraint anchor orientation on BodyB in local space of BodyB.
Public propertyAngularConstraintImpulse
Gets or sets the angular constraint impulse that was applied.
(Overrides ConstraintAngularConstraintImpulse.)
Public propertyBodyA
Gets or sets the first body.
(Inherited from Constraint.)
Public propertyBodyB
Gets or sets the second body.
(Inherited from Constraint.)
Public propertyCollisionEnabled
Gets or sets a value indicating whether collisions between BodyA and BodyB are disabled.
(Inherited from Constraint.)
Public propertyDampingConstant
Gets or sets the damping constant.
Public propertyEnabled
Gets or sets a value indicating whether this constraint is enabled.
(Inherited from Constraint.)
Public propertyLinearConstraintImpulse
Gets or sets the linear constraint impulse that was applied.
(Overrides ConstraintLinearConstraintImpulse.)
Public propertyMaxForce
Gets or sets the maximal force that is applied by this motor.
Public propertyMaxVelocity
Gets or sets the maximal velocity.
Public propertySimulation
Gets the simulation to which this constraint belongs.
(Inherited from Constraint.)
Public propertySpringConstant
Gets or sets the spring constant.
Public propertyTargetAngles
Gets or sets the target angles.
Top
Remarks

The motor pushes both bodies until the relative orientation of the constraint anchor on the second body relative to the constraint anchor on the first body is equal to the three Euler angles defined in TargetAngles. The motor acts like a damped-spring that rotates the bodies (controlled by SpringConstant and DampingConstant). The three Euler angles are defined as in the AngularLimit.

The target orientation is defined using Euler angles. In contrast, QuaternionMotor is a motor that controls the orientation where the target orientation is defined using a QuaternionF.

Euler Angles: The EulerMotor uses the same Euler angles as the AngularLimit.

The Euler angles are computed for following order of rotations: The first rotations 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°].

Use GetEulerAngles(Matrix33F) to get the Euler angles of a given rotation.

See Also