Table of Contents

Struct GravitasDiagnosticEvent

Namespace
Gravitas.Diagnostics
Assembly
Gravitas.dll

Deterministic physics diagnostic event data captured from one world context.

public readonly struct GravitasDiagnosticEvent
Inherited Members

Properties

BodyId

Gets the context-local body, ragdoll, or diagnostic root identifier.

public int BodyId { get; }

Property Value

int

ColliderA2DType

Gets the 2D type of the first collider.

public ColliderType2D ColliderA2DType { get; }

Property Value

ColliderType2D

ColliderADimension

Gets the dimensional runtime surface of the first collider.

public GravitasColliderDimension ColliderADimension { get; }

Property Value

GravitasColliderDimension

ColliderAId

Gets the first context-local collider identifier.

public int ColliderAId { get; }

Property Value

int

ColliderAType

Gets the 3D type of the first collider.

public ColliderType ColliderAType { get; }

Property Value

ColliderType

ColliderB2DType

Gets the 2D type of the second collider.

public ColliderType2D ColliderB2DType { get; }

Property Value

ColliderType2D

ColliderBDimension

Gets the dimensional runtime surface of the second collider.

public GravitasColliderDimension ColliderBDimension { get; }

Property Value

GravitasColliderDimension

ColliderBId

Gets the second context-local collider identifier.

public int ColliderBId { get; }

Property Value

int

ColliderBType

Gets the 3D type of the second collider.

public ColliderType ColliderBType { get; }

Property Value

ColliderType

DataA

Gets the first event-specific integer value.

public int DataA { get; }

Property Value

int

DataB

Gets the second event-specific integer value.

public int DataB { get; }

Property Value

int

End

Gets the event-specific end vector.

public Vector3d End { get; }

Property Value

Vector3d

Frame

Gets the simulation frame in which the event was captured.

public int Frame { get; }

Property Value

int

HasPointA

Gets whether PointA contains a materialized point.

public bool HasPointA { get; }

Property Value

bool

HasPointB

Gets whether PointB contains a materialized point.

public bool HasPointB { get; }

Property Value

bool

Hit

Gets the event-specific result flag.

public bool Hit { get; }

Property Value

bool

JointId

Gets the context-local joint identifier.

public int JointId { get; }

Property Value

int

Kind

Gets the event kind that determines how its payload is interpreted.

public GravitasDiagnosticEventKind Kind { get; }

Property Value

GravitasDiagnosticEventKind

PointA

Gets the first event-specific point.

public Vector3d PointA { get; }

Property Value

Vector3d

PointB

Gets the second event-specific point.

public Vector3d PointB { get; }

Property Value

Vector3d

ScalarA

Gets the first event-specific fixed-point scalar.

public Fixed64 ScalarA { get; }

Property Value

Fixed64

ScalarB

Gets the second event-specific fixed-point scalar.

public Fixed64 ScalarB { get; }

Property Value

Fixed64

Sequence

Gets the event's sequence within its capture buffer.

public int Sequence { get; }

Property Value

int

Start

Gets the event-specific start vector.

public Vector3d Start { get; }

Property Value

Vector3d

Vector

Gets the event-specific vector payload.

public Vector3d Vector { get; }

Property Value

Vector3d

Methods

DispatchTo(GravitasDiagnosticEventVisitor)

Dispatches this event to a typed diagnostic visitor based on Kind.

public void DispatchTo(GravitasDiagnosticEventVisitor visitor)

Parameters

visitor GravitasDiagnosticEventVisitor

TryAsAngularVelocityDelta(out GravitasVelocityDeltaDiagnosticView)

Tries to decode this event as an angular-velocity-delta diagnostic view.

public bool TryAsAngularVelocityDelta(out GravitasVelocityDeltaDiagnosticView view)

Parameters

view GravitasVelocityDeltaDiagnosticView

Returns

bool

TryAsCircleQuery(out GravitasCircleQueryDiagnosticView)

Tries to decode this event as an X/Z circle-query diagnostic view.

public bool TryAsCircleQuery(out GravitasCircleQueryDiagnosticView view)

Parameters

view GravitasCircleQueryDiagnosticView

Returns

bool

TryAsContact(out GravitasContactDiagnosticView)

Tries to decode this event as a 3D contact diagnostic view.

