private static < P extends GISPrimitive , N extends AbstractGISTreeSetNode < P , N > > Point2d computeCutPoint ( IcosepQuadTreeZone region , N parent ) { final double w = parent . nodeWidth / 4. ; final double h = parent . nodeHeight / 4. ; final double x ; final double y ; switch ( region ) { case SOUTH_WEST : x = parent . verticalSplit - w ; y = parent . horizontalSplit - h ; break ; case SOUTH_EAST : x = parent . verticalSplit + w ; y = parent . horizontalSplit - h ; break ; case NORTH_WEST : x = parent . verticalSplit - w ; y = parent . horizontalSplit + h ; break ; case NORTH_EAST : x = parent . verticalSplit + w ; y = parent . horizontalSplit + h ; break ; case ICOSEP : default : return null ; } return new Point2d ( x , y ) ; }
Computes the cut planes position of the given region .