Example #1
0
        public void Dirty(RGDataSource data, bool dirty)
        {
            int expand = 1 << LOD;

            for (int x = xIndex; x < xIndex + expand; x++)
            {
                for (int z = zIndex; z < zIndex + expand; z++)
                {
                    RGChunk gc = data.Node(x, z);
                    if (gc != null)
                    {
                        gc.Dirty = dirty;
                    }
                }
            }
        }
Example #2
0
        public bool IsDirty(RGDataSource data)
        {
            int expand = 1 << LOD;

            for (int x = xIndex; x < xIndex + expand; x++)
            {
                for (int z = zIndex; z < zIndex + expand; z++)
                {
                    RGChunk gc = data.Node(x, z);
                    if (gc != null && gc.Dirty)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Example #3
0
        public List <RGChunk> GetChunks(RGDataSource data)
        {
            List <RGChunk> gc_list = new List <RGChunk>();

            int expand = 1 << LOD;


            for (int x = xIndex; x < xIndex + expand; x++)
            {
                for (int z = zIndex; z < zIndex + expand; z++)
                {
                    RGChunk gc = data.Node(x, z);

                    if (gc == null)
                    {
                        continue;
                    }
                    gc_list.Add(gc);
                }
            }

            return(gc_list);
        }