Fixed bug in renderablestars and added support for Sun as a simple star.

This commit is contained in:
Jonathas Costa
2017-11-10 18:07:25 -05:00
parent ee4f65dab7
commit 88803ab3c5
2 changed files with 18 additions and 8 deletions
+11 -2
View File
@@ -644,8 +644,17 @@ bool RenderableStars::readSpeckFile() {
for (int i = 0; i < _nValuesPerStar; ++i) {
str >> values[i];
}
_fullData.insert(_fullData.end(), values.begin(), values.end());
bool nullArray = true;
for (int i = 0; i < values.size(); ++i) {
if (values[i] != 0.0) {
nullArray = false;
break;
}
}
if (!nullArray) {
_fullData.insert(_fullData.end(), values.begin(), values.end());
}
} while (!file.eof());
return true;