Added DeepSkyObject class. There are now 3 subclasses of SkyObject
author Jason Harris
()
committer Jason Harris
()
commit 5eefd203586edcd38260afd2a41ca146c3e5995e
tree d070e5114b5b83b0964080af6ba9f1ebc4de0487
parent f1dbf457f0c882e6a16f28445002b1236c88afd4
Added DeepSkyObject class. There are now 3 subclasses of SkyObject
(StarObject, DeepSkyObject and KSPlanetBase). The goal is to reduce
memory usage by making SkyObject and StarObject as small as possible
(since there are 10 times as many stars as anything else). Data that has
been moved from SkyObject to DeepSkyObject includes: the Image, angular
size, position angle, and PGC and UGC ID numbers (which are galaxy
catalogs).

In SkyObject, the Type value is stored internally as an "unsigned char"
rather than an int (but the interfaces setType() and type() still use
int). Similarly, the magnitude is a float rather than a double.

In DeepSkyObject, the catalog (messier/ngc/ic/custom) is now
specified with an enum rather than a QString.

Before these changes, KStars used 126 MB of RAM with the full star catalog
to 9th magnitude loaded (~130,000 stars). It now uses 106 MB. I'd like
to try to reduce this further, but I am unsure what else to do. One idea
is to store the object names (Name, Name2, and LongName) using 'const
char*' instead of QString. Another idea is to trim SkyPoint (from which
SkyObject is derived). SkyPoint currently stores 8 dms objects (catalog
RA, Dec; current RA, Dec; Az, Alt; and Galactic long, lat). I think we
can at least get rid of Galactic long/lat and simply compute those values
on-demand. Any other thoughts?

CCMAIL: kstars-devel@lists.sourceforge.net

svn path=/trunk/kdeedu/kstars/; revision=245336
20 files changed:
kstars/Makefile.am
kstars/addcatdialog.h
kstars/deepskyobject.cpp [ new file with mode 0644 ]
kstars/deepskyobject.h [ new file with mode 0644 ]
kstars/detaildialog.cpp
kstars/kspopupmenu.cpp
kstars/kspopupmenu.h
kstars/kstars.cpp
kstars/kstars_options_handling.cpp
kstars/kstarsdata.cpp
kstars/kstarsdata.h
kstars/skymap.cpp
kstars/skymap.h
kstars/skymapdraw.cpp
kstars/skymapevents.cpp
kstars/skyobject.cpp
kstars/skyobject.h
kstars/skypoint.h
kstars/starobject.cpp
kstars/starobject.h