parameters: (sim)
return_statement: return cmap
docstring: Given a Simulation, returns a contact map representing all
      current contacts (among bodies with collision feedback enabled).
docstring_summary: Given a Simulation, returns a contact map representing all
      current contacts (among bodies with collision feedback enabled).
docstring_tokens: Given a Simulation returns a contact map representing all current contacts ( among bodies with collision feedback enabled ) .
function: def simContactMap(sim):
      """Given a Simulation, returns a contact map representing all
      current contacts (among bodies with collision feedback enabled).
      """
      cmap = dict()
      w = sim.world
      for a in xrange(w.numIDs()):
          for b in xrange(a):
              c = sim.getContacts(a,b)
              if len(c) > 0:
                  for ci in c:
                      assert len(ci) == 7,"Internal error in Simulation.getContacts()?"
                  #figure out the objects corresponding to a and b
                  oa = idToObject(w,a)
                  ob = idToObject(w,b)
                  clist = [ContactPoint(ci[0:3],ci[3:6],ci[6]) for ci in c]
                  cmap[(oa,ob)] = clist
      return cmap
function_tokens: def simContactMap ( sim ) : cmap = dict ( ) w = sim . world for a in xrange ( w . numIDs ( ) ) : for b in xrange ( a ) : c = sim . getContacts ( a , b ) if len ( c ) > 0 : for ci in c : assert len ( ci ) == 7 , "Internal error in Simulation.getContacts()?" #figure out the objects corresponding to a and b oa = idToObject ( w , a ) ob = idToObject ( w , b ) clist = [ ContactPoint ( ci [ 0 : 3 ] , ci [ 3 : 6 ] , ci [ 6 ] ) for ci in c ] cmap [ ( oa , ob ) ] = clist return cmap