#pragma once #include "StarCelestialDatabase.hpp" namespace Star { STAR_CLASS(CelestialDatabase); // Functions for generating and drawing worlds from a celestial database. // Guards against drawing unloaded celestial objects, will return empty if no // information is returned from the celestial database. // // Drawing methods return the stack of images to draw and the scale to draw // them at. class CelestialGraphics { public: // Some static versions of drawing functions are given that do not require an // active CelestialDatabasePtr to draw. static List> drawSystemPlanetaryObject(CelestialParameters const& celestialParameters); static List> drawSystemCentralBody(CelestialParameters const& celestialParameters); // Specify the shadowing parameters in order to use the shadowing // information from that body instead of the primary one. static List> drawWorld( CelestialParameters const& celestialParameters, Maybe const& shadowingParameters = {}); static List> worldHorizonImages(CelestialParameters const& celestialParameters); static int worldRadialPosition(CelestialParameters const& celestialParameters); // Each orbiting body will occupy a unique orbital slot, but to give // graphical diversity, will also fit into exactly one radial slot for // display purposes. The range of radial numbers is [0, RadialPosiitons) static int planetRadialPositions(); static int satelliteRadialPositions(); static List> drawSystemTwinkle(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& system, double twinkleTime); // Returns the small graphic for the given planetary object appropriate for a // system-level view. static List> drawSystemPlanetaryObject(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate); static List> drawSystemCentralBody(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate); // Returns the graphics appropriate to draw an entire world (planetary object // or satellite object) in a map view. Shadows the satellite the same as // its parent planetary object. static List> drawWorld(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate); // Draw all of the left and right image pairs for all the layers for the // world horizon. static List> worldHorizonImages(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate); static int worldRadialPosition(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate); private: }; }