Skip to content

PhysicsWorld.OverlapAABBShapes Method

Definition

Namespace: Brine2D.Physics

Overloads
OverlapAABBShapes\(Vector2, Vector2, Span<OverlapHit>, bool, Nullable<PhysicsQueryFilter>\) Returns all shape hits \(one per shape\) within the given axis-aligned bounding box, written into results.
OverlapAABBShapes\(Vector2, Vector2, Span<OverlapHit>, Nullable<PhysicsQueryFilter>\) Returns all shape hits \(one per shape\) within the given axis-aligned bounding box, written into results.

PhysicsWorld.OverlapAABBShapes\(Vector2, Vector2, Span\<OverlapHit\>, bool, Nullable\<PhysicsQueryFilter\>\) Method

Returns all shape hits \(one per shape\) within the given axis-aligned bounding box, written into results.

C#
public int OverlapAABBShapes(System.Numerics.Vector2 min, System.Numerics.Vector2 max, System.Span<Brine2D.Physics.OverlapHit> results, out bool wasTruncated, System.Nullable<Brine2D.Physics.PhysicsQueryFilter> filter=null);

Parameters

min System.Numerics.Vector2

Lower-left corner of the query AABB in pixel coordinates.

max System.Numerics.Vector2

Upper-right corner of the query AABB in pixel coordinates.

results System.Span<OverlapHit>

Buffer to receive results.

wasTruncated System.Boolean

Set to true when the internal collection buffer was too small.

filter System.Nullable<PhysicsQueryFilter>

Optional query filter.

Returns

System.Int32
Number of results written.

PhysicsWorld.OverlapAABBShapes\(Vector2, Vector2, Span\<OverlapHit\>, Nullable\<PhysicsQueryFilter\>\) Method

Returns all shape hits \(one per shape\) within the given axis-aligned bounding box, written into results.

C#
public int OverlapAABBShapes(System.Numerics.Vector2 min, System.Numerics.Vector2 max, System.Span<Brine2D.Physics.OverlapHit> results, System.Nullable<Brine2D.Physics.PhysicsQueryFilter> filter=null);

Parameters

min System.Numerics.Vector2

Lower-left corner of the query AABB in pixel coordinates.

max System.Numerics.Vector2

Upper-right corner of the query AABB in pixel coordinates.

results System.Span<OverlapHit>

Buffer to receive results.

filter System.Nullable<PhysicsQueryFilter>

Optional query filter.

Returns

System.Int32
Number of results written.