public TerrainVisibilityStatistics(TerrainVisibility terrainVisibility, AreaCacheCollection cache)
 {
     this.terrainVisibility = terrainVisibility;
     this.cache = cache;
 }
        public void Initialize(Vector2i viewDistance, TerrainContext terrainContext)
        {
            this.terrainContext = terrainContext;

            areasAlwaysVisibleWithinDistance = Area.Size.X * 2;

            view = new ViewSettings(viewDistance);

            AreaCollection = new AreaCollection();
            AreaCache = new AreaCacheCollection();
            areaRange = new AreaRange();
            viewDistanceAreaRange = new AreaRange();

            visibilityQueue = new VisibilityQueue(terrainContext);
            Statistics = new TerrainVisibilityStatistics(this, AreaCache);
            SpawnPointHelper = new AreaSpawnPointHelper(terrainContext);

            Logger.RegisterLogLevelsFor<TerrainVisibility>(Logger.LogLevels.Adaptive);
        }