isVisible method

bool isVisible(
  1. Offset point
)

Whether the world point point is on screen. For a rolled 2-D camera that is the turned rectangle the screen shows, not the box around it; otherwise whether point lies inside visibleBounds.

Implementation

bool isVisible(Offset point) {
  if (!isPlanar || rotation == 0.0) {
    return visibleBounds.contains(point);
  }
  final s = worldToScreen(point);
  return s.dx >= 0 &&
      s.dx < viewportSize.width &&
      s.dy >= 0 &&
      s.dy < viewportSize.height;
}