[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Sat Nov 4 05:18:10 CET 2006


SVN commit 601654 by harris:

Adding LineListComponent, which is a new base class for
Components in the sky which consist of collections of
SkyLines (the SkyLine class was introduced a few months ago for
the upcoming earth-satellite support, but it is also quite
appropriate for other Components).

Many of the components that used to be PointListComponents are
now LineListComponents: EquatorComponent, EclipticComponent, and
ConstellationLineCompnent.  Using SkyLines in these components
has made the code much simpler.  There are other Components that
I plan to convert from PointListComponent to
LineListComponent (HorizonComponent, MilkyWayComponent,
CoordinateGridComponent), but the conversion is slightly more
complicated in these cases, so I haven't done it yet.

To support the new SkyLine class, I have added two functions to
SkyMap: toScreen( SkyLine*, double scale, bool useRefraction )
and checkVisibility( SkyLine* ).  These are very similar to their
SkyPoint* counterparts.  

toScreen( SkyLine* ) returns a QLineF that represents the SkyLine
transformed to pixel coordinates in the SkyMap widget.
Additionally, if the input SkyLine is only partially on-screen,
toScreen() will actually return the on-screen segment of the
SkyLine!  This is very handy, it allowed me to throw out a lot of
code in the Components that was devoted to calculating on-screen 
segments of lines.

checkVisibility( SkyLine* ) returns true if any portion of the
SkyLine is likely to be on-screen, otherwise it returns false.

CCMAIL: kstars-devel at kde.org



 M  +1 -0      CMakeLists.txt  
 M  +4 -4      skycomponents/constellationboundarycomponent.h  
 M  +8 -15     skycomponents/constellationlinescomponent.cpp  
 M  +3 -9      skycomponents/constellationlinescomponent.h  
 M  +20 -8     skycomponents/constellationlinescomposite.cpp  
 M  +3 -0      skycomponents/coordinategridcomponent.cpp  
 M  +1 -1      skycomponents/coordinategridcomponent.h  
 M  +20 -10    skycomponents/eclipticcomponent.cpp  
 M  +3 -3      skycomponents/eclipticcomponent.h  
 M  +64 -145   skycomponents/equatorcomponent.cpp  
 M  +3 -3      skycomponents/equatorcomponent.h  
 A             skycomponents/linelistcomponent.cpp   [License: GPL (v2+)]
 A             skycomponents/linelistcomponent.h   [License: GPL (v2+)]
 M  +26 -26    skycomponents/milkywaycomponent.cpp  
 M  +12 -12    skycomponents/milkywaycomponent.h  
 M  +12 -0     skyline.cpp  
 M  +3 -0      skyline.h  
 M  +125 -22   skymap.cpp  
 M  +18 -5     skymap.h  




More information about the Kstars-devel mailing list