1 #ifndef GlobeEngine_Comparisoner_h
2 #define GlobeEngine_Comparisoner_h
4 #include <vmmlib/vector.hpp>
29 labelContent =
"not set";
30 labelPosition = vmml::Vector3d(-1.0, -1.0, -1.0);
34 labelContent(_labelContent), labelPosition(labelPosition)
47 comparisonPosition = vmml::Vector3d(-1.0, -1.0, -1.0);
50 ComparisonInfo(
double _compareValueX,
double _compareValueY, vmml::Vector3d _comparisonPosition) :
51 compareValueX(_compareValueX), compareValueY(_compareValueY), comparisonPosition(_comparisonPosition)
64 void addPlanet(std::shared_ptr<Planet> _planet);
65 void addPlanet(std::vector<std::shared_ptr<Planet> > _planets);
73 void setCamera(std::shared_ptr<ge::OrthographicMapCamera> _cam);
97 std::vector<ComparisonInfo> createComparisonInfos();
98 std::vector<ComparisonInfo> calculateComparisonPositions(std::vector<ComparisonInfo>& _infosToCompare);
99 void setComparisonPositionForPlanets(std::vector<ComparisonInfo>& _infos);
102 std::set<std::shared_ptr<Planet> > planetsToCompare;
105 std::set<std::shared_ptr<Planet> > planetsInRange;
108 std::set<std::shared_ptr<Planet> > planetsMarked;
112 vmml::Vector2d mapValuesMin;
113 vmml::Vector2d mapValuesMax;
118 vmml::Vector2d propertyValuesMin;
119 vmml::Vector2d propertyValuesMax;
122 std::vector<double> xAxisValues;
123 std::vector<double> yAxisValues;
129 vmml::Vector4d labelOffsets;
136 vmml::Vector2i initialNumberOfLines;
138 std::shared_ptr<ge::OrthographicMapCamera> orthoCam;
140 void calculateAxisValues();
145 std::vector<ComparisonLabelInfo> axisLabelInfos;
146 std::vector<ComparisonLabelInfo> planetAxisLabelInfos;
147 std::vector<ComparisonLabelInfo> planetNameLabelInfos;
148 std::vector<ComparisonLabelInfo> markedPlanetAxisLabelInfos;
149 std::vector<ComparisonLabelInfo> markedPlanetNameLabelInfos;
void newYRangeMin(double _newMin)
Definition: Comparisoner.cpp:189
const vmml::Vector2i & getInitialNumberOfLines()
Definition: Comparisoner.cpp:139
ComparisonProperty getXProperty()
Definition: Comparisoner.cpp:123
vmml::Vector3d labelPosition
Definition: Comparisoner.h:26
ComparisonProperty getYProperty()
Definition: Comparisoner.cpp:127
void createComparison()
Definition: Comparisoner.cpp:26
void newNumberOfXLines(int _lines)
Definition: Comparisoner.cpp:161
void newNumberOfYLines(int _lines)
Definition: Comparisoner.cpp:170
const vmml::Vector2i & getCurrentNumberOfLines()
Definition: Comparisoner.cpp:143
Definition: Comparisoner.h:20
ComparisonLabelInfo()
Definition: Comparisoner.h:28
ComparisonInfo()
Definition: Comparisoner.h:44
std::vector< ComparisonLabelInfo > & getAxisLabelInfos()
Definition: Comparisoner.cpp:702
void newXRangeMin(double _newMin)
Definition: Comparisoner.cpp:179
void newXRangeMax(double _newMax)
Definition: Comparisoner.cpp:184
void drawComparison()
Definition: Comparisoner.cpp:33
Definition: Comparisoner.h:20
void setYProperty(ComparisonProperty _yProperty)
Definition: Comparisoner.cpp:115
void setCamera(std::shared_ptr< ge::OrthographicMapCamera > _cam)
Definition: Comparisoner.cpp:147
ComparisonLabelInfo(std::string _labelContent, vmml::Vector3d _labelPosition)
Definition: Comparisoner.h:33
Definition: Comparisoner.h:55
Definition: Comparisoner.h:19
ComparisonInfo(double _compareValueX, double _compareValueY, vmml::Vector3d _comparisonPosition)
Definition: Comparisoner.h:50
void setXProperty(ComparisonProperty _xProperty)
Definition: Comparisoner.cpp:107
Definition: Comparisoner.h:20
void createLabelInfos()
Definition: Comparisoner.cpp:381
ComparisonProperty
Definition: Comparisoner.h:17
void togglePlanetMarking(std::shared_ptr< Planet > _planet)
Definition: Comparisoner.cpp:91
void setupComparisonGrid(std::shared_ptr< ge::Shader > _shader)
Definition: Comparisoner.cpp:151
void clearPlanets()
Definition: Comparisoner.cpp:103
Definition: AstroCommon.h:18
void newYRangeMax(double _newMax)
Definition: Comparisoner.cpp:194
Definition: ComparisonGrid.h:10
Definition: Comparisoner.h:20
std::vector< ComparisonLabelInfo > & getPlanetAxisLabelInfos()
Definition: Comparisoner.cpp:829
Definition: Comparisoner.h:23
std::vector< ComparisonLabelInfo > & getMarkedPlanetAxisLabelInfos()
Definition: Comparisoner.cpp:1041
void resetCamera()
Definition: Comparisoner.cpp:1231
Definition: Comparisoner.h:19
const vmml::Vector2d & getPropertyValuesMin()
Definition: Comparisoner.cpp:131
Definition: Comparisoner.h:20
void addPlanet(std::shared_ptr< Planet > _planet)
Definition: Comparisoner.cpp:46
double compareValueY
Definition: Comparisoner.h:41
void drawComparisonGrid()
Definition: Comparisoner.cpp:42
vmml::Vector3d comparisonPosition
Definition: Comparisoner.h:42
Definition: Comparisoner.h:18
Definition: Comparisoner.h:38
Definition: Comparisoner.h:19
void removePlanet(std::shared_ptr< Planet > _planet)
Definition: Comparisoner.cpp:76
Definition: Comparisoner.h:19
std::vector< ComparisonLabelInfo > & getMarkedPlanetNameLabelInfos()
Definition: Comparisoner.cpp:1045
void clear()
Definition: Comparisoner.cpp:15
Definition: Comparisoner.h:19
Definition: Comparisoner.h:19
std::vector< ComparisonLabelInfo > & getPlanetNameLabelInfos()
Definition: Comparisoner.cpp:1024
Definition: Comparisoner.h:19
~Comparisoner()
Definition: Comparisoner.cpp:11
const vmml::Vector2d & getPropertyValuesMax()
Definition: Comparisoner.cpp:135
std::string labelContent
Definition: Comparisoner.h:25
Comparisoner()
Definition: Comparisoner.cpp:7
double compareValueX
Definition: Comparisoner.h:40
Definition: Comparisoner.h:20