]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tilemgr.hxx
Move viewer-related sources to separate folder.
[flightgear.git] / src / Scenery / tilemgr.hxx
index 848225b61ff753436d973f48d676a291ca52154f..9f9473d1a219154a56f53fa7ad9bc22f2867d999 100644 (file)
@@ -28,8 +28,9 @@
 
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/bucket/newbucket.hxx>
-#include <simgear/scene/tgdb/TileEntry.hxx>
-#include <simgear/scene/tgdb/TileCache.hxx>
+#include "SceneryPager.hxx"
+#include "tileentry.hxx"
+#include "tilecache.hxx"
 
 namespace osg
 {
@@ -42,15 +43,15 @@ class SGTerraSync;
 class SGReaderWriterOptions;
 }
 
-class FGTileMgr : public SGSubsystem, public simgear::ModelLoadHelper {
+class FGTileMgr : public SGSubsystem {
 
 private:
 
     // Tile loading state
     enum load_state {
-       Start = 0,
-       Inited = 1,
-       Running = 2
+        Start = 0,
+        Inited = 1,
+        Running = 2
     };
 
     load_state state, last_state;
@@ -66,10 +67,6 @@ private:
     SGBucket pending;
     osg::ref_ptr<simgear::SGReaderWriterOptions> _options;
 
-    // x and y distance of tiles to load/draw
-    float vis;
-    int xrange, yrange;
-
     // current longitude latitude
     double longitude;
     double latitude;
@@ -78,7 +75,7 @@ private:
     /**
      * tile cache
      */
-    simgear::TileCache tile_cache;
+    TileCache tile_cache;
     simgear::SGTerraSync* _terra_sync;
 
     // Update the various queues maintained by the tilemagr (private
@@ -87,9 +84,11 @@ private:
 
     static void refresh_tile(void* tileMgr, long tileIndex);
 
-    SGPropertyNode* _visibilityMeters;
-    SGPropertyNode_ptr _maxTileRangeM;
-    
+    SGPropertyNode_ptr _visibilityMeters;
+    SGPropertyNode_ptr _maxTileRangeM, _disableNasalHooks;
+
+    osg::ref_ptr<flightgear::SceneryPager> _pager;
+
 public:
     FGTileMgr();
 
@@ -111,9 +110,6 @@ public:
     /// lat and lon are expected to be in degrees.
     bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0);
 
-    // Load a model for a tile
-    osg::Node* loadTileModel(const std::string& modelPath, bool cacheModel);
-
     // Returns true if tiles around current view position have been loaded
     bool isSceneryLoaded();
 };