public BoundarySets(int sizePower)
 {
     BlockedVertexRegions = new QuickSet <int>(BufferPools <int> .Thread, BufferPools <int> .Thread, sizePower);
     BlockedEdgeRegions   = new QuickSet <Edge>(BufferPools <Edge> .Thread, BufferPools <int> .Thread, sizePower);
     EdgeContacts         = new QuickList <EdgeContact>(BufferPools <EdgeContact> .Thread, sizePower);
     VertexContacts       = new QuickList <VertexContact>(BufferPools <VertexContact> .Thread, sizePower);
 }
Exemplo n.º 2
0
        private void Resize(int newObjectPoolIndex, int newTablePoolIndex)
        {
            //Just double the size of the set.
            var oldSet = this;

            this = new QuickSet <T>(elementPool, tablePool, newObjectPoolIndex, newTablePoolIndex - newObjectPoolIndex);
            for (int i = oldSet.count - 1; i >= 0; --i)
            {
                Add(oldSet.Elements[i]);
            }
            oldSet.Dispose();
        }