Table of Contents

Struct ManifoldContact

Namespace
Gravitas.CollisionHandling
Assembly
Gravitas.dll

A deterministic narrow-phase contact point for a collision manifold.

public readonly struct ManifoldContact
Inherited Members

Constructors

ManifoldContact(ulong, Vector3d, Vector3d, Fixed64, Vector3d, bool, PhysicsMaterial, PhysicsMaterial, bool)

Creates a deterministic contact from world-space witness points.

public ManifoldContact(ulong contactId, Vector3d pointA, Vector3d pointB, Fixed64 depth, Vector3d normal, bool hasMaterialOverride = false, PhysicsMaterial materialA = default, PhysicsMaterial materialB = default, bool depthIsClamped = false)

Parameters

contactId ulong
pointA Vector3d
pointB Vector3d
depth Fixed64
normal Vector3d
hasMaterialOverride bool
materialA PhysicsMaterial
materialB PhysicsMaterial
depthIsClamped bool

ManifoldContact(ulong, ContactAnchor, ContactAnchor, Fixed64, Vector3d, bool, PhysicsMaterial, PhysicsMaterial, bool)

Creates a deterministic contact from authoritative rigid-frame anchors.

public ManifoldContact(ulong contactId, ContactAnchor anchorA, ContactAnchor anchorB, Fixed64 depth, Vector3d normal, bool hasMaterialOverride = false, PhysicsMaterial materialA = default, PhysicsMaterial materialB = default, bool depthIsClamped = false)

Parameters

contactId ulong
anchorA ContactAnchor
anchorB ContactAnchor
depth Fixed64
normal Vector3d
hasMaterialOverride bool
materialA PhysicsMaterial
materialB PhysicsMaterial
depthIsClamped bool

Properties

AnchorA

Authoritative canonical contact anchor on collider A.

public ContactAnchor AnchorA { get; }

Property Value

ContactAnchor

AnchorB

Authoritative canonical contact anchor on collider B.

public ContactAnchor AnchorB { get; }

Property Value

ContactAnchor

ContactId

Stable identity derived from the unordered pair of pose-invariant canonical local feature terms.

public ulong ContactId { get; }

Property Value

ulong

Depth

Penetration depth along Normal.

public Fixed64 Depth { get; }

Property Value

Fixed64

DepthIsClamped

Gets whether the conceptual penetration depth exceeded the scalar range.

public bool DepthIsClamped { get; }

Property Value

bool

HasMaterialOverride

Gets whether this contact carries materials from private compound parts.

public bool HasMaterialOverride { get; }

Property Value

bool

MaterialA

Material for collider A when HasMaterialOverride is true.

public PhysicsMaterial MaterialA { get; }

Property Value

PhysicsMaterial

MaterialB

Material for collider B when HasMaterialOverride is true.

public PhysicsMaterial MaterialB { get; }

Property Value

PhysicsMaterial

Normal

Unit normal pointing from collider A toward collider B.

public Vector3d Normal { get; }

Property Value

Vector3d

PointA

Gets the world-space contact point on collider A.

public Vector3d PointA { get; }

Property Value

Vector3d

Exceptions

InvalidOperationException

The conceptual world point is outside the scalar range.

PointB

Gets the world-space contact point on collider B.

public Vector3d PointB { get; }

Property Value

Vector3d

Exceptions

InvalidOperationException

The conceptual world point is outside the scalar range.

Methods

TryGetPointA(out Vector3d)

Attempts to materialize the world-space contact point on collider A.

public bool TryGetPointA(out Vector3d point)

Parameters

point Vector3d

Returns

bool

TryGetPointB(out Vector3d)

Attempts to materialize the world-space contact point on collider B.

public bool TryGetPointB(out Vector3d point)

Parameters

point Vector3d

Returns

bool