crashcat docs
    Preparing search index...

    Function findContactInPair

    • Find a contact in a pair record's chain by sub-shape ids.

      All chain contacts share the id-sorted body pair, so the caller's existing body-order sort covers orientation — only the two sub-shape ids need matching.

      Parameters

      • contacts: Contacts

        global contact state

      • pairs: Pairs

        persistent pair state (holds the per-record chain heads)

      • rec: number

        pair record index to search

      • subShapeIdA: number

        sub-shape ID for body A

      • subShapeIdB: number

        sub-shape ID for body B

      Returns Contact | null

      The contact if found, null otherwise