mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-24 22:09:10 -06:00
Fixed upper limit bug and added new asset details to main asteroid belt
This commit is contained in:
@@ -3,6 +3,7 @@ asset.require('./base')
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
asset.require('scene/solarsystem/planets/earth/satellites/satellites.asset')
|
||||
asset.require('scene/solarsystem/sssb/pha')
|
||||
asset.require('scene/solarsystem/sssb/main_asteroid_belt')
|
||||
|
||||
asset.onInitialize(function ()
|
||||
local now = openspace.time.currentWallTime()
|
||||
|
||||
11
data/assets/scene/solarsystem/sssb/main_asteroid_belt.asset
Normal file
11
data/assets/scene/solarsystem/sssb/main_asteroid_belt.asset
Normal file
@@ -0,0 +1,11 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sharedSssb = asset.require('./sssb_shared')
|
||||
|
||||
local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'main asteroid belt', 'sssb_data_main_asteroid_belt')
|
||||
local object = sharedSssb.createSssbGroupObject("sssb_data_main_asteroid_belt.csv", filepath, { 0.9, 0.3, 0.1 })
|
||||
object.Renderable.Enabled = false
|
||||
object.Renderable.Segments = 40
|
||||
object.Renderable.Fade = 3
|
||||
object.Renderable.UpperLimit = 50000
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
|
||||
@@ -252,9 +252,9 @@ RenderableSmallBody::RenderableSmallBody(const ghoul::Dictionary& dictionary)
|
||||
if (dictionary.hasKeyAndValue<glm::vec3>(LineColorInfo.identifier)) {
|
||||
_appearance.lineColor = dictionary.value<glm::vec3>(LineColorInfo.identifier);
|
||||
}
|
||||
if (dictionary.hasKeyAndValue<double>("FadeInfo")) {
|
||||
if (dictionary.hasKeyAndValue<double>(FadeInfo.identifier)) {
|
||||
_appearance.lineFade = static_cast<float>(
|
||||
dictionary.value<double>("FadeInfo")
|
||||
dictionary.value<double>(FadeInfo.identifier)
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -311,6 +311,8 @@ void RenderableSmallBody::readJplSbDb(const std::string& filename) {
|
||||
std::streamoff numberOfLines = std::count(std::istreambuf_iterator<char>(file),
|
||||
std::istreambuf_iterator<char>(), '\n' );
|
||||
file.seekg(std::ios_base::beg); // reset iterator to beginning of file
|
||||
_sbData.clear();
|
||||
_sbNames.clear();
|
||||
|
||||
std::string line;
|
||||
std::streamoff csvLine = -1;
|
||||
|
||||
Reference in New Issue
Block a user