@ Pure public static Rectangle2d getNodeBuildingBounds ( AbstractGISTreeSetNode < ? , ? > node ) { assert node != null ; final double w = node . nodeWidth / 2. ; final double h = node . nodeHeight / 2. ; final IcosepQuadTreeZone zone = node . getZone ( ) ; final double lx ; final double ly ; if ( zone == null ) { // Is root node lx = node . verticalSplit - w ; ly = node . horizontalSplit - h ; } else { switch ( zone ) { case SOUTH_EAST : lx = node . verticalSplit ; ly = node . horizontalSplit - h ; break ; case SOUTH_WEST : lx = node . verticalSplit - w ; ly = node . horizontalSplit - h ; break ; case NORTH_EAST : lx = node . verticalSplit ; ly = node . horizontalSplit ; break ; case NORTH_WEST : lx = node . verticalSplit - w ; ly = node . horizontalSplit ; break ; case ICOSEP : return getNodeBuildingBounds ( node . getParentNode ( ) ) ; default : throw new IllegalStateException ( ) ; } } return new Rectangle2d ( lx , ly , node . nodeWidth , node . nodeHeight ) ; }
Replies the bounds of the area covered by the node . The replied rectangle is not normalized .