Skip to content

CachedEntityQueryBuilderBase.WithinBounds(Rectangle) Method

Definition

Namespace: Brine2D.ECS.Query

Filters entities whose Position is contained within bounds.

C#
public TSelf WithinBounds(Brine2D.Core.Rectangle bounds);

Parameters

bounds Rectangle

Returns

TSelf

Remarks

The bounds check runs when the cache rebuilds (i.e. on the next structural change after a prior Execute() or ForEach() call). Because position updates do not trigger structural invalidation, the cached result may be stale if entities move between structural changes. Use the one-shot WithinBounds\(Rectangle\) for queries that must reflect the current frame's positions every frame.