Skip to content

Commit

Permalink
Add another lookup overload
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth committed Oct 2, 2024
1 parent f40ccb7 commit 7662b17
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,16 @@ public void GetEntitiesIntersecting(Type type, MapId mapId, Box2 worldAABB, Hash
GetEntitiesIntersecting(type, mapId, shape, transform, intersecting, flags);
}

public void GetEntitiesIntersecting<T>(MapId mapId, Box2Rotated worldBounds, HashSet<Entity<T>> entities, LookupFlags flags = DefaultFlags) where T : IComponent
{
if (mapId == MapId.Nullspace) return;

var shape = new Polygon(worldBounds);
var shapeTransform = Physics.Transform.Empty;

GetEntitiesIntersecting(mapId, shape, shapeTransform, entities, flags);
}

public void GetEntitiesIntersecting<T>(MapId mapId, Box2 worldAABB, HashSet<Entity<T>> entities, LookupFlags flags = DefaultFlags) where T : IComponent
{
if (mapId == MapId.Nullspace) return;
Expand Down

0 comments on commit 7662b17

Please sign in to comment.