parameters: (self,
                                     message: lcmt_contact_results_for_viz)
docstring: Given a hydroelastic contact message, updates the visual model's
          knowledge of what contacts are present. Contacts that are not present
          in the message get removed from the model. Contacts new in the message
          are added to the model.
  
          This does *not* populate any of the contact *items* for the contacts.
docstring_summary: Given a hydroelastic contact message, updates the visual model's
          knowledge of what contacts are present. Contacts that are not present
          in the message get removed from the model. Contacts new in the message
          are added to the model.
docstring_tokens: Given a hydroelastic contact message updates the visual model s knowledge of what contacts are present . Contacts that are not present in the message get removed from the model . Contacts new in the message are added to the model .
function: def update_contact_directories(self,
                                     message: lcmt_contact_results_for_viz):
          """Given a hydroelastic contact message, updates the visual model's
          knowledge of what contacts are present. Contacts that are not present
          in the message get removed from the model. Contacts new in the message
          are added to the model.
  
          This does *not* populate any of the contact *items* for the contacts.
          """
          self._timestamp = self._timestamp + 1
          for surface in message.hydroelastic_contacts:
              body_pair_key = _BodyContact.make_key(surface)
              if body_pair_key not in self._body_contacts:
                  body_contact = _BodyContact(surface, self._root_folder)
                  self._body_contacts[body_pair_key] = body_contact
              # Add or update a contact for this body pair.
              self._body_contacts[body_pair_key].add_contact(surface,
                                                             self._timestamp)
  
          # Remove anything that didn't get persisted from the previous message
          # (detected by an expired timestamp).
          folders_to_remove = []
          for key, body_contact in self._body_contacts.items():
              body_contact.clean(self._timestamp)
              if len(body_contact) == 0:
                  folders_to_remove.append(key)
          for key in folders_to_remove:
              # Python-ism, this also removes the entry from the dictionary.
              del self._body_contacts[key]
function_tokens: def update_contact_directories ( self , message : lcmt_contact_results_for_viz ) : self . _timestamp = self . _timestamp + 1 for surface in message . hydroelastic_contacts : body_pair_key = _BodyContact . make_key ( surface ) if body_pair_key not in self . _body_contacts : body_contact = _BodyContact ( surface , self . _root_folder ) self . _body_contacts [ body_pair_key ] = body_contact # Add or update a contact for this body pair. self . _body_contacts [ body_pair_key ] . add_contact ( surface , self . _timestamp ) # Remove anything that didn't get persisted from the previous message # (detected by an expired timestamp). folders_to_remove = [ ] for key , body_contact in self . _body_contacts . items ( ) : body_contact . clean ( self . _timestamp ) if len ( body_contact ) == 0 : folders_to_remove . append ( key ) for key in folders_to_remove : # Python-ism, this also removes the entry from the dictionary. del self . _body_contacts [ key ]