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
TypeProcessorType
Gets the type of the type batch which contains described constraints.
public static abstract 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.
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 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
TypeBatchBatch to read.
bundleIndex
intIndex of the source constraint's bundle.
innerIndex
intIndex of the source constraint within its bundle.
description
TDescriptionDescription of the constraint.
CreateTypeProcessor()
Creates a type processor for this constraint type.
public static abstract TypeProcessor CreateTypeProcessor()