Table of Contents

Struct CollidableReference

Namespace
BepuPhysics.Collidables
Assembly
BepuPhysics.dll

Uses a bitpacked representation to refer to a body or static collidable.

public struct CollidableReference : IEquatable<CollidableReference>
Implements
Inherited Members

Constructors

CollidableReference(CollidableMobility, BodyHandle)

Creates a collidable reference for a body.

public CollidableReference(CollidableMobility mobility, BodyHandle handle)

Parameters

mobility CollidableMobility

Mobility type of the owner of the collidable.

handle BodyHandle

Handle of the owner of the collidable.

CollidableReference(StaticHandle)

Creates a collidable reference for a static.

public CollidableReference(StaticHandle handle)

Parameters

handle StaticHandle

Handle of the owner of the collidable.

Fields

Packed

Bitpacked representation of the collidable reference.

public uint Packed

Field Value

uint

Properties

BodyHandle

Gets the body handle of the owner of the collidable referred to by this instance.

public BodyHandle BodyHandle { get; }

Property Value

BodyHandle

Mobility

Gets the mobility state of the owner of this collidable.

public CollidableMobility Mobility { get; }

Property Value

CollidableMobility

RawHandleValue

Gets the integer value of the handle of the owner of the collidable referred to by this instance.

public int RawHandleValue { get; }

Property Value

int

StaticHandle

Gets the static handle of the owner of the collidable referred to by this instance.

public StaticHandle StaticHandle { get; }

Property Value

StaticHandle

Methods

Equals(CollidableReference)

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

public bool Equals(CollidableReference other)

Parameters

other CollidableReference

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

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

Parameters

x CollidableReference
y CollidableReference

Returns

bool

operator !=(CollidableReference, CollidableReference)

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

Parameters

x CollidableReference
y CollidableReference

Returns

bool