mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-21 03:48:32 -05:00
added check for getting a scenegraphnode for dish, error if it is not in asset file
This commit is contained in:
@@ -91,7 +91,10 @@ namespace openspace {
|
||||
int activeFileIndex = findFileIndexForCurrentTime(currentTime);
|
||||
//parse data for that file
|
||||
if (!DsnManager::_dsnData.isLoaded)
|
||||
{
|
||||
DsnManager::jsonParser(activeFileIndex);
|
||||
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
@@ -237,9 +240,18 @@ namespace openspace {
|
||||
|
||||
RenderableCommunicationPackage::PositionVBOLayout
|
||||
CommunicationLines::getPositionForGeocentricSceneGraphNode(const char* id) {
|
||||
|
||||
glm::vec3 nodePos = global::renderEngine.scene()->sceneGraphNode(id)->position();
|
||||
|
||||
RenderableCommunicationPackage::PositionVBOLayout position;
|
||||
glm::dvec3 nodePos;
|
||||
|
||||
if (global::renderEngine.scene()->sceneGraphNode(id)) {
|
||||
nodePos = global::renderEngine.scene()->sceneGraphNode(id)->position();
|
||||
}
|
||||
else {
|
||||
LERROR(fmt::format("No position data for the station dish {}, drawing line from center of Earth", id));
|
||||
nodePos = glm::vec3(0, 0, 0);
|
||||
}
|
||||
|
||||
position.x = nodePos.x;
|
||||
position.y = nodePos.y;
|
||||
position.z = nodePos.z;
|
||||
|
||||
Reference in New Issue
Block a user