Table of Contents

Struct TypedIndex

Namespace
BepuPhysics.Collidables
Assembly
BepuPhysics.dll

Represents an index with an associated type packed into a single integer.

public struct TypedIndex : IEquatable<TypedIndex>
Implements
Inherited Members

Constructors

TypedIndex(int, int)

public TypedIndex(int type, int index)

Parameters

type int
index int

Fields

Packed

Bit packed representation of the typed index.

public uint Packed

Field Value

uint

Properties

Exists

Gets whether this index actually refers to anything. The Type and Index should only be used if this is true.

public bool Exists { get; }

Property Value

bool

Index

Gets the index of the object.

public int Index { get; }

Property Value

int

Type

Gets the type index of the object.

public int Type { get; }

Property Value

int

Methods

Equals(TypedIndex)

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

public bool Equals(TypedIndex other)

Parameters

other TypedIndex

An object to compare with this object.

Returns

bool

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

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object other)

Parameters

other object

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.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(TypedIndex, TypedIndex)

public static bool operator ==(TypedIndex x, TypedIndex y)

Parameters

x TypedIndex
y TypedIndex

Returns

bool

operator !=(TypedIndex, TypedIndex)

public static bool operator !=(TypedIndex x, TypedIndex y)

Parameters

x TypedIndex
y TypedIndex

Returns

bool