Table of Contents

Struct BodyHandle

Namespace
BepuPhysics
Assembly
BepuPhysics.dll

Unique identifier of a body belonging to a simulation's Bodies collection.

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

Constructors

BodyHandle(int)

public BodyHandle(int value)

Parameters

value int

Fields

Value

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

public int Value

Field Value

int

Methods

Equals(BodyHandle)

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

public bool Equals(BodyHandle other)

Parameters

other BodyHandle

An object to compare with this object.

Returns

bool

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

Equals(ref BodyHandle, ref BodyHandle)

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

Parameters

a BodyHandle
b BodyHandle

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

public int Hash(ref BodyHandle item)

Parameters

item BodyHandle

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 ==(BodyHandle, BodyHandle)

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

Parameters

a BodyHandle
b BodyHandle

Returns

bool

operator !=(BodyHandle, BodyHandle)

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

Parameters

a BodyHandle
b BodyHandle

Returns

bool