X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FScenery%2Ftilemgr.hxx;h=39b8103c521b350df3078f355e13dde67ea9039b;hb=470ee55fb7b3a913a14cb4e23ae526e624091822;hp=37894b79d27ac4b04ddb31326a324c53d77151bd;hpb=cd1a471f7ec53489ea70928fcde5964fba8978d3;p=flightgear.git diff --git a/src/Scenery/tilemgr.hxx b/src/Scenery/tilemgr.hxx index 37894b79d..39b8103c5 100644 --- a/src/Scenery/tilemgr.hxx +++ b/src/Scenery/tilemgr.hxx @@ -94,7 +94,12 @@ private: list < FGLoadRec > load_queue; // initialize the cache - void initialize_queue( void ); + void initialize_queue(); + + // forced emptying of the queue. This is necessay to keep + // bookeeping straight for the tile_cache -- which actually + // handles all the (de)allocations + void destroy_queue(); FGBucket BucketOffset( int dx, int dy ); @@ -143,10 +148,10 @@ public: // Initialize the Tile Manager subsystem int init( void ); - // given the current lon/lat, fill in the array of local chunks. - // If the chunk isn't already in the cache, then read it from - // disk. - int update( void ); + // given the current lon/lat (in degrees), fill in the array of + // local chunks. If the chunk isn't already in the cache, then + // read it from disk. + int update( double lon, double lat ); // Determine scenery altitude. Normally this just happens when we // render the scene, but we'd also like to be able to do this @@ -159,13 +164,15 @@ public: const sgdVec3 p, const sgdVec3 dir, FGHitList *list ); - bool current_elev_ssg( const Point3D& abs_view_pos, - const Point3D& view_pos ); + bool current_elev_ssg( sgdVec3 abs_view_pos, + sgVec3 view_pos ); // Prepare the ssg nodes ... for each tile, set it's proper // transform and update it's range selector based on current // visibilty void prep_ssg_nodes( void ); + + inline int queue_size() const { return load_queue.size(); } };