| | | 1 | | //======================================================================= |
| | | 2 | | // PhysicsOverlapCircle3DRequest.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2026-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | using FixedMathSharp; |
| | | 9 | | using Gravitas.Support; |
| | | 10 | | |
| | | 11 | | namespace Gravitas.Queries; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Describes one 3D X/Z circle overlap in a batched query call. |
| | | 15 | | /// </summary> |
| | | 16 | | public readonly struct PhysicsOverlapCircle3DRequest |
| | | 17 | | { |
| | | 18 | | /// <summary> |
| | | 19 | | /// Creates a 3D collider-projection overlap request with an X/Z circle and include layer mask. |
| | | 20 | | /// </summary> |
| | | 21 | | public PhysicsOverlapCircle3DRequest(Vector3d position, Fixed64 radius, PhysicsLayerMask layerMask) |
| | | 22 | | { |
| | 6 | 23 | | Position = position; |
| | 6 | 24 | | Radius = radius; |
| | 6 | 25 | | LayerMask = layerMask; |
| | 6 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Creates a 3D collider-projection overlap request against all physics layers. |
| | | 30 | | /// </summary> |
| | | 31 | | public PhysicsOverlapCircle3DRequest(Vector3d position, Fixed64 radius) |
| | 1 | 32 | | : this(position, radius, PhysicsLayerMask.All) |
| | | 33 | | { |
| | 1 | 34 | | } |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// Gets the circle center; only its X/Z components are used. |
| | | 38 | | /// </summary> |
| | | 39 | | public Vector3d Position { get; } |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// Gets the projected circle radius. |
| | | 43 | | /// </summary> |
| | | 44 | | public Fixed64 Radius { get; } |
| | | 45 | | |
| | | 46 | | /// <summary> |
| | | 47 | | /// Gets the included physics layers. |
| | | 48 | | /// </summary> |
| | | 49 | | public PhysicsLayerMask LayerMask { get; } |
| | | 50 | | } |