#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/bucket/newbucket.hxx>
#include "SceneryPager.hxx"
-#include "tileentry.hxx"
#include "tilecache.hxx"
namespace osg
// schedule a needed buckets for loading
void schedule_needed(const SGBucket& curr_bucket, double rangeM);
+ bool isTileDirSyncing(const std::string& tileFileName) const;
+
SGBucket previous_bucket;
SGBucket current_bucket;
SGBucket pending;
osg::ref_ptr<simgear::SGReaderWriterOptions> _options;
- // current longitude latitude
- double longitude;
- double latitude;
double scheduled_visibility;
/**
*/
TileCache tile_cache;
simgear::SGTerraSync* _terra_sync;
-
+
+ class TileManagerListener;
+ friend class TileManagerListener;
+ TileManagerListener* _listener;
+
// update various queues internal queues
- void update_queues();
+ void update_queues(bool& isDownloadingScenery);
// schedule tiles for the viewer bucket
void schedule_tiles_at(const SGGeod& location, double rangeM);
- static void refresh_tile(void* tileMgr, long tileIndex);
-
SGPropertyNode_ptr _visibilityMeters;
SGPropertyNode_ptr _maxTileRangeM, _disableNasalHooks;
SGPropertyNode_ptr _scenery_loaded, _scenery_override;
osg::ref_ptr<flightgear::SceneryPager> _pager;
+ /// is caching of expired tiles enabled or not?
+ bool _enableCache;
public:
FGTileMgr();
~FGTileMgr();
// Returns true if tiles around current view position have been loaded
bool isSceneryLoaded();
+
+ // notify the tile manahger the material library was reloaded,
+ // so it can pass this through to its options object
+ void materialLibChanged();
};