Correction of star position

This commit is contained in:
KarRei
2018-04-19 15:24:31 -04:00
parent 62acf30c1c
commit 80f8b7dca9

View File

@@ -145,7 +145,7 @@ int addNode(lua_State* L) {
if (found && !isnan(p.POSITIONX) && !p.BINARY )
{
Time epoch;
double parsecinmeter = 3.08567758*10e16;
double parsec = 0.308567756E17;
const std::string luaTableParent = "{"
"Name = '" + starname + "',"
@@ -153,7 +153,7 @@ int addNode(lua_State* L) {
"Transform = {"
"Translation = {"
"Type = 'StaticTranslation',"
"Position = {" + std::to_string(p.POSITIONX * parsecinmeter) + ", " + std::to_string(p.POSITIONY * parsecinmeter) + ", " + std::to_string(p.POSITIONZ * parsecinmeter) + "}"
"Position = {" + std::to_string(p.POSITIONX * parsec) + ", " + std::to_string(p.POSITIONY * parsec) + ", " + std::to_string(p.POSITIONZ * parsec) + "}"
"}"
"}"
"}";
@@ -175,7 +175,7 @@ int addNode(lua_State* L) {
"}"
"}";
std::string scriptParent = "openspace.addSceneGraphNode(" + luaTableParent + "); openspace.addSceneGraphNode(" + luaTableStarGlare + ")";
std::string scriptParent = "openspace.addSceneGraphNode(" + luaTableParent + "); openspace.addSceneGraphNode(" + luaTableStarGlare + ");";
for (size_t i = 0; i < plsy.size(); i++)
{
@@ -249,12 +249,10 @@ int addNode(lua_State* L) {
"},"
"}";
scriptParent += "openspace.addSceneGraphNode(" + luaTablePlanet + ")";
scriptParent += "openspace.addSceneGraphNode(" + luaTablePlanet + ");";
}
scriptParent += ";";
OsEng.scriptEngine().queueScript(
scriptParent,