Closed pirogronian closed 2 years ago
1-3 They do. 4 Catalog is useless for planets & moons as they belong to their star. Dunno if it required for asteroids and comets. 5-7 Currently Celestia has only one catalog (HIP), other catalogs are either crosslinked to it (e.g. SAO) or map their numbers to HIP numbers (Tycho). Not all catalogs use simple linear numbering (e.g. Tycho has a-b-c numbering). So if you want to fix the problem, you should have a very good understanding of it, simply adding a virtual parent for all C++ classes will not solve it magically.
1-3 They do.
No. DSO don't move nor have parents.
Because they are DSO. What parent can a galaxy have?
Other galaxy. Or center of mass in a group. For example, Centaur Galaxy near Milky Way or both Magellan Clouds. Moreover, DSOs include also globular clusters and nebulae, that certainly can have parent with galaxy center and trajectory around it. Edit: Moreover, there could be many other purposes, for example purely teoretic galaxy motions presentation or so... Celestia may be used not necessarily for display real objects & features only.
So, summarizing, you propose to add some dead code, because now we don't have any code to support clusters/nebulae/etc trajectories/universe expansion and so on.
As overall code size will be reduced, objections about dead code sounds a bit abstract...
Are you sure that it will be reduced? Can you prove this?
I think so. Now we have 3 base classess for objects, every with own databade, data parser and name handling. It causes existence of three different (although very similar) browse widgets. I propose one universal clasd for (nearly) evetything , with all common code. It can also include code for all special cases or let it for subclassing. If user want galaxy encircling around immovable planet - let it be. I just dont want waste my effort just to prevent user radiculus ideas...
Just do fgrep -R StarDetails
.
Star & DSO browsers can be merged, but merging Solar system browser doesn't worth efforts.
So, StarDetails can be left in star.h/cpp, while common data can be moved to, for example, celestialobject. Solar system browser will need a refit, where it will come to extrasolar planets...
What common data? Radius?
Radius also. But first of all: parent, children, trajectory, visibility, category (already is) and (maybe) names list/catalog entries.
Don't you see that this means that your proposal is useless?
No, I don't see. Why?
First you should implement a new feature which can be implemented better if all object has common ancestor and only then implement your proposal. Not just because you was told that common virtual classes are "the only right thing"
you should implement a new feature which can be implemented better if all object has common ancestor
That's how I planned to try it. Where I argued that common virtual class is the only right thing? Btw look at DeepSkyObject definition... :-)
"code path" = "code", but related to some particular feature.
DSOs have a lot of shared, they are not implemented in this way just because in textbooks it's said so.
To me, every (or nearly) celestial object should be able to have: