Skip to content

PhysicsWorld.OverlapBoxShapes Method

Definition

Namespace: Brine2D.Physics

Overloads
OverlapBoxShapes(Vector2, float, float, float, Span<OverlapHit>, bool, Nullable<PhysicsQueryFilter>) Returns all shape hits (one per shape) overlapping the given oriented box, written into results.
OverlapBoxShapes(Vector2, float, float, float, Span<OverlapHit>, Nullable<PhysicsQueryFilter>) Returns all shape hits (one per shape) overlapping the given oriented box, written into results.

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

Returns all shape hits (one per shape) overlapping the given oriented box, written into results.

public int OverlapBoxShapes(System.Numerics.Vector2 center, float halfWidth, float halfHeight, float angle, System.Span<Brine2D.Physics.OverlapHit> results, out bool wasTruncated, System.Nullable<Brine2D.Physics.PhysicsQueryFilter> filter=null);

Parameters

center System.Numerics.Vector2

Box center in pixel coordinates.

halfWidth System.Single

Half-width of the box in pixels.

halfHeight System.Single

Half-height of the box in pixels.

angle System.Single

Rotation of the box in radians.

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.OverlapBoxShapes(Vector2, float, float, float, Span\<OverlapHit>, Nullable\<PhysicsQueryFilter>) Method

Returns all shape hits (one per shape) overlapping the given oriented box, written into results.

public int OverlapBoxShapes(System.Numerics.Vector2 center, float halfWidth, float halfHeight, float angle, System.Span<Brine2D.Physics.OverlapHit> results, System.Nullable<Brine2D.Physics.PhysicsQueryFilter> filter=null);

Parameters

center System.Numerics.Vector2

Box center in pixel coordinates.

halfWidth System.Single

Half-width of the box in pixels.

halfHeight System.Single

Half-height of the box in pixels.

angle System.Single

Rotation of the box in radians.

results System.Span<OverlapHit>

Buffer to receive results.

filter System.Nullable<PhysicsQueryFilter>

Optional query filter.

Returns

System.Int32
Number of results written.