Merge remote-tracking branch 'origin/NewHorizonsMerge' into feature/timelinegui

Conflicts:
	src/rendering/renderengine.cpp
	src/util/imagesequencer2.cpp
This commit is contained in:
Alexander Bock
2015-05-05 11:42:49 +02:00
133 changed files with 4483 additions and 1819 deletions
+333 -182
View File
@@ -22,9 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <openspace/rendering/renderengine.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/util/imagesequencer.h>
#include <openspace/util/imagesequencer2.h>
@@ -36,7 +35,7 @@
#include <openspace/abuffer/abufferdynamic.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/interaction/interactionhandler.h>
#include <openspace/scenegraph/scenegraph.h>
#include <openspace/scene/scene.h>
#include <openspace/util/camera.h>
#include <openspace/util/constants.h>
#include <openspace/util/time.h>
@@ -61,8 +60,8 @@
#include <sgct.h>
// These are temporary ---abock
#include <openspace/scenegraph/spiceephemeris.h>
#include <openspace/scenegraph/staticephemeris.h>
#include <openspace/scene/spiceephemeris.h>
#include <openspace/scene/staticephemeris.h>
// ABuffer defines
#define ABUFFER_FRAMEBUFFER 0
@@ -433,7 +432,6 @@ namespace openspace {
Time::ref().deltaTime(),
_doPerformanceMeasurements
});
ImageSequencer::ref().update(Time::ref().currentTime());
_sceneGraph->evaluate(_mainCamera);
// clear the abuffer before rendering the scene
@@ -509,60 +507,6 @@ namespace openspace {
sgct::Engine::instance()->getActiveWindowPtr()->getCurrentViewportPixelCoords(x1, y1, xSize, ySize);
int startY = ySize - 2 * font_size_mono;
double currentTime = Time::ref().currentTime();
double remaining = openspace::ImageSequencer::ref().getNextCaptureTime() - currentTime;
double t = 1.f - remaining / openspace::ImageSequencer::ref().getIntervalLength();
std::string progress = "|";
int g = ((t)* 20) + 1;
for (int i = 0; i < g; i++) progress.append("-"); progress.append(">");
for (int i = 0; i < 21 - g; i++) progress.append(" ");
std::string str = "";
openspace::SpiceManager::ref().getDateFromET(openspace::ImageSequencer::ref().getNextCaptureTime(), str);
Freetype::print(font,
_onScreenInformation._position.x * xSize,
_onScreenInformation._position.y * ySize,
"Date: %s",
Time::ref().currentTimeUTC().c_str()
);
progress.append("|");
if (remaining > 0){
glm::vec4 g1(0, t, 0, 1);
glm::vec4 g2(1 - t);
Freetype::print(font,
_onScreenInformation._position.x * xSize,
_onScreenInformation._position.y * ySize - font_size_mono * 2,
g1 + g2,
"Next projection in | %.0f seconds",
remaining
);
Freetype::print(font,
_onScreenInformation._position.x * xSize,
_onScreenInformation._position.y * ySize - font_size_mono * 2 * 2,
g1 + g2,
"%s %.1f %%",
progress.c_str(), t * 100
);
}
/*std::vector<std::string> instrVec = ImageSequencer2::ref().getActiveInstruments();
std::string active ="";
for (int i = 0; i < instrVec.size(); i++){
active.append(instrVec[i]);
active.append(" ");
}
Freetype::print(font,
_onScreenInformation._position.x * xSize,
_onScreenInformation._position.y * ySize - font_size_mono * 3 * 2,
glm::vec4(0.3, 0.6, 1, 1),
"Active Instrument : %s",
active.c_str()
);*/
}
}
@@ -593,19 +537,21 @@ namespace openspace {
// Using a macro to shorten line length and increase readability
int i = 0;
PrintText(i++, "Date: %s", Time::ref().currentTimeUTC().c_str());
/*
PrintText(i++, "Avg. Frametime: %.5f", sgct::Engine::instance()->getAvgDt());
PrintText(i++, "Drawtime: %.5f", sgct::Engine::instance()->getDrawTime());
PrintText(i++, "Frametime: %.5f", sgct::Engine::instance()->getDt());
/*
PrintText(i++, "Origin: (% .5f, % .5f, % .5f, % .5f)", origin[0], origin[1], origin[2], origin[3]);
PrintText(i++, "Cam pos: (% .5f, % .5f, % .5f, % .5f)", position[0], position[1], position[2], position[3]);
PrintText(i++, "View dir: (% .5f, % .5f, % .5f)", viewdirection[0], viewdirection[1], viewdirection[2]);
PrintText(i++, "Cam->origin: (% .15f, % .4f)", pssl[0], pssl[1]);
PrintText(i++, "Scaling: (% .5f, % .5f)", scaling[0], scaling[1]);
*/
if (openspace::ImageSequencer2::ref().isReady()){
if (openspace::ImageSequencer2::ref().isReady()) {
double remaining = openspace::ImageSequencer2::ref().getNextCaptureTime() - currentTime;
double t = 1.f - remaining / openspace::ImageSequencer2::ref().getIntervalLength();
std::string progress = "|";
@@ -625,75 +571,65 @@ namespace openspace {
}
glm::vec4 w(1);
PrintColorText(i++, "Ucoming capture : %s", 10, w, str.c_str());
std::pair<double, std::string> nextTarget = ImageSequencer2::ref().getNextTarget();
std::pair<double, std::string> currentTarget = ImageSequencer2::ref().getCurrentTarget();
std::pair<double, std::string> currentTarget = ImageSequencer2::ref().getCurrentTarget();
if (currentTarget.first > 0.0) {
int timeleft = nextTarget.first - currentTime;
int timeleft = nextTarget.first - currentTime;
int hour = timeleft / 3600;
int second = timeleft % 3600;
int minute = second / 60;
second = second % 60;
int hour = timeleft / 3600;
int second = timeleft % 3600;
int minute = second / 60;
second = second % 60;
std::string hh, mm, ss, coundtown;
std::string hh, mm, ss, coundtown;
if (hour < 10) hh.append("0");
if (minute < 10) mm.append("0");
if (second < 10) ss.append("0");
if (hour < 10) hh.append("0");
if (minute < 10) mm.append("0");
if (second < 10) ss.append("0");
hh.append(std::to_string(hour));
mm.append(std::to_string(minute));
ss.append(std::to_string(second));
hh.append(std::to_string(hour));
mm.append(std::to_string(minute));
ss.append(std::to_string(second));
glm::vec4 b2(1.00, 0.51, 0.00, 1);
PrintColorText(i++, "Switching observation focus in : [%s:%s:%s]", 10, b2, hh.c_str(), mm.c_str(), ss.c_str());
std::pair<double, std::vector<std::string>> incidentTargets = ImageSequencer2::ref().getIncidentTargetList(2);
std::string space;
glm::vec4 color;
int isize = incidentTargets.second.size();
for (int p = 0; p < isize; p++){
double t = (double)(p + 1) / (double)(isize + 1);
t = (p > isize / 2) ? 1 - t : t;
t += 0.3;
color = (p == isize / 2) ? glm::vec4(1.00, 0.51, 0.00, 1) : glm::vec4(t, t, t, 1);
PrintColorText(i, "%s%s", 10, color, space.c_str(), incidentTargets.second[p].c_str());
for (int k = 0; k < 10; k++){ space += " "; }
}
i++;
std::vector<std::pair<std::string, bool>> instrVec = ImageSequencer2::ref().getActiveInstruments();
glm::vec4 active(0.58, 1, 0.00, 1);
glm::vec4 firing(0.58 - t, 1 - t, 1 - t, 1);
glm::vec4 notFiring(0.5, 0.5, 0.5, 1);
double reduce = 0.01;
PrintColorText(i++, "Active Instruments : ", 10, active);
for (int k = 0; k < instrVec.size(); k++){
if (instrVec[k].second == false){
PrintColorText(i, "| |", 10, glm::vec4(0.3, 0.3, 0.3, 1));
PrintColorText(i++, " %5s", 10, glm::vec4(0.3, 0.3, 0.3, 1), instrVec[k].first.c_str());
}
else{
PrintColorText(i, "|", 10, glm::vec4(0.3, 0.3, 0.3, 1));
if (instrVec[k].first == "NH_LORRI"){
PrintColorText(i, " + ", 10, firing);
}
PrintColorText(i, " |", 10, glm::vec4(0.3, 0.3, 0.3, 1));
PrintColorText(i++, " %5s", 10, active, instrVec[k].first.c_str());
}
}
glm::vec4 b2(1.00, 0.51, 0.00, 1);
PrintColorText(i++, "Switching observation focus in : [%s:%s:%s]", 10, b2, hh.c_str(), mm.c_str(), ss.c_str());
std::pair<double, std::vector<std::string>> incidentTargets = ImageSequencer2::ref().getIncidentTargetList(2);
std::string space;
glm::vec4 color;
int isize = incidentTargets.second.size();
for (int p = 0; p < isize; p++){
double t = (double)(p + 1) / (double)(isize+1);
t = (p > isize / 2) ? 1-t : t;
t += 0.3;
color = (p == isize / 2) ? glm::vec4(1.00, 0.51, 0.00, 1) : glm::vec4(t, t, t, 1);
PrintColorText(i, "%s%s", 10, color, space.c_str(), incidentTargets.second[p].c_str());
for (int k = 0; k < 10; k++){ space += " "; }
}
i++;
std::map<std::string, bool> activeMap = ImageSequencer2::ref().getActiveInstruments();
glm::vec4 active(0.58, 1, 0.00, 1);
glm::vec4 firing(0.58-t, 1-t, 1-t, 1);
glm::vec4 notFiring(0.5, 0.5, 0.5, 1);
PrintColorText(i++, "Active Instruments : ", 10, active);
for (auto t : activeMap){
if (t.second == false){
PrintColorText(i, "| |", 10, glm::vec4(0.3, 0.3, 0.3, 1));
PrintColorText(i++, " %5s", 10, glm::vec4(0.3, 0.3, 0.3, 1), t.first.c_str());
}
else{
PrintColorText(i, "|", 10, glm::vec4(0.3, 0.3, 0.3, 1));
if (t.first == "NH_LORRI"){
PrintColorText(i, " + ", 10, firing);
}
PrintColorText(i, " |", 10, glm::vec4(0.3, 0.3, 0.3, 1));
PrintColorText(i++, " %5s", 10, active, t.first.c_str());
}
}
}
}
@@ -800,14 +736,14 @@ namespace openspace {
_showInfo = b;
}
SceneGraph* RenderEngine::sceneGraph()
Scene* RenderEngine::scene()
{
// TODO custom assert (ticket #5)
assert(_sceneGraph);
return _sceneGraph;
}
void RenderEngine::setSceneGraph(SceneGraph* sceneGraph)
void RenderEngine::setSceneGraph(Scene* sceneGraph)
{
_sceneGraph = sceneGraph;
}
@@ -984,7 +920,7 @@ namespace openspace {
PerformanceLayoutEntry entries[maxValues];
};
const int nNodes = static_cast<int>(sceneGraph()->allSceneGraphNodes().size());
const int nNodes = static_cast<int>(scene()->allSceneGraphNodes().size());
if (!_performanceMemory) {
// Compute the total size
@@ -1005,7 +941,7 @@ namespace openspace {
memset(layout->entries, 0, maxValues * sizeof(PerformanceLayout::PerformanceLayoutEntry));
for (int i = 0; i < nNodes; ++i) {
SceneGraphNode* node = sceneGraph()->allSceneGraphNodes()[i];
SceneGraphNode* node = scene()->allSceneGraphNodes()[i];
memset(layout->entries[i].name, 0, lengthName);
strcpy(layout->entries[i].name, node->name().c_str());
@@ -1019,7 +955,7 @@ namespace openspace {
PerformanceLayout* layout = reinterpret_cast<PerformanceLayout*>(_performanceMemory->pointer());
_performanceMemory->acquireLock();
for (int i = 0; i < nNodes; ++i) {
SceneGraphNode* node = sceneGraph()->allSceneGraphNodes()[i];
SceneGraphNode* node = scene()->allSceneGraphNodes()[i];
SceneGraphNode::PerformanceRecord r = node->performanceRecord();
PerformanceLayout::PerformanceLayoutEntry& entry = layout->entries[i];
@@ -1036,38 +972,56 @@ namespace openspace {
// This method is temporary and will be removed once the scalegraph is in effect ---abock
void RenderEngine::changeViewPoint(std::string origin) {
SceneGraphNode* solarSystemBarycenterNode = sceneGraph()->sceneGraphNode("SolarSystemBarycenter");
SceneGraphNode* plutoBarycenterNode = sceneGraph()->sceneGraphNode("PlutoBarycenter");
SceneGraphNode* newHorizonsNode = sceneGraph()->sceneGraphNode("NewHorizons");
SceneGraphNode* jupiterBarycenterNode = sceneGraph()->sceneGraphNode("JupiterBarycenter");
SceneGraphNode* solarSystemBarycenterNode = scene()->sceneGraphNode("SolarSystemBarycenter");
SceneGraphNode* plutoBarycenterNode = scene()->sceneGraphNode("PlutoBarycenter");
SceneGraphNode* newHorizonsNode = scene()->sceneGraphNode("NewHorizons");
SceneGraphNode* newHorizonsTrailNode = scene()->sceneGraphNode("NewHorizonsTrail");
if (solarSystemBarycenterNode == nullptr || plutoBarycenterNode == nullptr || newHorizonsNode == nullptr || jupiterBarycenterNode == nullptr) {
LERROR("WTF");
return;
SceneGraphNode* jupiterBarycenterNode = scene()->sceneGraphNode("JupiterBarycenter");
SceneGraphNode* newHorizonsGhostNode = scene()->sceneGraphNode("NewHorizonsGhost");
//SceneGraphNode* dawnNode = scene()->sceneGraphNode("Dawn");
//SceneGraphNode* vestaNode = scene()->sceneGraphNode("Vesta");
if (solarSystemBarycenterNode == nullptr || plutoBarycenterNode == nullptr ||
newHorizonsNode == nullptr || jupiterBarycenterNode == nullptr
//|| dawnNode == nullptr
//|| vestaNode == nullptr
) {
LERROR("Necessary nodes does not exist");
return;
}
if (origin == "Pluto") {
ghoul::Dictionary solarDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body") , std::string("SUN") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Observer") , std::string("PLUTO BARYCENTER") },
{ std::string("Kernels") , ghoul::Dictionary() }
};
plutoBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem"));
plutoBarycenterNode->setEphemeris(new StaticEphemeris);
solarSystemBarycenterNode->setParent(plutoBarycenterNode);
newHorizonsNode->setParent(plutoBarycenterNode);
newHorizonsGhostNode->setParent(plutoBarycenterNode);
//dawnNode->setParent(plutoBarycenterNode);
//vestaNode->setParent(plutoBarycenterNode);
//newHorizonsTrailNode->setParent(plutoBarycenterNode);
ghoul::Dictionary solarDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("SUN") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("PLUTO BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
ghoul::Dictionary jupiterDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("JUPITER BARYCENTER") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Observer"), std::string("SUN") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("PLUTO BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary));
jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary));
plutoBarycenterNode->setEphemeris(new StaticEphemeris);
ghoul::Dictionary newHorizonsDictionary =
{
{ std::string("Type"), std::string("Spice") },
@@ -1076,16 +1030,64 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Observer"), std::string("PLUTO BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary));
jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary));
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//ghoul::Dictionary dawnDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("DAWN") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("PLUTO BARYCENTER") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary));
//
//ghoul::Dictionary vestaDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("VESTA") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("PLUTO BARYCENTER") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//vestaNode->setEphemeris(new SpiceEphemeris(vestaDictionary));
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("EphmerisGhosting"), std::string("TRUE") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("PLUTO BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
return;
}
if (origin == "Sun") {
solarSystemBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem"));
plutoBarycenterNode->setParent(solarSystemBarycenterNode);
jupiterBarycenterNode->setParent(solarSystemBarycenterNode);
newHorizonsNode->setParent(solarSystemBarycenterNode);
newHorizonsGhostNode->setParent(solarSystemBarycenterNode);
//newHorizonsTrailNode->setParent(solarSystemBarycenterNode);
//dawnNode->setParent(solarSystemBarycenterNode);
//vestaNode->setParent(solarSystemBarycenterNode);
ghoul::Dictionary plutoDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("PLUTO BARYCENTER") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("SUN") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
@@ -1093,7 +1095,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("JUPITER BARYCENTER") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("SUN") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
@@ -1107,45 +1109,194 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Observer"), std::string("SUN") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//ghoul::Dictionary dawnDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("DAWN") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("SUN") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary));
//
//ghoul::Dictionary vestaDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("VESTA") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("SUN") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//vestaNode->setEphemeris(new SpiceEphemeris(vestaDictionary));
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("EphmerisGhosting"), std::string("TRUE") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
return;
}
if (origin == "Jupiter") {
ghoul::Dictionary plutoDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("PLUTO BARYCENTER") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
ghoul::Dictionary solarDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("SUN") },
{ std::string("Reference"), std::string("ECLIPJ2000") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary));
plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary));
jupiterBarycenterNode->setEphemeris(new StaticEphemeris);
jupiterBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem"));
jupiterBarycenterNode->setEphemeris(new StaticEphemeris);
ghoul::Dictionary newHorizonsDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
solarSystemBarycenterNode->setParent(jupiterBarycenterNode);
newHorizonsNode->setParent(jupiterBarycenterNode);
//newHorizonsTrailNode->setParent(jupiterBarycenterNode);
//dawnNode->setParent(jupiterBarycenterNode);
//vestaNode->setParent(jupiterBarycenterNode);
ghoul::Dictionary solarDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("SUN") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
ghoul::Dictionary plutoDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("PlUTO BARYCENTER") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
ghoul::Dictionary newHorizonsDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary));
plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary));
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
newHorizonsGhostNode->setParent(jupiterBarycenterNode);
//newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//ghoul::Dictionary dawnDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("DAWN") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("JUPITER BARYCENTER") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary));
//
//ghoul::Dictionary vestaDictionary =
//{
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("VESTA") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("JUPITER BARYCENTER") },
// { std::string("Kernels"), ghoul::Dictionary() }
//};
//vestaNode->setEphemeris(new SpiceEphemeris(vestaDictionary));
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
{ std::string("Body"), std::string("NEW HORIZONS") },
{ std::string("EphmerisGhosting"), std::string("TRUE") },
{ std::string("Reference"), std::string("GALACTIC") },
{ std::string("Observer"), std::string("JUPITER BARYCENTER") },
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
newHorizonsGhostNode->setParent(jupiterBarycenterNode);
return;
}
//if (origin == "Vesta") {
//
// vestaNode->setParent(scene()->sceneGraphNode("SolarSystem"));
// vestaNode->setEphemeris(new StaticEphemeris);
//
// solarSystemBarycenterNode->setParent(vestaNode);
// newHorizonsNode->setParent(vestaNode);
//
// dawnNode->setParent(vestaNode);
// plutoBarycenterNode->setParent(vestaNode);
//
//
// ghoul::Dictionary plutoDictionary =
// {
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("PLUTO BARYCENTER") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("VESTA") },
// { std::string("Kernels"), ghoul::Dictionary() }
// };
// ghoul::Dictionary solarDictionary =
// {
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("SUN") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("VESTA") },
// { std::string("Kernels"), ghoul::Dictionary() }
// };
//
// ghoul::Dictionary jupiterDictionary =
// {
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("JUPITER BARYCENTER") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("VESTA") },
// { std::string("Kernels"), ghoul::Dictionary() }
// };
//
// solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary));
// plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary));
// jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary));
//
// ghoul::Dictionary newHorizonsDictionary =
// {
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("NEW HORIZONS") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("VESTA") },
// { std::string("Kernels"), ghoul::Dictionary() }
// };
// newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
//
// ghoul::Dictionary dawnDictionary =
// {
// { std::string("Type"), std::string("Spice") },
// { std::string("Body"), std::string("DAWN") },
// { std::string("Reference"), std::string("GALACTIC") },
// { std::string("Observer"), std::string("VESTA") },
// { std::string("Kernels"), ghoul::Dictionary() }
// };
// dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary));
// vestaNode->setEphemeris(new StaticEphemeris);
//
// return;
//}
ghoul_assert(false, "This function is being misused");
}