Table of Contents

Class GravitasQueryMixedService

Namespace
Gravitas.Queries
Assembly
Gravitas.dll

Owns batched mixed 3D/2D query behavior for one GravitasWorldContext.

public sealed class GravitasQueryMixedService
Inheritance
GravitasQueryMixedService
Inherited Members

Constructors

GravitasQueryMixedService(GravitasWorldContext)

Creates a mixed query service owned by the specified world context.

public GravitasQueryMixedService(GravitasWorldContext context)

Parameters

context GravitasWorldContext

Properties

Context

Gets the world context that owns this query service.

public GravitasWorldContext Context { get; }

Property Value

GravitasWorldContext

LastBatchCandidateCount

Gets the summed top-level candidate count reported by the last mixed batch query call.

public int LastBatchCandidateCount { get; }

Property Value

int

LastBatchHitCount

Gets the number of hits accepted by the last mixed batch query call.

public int LastBatchHitCount { get; }

Property Value

int

LastBatchMeshTriangleCandidateCount

Gets the summed mesh-triangle candidate count reported by the last mixed batch query call.

public int LastBatchMeshTriangleCandidateCount { get; }

Property Value

int

LastBatchRequestCount

Gets the number of requests processed by the last mixed batch query call.

public int LastBatchRequestCount { get; }

Property Value

int

Methods

Reset()

Clears reusable mixed-query buffers and diagnostic counters.

public void Reset()

SweepCircleAgainst3D(Vector2d, Vector2d, Fixed64, Fixed64, Fixed64, PhysicsLayerMask, out PhysicsMixedHit, LSCollider2D?, bool)

Sweeps a 2D circle embedded in a finite mixed slab against 3D colliders and returns the closest hit.

public bool SweepCircleAgainst3D(Vector2d start, Vector2d end, Fixed64 radius, Fixed64 slabCenterY, Fixed64 halfThickness, PhysicsLayerMask layerMask, out PhysicsMixedHit hit, LSCollider2D? excludedCollider = null, bool includeTriggers = true)

Parameters

start Vector2d
end Vector2d
radius Fixed64
slabCenterY Fixed64
halfThickness Fixed64
layerMask PhysicsLayerMask
hit PhysicsMixedHit
excludedCollider LSCollider2D
includeTriggers bool

Returns

bool

SweepCircleAgainst3DAll(Vector2d, Vector2d, Fixed64, Fixed64, Fixed64, PhysicsLayerMask, SwiftList<PhysicsMixedHit>, LSCollider2D?, bool)

Sweeps a 2D circle embedded in a finite mixed slab against 3D colliders and writes hits from closest to farthest.

public int SweepCircleAgainst3DAll(Vector2d start, Vector2d end, Fixed64 radius, Fixed64 slabCenterY, Fixed64 halfThickness, PhysicsLayerMask layerMask, SwiftList<PhysicsMixedHit> results, LSCollider2D? excludedCollider = null, bool includeTriggers = true)

Parameters

start Vector2d
end Vector2d
radius Fixed64
slabCenterY Fixed64
halfThickness Fixed64
layerMask PhysicsLayerMask
results SwiftList<PhysicsMixedHit>
excludedCollider LSCollider2D
includeTriggers bool

Returns

int

SweepCircleAgainst3DAllBatch(ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>, SwiftList<PhysicsMixedHit>, Span<PhysicsQueryHitRange>)

Executes multiple mixed swept-circle-against-3D queries and appends all hits into one caller-owned hit buffer.

public int SweepCircleAgainst3DAllBatch(ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest> requests, SwiftList<PhysicsMixedHit> hits, Span<PhysicsQueryHitRange> ranges)

Parameters

requests ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>
hits SwiftList<PhysicsMixedHit>
ranges Span<PhysicsQueryHitRange>

Returns

int

SweepCircleAgainst3DBatch(ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>, Span<PhysicsMixedHit>)

Executes multiple mixed swept-circle-against-3D queries and writes one closest-hit slot per request.

public int SweepCircleAgainst3DBatch(ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest> requests, Span<PhysicsMixedHit> closestHits)

Parameters

requests ReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>
closestHits Span<PhysicsMixedHit>

Returns

int

SweepSphereAgainst2D(Vector3d, Vector3d, Fixed64, PhysicsLayerMask, out PhysicsMixedHit, LSCollider?, bool)

Sweeps a 3D sphere against embedded 2D mixed slabs and returns the closest hit.

public bool SweepSphereAgainst2D(Vector3d start, Vector3d end, Fixed64 radius, PhysicsLayerMask layerMask, out PhysicsMixedHit hit, LSCollider? excludedCollider = null, bool includeTriggers = true)

Parameters

start Vector3d
end Vector3d
radius Fixed64
layerMask PhysicsLayerMask
hit PhysicsMixedHit
excludedCollider LSCollider
includeTriggers bool

Returns

bool

SweepSphereAgainst2DAll(Vector3d, Vector3d, Fixed64, PhysicsLayerMask, SwiftList<PhysicsMixedHit>, LSCollider?, bool)

Sweeps a 3D sphere against embedded 2D mixed slabs and writes hits from closest to farthest.

public int SweepSphereAgainst2DAll(Vector3d start, Vector3d end, Fixed64 radius, PhysicsLayerMask layerMask, SwiftList<PhysicsMixedHit> results, LSCollider? excludedCollider = null, bool includeTriggers = true)

Parameters

start Vector3d
end Vector3d
radius Fixed64
layerMask PhysicsLayerMask
results SwiftList<PhysicsMixedHit>
excludedCollider LSCollider
includeTriggers bool

Returns

int

SweepSphereAgainst2DAllBatch(ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>, SwiftList<PhysicsMixedHit>, Span<PhysicsQueryHitRange>)

Executes multiple mixed swept-sphere-against-2D queries and appends all hits into one caller-owned hit buffer.

public int SweepSphereAgainst2DAllBatch(ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest> requests, SwiftList<PhysicsMixedHit> hits, Span<PhysicsQueryHitRange> ranges)

Parameters

requests ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>
hits SwiftList<PhysicsMixedHit>
ranges Span<PhysicsQueryHitRange>

Returns

int

SweepSphereAgainst2DBatch(ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>, Span<PhysicsMixedHit>)

Executes multiple mixed swept-sphere-against-2D queries and writes one closest-hit slot per request.

public int SweepSphereAgainst2DBatch(ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest> requests, Span<PhysicsMixedHit> closestHits)

Parameters

requests ReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>
closestHits Span<PhysicsMixedHit>

Returns

int