isLineVisible method

  1. @override
bool isLineVisible(
  1. Vector3 a,
  2. Vector3 b
)
override

Checks if line is visible in the current viewport.

Implementation

@override
bool isLineVisible(Vector3 a, Vector3 b) {
  if (a.x < -_viewPortWidth && b.x < -_viewPortWidth) return false;
  if (a.x > _viewPortWidth && b.x > _viewPortWidth) return false;
  if (a.y < -_viewPortHeight && b.y < -_viewPortHeight) return false;
  if (a.y > _viewPortHeight && b.y > _viewPortHeight) return false;
  if (a.z > _maxDepth || b.z > _maxDepth) return false;
  return true;
}