Table of Contents

Struct ConstraintHandle

Namespace
BepuPhysics
Assembly
BepuPhysics.dll

Unique identifier of a constraint belonging to a simulation's Solver.

public struct ConstraintHandle : IEquatable<ConstraintHandle>, IEqualityComparerRef<ConstraintHandle>
Implements
IEqualityComparerRef<ConstraintHandle>
Inherited Members

Constructors

ConstraintHandle(int)

public ConstraintHandle(int index)

Parameters

index int

Fields

Value

Index in the handle-to-memory mapping table used to look up the current memory location of the constraint. This value will not (and must not) change during the constraint's lifespan, but the memory that the table points to could change.

public int Value

Field Value

int

Methods

Equals(ConstraintHandle)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ConstraintHandle other)

Parameters

other ConstraintHandle

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(ref ConstraintHandle, ref ConstraintHandle)

public bool Equals(ref ConstraintHandle a, ref ConstraintHandle b)

Parameters

a ConstraintHandle
b ConstraintHandle

Returns

bool

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Hash(ref ConstraintHandle)

public int Hash(ref ConstraintHandle item)

Parameters

item ConstraintHandle

Returns

int

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(ConstraintHandle, ConstraintHandle)

public static bool operator ==(ConstraintHandle a, ConstraintHandle b)

Parameters

a ConstraintHandle
b ConstraintHandle

Returns

bool

operator !=(ConstraintHandle, ConstraintHandle)

public static bool operator !=(ConstraintHandle a, ConstraintHandle b)

Parameters

a ConstraintHandle
b ConstraintHandle

Returns

bool