[Kstars-devel] Questions about planet skycomponents

Thomas Kabelmann thomas.kabelmann at gmx.de
Mon Sep 26 20:36:51 CEST 2005


Hi Jason,

without having a look in the code, I understand the problem of adding a trail 
as following. We get a SkyPoint from the SkyMap and are now searching for a 
corresponding SkyObject. So we have to traverse through appropriate 
SkyComponents to find the SkyObject. Now if we have found the SkyObject, we 
know the component too and can easily add this SkyObject to the trail list of 
the component.

So I agree with you, that the trail data don't belong into the component. But 
I would prefer the Trailable class, because it encapsulates the functionality 
of adding/removing trails to components (just the sky objects which have 
trails, not the trails itself). It would be a slight but not measurable 
overhead for objects, which are standalone components unlike asteroids, but I 
would always prefer a simple and generic solution. And we can also put 
planets in composites like InnerPlanets/OuterPlanets and these composites 
know which planets have a trail.

> Issues:
> SolarSystemComposite would have to be made a QObject, and would have a moc
> file.
Should be no problem if we need this functionality.

> Is it desireable/possible to have a solarsystemComposite pointer that is
> visible to SkyMap and KStarsData ?
For performance reasons we could do this so, but it's not really nice :-)

Thomas


More information about the Kstars-devel mailing list