parameters: (
          geomlist1: Sequence[Geometry3D],
          geomlist2: Sequence[Geometry3D],
          pairs: Union[str,Callable[[int,int],bool],List[Tuple[int,int]]] = 'all'
      )
docstring: Tests whether two sets of geometries collide.
  
      Args:
          geomlist1 (list of Geometry3D): set 1
          geomlist2 (list of Geometry3D): set 2
          pairs: can be:
  
              * 'all': all pairs are tested.  
              * a function test(i,j) -> bool, taking geomlist1 index i and
                geomlist2 index j, and returning true if they should be tested
              * list of pairs (i,j) of collision indices.
  
      Uses a quick bounding box reject test.
  
      Returns:
          Iterator over colliding pairs (i,j) where i is
          an index into geomlist1 and j is an index into geomlist.
docstring_summary: Tests whether two sets of geometries collide.
docstring_tokens: Tests whether two sets of geometries collide .
function: def group_collision_iter(
          geomlist1: Sequence[Geometry3D],
          geomlist2: Sequence[Geometry3D],
          pairs: Union[str,Callable[[int,int],bool],List[Tuple[int,int]]] = 'all'
      ) -> Iterator[Tuple[int,int]]:
      """Tests whether two sets of geometries collide.
  
      Args:
          geomlist1 (list of Geometry3D): set 1
          geomlist2 (list of Geometry3D): set 2
          pairs: can be:
  
              * 'all': all pairs are tested.  
              * a function test(i,j) -> bool, taking geomlist1 index i and
                geomlist2 index j, and returning true if they should be tested
              * list of pairs (i,j) of collision indices.
  
      Uses a quick bounding box reject test.
  
      Returns:
          Iterator over colliding pairs (i,j) where i is
          an index into geomlist1 and j is an index into geomlist.
      """
      if len(geomlist1) == 0 or len(geomlist2) == 0: return
      bblist1 = [g.getBB() for g in geomlist1]
      bblist2 = [g.getBB() for g in geomlist2]
      bb1 = bb_union(*bblist1)
      bb2 = bb_union(*bblist2)
      geoms1 = [(i,g) for (i,g) in enumerate(geomlist1) if bb_intersect(bblist1[i],bb2)]
      geoms2 = [(i,g) for (i,g) in enumerate(geomlist2) if bb_intersect(bblist2[i],bb1)]
      if pairs=='all':
          for i,g in geoms1:
              for j,g2 in geoms2:
                  #if not bb_intersect(bblist1[i],bblist2[j]): continue
                  if g.collides(g2):
                      yield (i,j)
      elif callable(pairs):
          for i,g in geoms1:
              for j,g2 in geoms2:
                  if not pairs(i,j): continue
                  #if not bb_intersect(bblist1[i],bblist2[j]): continue
                  if g.collides(g2):
                      yield (i,j)
      else:
          for (i,j) in pairs:
              #if not bb_intersect(bblist1[i],bblist2[j]): continue
              g  = geomlist1[i]
              g2 = geomlist2[j]
              if g.collides(g2):
                  yield (i,j)
function_tokens: def group_collision_iter ( geomlist1 : Sequence [ Geometry3D ] , geomlist2 : Sequence [ Geometry3D ] , pairs : Union [ str , Callable [ [ int , int ] , bool ] , List [ Tuple [ int , int ] ] ] = 'all' ) -> Iterator [ Tuple [ int , int ] ] : if len ( geomlist1 ) == 0 or len ( geomlist2 ) == 0 : return bblist1 = [ g . getBB ( ) for g in geomlist1 ] bblist2 = [ g . getBB ( ) for g in geomlist2 ] bb1 = bb_union ( * bblist1 ) bb2 = bb_union ( * bblist2 ) geoms1 = [ ( i , g ) for ( i , g ) in enumerate ( geomlist1 ) if bb_intersect ( bblist1 [ i ] , bb2 ) ] geoms2 = [ ( i , g ) for ( i , g ) in enumerate ( geomlist2 ) if bb_intersect ( bblist2 [ i ] , bb1 ) ] if pairs == 'all' : for i , g in geoms1 : for j , g2 in geoms2 : #if not bb_intersect(bblist1[i],bblist2[j]): continue if g . collides ( g2 ) : yield ( i , j ) elif callable ( pairs ) : for i , g in geoms1 : for j , g2 in geoms2 : if not pairs ( i , j ) : continue #if not bb_intersect(bblist1[i],bblist2[j]): continue if g . collides ( g2 ) : yield ( i , j ) else : for ( i , j ) in pairs : #if not bb_intersect(bblist1[i],bblist2[j]): continue g = geomlist1 [ i ] g2 = geomlist2 [ j ] if g . collides ( g2 ) : yield ( i , j )