]> git.mxchange.org Git - flightgear.git/commitdiff
Renamed FGBucket -> SGBucket.
authorcurt <curt>
Wed, 13 Dec 2000 20:36:04 +0000 (20:36 +0000)
committercurt <curt>
Wed, 13 Dec 2000 20:36:04 +0000 (20:36 +0000)
src/Main/keyboard.cxx
src/Objects/obj.cxx
src/Scenery/newcache.cxx
src/Scenery/newcache.hxx
src/Scenery/tileentry.hxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx
src/Time/moonpos.cxx
src/Time/sunpos.cxx

index 7ebc023a1e910f612cb05588bb615f836c2e41ca..f983144eae6a823339c864b76d7e4b741ce12a86 100644 (file)
@@ -345,7 +345,7 @@ void GLUTkey(unsigned char k, int x, int y) {
            globals->set_freeze( ! globals->get_freeze() );
 
            {
-               FGBucket p( f->get_Longitude() * RAD_TO_DEG,
+               SGBucket p( f->get_Longitude() * RAD_TO_DEG,
                            f->get_Latitude() * RAD_TO_DEG );
                FGPath tile_path( globals->get_options()->get_fg_root() );
                tile_path.append( "Scenery" );
index 0cb64fe8aa9da3a5aa4843932fc1cb1f3ead4a77..7eca9a6bf863e094b87a44a8b05c0d5b0424beb6 100644 (file)
@@ -159,7 +159,7 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) {
     }
 
     // Calculate center point
-    FGBucket b = t->tile_bucket;
+    SGBucket b = t->tile_bucket;
     double clon = b.get_center_lon();
     double clat = b.get_center_lat();
     double height = b.get_height();
index daa67c82a76cde6d18b2e72ccad6a7a85992ade2..53e0af00e9183e8f8f8d33f4bf67c1b5518ffc28 100644 (file)
@@ -100,7 +100,7 @@ void FGNewCache::init( void ) {
     
     for ( ; current != end; ++current ) {
        long index = current->first;
-       cout << "clearing " << index << endl;
+       FG_LOG( FG_TERRAIN, FG_DEBUG, "clearing " << index );
        FGTileEntry *e = current->second;
        e->tile_bucket.make_bad();
        entry_free(index);
@@ -114,7 +114,7 @@ void FGNewCache::init( void ) {
 
 
 // Search for the specified "bucket" in the cache
-bool FGNewCache::exists( const FGBucket& b ) {
+bool FGNewCache::exists( const SGBucket& b ) {
     long tile_index = b.gen_index();
     tile_map_iterator it = tile_cache.find( tile_index );
 
@@ -191,7 +191,7 @@ static ssgLeaf *gen_lights( ssgVertexArray *lights, int inc, float bright ) {
 
 
 // Fill in a tile cache entry with real data for the specified bucket
-void FGNewCache::fill_in( const FGBucket& b ) {
+void FGNewCache::fill_in( const SGBucket& b ) {
     FG_LOG( FG_TERRAIN, FG_INFO, "FILL IN CACHE ENTRY = " << b.gen_index() );
 
     // clear out a distant entry in the cache if needed.
@@ -239,13 +239,13 @@ void FGNewCache::fill_in( const FGBucket& b ) {
     }
   
     // load custom objects
-    cout << "CUSTOM OBJECTS" << endl;
+    FG_LOG( FG_TERRAIN, FG_DEBUG, "CUSTOM OBJECTS" );
 
     FGPath index_path = tile_path;
     index_path.append( b.gen_index_str() );
     index_path.concat( ".ind" );
 
-    cout << "Looking in " << index_path.str() << endl;
+    FG_LOG( FG_TERRAIN, FG_DEBUG, "Looking in " << index_path.str() );
 
     fg_gzifstream in( index_path.str() );
 
@@ -260,7 +260,8 @@ void FGNewCache::fill_in( const FGBucket& b ) {
 #else
            in >> skipws;
 #endif
-           cout << "token = " << token << " name = " << name << endl;
+           FG_LOG( FG_TERRAIN, FG_DEBUG, "token = " << token
+                   << " name = " << name );
 
            FGPath custom_path = tile_path;
            custom_path.append( name );
@@ -287,7 +288,7 @@ void FGNewCache::fill_in( const FGBucket& b ) {
     e->lights_range = NULL;
     /* uncomment this section for testing ground lights */
     if ( light_pts->getNum() ) {
-       cout << "generating lights" << endl;
+       FG_LOG( FG_TERRAIN, FG_DEBUG, "generating lights" );
        e->lights_transform = new ssgTransform;
        e->lights_range = new ssgRangeSelector;
        e->lights_brightness = new ssgSelector;
@@ -316,8 +317,8 @@ void FGNewCache::make_space() {
     FG_LOG( FG_TERRAIN, FG_INFO, "Make space in cache" );
 
     
-    cout << "cache size = " << tile_cache.size() << endl;
-    cout << "max size = " << max_cache_size << endl;
+    FG_LOG( FG_TERRAIN, FG_DEBUG, "cache entries = " << tile_cache.size() );
+    FG_LOG( FG_TERRAIN, FG_INFO, "max size = " << max_cache_size );
 
     if ( (int)tile_cache.size() < max_cache_size ) {
        // space in the cache, return
index 7d3c7b3b188438dc889c5d940463d306747aac1d..20272b9832f0b60d49b16f3c48615a399b07eee4 100644 (file)
@@ -82,13 +82,13 @@ public:
     void init( void );
 
     // Check if the specified "bucket" exists in the cache
-    bool exists( const FGBucket& b );
+    bool exists( const SGBucket& b );
 
     // Ensure at least one entry is free in the cache
     void FGNewCache::make_space();
 
     // Fill in a tile cache entry with real data for the specified bucket 
-    void fill_in( const FGBucket& b );
+    void fill_in( const SGBucket& b );
 
     // Return a pointer to the specified tile cache entry 
     inline FGTileEntry *get_tile( const long tile_index ) {
@@ -101,7 +101,7 @@ public:
     }
 
     // Return a pointer to the specified tile cache entry 
-    inline FGTileEntry *get_tile( const FGBucket& b ) {
+    inline FGTileEntry *get_tile( const SGBucket& b ) {
        return get_tile( b.gen_index() );
     }
 
index 5bf057daa36820a426041b3e849fa106888e8ca4..dbbf8a42e135b41787753451ac4eb228993d8cde 100644 (file)
@@ -82,7 +82,7 @@ public:
     Point3D offset;
 
     // this tile's official location in the world
-    FGBucket tile_bucket;
+    SGBucket tile_bucket;
 
     // list of pointers to memory chunks that need to be freed when
     // tile entry goes away
index 9697a5d1da0295c44a1cfc100c9333c7102a7626..5bc82ddbcc18ccc03229cd80a10539ce8fb34081 100644 (file)
@@ -111,7 +111,7 @@ int FGTileMgr::init() {
 
 
 // schedule a tile for loading
-void FGTileMgr::sched_tile( const FGBucket& b ) {
+void FGTileMgr::sched_tile( const SGBucket& b ) {
     // see if tile already exists in the cache
     FGTileEntry *t = global_tile_cache.get_tile( b );
 
@@ -123,7 +123,7 @@ void FGTileMgr::sched_tile( const FGBucket& b ) {
 
 
 // load a tile
-void FGTileMgr::load_tile( const FGBucket& b ) {
+void FGTileMgr::load_tile( const SGBucket& b ) {
     // see if tile already exists in the cache
     FGTileEntry *t = global_tile_cache.get_tile( b );
 
@@ -230,7 +230,7 @@ void FGTileMgr::schedule_needed() {
 
     for ( int x = -xrange; x <= xrange; ++x ) {
        for ( int y = -yrange; y <= yrange; ++y ) {
-           FGBucket b = fgBucketOffset( longitude, latitude, x, y );
+           SGBucket b = sgBucketOffset( longitude, latitude, x, y );
            if ( ! global_tile_cache.exists( b ) ) {
                sched_tile( b );
            }
@@ -269,7 +269,7 @@ void FGTileMgr::initialize_queue()
             FG_LOG( FG_TERRAIN, FG_DEBUG, 
                     "Load queue not empty, loading a tile" );
 
-            FGBucket pending = load_queue.front();
+            SGBucket pending = load_queue.front();
             load_queue.pop_front();
             load_tile( pending );
         }
@@ -327,7 +327,7 @@ int FGTileMgr::update( double lon, double lat ) {
        FG_LOG( FG_TERRAIN, FG_INFO, "Load queue size = " << load_queue.size()
                << " loading a tile" );
 
-       FGBucket pending = load_queue.front();
+       SGBucket pending = load_queue.front();
        load_queue.pop_front();
        load_tile( pending );
     }
index 7be5fe52c583a155ce08db2f8fec2dd40c001b72..97b4bf3fc19ac8a1271adf5aedc2ea3e64a956be 100644 (file)
@@ -67,7 +67,7 @@ private:
     load_state state;
 
     // pending tile load queue
-    list < FGBucket > load_queue;
+    list < SGBucket > load_queue;
 
     // initialize the cache
     void initialize_queue();
@@ -78,10 +78,10 @@ private:
     void destroy_queue();
 
     // schedule a tile for loading
-    void sched_tile( const FGBucket& b );
+    void sched_tile( const SGBucket& b );
 
     // load a tile
-    void load_tile( const FGBucket& b );
+    void load_tile( const SGBucket& b );
 
     // schedule a needed buckets for loading
     void FGTileMgr::schedule_needed();
@@ -95,9 +95,9 @@ private:
     // ssgEntity *last_hit;
     FGHitList hit_list;
 
-    FGBucket previous_bucket;
-    FGBucket current_bucket;
-    FGBucket pending;
+    SGBucket previous_bucket;
+    SGBucket current_bucket;
+    SGBucket pending;
        
     FGTileEntry *current_tile;
        
index 0fb907236d4742ad6f6f8db2dcf24470193cfd5d..e1aebcf41f6951df0935d2d98b1446d06dbefe7d 100644 (file)
@@ -391,8 +391,8 @@ void fgUpdateMoonPos( void ) {
     //      << nmoon[2] << endl;
 
     l->moon_angle = acos( sgScalarProductVec3( nup, nmoon ) );
-    cout << "moon angle relative to current location = " 
-        << l->moon_angle << endl;
+    FG_LOG( FG_EVENT, FG_INFO, "moon angle relative to current location = " 
+           << l->moon_angle );
     
     // calculate vector to moon's position on the earth's surface
     Point3D vp( v->get_view_pos()[0],
@@ -421,7 +421,7 @@ void fgUpdateMoonPos( void ) {
     // v->surface_east.  We do this so we can sort out the acos()
     // ambiguity.  I wish I could think of a more efficient way ... :-(
     east_dot = sgScalarProductVec3( surface_to_moon, v->get_surface_east() );
-   // cout << "  East dot product = " << east_dot << endl;
+    // cout << "  East dot product = " << east_dot << endl;
 
     // calculate the angle between v->surface_to_moon and
     // v->surface_south.  this is how much we have to rotate the sky
index 1c31b2982e2a8bc6672491e32510682ce4837489..896b0c53158e6bbacb3abaae95e52ecb1b42427f 100644 (file)
@@ -298,7 +298,8 @@ void fgUpdateSunPos( void ) {
     //      << nsun[2] << endl;
 
     l->sun_angle = acos( sgScalarProductVec3 ( nup, nsun ) );
-    cout << "sun angle relative to current location = " << l->sun_angle << endl;
+    FG_LOG( FG_EVENT, FG_INFO, "sun angle relative to current location = "
+           << l->sun_angle );
     
     // calculate vector to sun's position on the earth's surface
     Point3D vp( v->get_view_pos()[0],