SolarSystem::SolarSystem(vector<SpaceObject> spaceObjects) { this->spaceObjects.swap(spaceObjects); assignObjects(planets, "planet"); assignMoons(); }
/** * Constructor that will add the space objects to the system * and will also assign them to their respective groups */ SolarSystem::SolarSystem(vector<SpaceObject> &spaceObjects) { this->spaceObjects = spaceObjects; assignObjects(); assignMoons(); }