protected final Section getSection ( int x , int y , boolean create ) { int key = key ( x , y ) ; Section sect = _sections . get ( key ) ; if ( sect == null && create ) { short sx = ( short ) ( MathUtil . floorDiv ( x , swidth ) * swidth ) ; short sy = ( short ) ( MathUtil . floorDiv ( y , sheight ) * sheight ) ; _sections . put ( key , sect = new Section ( sx , sy , swidth , sheight ) ) ; // Log.info("Created new section " + sect + "."); } return sect ; }
Returns the section for the specified tile coordinate .