Table of Contents

Class HingeConstraintDesc

Namespace
Stride.Physics.Constraints
Assembly
Stride.Physics.dll

Description of a HingeConstraint.

[Display("Hinge", null)]
[DataContract("HingeConstraintDesc")]
public class HingeConstraintDesc : IConstraintDesc
Inheritance
HingeConstraintDesc
Implements

Properties

AxisInA

Axis on which the hinge will rotate relative to body A.

[Display(2, null, null)]
public Quaternion AxisInA { get; set; }

Property Value

Quaternion

AxisInB

Axis on which the hinge will rotate relative to body B.

[Display(3, null, null)]
public Quaternion AxisInB { get; set; }

Property Value

Quaternion

Limit

[Display(5, null, null)]
public HingeConstraintDesc.LimitDesc Limit { get; set; }

Property Value

HingeConstraintDesc.LimitDesc

Motor

[Display(6, null, null)]
public HingeConstraintDesc.MotorDesc Motor { get; set; }

Property Value

HingeConstraintDesc.MotorDesc

PivotInA

Position local to rigidbody A.

[Display(0, null, null)]
public Vector3 PivotInA { get; set; }

Property Value

Vector3

PivotInB

Position local to rigidbody B.

[Display(1, null, null)]
public Vector3 PivotInB { get; set; }

Property Value

Vector3

Remarks

Ignored when creating a body-world constraint.

Type

Type of the constraint description.

public ConstraintTypes Type { get; }

Property Value

ConstraintTypes

UseReferenceFrameA

If true, UseReferenceFrameA sets the reference sign to -1, which is used in some correction computations regarding limits and when returning the current hinge angle.

[Display(4, null, null)]
public bool UseReferenceFrameA { get; set; }

Property Value

bool

Methods

Build(RigidbodyComponent, RigidbodyComponent)

Create a new constraint according to the description properties between bodies A and B, or between A and World.

public Constraint Build(RigidbodyComponent bodyA, RigidbodyComponent bodyB)

Parameters

bodyA RigidbodyComponent
bodyB RigidbodyComponent

Returns

Constraint

A new constraint constructed in the Simulation. Needs to be added with AddConstraint(Constraint) to take effect.