private bool Equals(Pair pair, int proxyId1, int proxyId2) { return pair.ProxyId1 == proxyId1 && pair.ProxyId2 == proxyId2; }
public PairManager() { Box2DXDebug.Assert(Common.Math.IsPowerOfTwo((uint)PairManager.TableCapacity) == true); Box2DXDebug.Assert(PairManager.TableCapacity >= Settings.MaxPairs); for (int i = 0; i < PairManager.TableCapacity; ++i) { _hashTable[i] = PairManager.NullPair; } _freePair = 0; for (int i = 0; i < Settings.MaxPairs; ++i) { _pairs[i] = new Pair(); _pairs[i].ProxyId1 = PairManager.NullProxy; _pairs[i].ProxyId2 = PairManager.NullProxy; _pairs[i].UserData = null; _pairs[i].Status = 0; _pairs[i].Next = (ushort)(i + (ushort)1); } _pairs[Settings.MaxPairs - 1].Next = PairManager.NullPair; _pairCount = 0; _pairBufferCount = 0; }