lighting/lighting_occluder library
Classes
- LightingOccluder
- A polygon that blocks light, in world coordinates.
Mixins
- WithLightingOcclusion
- Mixin for components that should block light where they are.
Functions
-
computeVisibilityPolygon(
{required Vector2 center, required double radius, required List< LightingOccluder> occluders, int rays = 64}) → List<Vector2> -
Computes the region visible from
center, limited byradiusand clipped byoccluders. -
mergeOccluderTileGrid(
{required List< List< cells, required double tileWidth, required double tileHeight, double offsetX = 0, double offsetY = 0}) → List<bool> >Rect> - Merges a grid of blocked cells into as few rectangles as possible.
-
pointInPolygon(
Vector2 point, List< Vector2> polygon) → bool -
Whether
pointis inside the polygon defined bypolygon.