public void Clone(ContactEdge contactEdge)
        {
            this.contactKey = contactEdge.Contact.Key;
            this.body       = contactEdge.Other;

            this.contactEdgeCloneKey.Set(contactKey, body.BodyId);

            if (contactEdge.Next != null)
            {
                this.nextEdge.Set(contactEdge.Next.Contact.Key, contactEdge.Next.Other.BodyId);
            }
            else
            {
                this.nextEdge.Set(this.nextEdge.contactKey, -1);
            }

            if (contactEdge.Prev != null)
            {
                this.previousEdge.Set(contactEdge.Prev.Contact.Key, contactEdge.Prev.Other.BodyId);
            }
            else
            {
                this.previousEdge.Set(this.previousEdge.contactKey, -1);
            }
        }
Esempio n. 2
0
 public void Set(ContactCloneKey contactKey, int bodyId)
 {
     this.contactKey = contactKey;
     this.bodyId     = bodyId;
 }
Esempio n. 3
0
 public ContactEdgeCloneKey(ContactCloneKey contactKey, int bodyId)
 {
     this.contactKey = contactKey;
     this.bodyId     = bodyId;
 }