Table of Contents

Interface IConstraintDescription<TDescription>

Namespace
BepuPhysics.Constraints
Assembly
BepuPhysics.dll

Marks a type as a description of a constraint associated with a particular batch.

public interface IConstraintDescription<TDescription> where TDescription : unmanaged, IConstraintDescription<TDescription>

Type Parameters

TDescription

Type of the description object.

Remarks

Note that one batch may have multiple description types associated with it, each one potentially offering a different subset of properties or translation logic.

Properties

ConstraintTypeId

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

public static abstract int ConstraintTypeId { get; }

Property Value

int

TypeProcessorType

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

public static abstract 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.

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 TDescription)

Creates a description from the batch-held memory at a given location.

public static abstract void BuildDescription(ref TypeBatch batch, int bundleIndex, int innerIndex, out TDescription 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 TDescription

Description of the constraint.

CreateTypeProcessor()

Creates a type processor for this constraint type.

public static abstract TypeProcessor CreateTypeProcessor()

Returns

TypeProcessor