public bool TryAsContact(out GravitasContactDiagnosticView view)

Parameters

view GravitasContactDiagnosticView

Returns

bool

TryAsForceDelta(out GravitasForceDeltaDiagnosticView)

Tries to decode this event as a force-delta diagnostic view.

public bool TryAsForceDelta(out GravitasForceDeltaDiagnosticView view)

Parameters

view GravitasForceDeltaDiagnosticView

Returns

bool

TryAsGroundProbe(out GravitasGroundProbeDiagnosticView)

Tries to decode this event as a ground-probe diagnostic view.

public bool TryAsGroundProbe(out GravitasGroundProbeDiagnosticView view)

Parameters

view GravitasGroundProbeDiagnosticView

Returns

bool

TryAsJoint(out GravitasJointDiagnosticView)

Tries to decode this event as a joint diagnostic view.

public bool TryAsJoint(out GravitasJointDiagnosticView view)

Parameters

view GravitasJointDiagnosticView

Returns

bool

TryAsLinearVelocityDelta(out GravitasVelocityDeltaDiagnosticView)

Tries to decode this event as a linear-velocity-delta diagnostic view.

public bool TryAsLinearVelocityDelta(out GravitasVelocityDeltaDiagnosticView view)

Parameters

view GravitasVelocityDeltaDiagnosticView

Returns

bool

TryAsMixedContact(out GravitasMixedContactDiagnosticView)

Tries to decode this event as a mixed 3D/2D contact diagnostic view.

public bool TryAsMixedContact(out GravitasMixedContactDiagnosticView view)

Parameters

view GravitasMixedContactDiagnosticView

Returns

bool

TryAsMixedQuery(out GravitasMixedQueryDiagnosticView)

Tries to decode this event as a mixed 3D/2D query diagnostic view.

public bool TryAsMixedQuery(out GravitasMixedQueryDiagnosticView view)

Parameters

view GravitasMixedQueryDiagnosticView

Returns

bool

TryAsMixedResponseImpulse(out GravitasMixedResponseImpulseDiagnosticView)

Tries to decode this event as a mixed 3D/2D response-impulse diagnostic view.

public bool TryAsMixedResponseImpulse(out GravitasMixedResponseImpulseDiagnosticView view)

Parameters

view GravitasMixedResponseImpulseDiagnosticView

Returns

bool

TryAsMixedResponseIsland(out GravitasMixedResponseIslandDiagnosticView)

Tries to decode this event as a mixed 3D/2D response-island diagnostic view.

public bool TryAsMixedResponseIsland(out GravitasMixedResponseIslandDiagnosticView view)

Parameters

view GravitasMixedResponseIslandDiagnosticView

Returns

bool

TryAsQuerySummary(out GravitasQuerySummaryDiagnosticView)

Tries to decode this event as a query quality summary diagnostic view.

public bool TryAsQuerySummary(out GravitasQuerySummaryDiagnosticView view)

Parameters

view GravitasQuerySummaryDiagnosticView

Returns

bool

TryAsRagdoll(out GravitasRagdollDiagnosticView)

Tries to decode this event as a ragdoll active-state diagnostic view.

public bool TryAsRagdoll(out GravitasRagdollDiagnosticView view)

Parameters

view GravitasRagdollDiagnosticView

Returns

bool

TryAsRayQuery(out GravitasRayQueryDiagnosticView)

Tries to decode this event as a ray or swept-sphere query diagnostic view.

public bool TryAsRayQuery(out GravitasRayQueryDiagnosticView view)

Parameters

view GravitasRayQueryDiagnosticView

Returns

bool

TryAsResponseImpulse(out GravitasResponseImpulseDiagnosticView)

Tries to decode this event as a 3D response-impulse diagnostic view.

public bool TryAsResponseImpulse(out GravitasResponseImpulseDiagnosticView view)

Parameters

view GravitasResponseImpulseDiagnosticView

Returns

bool

TryAsTorqueDelta(out GravitasTorqueDeltaDiagnosticView)

Tries to decode this event as a torque-delta diagnostic view.

public bool TryAsTorqueDelta(out GravitasTorqueDeltaDiagnosticView view)

Parameters

view GravitasTorqueDeltaDiagnosticView

Returns

bool