private void removeFromInner(GridRegion region)
        {
            int rsx = region.RegionSizeX;
            int rsy = region.RegionSizeY;

            if (rsx < 257 && rsy < 257)
            {
                return;
            }

            rsx >>= 8;
            rsy >>= 8;
            ulong            handle = region.RegionHandle & HANDLEMASK;
            fastRegionHandle fh     = new fastRegionHandle(handle);
            uint             startY = fh.y;

            for (int i = 0; i < rsx; i++)
            {
                for (int j = 0; j < rsy; j++)
                {
                    m_innerHandles.Remove(fh.toHandle());
                    fh.y += 256;
                }

                fh.y  = startY;
                fh.x += 256;
            }
        }
Ejemplo n.º 2
0
        private void addToInner(GridRegion region)
        {
            int rsx = region.RegionSizeX;
            int rsy = region.RegionSizeY;

            if (rsx < 512 && rsy < 512)
            {
                return;
            }

            rsx >>= 8;
            rsy >>= 8;

            ulong            handle = region.RegionHandle & HANDLEMASK;
            fastRegionHandle fh     = new fastRegionHandle(handle);
            uint             startY = fh.y;

            for (int i = 0; i < rsx; i++)
            {
                for (int j = 0; j < rsy; j++)
                {
                    innerHandles[fh.toHandle()] = handle;
                    fh.y += 256;
                }

                fh.y  = startY;
                fh.x += 256;
            }
        }
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            fastRegionHandle p = obj as fastRegionHandle;

            return(p.handle == handle);
        }