Table of Contents

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

Vector3

AxisLocalB

Axis attached to body B in its local space.

public Vector3 AxisLocalB

Field Value

Vector3

MinimumDot

Minimum dot product between the world space A and B axes that the constraint attempts to maintain.

public float MinimumDot

Field Value

float

SpringSettings

Spring frequency and damping parameters.

public SpringSettings SpringSettings

Field Value

SpringSettings

Properties

ConstraintTypeId

Gets the type id of the constraint that this is a description of.

public static int ConstraintTypeId { get; }

Property Value

int

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

float

TypeProcessorType

Gets the type of the type batch which contains described constraints.

public static Type TypeProcessorType { get; }

Property Value

Type

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 TypeBatch

Batch to modify.

bundleIndex int

Index of the target constraint's bundle.

innerIndex int

Index 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 TypeBatch

Batch to read.

bundleIndex int

Index of the source constraint's bundle.

innerIndex int

Index of the source constraint within its bundle.

description SwingLimit

Description of the constraint.

CreateTypeProcessor()

Creates a type processor for this constraint type.

public static TypeProcessor CreateTypeProcessor()

Returns

TypeProcessor