HingeConstraint Class
Namespace: Stride.PhysicsAssembly: Stride.Physics.dll
public class HingeConstraint : Constraint, IDisposable, IRelative
| Name | Description | |
|---|---|---|
| Properties | ||
| AngularOnly | Gets or sets a value indicating whether [angular only]. |
|
| HingeAngle | Gets the hinge angle. |
|
| LimitSign | Gets the limit sign. |
|
| LowerLimit | Gets the lower limit. |
|
| MaxMotorImpulse | Gets or sets the maximum motor impulse. |
|
| MotorTargetVelocity | Gets the motor target velocity. |
|
| SolveLimit | Gets the solve limit. |
|
| UpperLimit | Gets the upper limit. |
|
| Methods | ||
| EnableAngularMotor(Boolean, Single, Single) | Enables the angular motor. |
|
| EnableMotor(Boolean) | Enables the motor. |
|
| SetFrames(Matrix, Matrix) | Sets the frames. |
|
| SetLimit(Single, Single) | Sets the limit. |
|
| SetLimit(Single, Single, Single) | Sets the limit. |
|
| SetLimit(Single, Single, Single, Single) | Sets the limit. |
|
| SetLimit(Single, Single, Single, Single, Single) | Sets the limit. |
|
| SetMotorTarget(Quaternion, Single) | Sets the motor target. |
|
| SetMotorTarget(Single, Single) | Sets the motor target. |
|
Properties
AngularOnly
Gets or sets a value indicating whether [angular only].
public bool AngularOnly { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
HingeAngle
Gets the hinge angle.
public float HingeAngle { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The hinge angle. |
LimitSign
Gets the limit sign.
public float LimitSign { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The limit sign. |
LowerLimit
Gets the lower limit.
public float LowerLimit { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The lower limit. |
MaxMotorImpulse
Gets or sets the maximum motor impulse.
public float MaxMotorImpulse { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The maximum motor impulse. |
MotorTargetVelocity
Gets the motor target velocity.
public float MotorTargetVelocity { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The motor target velocity. |
SolveLimit
Gets the solve limit.
public int SolveLimit { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The solve limit. |
UpperLimit
Gets the upper limit.
public float UpperLimit { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The upper limit. |
Methods
EnableAngularMotor(Boolean, Single, Single)
Enables the angular motor.
public void EnableAngularMotor(bool enableMotor, float targetVelocity, float maxMotorImpulse)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | enableMotor | if set to |
| System.Single | targetVelocity | The target velocity. |
| System.Single | maxMotorImpulse | The maximum motor impulse. |
EnableMotor(Boolean)
Enables the motor.
public void EnableMotor(bool enableMotor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | enableMotor | if set to |
SetFrames(Matrix, Matrix)
Sets the frames.
public void SetFrames(Matrix frameA, Matrix frameB)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix | frameA | The frame a. |
| Matrix | frameB | The frame b. |
SetLimit(Single, Single)
Sets the limit.
public void SetLimit(float low, float high)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | low | The low. |
| System.Single | high | The high. |
SetLimit(Single, Single, Single)
Sets the limit.
public void SetLimit(float low, float high, float softness)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | low | The low. |
| System.Single | high | The high. |
| System.Single | softness | The softness. |
SetLimit(Single, Single, Single, Single)
Sets the limit.
public void SetLimit(float low, float high, float softness, float biasFactor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | low | The low. |
| System.Single | high | The high. |
| System.Single | softness | The softness. |
| System.Single | biasFactor | The bias factor. |
SetLimit(Single, Single, Single, Single, Single)
Sets the limit.
public void SetLimit(float low, float high, float softness, float biasFactor, float relaxationFactor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | low | The low. |
| System.Single | high | The high. |
| System.Single | softness | The softness. |
| System.Single | biasFactor | The bias factor. |
| System.Single | relaxationFactor | The relaxation factor. |
SetMotorTarget(Quaternion, Single)
Sets the motor target.
public void SetMotorTarget(Quaternion qAinB, float dt)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | qAinB | The q ain b. |
| System.Single | dt | The dt. |
SetMotorTarget(Single, Single)
Sets the motor target.
public void SetMotorTarget(float targetAngle, float dt)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | targetAngle | The target angle. |
| System.Single | dt | The dt. |