#NEWLINE# def objs_near( self , obj , near_distance ) : #NEWLINE# #INDENT# ( minx , maxx , miny , maxy ) = obj . cshape . minmax ( ) #NEWLINE# minx -= collides #NEWLINE# maxx += near_distance #NEWLINE# miny -= near_distance #NEWLINE# maxy += near_distance #NEWLINE# f_distance = obj . cshape . distance #NEWLINE# collides = set ( ) #NEWLINE# for cell_id in self . _iter_cells_for_aabb ( ( minx , maxx , miny , maxy ) ) : #NEWLINE# #INDENT# for other in self . buckets [ cell_id ] : #NEWLINE# #INDENT# if ( ( other not in collides ) and ( f_distance ( other . cshape ) < near_distance ) ) : #NEWLINE# #INDENT# collides . add ( other ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# collides . remove ( obj ) #NEWLINE# return collides