Struct SwingLimit
- Namespace
- BepuPhysics.Constraints
- Assembly
- BepuPhysics.dll
Restricts axes attached to two bodies to fall within a maximum swing angle.
public struct SwingLimit : ITwoBodyConstraintDescription<SwingLimit>, IConstraintDescription<SwingLimit>
- Implements
- Inherited Members
Fields
AxisLocalA
Axis attached to body A in its local space.
public Vector3 AxisLocalA
Field Value
AxisLocalB
Axis attached to body B in its local space.
public Vector3 AxisLocalB
Field Value
MinimumDot
Minimum dot product between the world space A and B axes that the constraint attempts to maintain.
public float MinimumDot
Field Value
SpringSettings
Spring frequency and damping parameters.
public SpringSettings SpringSettings
Field Value
Properties
ConstraintTypeId
Gets the type id of the constraint that this is a description of.
public static int ConstraintTypeId { get; }
Property Value
MaximumSwingAngle
Gets or sets the maximum swing angle that the constraint allows between world axis A and B. Based on the MinimumDot field.
public float MaximumSwingAngle { readonly get; set; }
Property Value
TypeProcessorType
Gets the type of the type batch which contains described constraints.
public static Type TypeProcessorType { get; }
Property Value
Methods
ApplyDescription(ref TypeBatch, int, int)
Changes the batch-held memory at a given location to match the given description.
public readonly void ApplyDescription(ref TypeBatch batch, int bundleIndex, int innerIndex)
Parameters
batch
TypeBatchBatch to modify.
bundleIndex
intIndex of the target constraint's bundle.
innerIndex
intIndex of the target constraint within its bundle.
BuildDescription(ref TypeBatch, int, int, out SwingLimit)
Creates a description from the batch-held memory at a given location.
public static void BuildDescription(ref TypeBatch batch, int bundleIndex, int innerIndex, out SwingLimit description)
Parameters
batch
TypeBatchBatch to read.
bundleIndex
intIndex of the source constraint's bundle.
innerIndex
intIndex of the source constraint within its bundle.
description
SwingLimitDescription of the constraint.
CreateTypeProcessor()
Creates a type processor for this constraint type.
public static TypeProcessor CreateTypeProcessor()