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

Jason Harris kstars at 30doradus.org
Mon Apr 2 17:36:18 CEST 2007


SVN commit 649384 by harris:

Refactored the constellation boundaries

Previously, boundaries were stored as "segments", each of which was the 
boundary between two constellations.  A single constellation's boundary 
could be any number of segments, depending on how many other 
constellations it borders.  Each segment also contained the name of the 
two constellations which it divided.  Under this scheme, it was 
CPU-intensive to determine which constellation a particular point was 
in, and there were many corner cases.  However, the advantage of this 
method over simply storing each constellation's full boundary is that it 
avoids having redundant representation of each boundary.

Now I have switched to the more intuitive method of storing each 
constellation's full boundary.  ConstellationBoundaryComponent is a 
LineListComponent, containing all of the non-redundant constellation 
boundary segments.  However, it also represents each full boundary 
internally in a QHash of QPolygonF's.  This representation is much more 
convenient for drawing the highlighted constellation boundary, and for 
determining which constellation a given SkyPoint is in.  I also added a 
new function 'bool SkyMapComposite::inConstellation( const QString 
&name, SkyPoint *p )', which returns true if the point p is inside the 
constellation named name.  This function will be useful (for example) in 
the Observing List Wizard, when the user wants to select objects which 
are in a particular constellation.

In fact, these changes were initially prompted by a bug report that 
selecting by constellation in the ObsList wizard is very slow.  
Hopefully, these changes will help make it faster.

Note that the cbounds.dat data file has been removed; the constellation 
boundaries are now stored in 88 files named *.cbound, one per 
constellation.

TODO: there's a problem with the 'QString constellation( SkyPoint *p )' 
function; there are many points on the sky where it fails to identify 
the containing constellation.  I don't understand what the problem could 
be, because I'm simply using the QPolygonF::contains() function here.  
I'll look into it.

CCMAIL: kstars-devel at kde.org



 M  +1 -1      CMakeLists.txt  
 D             csegment.cpp  
 D             csegment.h  
 A             data/AND.cbound  
 A             data/ANT.cbound  
 A             data/APS.cbound  
 A             data/AQL.cbound  
 A             data/AQR.cbound  
 A             data/ARA.cbound  
 A             data/ARI.cbound  
 A             data/AUR.cbound  
 A             data/BOO.cbound  
 A             data/CAE.cbound  
 A             data/CAM.cbound  
 A             data/CAP.cbound  
 A             data/CAR.cbound  
 A             data/CAS.cbound  
 A             data/CEN.cbound  
 A             data/CEP.cbound  
 A             data/CET.cbound  
 A             data/CHA.cbound  
 A             data/CIR.cbound  
 A             data/CMA.cbound  
 A             data/CMI.cbound  
 M  +19 -1     data/CMakeLists.txt  
 A             data/CNC.cbound  
 A             data/COL.cbound  
 A             data/COM.cbound  
 A             data/CRA.cbound  
 A             data/CRB.cbound  
 A             data/CRT.cbound  
 A             data/CRU.cbound  
 A             data/CRV.cbound  
 A             data/CVN.cbound  
 A             data/CYG.cbound  
 A             data/DEL.cbound  
 A             data/DOR.cbound  
 A             data/DRA.cbound  
 A             data/EQU.cbound  
 A             data/ERI.cbound  
 A             data/FOR.cbound  
 A             data/GEM.cbound  
 A             data/GRU.cbound  
 A             data/HER.cbound  
 A             data/HOR.cbound  
 A             data/HYA.cbound  
 A             data/HYI.cbound  
 A             data/IND.cbound  
 A             data/LAC.cbound  
 A             data/LEO.cbound  
 A             data/LEP.cbound  
 A             data/LIB.cbound  
 A             data/LMI.cbound  
 A             data/LUP.cbound  
 A             data/LYN.cbound  
 A             data/LYR.cbound  
 A             data/MEN.cbound  
 A             data/MIC.cbound  
 A             data/MON.cbound  
 A             data/MUS.cbound  
 A             data/NOR.cbound  
 A             data/OCT.cbound  
 A             data/OPH.cbound  
 A             data/ORI.cbound  
 A             data/PAV.cbound  
 A             data/PEG.cbound  
 A             data/PER.cbound  
 A             data/PHE.cbound  
 A             data/PIC.cbound  
 A             data/PSA.cbound  
 A             data/PSC.cbound  
 A             data/PUP.cbound  
 A             data/PYX.cbound  
 A             data/RET.cbound  
 A             data/SCD.cbound  
 A             data/SCL.cbound  
 A             data/SCO.cbound  
 A             data/SCP.cbound  
 A             data/SCT.cbound  
 A             data/SEX.cbound  
 A             data/SGE.cbound  
 A             data/SGR.cbound  
 A             data/TAU.cbound  
 A             data/TEL.cbound  
 A             data/TRA.cbound  
 A             data/TRI.cbound  
 A             data/TUC.cbound  
 A             data/UMA.cbound  
 A             data/UMI.cbound  
 A             data/VEL.cbound  
 A             data/VIR.cbound  
 A             data/VOL.cbound  
 A             data/VUL.cbound  
 D             data/cbound.dat  
 M  +1 -3      kstarsdata.cpp  
 M  +0 -2      kstarsdata.h  
 M  +3 -6      skycomponents/README  
 M  +94 -129   skycomponents/constellationboundarycomponent.cpp  
 M  +16 -47    skycomponents/constellationboundarycomponent.h  
 M  +0 -13     skycomponents/constellationlinescomponent.cpp  
 M  +8 -243    skycomponents/skymapcomposite.cpp  
 M  +3 -2      skycomponents/skymapcomposite.h  
 M  +13 -4     skymap.h  
 M  +19 -4     skymapdraw.cpp  
 M  +0 -249    skypoint.cpp  
 M  +1 -8      skypoint.h  
 M  +1 -1      widgets/mapcanvas.cpp  




More information about the Kstars-devel mailing list