restore back some previous code

This commit is contained in:
Michal Marcinkowski
2015-04-23 00:13:11 -04:00
parent 2ad3b58898
commit 59ab268489
3 changed files with 11 additions and 10 deletions

View File

@@ -973,7 +973,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
SceneGraphNode* solarSystemBarycenterNode = sceneGraph()->sceneGraphNode("SolarSystemBarycenter");
SceneGraphNode* plutoBarycenterNode = sceneGraph()->sceneGraphNode("PlutoBarycenter");
SceneGraphNode* newHorizonsNode = sceneGraph()->sceneGraphNode("NewHorizons");
SceneGraphNode* newHorizonsGhostNode = sceneGraph()->sceneGraphNode("NewHorizonsGhost");
//SceneGraphNode* newHorizonsGhostNode = sceneGraph()->sceneGraphNode("NewHorizonsGhost");
SceneGraphNode* jupiterBarycenterNode = sceneGraph()->sceneGraphNode("JupiterBarycenter");
if (solarSystemBarycenterNode == nullptr || plutoBarycenterNode == nullptr || newHorizonsNode == nullptr || jupiterBarycenterNode == nullptr) {
@@ -1012,7 +1012,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
/*
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
@@ -1022,7 +1022,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
*/
return;
}
if (origin == "Sun") {
@@ -1056,7 +1056,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
/*
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
@@ -1066,7 +1066,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
*/
return;
}
if (origin == "Jupiter") {
@@ -1100,7 +1100,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary));
/*
ghoul::Dictionary newHorizonsGhostDictionary =
{
{ std::string("Type"), std::string("Spice") },
@@ -1110,6 +1110,7 @@ void RenderEngine::changeViewPoint(std::string origin) {
{ std::string("Kernels"), ghoul::Dictionary() }
};
newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary));
*/
return;
}

View File

@@ -74,17 +74,17 @@ void SpiceEphemeris::update(const UpdateData& data) {
glm::dvec3 position(0,0,0);
double lightTime = 0.0;
if (_targetName != "NEW HORIZONS GHOST")
//if (_targetName != "NEW HORIZONS GHOST")
SpiceManager::ref().getTargetPosition(_targetName, _originName,
"GALACTIC", "NONE", data.time, position, lightTime);
/*
double interval = openspace::ImageSequencer2::ref().getIntervalLength();
if (_targetName == "NEW HORIZONS GHOST" && interval > 60){
double _time = openspace::ImageSequencer2::ref().getNextCaptureTime();
SpiceManager::ref().getTargetPosition("NEW HORIZONS", _originName,
"GALACTIC", "NONE", _time, position, lightTime);
}
*/
_position = psc::CreatePowerScaledCoordinate(position.x, position.y, position.z);
_position[3] += 3;
}