Class GearConstraintDesc
- Namespace
- Stride.Physics.Constraints
- Assembly
- Stride.Physics.dll
Description of a GearConstraint.
[Display("Gear", null)]
[DataContract("GearConstraintDesc")]
public class GearConstraintDesc : IConstraintDesc
- Inheritance
-
GearConstraintDesc
- Implements
Properties
AxisInA
Axis on which the gear will rotate relative to body A.
[Display(0, null, null)]
public Quaternion AxisInA { get; set; }
Property Value
AxisInB
Axis on which the gear will rotate relative to body B.
[Display(1, null, null)]
public Quaternion AxisInB { get; set; }
Property Value
PivotInA
Position local to rigidbody A.
public Vector3 PivotInA { get; }
Property Value
Remarks
Not used for the gear constraint.
PivotInB
Position local to rigidbody B.
public Vector3 PivotInB { get; }
Property Value
Remarks
Ignored when creating a body-world constraint.
Ratio
Size ratio between the gears (rotating a bigger gear will rotate smaller gear quicker).
[Display(2, null, null)]
public float Ratio { get; set; }
Property Value
Type
Type of the constraint description.
public ConstraintTypes Type { get; }
Property Value
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
RigidbodyComponentbodyB
RigidbodyComponent
Returns
- Constraint
A new constraint constructed in the Simulation. Needs to be added with AddConstraint(Constraint) to take effect.