2 Apr 17:36
KDE/kdeedu/kstars/kstars
Jason Harris <kstars <at> 30doradus.org>
2007-04-02 15:36:18 GMT
2007-04-02 15:36:18 GMT
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.(Continue reading)
RSS Feed