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
contactIdulongpointAVector3dpointBVector3ddepthFixed64normalVector3dhasMaterialOverrideboolmaterialAPhysicsMaterialmaterialBPhysicsMaterialdepthIsClampedbool
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
contactIdulonganchorAContactAnchoranchorBContactAnchordepthFixed64normalVector3dhasMaterialOverrideboolmaterialAPhysicsMaterialmaterialBPhysicsMaterialdepthIsClampedbool
Properties
AnchorA
Authoritative canonical contact anchor on collider A.
public ContactAnchor AnchorA { get; }
Property Value
AnchorB
Authoritative canonical contact anchor on collider B.
public ContactAnchor AnchorB { get; }
Property Value
ContactId
Stable identity derived from the unordered pair of pose-invariant canonical local feature terms.
public ulong ContactId { get; }
Property Value
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
HasMaterialOverride
Gets whether this contact carries materials from private compound parts.
public bool HasMaterialOverride { get; }
Property Value
MaterialA
Material for collider A when HasMaterialOverride is true.
public PhysicsMaterial MaterialA { get; }
Property Value
MaterialB
Material for collider B when HasMaterialOverride is true.
public PhysicsMaterial MaterialB { get; }
Property Value
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
pointVector3d
Returns
TryGetPointB(out Vector3d)
Attempts to materialize the world-space contact point on collider B.
public bool TryGetPointB(out Vector3d point)
Parameters
pointVector3d