Beispiel #1
0
        // used by Starnames in a thread..
        public void GetSystemsInView(ref SortedDictionary <float, StarGrid.InViewInfo> list, double gridlylimit, StarGrid.TransFormInfo ti)
        {
            int idpos = GridId.Id(ti.campos.X, ti.campos.Z);

            foreach (StarGrid grd in grids)                                                      // either we are inside the grid, or close to the centre of another grid..
            {
                if (grd.Id == idpos || grd.DistanceFrom(ti.campos.X, ti.campos.Z) < gridlylimit) // only consider grids which are nearer than this..
                {
                    grd.GetSystemsInView(ref list, ti, (ForceWhite) ? 0x00ffff : 0);
                    //Console.WriteLine("Check grid " + grd.X + "," + grd.Z);
                }
            }

            visitedsystemsgrid.GetSystemsInView(ref list, ti);          // this can be anywhere in space.. so must check
        }