Class GravitasQueryMixedService
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
contextGravitasWorldContext
Properties
Context
Gets the world context that owns this query service.
public GravitasWorldContext Context { get; }
Property Value
LastBatchCandidateCount
Gets the summed top-level candidate count reported by the last mixed batch query call.
public int LastBatchCandidateCount { get; }
Property Value
LastBatchHitCount
Gets the number of hits accepted by the last mixed batch query call.
public int LastBatchHitCount { get; }
Property Value
LastBatchMeshTriangleCandidateCount
Gets the summed mesh-triangle candidate count reported by the last mixed batch query call.
public int LastBatchMeshTriangleCandidateCount { get; }
Property Value
LastBatchRequestCount
Gets the number of requests processed by the last mixed batch query call.
public int LastBatchRequestCount { get; }
Property Value
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
startVector2dendVector2dradiusFixed64slabCenterYFixed64halfThicknessFixed64layerMaskPhysicsLayerMaskhitPhysicsMixedHitexcludedColliderLSCollider2DincludeTriggersbool
Returns
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
startVector2dendVector2dradiusFixed64slabCenterYFixed64halfThicknessFixed64layerMaskPhysicsLayerMaskresultsSwiftList<PhysicsMixedHit>excludedColliderLSCollider2DincludeTriggersbool
Returns
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
requestsReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>hitsSwiftList<PhysicsMixedHit>rangesSpan<PhysicsQueryHitRange>
Returns
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
requestsReadOnlySpan<PhysicsSweepCircleAgainst3DRequest>closestHitsSpan<PhysicsMixedHit>
Returns
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
startVector3dendVector3dradiusFixed64layerMaskPhysicsLayerMaskhitPhysicsMixedHitexcludedColliderLSColliderincludeTriggersbool
Returns
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
startVector3dendVector3dradiusFixed64layerMaskPhysicsLayerMaskresultsSwiftList<PhysicsMixedHit>excludedColliderLSColliderincludeTriggersbool
Returns
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
requestsReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>hitsSwiftList<PhysicsMixedHit>rangesSpan<PhysicsQueryHitRange>
Returns
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
requestsReadOnlySpan<PhysicsSweepSphereAgainst2DRequest>closestHitsSpan<PhysicsMixedHit>