Merge branch 'feature/globebrowsing' into feature/osirisrex
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -59,25 +59,25 @@ return {
|
||||
{
|
||||
Type = "Temporal",
|
||||
Name = "Temporal VIIRS SNPP",
|
||||
FilePath = "map_service_configs/earth/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml",
|
||||
FilePath = "map_service_configs/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml",
|
||||
},
|
||||
{
|
||||
Type = "SingleImage",
|
||||
Name = "Debug Tiles",
|
||||
FilePath = "textures/test_tile.png",
|
||||
FilePath = "../debugglobe/textures/test_tile.png",
|
||||
},
|
||||
{
|
||||
Type = "Temporal",
|
||||
Name = "Temporal MODIS Aqua CorrectedRecflectance TrueColor",
|
||||
FilePath = "map_service_configs/earth/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml",
|
||||
FilePath = "map_service_configs/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml",
|
||||
},
|
||||
{
|
||||
Name = "MODIS_Terra_CorrectedReflectance_TrueColor",
|
||||
FilePath = "map_service_configs/earth/MODIS_Terra_CorrectedReflectance_TrueColor.xml",
|
||||
FilePath = "map_service_configs/MODIS_Terra_CorrectedReflectance_TrueColor.xml",
|
||||
},
|
||||
{
|
||||
Name = "ESRI Imagery World 2D",
|
||||
FilePath = "map_service_configs/earth/ESRI_Imagery_World_2D.wms",
|
||||
FilePath = "map_service_configs/ESRI_Imagery_World_2D.wms",
|
||||
Enabled = true,
|
||||
}
|
||||
},
|
||||
@@ -87,33 +87,33 @@ return {
|
||||
NightTextures = {
|
||||
{
|
||||
Name = "Earth at Night 2012",
|
||||
FilePath = "map_service_configs/earth/VIIRS_CityLights_2012.xml",
|
||||
FilePath = "map_service_configs/VIIRS_CityLights_2012.xml",
|
||||
},
|
||||
},
|
||||
WaterMasks = {
|
||||
{
|
||||
Name = "MODIS_Water_Mask",
|
||||
FilePath = "map_service_configs/earth/MODIS_Water_Mask.xml",
|
||||
FilePath = "map_service_configs/MODIS_Water_Mask.xml",
|
||||
},
|
||||
},
|
||||
Overlays = {
|
||||
{
|
||||
Name = "Coastlines",
|
||||
FilePath = "map_service_configs/earth/Coastlines.xml",
|
||||
FilePath = "map_service_configs/Coastlines.xml",
|
||||
},
|
||||
{
|
||||
Name = "Reference_Features",
|
||||
FilePath = "map_service_configs/earth/Reference_Features.xml",
|
||||
FilePath = "map_service_configs/Reference_Features.xml",
|
||||
},
|
||||
{
|
||||
Name = "Reference_Labels",
|
||||
FilePath = "map_service_configs/earth/Reference_Labels.xml",
|
||||
FilePath = "map_service_configs/Reference_Labels.xml",
|
||||
},
|
||||
},
|
||||
HeightMaps = {
|
||||
{
|
||||
Name = "Terrain tileset",
|
||||
FilePath = "map_service_configs/earth/TERRAIN.wms",
|
||||
FilePath = "map_service_configs/TERRAIN.wms",
|
||||
Enabled = true,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@ return {
|
||||
{
|
||||
Type = "SingleImage",
|
||||
Name = "Debug Tiles",
|
||||
FilePath = "textures/test_tile.png",
|
||||
FilePath = "../debugglobe/textures/test_tile.png",
|
||||
},
|
||||
{
|
||||
Name = "MARS_Viking_MDIM21",
|
||||
|
||||
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 645 KiB |
|
Before Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 28 KiB |
@@ -68,7 +68,7 @@ namespace openspace {
|
||||
, maxSplitDepth(22)
|
||||
, _savedCamera(nullptr)
|
||||
, _tileProviderManager(tileProviderManager)
|
||||
, stats(StatsCollector(absPath("test_stats"), 1))
|
||||
, stats(StatsCollector(absPath("test_stats"), 1, StatsCollector::Enabled::No))
|
||||
{
|
||||
|
||||
auto geometry = std::make_shared<SkirtedGrid>(
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace openspace {
|
||||
|
||||
|
||||
RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
|
||||
: _saveOrThrowCamera(properties::BoolProperty("saveOrThrowCamera", "saveOrThrowCamera"))
|
||||
: _isEnabled(properties::BoolProperty(" Enabled", " Enabled", true))
|
||||
, _saveOrThrowCamera(properties::BoolProperty("saveOrThrowCamera", "saveOrThrowCamera"))
|
||||
, _resetTileProviders(properties::BoolProperty("resetTileProviders", "resetTileProviders"))
|
||||
, _cameraMinHeight(properties::FloatProperty("cameraMinHeight", "cameraMinHeight", 100.0f, 0.0f, 1000.0f))
|
||||
, lodScaleFactor(properties::FloatProperty("lodScaleFactor", "lodScaleFactor", 5.0f, 1.0f, 50.0f))
|
||||
@@ -98,6 +99,9 @@ namespace openspace {
|
||||
_ellipsoid, patchSegments, _tileProviderManager);
|
||||
_distanceSwitch.addSwitchValue(_chunkedLodGlobe, 1e12);
|
||||
|
||||
addProperty(_isEnabled);
|
||||
|
||||
|
||||
// Add debug options - must be after chunkedLodGlobe has been created as it
|
||||
// references its members
|
||||
addProperty(debugSelection);
|
||||
@@ -157,20 +161,21 @@ namespace openspace {
|
||||
}
|
||||
|
||||
void RenderableGlobe::render(const RenderData& data) {
|
||||
if (_saveOrThrowCamera.value()) {
|
||||
_saveOrThrowCamera.setValue(false);
|
||||
if (_isEnabled.value()) {
|
||||
if (_saveOrThrowCamera.value()) {
|
||||
_saveOrThrowCamera.setValue(false);
|
||||
|
||||
if (_chunkedLodGlobe->getSavedCamera() == nullptr) { // save camera
|
||||
LDEBUG("Saving snapshot of camera!");
|
||||
_chunkedLodGlobe->setSaveCamera(std::make_shared<Camera>(data.camera));
|
||||
}
|
||||
else { // throw camera
|
||||
LDEBUG("Throwing away saved camera!");
|
||||
_chunkedLodGlobe->setSaveCamera(nullptr);
|
||||
if (_chunkedLodGlobe->getSavedCamera() == nullptr) { // save camera
|
||||
LDEBUG("Saving snapshot of camera!");
|
||||
_chunkedLodGlobe->setSaveCamera(std::make_shared<Camera>(data.camera));
|
||||
}
|
||||
else { // throw camera
|
||||
LDEBUG("Throwing away saved camera!");
|
||||
_chunkedLodGlobe->setSaveCamera(nullptr);
|
||||
}
|
||||
}
|
||||
_distanceSwitch.render(data);
|
||||
}
|
||||
|
||||
_distanceSwitch.render(data);
|
||||
}
|
||||
|
||||
void RenderableGlobe::update(const UpdateData& data) {
|
||||
|
||||
@@ -120,6 +120,7 @@ public:
|
||||
|
||||
|
||||
// Properties
|
||||
properties::BoolProperty _isEnabled;
|
||||
properties::FloatProperty lodScaleFactor;
|
||||
std::vector<std::unique_ptr<ReferencedBoolSelection>> _categorySelections;
|
||||
properties::BoolProperty atmosphereEnabled;
|
||||
@@ -127,6 +128,7 @@ public:
|
||||
properties::BoolProperty _saveOrThrowCamera;
|
||||
properties::BoolProperty _resetTileProviders;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -143,11 +143,13 @@ namespace openspace {
|
||||
|
||||
StatsCollector() = delete;
|
||||
|
||||
StatsCollector(const std::string& filename, int dumpEveryXRecord, const std::string& delimiter = ",", bool enabled = true)
|
||||
enum class Enabled { Yes, No };
|
||||
|
||||
StatsCollector(const std::string& filename, int dumpEveryXRecord, Enabled enabled = Enabled::Yes, const std::string& delimiter = ",")
|
||||
: _filename(filename)
|
||||
, _dumpEveryXRecord(dumpEveryXRecord)
|
||||
, _recordsSinceLastDump(0)
|
||||
, _enabled(enabled)
|
||||
, _enabled(enabled == Enabled::Yes)
|
||||
, _delimiter(delimiter)
|
||||
, _hasWrittenHeader(false)
|
||||
, i(TemplatedStatsCollector<long long>(_enabled, delimiter))
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace openspace {
|
||||
{
|
||||
}
|
||||
|
||||
void TileProviderManager::initTexures(std::vector<TileProviderWithName>& dest,
|
||||
void TileProviderManager::initTexures(std::vector<NamedTileProvider>& dest,
|
||||
const ghoul::Dictionary& texturesDict, const TileProviderInitData& initData)
|
||||
{
|
||||
// Create TileProviders for all textures within this category
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
namespace openspace {
|
||||
|
||||
|
||||
struct TileProviderWithName {
|
||||
struct NamedTileProvider {
|
||||
std::string name;
|
||||
std::shared_ptr<TileProvider> tileProvider;
|
||||
bool isActive;
|
||||
@@ -57,7 +57,7 @@ namespace openspace {
|
||||
const std::vector<std::shared_ptr<TileProvider>> TileProviderGroup::getActiveTileProviders() const;
|
||||
|
||||
|
||||
std::vector<TileProviderWithName> tileProviders;
|
||||
std::vector<NamedTileProvider> tileProviders;
|
||||
bool levelBlendingEnabled;
|
||||
|
||||
};
|
||||
@@ -81,7 +81,7 @@ namespace openspace {
|
||||
|
||||
private:
|
||||
static void initTexures(
|
||||
std::vector<TileProviderWithName>& destination,
|
||||
std::vector<NamedTileProvider>& destination,
|
||||
const ghoul::Dictionary& dict,
|
||||
const TileProviderInitData& initData);
|
||||
|
||||
|
||||