isRectVisible method

bool isRectVisible(
  1. Rect worldRect
)

Checks if a world coordinate rectangle intersects with the viewport.

Use this for visibility culling to determine if a node or element should be rendered.

Parameters:

  • worldRect: The rectangle to check in world/graph coordinates

Returns true if any part of the rectangle overlaps the viewport, false otherwise.

Implementation

bool isRectVisible(Rect worldRect) {
  return viewportExtent.overlaps(worldRect);
}