Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    HingeConstraint Class

    Namespace: Stride.Physics
    Assembly: Stride.Physics.dll
    System.Object → Constraint → HingeConstraint
    Derived from HingeConstraint:

    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.

    | Improve this Doc View Source

    Properties


    AngularOnly

    Gets or sets a value indicating whether [angular only].

    public bool AngularOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [angular only]; otherwise, false.


    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.

    | Improve this Doc View Source

    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 true [enable motor].

    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 true [enable motor].


    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.


    Inherited Members

    Constraint.Dispose()
    Constraint.RigidBodyA
    Constraint.RigidBodyB
    Constraint.Enabled
    Constraint.BreakingImpulseThreshold
    Constraint.AppliedImpulse
    Constraint.Simulation

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation