isRectVisible method

bool isRectVisible(
  1. GraphRect graphRect
)

Checks if a graph coordinate rectangle intersects with the viewport.

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

Parameters:

  • graphRect: The rectangle to check in graph coordinates

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

Implementation

bool isRectVisible(GraphRect graphRect) {
  return viewportExtent.overlaps(graphRect);
}