[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Feb 20 05:56:25 CET 2004


CVS commit by harris: 

Added missing "checkVisibility()" calls to solar system bodies (planets, 
comets, and asteroids).  This check allows for quick-skipping of offscreen 
objects in the drawing loop. Will backport to 3_2_BRANCH

CCMAIL: kstars-devel at kde.org


  M +104 -98   skymapdraw.cpp   1.50


--- kdeedu/kstars/kstars/skymapdraw.cpp  #1.49:1.50
@@ -969,4 +969,5 @@ void SkyMap::drawSolarSystem( QPainter& 
                                 if ( ast->mag() > data->options->magLimitAsteroid ) break;
 
+                                if ( checkVisibility( ast, fov(), XRange ) ) {
                                 psky.setPen( QPen( QColor( "gray" ) ) );
                                 psky.setBrush( QBrush( QColor( "gray" ) ) );
@@ -988,8 +989,10 @@ void SkyMap::drawSolarSystem( QPainter& 
                         }
                 }
+                }
 
                 //Draw Comets
                 if ( options->drawComets ) {
                         for ( KSComet *com = data->cometList.first(); com; com = data->cometList.next() ) {
+                                if ( checkVisibility( com, fov(), XRange ) ) {
                                 psky.setPen( QPen( QColor( "cyan4" ) ) );
                                 psky.setBrush( QBrush( QColor( "cyan4" ) ) );
@@ -1011,4 +1014,5 @@ void SkyMap::drawSolarSystem( QPainter& 
                         }
                 }
+                }
                 
                 //Draw Pluto
@@ -1122,4 +1126,5 @@ void SkyMap::drawPlanet( QPainter &psky,
                 double zoommin, int resize_mult, double scale ) {
 
+        if ( checkVisibility( p, fov(), XRange ) ) {
         int Width = int( scale * width() );
         int Height = int( scale * height() );
@@ -1191,4 +1196,5 @@ void SkyMap::drawPlanet( QPainter &psky,
                 }
         }
+        }
 }
 




More information about the Kstars-devel mailing list