private static Rectangle2d computeIcosepSubarea ( IcosepQuadTreeZone region , Rectangle2d area ) { if ( area == null || area . isEmpty ( ) ) { return area ; } final double demiWidth = area . getWidth ( ) / 2. ; final double demiHeight = area . getHeight ( ) / 2. ; switch ( region ) { case ICOSEP : return area ; case SOUTH_WEST : return new Rectangle2d ( area . getMinX ( ) , area . getMinY ( ) , demiWidth , demiHeight ) ; case NORTH_WEST : return new Rectangle2d ( area . getMinX ( ) , area . getCenterY ( ) , demiWidth , demiHeight ) ; case NORTH_EAST : return new Rectangle2d ( area . getCenterX ( ) , area . getMinY ( ) , demiWidth , demiHeight ) ; case SOUTH_EAST : return new Rectangle2d ( area . getMinX ( ) , area . getMinY ( ) , demiWidth , demiHeight ) ; default : } throw new IllegalStateException ( ) ; }
Computes the area covered by a child node of an icosep - node .