contact.groupmap

Syntax

m = contact.groupmap(s1<,i,s2>)

Get active contacts that belong to a group.

A map is returned where the keys are the contact ID numbers and the values are the contact pointers. The optional arguments allow filtering with a group slot and/or a contact class name (e.g., mechanical) or a contact type name (e.g., ball-ball):

  • If two arguments are provided, then the first argument must be a group name and the second argument can either be an integer indicating a group slot or a string indicating a contact class or type name.
  • If three arguments are provided, then the first argument must be a group name, the second argument must be an integer indicating a group slot, and the third argument must be a string indicating a contact class or type name.

By default, all slots are queried and the mechanical contact list is considered.

Returns:

m - map of active contacts

Arguments:

s1 - group name

i - optional slot number

s2 - optional contact class name or contact type name