public Contact(Shape s1, Shape s2) { this._flags = (Contact.CollisionFlags) 0; if (s1.IsSensor || s2.IsSensor) { this._flags |= Contact.CollisionFlags.NonSolid; } this._shape1 = s1; this._shape2 = s2; this._manifoldCount = 0; this._prev = null; this._next = null; this._node1 = new ContactEdge(); this._node1.Contact = null; this._node1.Prev = null; this._node1.Next = null; this._node1.Other = null; this._node2 = new ContactEdge(); this._node2.Contact = null; this._node2.Prev = null; this._node2.Next = null; this._node2.Other = null; }
public Contact(Shape s1, Shape s2) { this._flags = (Contact.CollisionFlags)0; if (s1.IsSensor || s2.IsSensor) { this._flags |= Contact.CollisionFlags.NonSolid; } this._shape1 = s1; this._shape2 = s2; this._manifoldCount = 0; this._prev = null; this._next = null; this._node1 = new ContactEdge(); this._node1.Contact = null; this._node1.Prev = null; this._node1.Next = null; this._node1.Other = null; this._node2 = new ContactEdge(); this._node2.Contact = null; this._node2.Prev = null; this._node2.Next = null; this._node2.Other = null; }
public void Update(ContactListener listener) { int manifoldCount = this.GetManifoldCount(); this.Evaluate(listener); int manifoldCount2 = this.GetManifoldCount(); Body body = this._shape1.GetBody(); Body body2 = this._shape2.GetBody(); if (manifoldCount2 == 0 && manifoldCount > 0) { body.WakeUp(); body2.WakeUp(); } if (body.IsStatic() || body.IsBullet() || body2.IsStatic() || body2.IsBullet()) { this._flags &= ~Contact.CollisionFlags.Slow; } else { this._flags |= Contact.CollisionFlags.Slow; } }