1 #ifndef exoViewer_Universe_h
2 #define exoViewer_Universe_h
31 name(_name), screenPosition(_screenPosition), selectionInfo(_selectionInfo), isVisible(_isVisible)
36 screenPosition = vmml::Vector2d::ZERO;
48 void create(std::string _path);
72 const std::vector<std::shared_ptr<System>>&
getSystems();
100 std::shared_ptr<ge::DrawableComponent> getCurrentlySelectedDrawable()
const;
102 std::shared_ptr<Moon> getMoonFromXMLElement(tinyxml2::XMLElement* _element, vmml::Vector3d _systemPos);
103 std::shared_ptr<Planet> getPlanetFromXMLElement(tinyxml2::XMLElement* _element, vmml::Vector3d _systemPos,
bool _isSolarSystem);
104 std::shared_ptr<Star> getStarFromXMLElement(tinyxml2::XMLElement* _element, vmml::Vector3d _systemPos);
105 bool getSystemFromXML(std::string _path,
bool _isSolarSystem =
false);
106 void createSSBodiesA(tinyxml2::XMLElement* _root, std::shared_ptr<System> _system);
108 OrbitInfo getOrbitInfoFromXMLElement(tinyxml2::XMLElement* _XMLsuperordinateElement);
110 void createTestSun();
112 std::string trim(std::string& _str,
char _c);
114 std::shared_ptr<ge::Shader> programForOrbits;
115 std::shared_ptr<ge::Shader> programForSpheres;
116 std::shared_ptr<ge::Shader> programForPlanets;
117 std::shared_ptr<ge::Shader> programForStars;
118 std::shared_ptr<ge::Shader> programForHabitableZones;
119 std::shared_ptr<ge::Shader> programForOverviewPointCloud;
120 std::shared_ptr<ge::Shader> programForSmallBodyPointClouds;
124 std::vector<std::shared_ptr<System>> systems;
125 std::stack<UniverseSelection> selectionStack;
129 bool localSBDatabase;
130 bool localOpenExoplanetCatalogue;
131 bool smallBodiesAsPointCloud;
133 std::string solarSystemXMLName;
134 std::string solarSystemMoonsPath;
135 std::string jplSmallBodiesPath;
136 std::string openExoplanetCataloguePath;
138 unsigned int numberOfSystemsToDisplay;
139 std::vector<std::string> interestingSystems;
140 std::vector<std::string> allBodyNames;
141 std::vector<std::string> systemAndPlanetNames;
143 unsigned int numberOfSmallBodiesPerCategoryToDisplay;
145 std::string texturePath;
146 std::string habZonePath;
148 std::shared_ptr<ge::Texture2Drgba> standardSuntex;
149 std::shared_ptr<ge::Texture2Drgba> standardJupitertex;
150 std::shared_ptr<ge::Texture2Drgba> standardMoontex;
151 std::shared_ptr<ge::Texture2Drgba> standardEarthtex;
152 std::shared_ptr<HabitableZoneClassification> hzClassification;
154 vmml::Vector3f orbitColorForPlanets;
155 vmml::Vector3f orbitColorForMoons;
156 vmml::Vector3f orbitColorForSmallbodies;
std::shared_ptr< OverviewPointCloud > overviewPointCloud
Definition: Universe.h:80
void drawOrbitsOfSystemAtIdx(int _idx, System::BodyType _type, std::shared_ptr< ge::Camera > _cam)
Definition: Universe.cpp:582
void createSolarSystemBodies()
Definition: Universe.cpp:81
UniverseSelection findSelectionByName(std::string _name)
Definition: Universe.cpp:688
void createSSsmallBodies(std::shared_ptr< System > _system)
Definition: Universe.cpp:488
UniverseSelection getCurrentSelection() const
Definition: Universe.cpp:891
void clear()
Definition: Universe.cpp:19
const std::vector< std::string > & getSystemAndPlanetNames() const
Definition: Universe.cpp:665
~Universe()
Definition: Universe.cpp:15
std::shared_ptr< Body > getBodyForSelection(UniverseSelection _selection) const
Definition: Universe.cpp:815
Definition: AstroCommon.h:50
void drawObjectsOfSystemAtIdx(int _idx, System::BodyType _type, std::shared_ptr< ge::Camera > _cam)
Definition: Universe.cpp:578
void create(std::string _path)
Definition: Universe.cpp:24
const std::vector< std::string > & getAllBodyNames() const
Definition: Universe.cpp:661
Definition: AstroCommon.h:18
void createExoSystems()
Definition: Universe.cpp:116
Definition: Universe.h:23
void collectAllBodyNames()
Definition: Universe.cpp:669
Definition: Universe.h:42
std::string name
Definition: Universe.h:25
bool getCurrentlySelectedVisibilty() const
Definition: Universe.cpp:807
Universe()
Definition: Universe.cpp:10
BodyType
Definition: System.h:23
bool isVisible
Definition: Universe.h:28
UIBodyInfo(std::string _name, vmml::Vector2d _screenPosition, SystemSelection _selectionInfo, bool _isVisible)
Definition: Universe.h:30
void showHabitableZones()
Definition: Universe.cpp:628
void updatePositions()
Definition: Universe.cpp:596
void navigateBackInHistory()
Definition: Universe.cpp:895
const std::vector< std::shared_ptr< System > > & getSystems()
Definition: Universe.cpp:634
void updateAllOrbits(double _currentDate)
Definition: Universe.cpp:586
vmml::Vector3d getCurrentlySelectedPosition() const
Definition: Universe.cpp:801
vmml::Matrix4d getCurrentlySelectedModelMatrix() const
Definition: Universe.cpp:795
std::shared_ptr< Body > getCurrentlySelectedBody() const
Definition: Universe.cpp:811
bool isRealScaled() const
Definition: Universe.cpp:657
vmml::Vector2d screenPosition
Definition: Universe.h:26
std::shared_ptr< System > const & getSystemAtIdx(int _idx) const
Definition: Universe.cpp:638
void Universe::loadShaders(std::string _shaderpath)
void setModelsVisibleForSelection(UniverseSelection _sel, bool _isVisible)
Definition: Universe.cpp:726
const std::shared_ptr< System > getSystemByName(std::string _name)
Definition: Universe.cpp:619
UIBodyInfo()
Definition: Universe.h:34
void updateOrbitsOfCurrentSystem(double _currentDate)
Definition: Universe.cpp:592
std::shared_ptr< System > getSystemForSelection(UniverseSelection _selection) const
Definition: Universe.cpp:838
void setCurrentSelection(UniverseSelection _selection)
Definition: Universe.cpp:846
std::shared_ptr< Planet > getPlanetForSelection(UniverseSelection _selection) const
Definition: Universe.cpp:842
Definition: XMLGetter.h:10
int getSystemCount()
Definition: Universe.cpp:642
SystemSelection selectionInfo
Definition: Universe.h:27
Definition: AstroCommon.h:35