Merge branch 'master' into feature/session-recording-addons

This commit is contained in:
GPayne
2021-03-09 19:12:43 -07:00
304 changed files with 51941 additions and 25620 deletions

2
.gitignore vendored
View File

@@ -32,9 +32,11 @@ Thumbs.db
/logs/
/screenshots/
/recordings/
/user/
/sync/
/temp/
# Customization is not supposed to be committed
customization.lua
# The COMMIT info is generated everytime CMake is run
COMMIT.md
*_codegen.cpp

3
.gitmodules vendored
View File

@@ -29,3 +29,6 @@
[submodule "ext/date"]
path = ext/date
url = https://github.com/HowardHinnant/date
[submodule "support/coding/codegen"]
path = support/coding/codegen
url = https://github.com/OpenSpace/codegen

View File

@@ -139,12 +139,29 @@ if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi")
endif ()
# Add external dependencies
add_subdirectory(${OPENSPACE_BASE_DIR}/ext)
add_subdirectory(ext)
# include(src/CMakeLists.txt)
add_subdirectory(src)
add_subdirectory(support/coding/codegen)
# It is important that the __codegen.h do not actually exist so
# that this target is never considered as finished
add_custom_target(
run_codegen
ALL DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/__codegen.h"
)
add_dependencies(run_codegen codegen)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/__codegen.h"
COMMAND codegen ARGS "${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_BASE_DIR}/src"
VERBATIM
)
set_folder_location(codegen-lib "support")
set_folder_location(codegen "support")
set_folder_location(run_codegen "support")
# Qt
# Unfortunately, we have to set this value manually; sigh
# In the future, if the Qt version is updated, just add to this variable ---abock
@@ -176,10 +193,22 @@ begin_header("Configuring Modules")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/modules")
end_header("End: Configuring Modules")
add_subdirectory(support/coding/codegen/tests)
set_folder_location(run_test_codegen "Unit Tests/support")
set_folder_location(codegentest "Unit Tests")
begin_header("Configuring Applications")
add_subdirectory("${OPENSPACE_APPS_DIR}")
end_header("End: Configuring Applications")
if (MSVC AND TARGET OpenSpace)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT OpenSpace)
endif()
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
if (OPENSPACE_HAVE_TESTS)
begin_header("Generating OpenSpace unit test")

5
Jenkinsfile vendored
View File

@@ -114,6 +114,7 @@ linux_gcc_make: {
}
stage('linux-gcc-make/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
}
cleanWs()
} // node('linux')
@@ -134,6 +135,7 @@ linux_gcc_ninja: {
}
stage('linux-gcc-ninja/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
}
cleanWs()
} // node('linux')
@@ -155,6 +157,7 @@ linux_clang_make: {
}
stage('linux-clang-make/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
}
cleanWs()
} // node('linux')
@@ -175,6 +178,7 @@ linux_clang_ninja: {
}
stage('linux-clang-ninja/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
}
cleanWs()
} // node('linux')
@@ -194,6 +198,7 @@ windows_msvc: {
stage('windows-msvc/test') {
// Currently, the unit tests are failing on Windows
// testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest')
testHelper.runUnitTests('bin\\Debug\\codegentest')
}
cleanWs()
} // node('windows')

View File

@@ -154,12 +154,6 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
set_cef_targets("${CEF_ROOT}" OpenSpace)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
# @TODO (abock, 2020-12-12) This should be handled more gracefully. Right now we *have*
# to build OpenSpace or otherwise the necessary files will not be copied over
# Copy binary and resource files to the target output directory.
copy_files("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "$<TARGET_FILE_DIR:${CEF_TARGET}>")
copy_files("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "$<TARGET_FILE_DIR:${CEF_TARGET}>")
elseif ()
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()

View File

@@ -90,3 +90,11 @@ set_openspace_compile_settings(openspace-ui-launcher)
target_include_directories(openspace-ui-launcher PUBLIC include)
target_link_libraries(openspace-ui-launcher PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets openspace-core)
if (MSVC)
set(MSVC_WARNINGS
"/wd4619" # #pragma warning: there is no warning number (raised by Qt headers)
"/wd4946" # reinterpret_cast used between related classes:
)
target_compile_options(openspace-ui-launcher INTERFACE ${MSVC_WARNINGS})
endif ()

View File

@@ -54,11 +54,12 @@ public:
*
* \param dir The directory from which to start the search from
*/
std::string useQtFileSystemModelToTraverseDir(std::string dir);
std::string useQtFileSystemModelToTraverseDir(std::string dir, bool usersAssets = false);
private:
void parseChildDirElements(QFileInfo item, std::string space, int level,
std::vector<std::string>& dirNames, std::vector<std::string>& output);
std::vector<std::string>& dirNames, std::vector<std::string>& output,
bool userAssets);
void parseChildFile(std::string res, bool& hasDirHeaderBeenAdded,
std::vector<std::string>& dirNames, std::vector<std::string>& output);
bool isApprovedPath(std::string path);

View File

@@ -81,16 +81,21 @@ private:
QWidget* createCentralWidget();
void setBackgroundImage(const std::string& syncPath);
void openProfileEditor(const std::string& profile);
void openProfileEditor(const std::string& profile, bool isUserProfile);
void populateProfilesList(std::string preset);
void populateWindowConfigsList(std::string preset);
const std::string _assetPath;
const std::string _userAssetPath;
const std::string _configPath;
const std::string _userConfigPath;
const std::string _profilePath;
const std::string _userProfilePath;
const std::vector<std::string>& _readOnlyProfiles;
bool _shouldLaunch = false;
int _userAssetCount = 0;
int _userConfigCount = 0;
QComboBox* _profileBox = nullptr;
QComboBox* _windowConfigBox = nullptr;

View File

@@ -43,10 +43,11 @@ public:
* \param profile The #openspace::Profile object containing all data of the
* new or imported profile.
* \param assetBasePath The path to the folder in which all of the assets are living
* \param userAssetBasePath The path to the folder in which the users' assets are living
* \param parent Pointer to parent Qt widget
*/
AssetsDialog(openspace::Profile& profile, const std::string& assetBasePath,
QWidget* parent);
const std::string& userAssetBasePath, QWidget* parent);
private slots:
void parseSelections();

View File

@@ -148,8 +148,10 @@ public:
* Imports asset tree data for this model by recursively traversing the folder
* structure.
* \param assetBasePath The base path where to find all assets
* \param assetBasePath The base path where to find user assets
*/
void importModelData(const std::string& assetBasePath);
void importModelData(const std::string& assetBasePath,
const std::string& userAssetBasePath);
/**
* Returns bool for if item is checked/selected

View File

@@ -46,13 +46,15 @@ public:
* new or imported profile.
* \param profileName The name of the profile to create
* \param assetBasePath The path to the folder where the assets live
* \param userAssetBasePath The path to the folder where the user assets live
* \param profileName The path to the folder in which all profiles live
* \param profilesReadOnly vector list of profile names that are read-only and must
* not be overwritten
* \param parent Pointer to parent Qt widget
*/
ProfileEdit(openspace::Profile& profile, const std::string& profileName,
std::string assetBasePath, std::string profileBasePath,
std::string assetBasePath, std::string userAssetBasePath,
std::string profileBasePath,
const std::vector<std::string>& profilesReadOnly, QWidget* parent);
/**
@@ -98,6 +100,7 @@ private:
openspace::Profile& _profile;
const std::string _assetBasePath;
const std::string _userAssetBasePath;
const std::string _profileBasePath;
bool _saveSelected = false;
const std::vector<std::string>& _readOnlyProfiles;

View File

@@ -33,13 +33,13 @@ FileSystemAccess::FileSystemAccess(std::string fileExtension,
, _useCheckboxes(useCheckboxes)
{}
std::string FileSystemAccess::useQtFileSystemModelToTraverseDir(std::string dir) {
std::string FileSystemAccess::useQtFileSystemModelToTraverseDir(std::string dir, bool userAssets) {
_filesystemModel.setRootPath(QString::fromStdString(dir));
QModelIndex index = _filesystemModel.index(_filesystemModel.rootPath());
QFileInfo fileInfo = _filesystemModel.fileInfo(index);
std::vector<std::string> dirsNested;
std::vector<std::string> out;
parseChildDirElements(fileInfo, "", 0, dirsNested, out);
parseChildDirElements(fileInfo, "", 0, dirsNested, out, userAssets);
std::string combined;
for (const std::string& o : out) {
combined += o + "\n";
@@ -49,7 +49,7 @@ std::string FileSystemAccess::useQtFileSystemModelToTraverseDir(std::string dir)
void FileSystemAccess::parseChildDirElements(QFileInfo fileInfo, std::string space,
int level, std::vector<std::string>& dirNames,
std::vector<std::string>& output)
std::vector<std::string>& output, bool userAssets)
{
QDir dir(fileInfo.filePath());
bool hasDirHeaderBeenAdded = false;
@@ -58,11 +58,13 @@ void FileSystemAccess::parseChildDirElements(QFileInfo fileInfo, std::string spa
for (int i = 0; i < fileList.size(); i++) {
QFileInfo fi = fileList[i];
std::string res = space + fi.fileName().toStdString();
if (level == 0 && userAssets) {
res = "${USER_ASSETS}/" + res;
}
if (fi.isDir()) {
if (level != 0 || (level == 0 && isApprovedPath(res))) {
if (level != 0 || (level == 0 && (isApprovedPath(res) || userAssets))) {
dirNames.push_back(res);
parseChildDirElements(fi, (space + " "), level + 1, dirNames, output);
parseChildDirElements(fi, (space + " "), level + 1, dirNames, output, userAssets);
}
}
else {

View File

@@ -37,6 +37,7 @@
#include <filesystem>
#include <iostream>
#include <random>
#include <QStandardItemModel>
using namespace openspace;
@@ -141,8 +142,11 @@ LauncherWindow::LauncherWindow(bool profileEnabled,
QWidget* parent)
: QMainWindow(parent)
, _assetPath(absPath(globalConfig.pathTokens.at("ASSETS")) + '/')
, _userAssetPath(absPath(globalConfig.pathTokens.at("USER_ASSETS")) + '/')
, _configPath(absPath(globalConfig.pathTokens.at("CONFIG")) + '/')
, _userConfigPath(absPath(globalConfig.pathTokens.at("USER_CONFIG")) + '/')
, _profilePath(absPath(globalConfig.pathTokens.at("PROFILES")) + '/')
, _userProfilePath(absPath(globalConfig.pathTokens.at("USER_PROFILES")) + '/')
, _readOnlyProfiles(globalConfig.readOnlyProfiles)
{
Q_INIT_RESOURCE(resources);
@@ -168,7 +172,6 @@ LauncherWindow::LauncherWindow(bool profileEnabled,
setCentralWidget(createCentralWidget());
populateProfilesList(globalConfig.profile);
_profileBox->setEnabled(profileEnabled);
@@ -242,7 +245,7 @@ QWidget* LauncherWindow::createCentralWidget() {
connect(
newButton, &QPushButton::released,
[this]() {
openProfileEditor("");
openProfileEditor("", true);
}
);
newButton->setObjectName("small");
@@ -254,7 +257,9 @@ QWidget* LauncherWindow::createCentralWidget() {
editButton, &QPushButton::released,
[this]() {
const std::string selection = _profileBox->currentText().toStdString();
openProfileEditor(selection);
int selectedIndex = _profileBox->currentIndex();
bool isUserProfile = selectedIndex <= _userAssetCount;
openProfileEditor(selection, isUserProfile);
}
);
editButton->setObjectName("small");
@@ -310,6 +315,7 @@ void LauncherWindow::populateProfilesList(std::string preset) {
namespace fs = std::filesystem;
_profileBox->clear();
_userAssetCount = 0;
if (!std::filesystem::exists(_profilePath)) {
LINFOC(
@@ -318,6 +324,26 @@ void LauncherWindow::populateProfilesList(std::string preset) {
);
return;
}
_profileBox->addItem(QString::fromStdString("--- User Profiles ---"));
const QStandardItemModel* model = qobject_cast<const QStandardItemModel*>(_profileBox->model());
model->item(_userAssetCount)->setEnabled(false);
++_userAssetCount;
// Add all the files with the .profile extension to the dropdown
for (const fs::directory_entry& p : fs::directory_iterator(_userProfilePath)) {
if (p.path().extension() != ".profile") {
continue;
}
_profileBox->addItem(QString::fromStdString(p.path().stem().string()));
++_userAssetCount;
}
_profileBox->addItem(QString::fromStdString("--- OpenSpace Profiles ---"));
model = qobject_cast<const QStandardItemModel*>(_profileBox->model());
model->item(_userAssetCount)->setEnabled(false);
++_userAssetCount;
// Add all the files with the .profile extension to the dropdown
for (const fs::directory_entry& p : fs::directory_iterator(_profilePath)) {
if (p.path().extension() != ".profile") {
@@ -330,7 +356,6 @@ void LauncherWindow::populateProfilesList(std::string preset) {
const int idx = _profileBox->findText(QString::fromStdString(std::move(preset)));
if (idx != -1) {
_profileBox->setCurrentIndex(idx);
}
}
@@ -338,6 +363,24 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) {
namespace fs = std::filesystem;
_windowConfigBox->clear();
_userConfigCount = 0;
_windowConfigBox->addItem(QString::fromStdString("--- User Configurations ---"));
const QStandardItemModel* model = qobject_cast<const QStandardItemModel*>(_windowConfigBox->model());
model->item(_userConfigCount)->setEnabled(false);
++_userConfigCount;
// Add all the files with the .xml extension to the dropdown
for (const fs::directory_entry& p : fs::directory_iterator(_userConfigPath)) {
if (p.path().extension() != ".xml") {
continue;
}
_windowConfigBox->addItem(QString::fromStdString(p.path().stem().string()));
++_userConfigCount;
}
_windowConfigBox->addItem(QString::fromStdString("--- OpenSpace Configurations ---"));
model = qobject_cast<const QStandardItemModel*>(_windowConfigBox->model());
model->item(_userConfigCount)->setEnabled(false);
if (std::filesystem::exists(_configPath)) {
// Add all the files with the .xml extension to the dropdown
for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) {
@@ -368,8 +411,9 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) {
}
}
void LauncherWindow::openProfileEditor(const std::string& profile) {
void LauncherWindow::openProfileEditor(const std::string& profile, const bool isUserProfile) {
std::optional<Profile> p;
std::string saveProfilePath = isUserProfile ? _userProfilePath : _profilePath;
if (profile.empty()) {
// If the requested profile is the empty string, then we want to create a new one
@@ -378,17 +422,20 @@ void LauncherWindow::openProfileEditor(const std::string& profile) {
else {
// Otherwise, we want to load that profile
std::string fullProfilePath = _profilePath + profile + ".profile";
std::string fullProfilePath = saveProfilePath + profile + ".profile";
p = loadProfileFromFile(this, fullProfilePath);
if (!p.has_value()) {
return;
}
}
ProfileEdit editor(*p, profile, _assetPath, _profilePath, _readOnlyProfiles, this);
ProfileEdit editor(*p, profile, _assetPath, _userAssetPath, saveProfilePath, _readOnlyProfiles, this);
editor.exec();
if (editor.wasSaved()) {
const std::string path = _profilePath + editor.specifiedFilename() + ".profile";
if (editor.specifiedFilename() != profile) {
saveProfilePath = _userProfilePath;
}
const std::string path = saveProfilePath + editor.specifiedFilename() + ".profile";
saveProfile(this, path, *p);
populateProfilesList(editor.specifiedFilename());
}
@@ -407,5 +454,10 @@ std::string LauncherWindow::selectedProfile() const {
}
std::string LauncherWindow::selectedWindowConfig() const {
return _windowConfigBox->currentText().toStdString();
if (_windowConfigBox->currentIndex() > _userAssetCount) {
return "${CONFIG}/" + _windowConfigBox->currentText().toStdString();
}
else {
return "${USER_CONFIG}/" + _windowConfigBox->currentText().toStdString();
}
}

View File

@@ -59,7 +59,13 @@ namespace {
void traverseToFindFilesystemMatch(AssetTreeModel& model, QModelIndex parent,
int nRows, const std::string& path)
{
const size_t slash = path.find_first_of('/', 0);
int startIndex = 0;
std::string token = "${USER_ASSETS}/";
if (path.find(token) == 0) {
startIndex = token.length();
}
const size_t slash = path.find_first_of('/', startIndex);
const bool endOfPath = (slash == std::string::npos);
std::string firstDir = endOfPath ? "" : path.substr(0, slash);
@@ -117,12 +123,12 @@ namespace {
} // namespace
AssetsDialog::AssetsDialog(openspace::Profile& profile, const std::string& assetBasePath,
QWidget* parent)
const std::string& userAssetBasePath, QWidget* parent)
: QDialog(parent)
, _profile(profile)
{
setWindowTitle("Assets");
_assetTreeModel.importModelData(assetBasePath);
_assetTreeModel.importModelData(assetBasePath, userAssetBasePath);
createWidgets();
}

View File

@@ -145,7 +145,8 @@ AssetTreeModel::AssetTreeModel(QObject* parent)
);
}
void AssetTreeModel::importModelData(const std::string& assetBasePath) {
void AssetTreeModel::importModelData(const std::string& assetBasePath,
const std::string& userAssetBasePath) {
FileSystemAccess assets(
".asset",
{ "scene", "global", "customization", "examples", "util" },
@@ -153,7 +154,7 @@ void AssetTreeModel::importModelData(const std::string& assetBasePath) {
true
);
std::string assetList = assets.useQtFileSystemModelToTraverseDir(assetBasePath);
assetList += assets.useQtFileSystemModelToTraverseDir(userAssetBasePath, true);
std::istringstream iss(assetList);
ImportElement rootElem = { "", 0, false };

View File

@@ -94,12 +94,15 @@ namespace {
} // namespace
ProfileEdit::ProfileEdit(Profile& profile, const std::string& profileName,
std::string assetBasePath, std::string profileBasePath,
std::string assetBasePath,
std::string userAssetBasePath,
std::string profileBasePath,
const std::vector<std::string>& readOnlyProfiles,
QWidget* parent)
: QDialog(parent)
, _profile(profile)
, _assetBasePath(std::move(assetBasePath))
, _userAssetBasePath(std::move(userAssetBasePath))
, _profileBasePath(std::move(profileBasePath))
, _readOnlyProfiles(readOnlyProfiles)
{
@@ -427,7 +430,7 @@ void ProfileEdit::openKeybindings() {
void ProfileEdit::openAssets() {
_errorMsg->clear();
AssetsDialog(_profile, _assetBasePath, this).exec();
AssetsDialog(_profile, _assetBasePath, _userAssetBasePath, this).exec();
_assetsLabel->setText(labelText(_profile.assets().size(), "Assets"));
_assetsEdit->setText(QString::fromStdString(summarizeAssets(_profile.assets())));
}

View File

@@ -41,11 +41,11 @@
#include <ghoul/lua/ghoul_lua.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/boolean.h>
//#include <ghoul/opengl/ghoul_gl.h>
#include <GLFW/glfw3.h>
#include <ghoul/opengl/ghoul_gl.h>
#ifdef WIN32
#define GLFW_EXPOSE_NATIVE_WIN32
#endif
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#include <sgct/clustermanager.h>
#include <sgct/commandline.h>
@@ -576,7 +576,7 @@ void mainPostDrawFunc() {
glBindTexture(GL_TEXTURE_2D, texId);
w.leftOrMain.handle->SendTexture(
texId,
GL_TEXTURE_2D,
GLuint(GL_TEXTURE_2D),
window.framebufferResolution().x,
window.framebufferResolution().y
);
@@ -587,7 +587,7 @@ void mainPostDrawFunc() {
glBindTexture(GL_TEXTURE_2D, tId);
w.right.handle->SendTexture(
tId,
GL_TEXTURE_2D,
GLuint(GL_TEXTURE_2D),
window.framebufferResolution().x,
window.framebufferResolution().y
);
@@ -660,6 +660,17 @@ void mainCharCallback(unsigned int codepoint, int modifiers) {
void mainDropCallback(int amount, const char** paths) {
ghoul_assert(amount > 0, "Expected at least one file path");
ghoul_assert(paths, "expected non-nullptr");
for (int i = 0; i < amount; ++i) {
global::openSpaceEngine->handleDragDrop(paths[i]);
}
}
std::vector<std::byte> mainEncodeFun() {
ZoneScoped
LTRACE("main::mainEncodeFun(begin)");
@@ -1005,7 +1016,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC
}
}
else {
config = "${CONFIG}/" + config + xmlExt;
config += xmlExt;
}
global::configuration->windowConfiguration = config;
}
@@ -1013,7 +1024,6 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC
}
int main(int argc, char* argv[]) {
#ifdef WIN32
SetUnhandledExceptionFilter(generateMiniDump);
#endif // WIN32
@@ -1026,7 +1036,6 @@ int main(int argc, char* argv[]) {
{
using namespace ghoul::logging;
LogManager::initialize(LogLevel::Debug, LogManager::ImmediateFlush::Yes);
LogMgr.addLog(std::make_unique<ConsoleLog>());
#ifdef WIN32
if (IsDebuggerPresent()) {
LogMgr.addLog(std::make_unique<ghoul::logging::VisualStudioOutputLog>());
@@ -1153,7 +1162,6 @@ int main(int argc, char* argv[]) {
global::openSpaceEngine->registerPathTokens();
bool hasSGCTConfig = false;
bool hasProfile = false;
std::string sgctFunctionName;
@@ -1169,6 +1177,9 @@ int main(int argc, char* argv[]) {
sgctFunctionName
);
//TODO consider LFATAL if ${USER} doens't exist rather then recurisve create.
global::openSpaceEngine->createUserDirectoriesIfNecessary();
// (abock, 2020-12-07) For some reason on Apple the keyboard handler in CEF will call
// the Qt one even if the QApplication was destroyed, leading to invalid memory
// access. The only way we could fix this for the release was to keep the
@@ -1253,6 +1264,7 @@ int main(int argc, char* argv[]) {
callbacks.mousePos = mainMousePosCallback;
callbacks.mouseScroll = mainMouseScrollCallback;
callbacks.character = mainCharCallback;
callbacks.drop = mainDropCallback;
callbacks.encode = mainEncodeFun;
callbacks.decode = mainDecodeFun;
Log::instance().setNotifyLevel(Log::Level::Debug);

View File

@@ -106,6 +106,10 @@ void performTasks(const std::string& path) {
int main(int argc, char** argv) {
using namespace openspace;
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Debug,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
ghoul::initialize();
global::create();

View File

@@ -98,7 +98,10 @@ int main(int argc, char** argv) {
settings.changeHostPassword = defaultChangeHostPassword.str();
}
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Debug,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
LINFO(fmt::format("Connection password: {}", settings.password));
LINFO(fmt::format("Host password: {}", settings.changeHostPassword));

View File

@@ -7,11 +7,10 @@ asset.require('./base_blank')
-- Specifying which other assets should be loaded in this scene
asset.require('scene/solarsystem/sun/sun')
asset.require('scene/solarsystem/sun/glare')
asset.require('scene/solarsystem/sun/habitablezone')
asset.require('scene/solarsystem/sun/default_layers')
asset.require('scene/solarsystem/planets/planets')
asset.require('scene/solarsystem/planets/default_layers')
asset.require('scene/solarsystem/planets/mars/moons/phobos')
asset.require('scene/solarsystem/planets/mars/moons/deimos')
asset.require('scene/solarsystem/dwarf_planets/pluto/system')
asset.require('scene/solarsystem/dwarf_planets/pluto/default_layers')
asset.require('scene/solarsystem/dwarf_planets/pluto/charon/default_layers')
@@ -21,9 +20,11 @@ asset.require('scene/milkyway/constellations/constellation_keybinds')
asset.require('scene/milkyway/objects/orionnebula/orionnebula')
asset.require('util/launcher_images')
local assetHelper = asset.require('util/asset_helper')
-- For exoplanet system visualizations
asset.require('scene/milkyway/exoplanets/exoplanets_data')
asset.require('scene/milkyway/exoplanets/exoplanets_textures')
local assetHelper = asset.require('util/asset_helper')
asset.require('scene/digitaluniverse/2dF')
asset.require('scene/digitaluniverse/2mass')
asset.require('scene/digitaluniverse/6dF')

View File

@@ -25,11 +25,11 @@ local vrt_folders = {
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX'
-- We recommend using this folder for CTX
openspace.absPath('G:/OpenSpaceData/Mars/CTX'),
openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'),
-- if not and you have a custom path for CTX layers, enter it below
'',
-- We recommend using this folder for HiRISE
openspace.absPath('G:/OpenSpaceData/Mars/HiRISE'),
openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'),
-- if not and you have a custom path for HiRISE layers, enter it below
''
},
@@ -39,8 +39,8 @@ local vrt_folders = {
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Moon'
openspace.absPath('G:/OpenSpaceData/Moon'),
openspace.absPath('G:/OpenSpaceData/Apollo'),
openspace.absPath('${BASE}/../OpenSpaceData/Moon'),
openspace.absPath('${BASE}/../OpenSpaceData/Apollo'),
''
},
Mercury = {
@@ -49,7 +49,7 @@ local vrt_folders = {
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mercury'
openspace.absPath('G:/OpenSpaceData/Mercury'),
openspace.absPath('${BASE}/../OpenSpaceData/Mercury'),
''
}
}

View File

@@ -0,0 +1,46 @@
local assetHelper = asset.require('util/asset_helper')
-- @TODO (emmbr 2020-02-03) Potential threading issue later on? This will run on the main thread
local cyanTexture = openspace.createSingeColorImage("example_disc_color1", {0.0, 1.0, 1.0})
local purpleTexture = openspace.createSingeColorImage("example_disc_color2", {0.5, 0.0, 0.5})
local BasicDisc = {
Identifier = "BasicDisc",
Renderable = {
Type = "RenderableDisc",
Texture = cyanTexture,
Size = 1e10,
Width = 0.5
},
GUI = {
Name = "Basic Disc",
Path = "/Examples/Discs"
}
}
-- Elliptic discs can be created using a non-uniform scaling
-- For a full disc, use a width of 1.0
local FullEllipticDisc = {
Identifier = "FullEllipticDisc",
Transform = {
Scale = {
Type = "NonUniformStaticScale",
Scale = {2.0, 1.0, 1.0}
}
},
Renderable = {
Type = "RenderableDisc",
Texture = purpleTexture,
Size = 2e10,
Width = 1.0
},
GUI = {
Name = "Full Elliptic Disc",
Path = "/Examples/Discs"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
BasicDisc,
FullEllipticDisc
})

View File

@@ -1,6 +1,6 @@
local assetHelper = asset.require('util/asset_helper')
local scale = 3E11
local scale = 149597870700 -- 1 AU
local radialGrid = {
Identifier = "ExampleRadialGrid",
@@ -14,9 +14,10 @@ local radialGrid = {
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
GridColor = {0.6, 1.0, 0.7},
Color = { 0.6, 1.0, 0.7 },
LineWidth = 3.0,
GridSegments = {3, 4},
GridSegments = { 3, 4 },
OuterRadius = 1.0,
InnerRadius = 0.2,
Enabled = false
},
@@ -36,10 +37,10 @@ local planarGrid = {
},
Renderable = {
Type = "RenderableGrid",
GridColor = {0.0, 1.0, 0.8},
Color = { 0.0, 1.0, 0.8 },
LineWidth = 2.0,
Segments = {5, 10},
Size = {1, 2},
Segments = { 5, 10 },
Size = { 1, 2 },
Enabled = false
},
GUI = {
@@ -48,7 +49,51 @@ local planarGrid = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radialGrid,
planarGrid
local sphericalGrid = {
Identifier = "ExampleSphericalGrid",
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Color = { 1.0, 0.5, 0.2 },
LineWidth = 2.0,
Segments = 40,
Enabled = false
},
GUI = {
Name = "Example Spherical Grid",
Path = "/Examples/Grids"
}
}
local boxGrid = {
Identifier = "ExampleBoxGrid",
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale
}
},
Renderable = {
Type = "RenderableBoxGrid",
Color = { 0.5, 0.0, 1.0 },
LineWidth = 2.0,
Size = { 2, 2, 2 },
Enabled = false
},
GUI = {
Name = "Example Box Grid",
Path = "/Examples/Grids"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radialGrid,
planarGrid,
sphericalGrid,
boxGrid
})

View File

@@ -0,0 +1,52 @@
local assetHelper = asset.require('util/asset_helper')
local scale = 149597870700 -- 1 AU
local circle = {
Identifier = "ExampleCircle",
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale
}
},
Renderable = {
Type = "RenderableRadialGrid",
Color = { 0.6, 0.6, 0.8 },
LineWidth = 3.0,
GridSegments = { 1, 1 },
CircleSegments = 64,
OuterRadius = 1.0
},
GUI = {
Name = "Example Circle",
Path = "/Examples/Primitives"
}
}
local ellipse = {
Identifier = "ExampleEllipse",
Transform = {
Scale = {
Type = "NonUniformStaticScale",
Scale = {1.5, 1.0, 1.0}
}
},
Renderable = {
Type = "RenderableRadialGrid",
Color = { 0.6, 0.8, 0.6 },
LineWidth = 3.0,
GridSegments = { 1, 1 },
CircleSegments = 64,
OuterRadius = scale
},
GUI = {
Name = "Example Ellipse",
Path = "/Examples/Primitives"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
circle,
ellipse
})

View File

@@ -33,7 +33,7 @@ local deepSkyPoints = {
TextColor = { 0.1, 0.4, 0.6 },
TextSize = 20.50,
TextMinSize = 16.0,
Unit = "Mpc",
Unit = "pc",
-- Fade in value in the same unit as "Unit"
--FadeInDistances = { 0.05, 1.0 },
-- Max size in pixels
@@ -68,7 +68,7 @@ local deepSkyImages = {
TexturePath = textures,
Luminosity = "radius",
ScaleLuminosity = 0.001,
Unit = "Mpc",
Unit = "pc",
-- Fade in value in the same unit as "Unit"
--FadeInDistances = {0.001, 0.05010},
PlaneMinSize = 5.0

View File

@@ -40,7 +40,7 @@ local radio = {
Type = "RenderableSphericalGrid",
Enabled = false,
Opacity = 1.0,
GridColor = { 0.3, 0.84, 1.0 },
Color = { 0.3, 0.84, 1.0 },
LineWidth = 2.0
},
GUI = {
@@ -66,7 +66,7 @@ local oort = {
Type = "RenderableSphericalGrid",
Enabled = false,
Opacity = 0.8,
GridColor = { 0.8, 0.4, 0.4 },
Color = { 0.8, 0.4, 0.4 },
LineWidth = 2.0
},
GUI = {
@@ -92,7 +92,7 @@ local ecliptic = {
Type = "RenderableSphericalGrid",
Enabled = false,
Opacity = 1.0,
GridColor = { 0.74, 0.26, 0.26 },
Color = { 0.74, 0.26, 0.26 },
LineWidth = 2.0
},
GUI = {
@@ -146,7 +146,7 @@ local equatorial = {
Type = "RenderableSphericalGrid",
Enabled = false,
Opacity = 0.8,
GridColor = { 0.69, 0.68, 0.29 },
Color = { 0.69, 0.68, 0.29 },
LineWidth = 2.0
},
GUI = {
@@ -197,7 +197,7 @@ local galactic = {
Enabled = false,
LineWidth = 2.0,
Opacity = 1.0,
GridColor = { 0.0, 0.6, 0.6 }
Color = { 0.0, 0.6, 0.6 }
},
GUI = {
Name = "Galactic Sphere",

View File

@@ -2,6 +2,25 @@ local DataPath = asset.syncedResource({
Name = "Exoplanet Data Files",
Type = "HttpSynchronization",
Identifier = "exoplanets_data",
Version = 1
Version = 2
})
asset.onInitialize(function ()
local p = "Modules.Exoplanets.DataFolder";
if(openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, DataPath)
end
end)
asset.export("DataPath", DataPath)
asset.meta = {
Name = "Exoplanet Data",
Version = "2.0",
Description = [[ The data that is used for the exoplanet systems. The data has been
derived from the 'Planetary Systems Composite Data' dataset from the NASA Exoplanet
Archive]],
Author = "OpenSpace Team",
URL = "https://exoplanetarchive.ipac.caltech.edu/docs/data.html",
License = "MIT license",
}

View File

@@ -1,7 +1,60 @@
local habitableZoneTextures =
asset.require('./../habitable_zones/habitable_zone_textures').TexturesPath
local sunTextures = asset.require('scene/solarsystem/sun/sun_textures').TexturesPath
local TexturesPath = asset.syncedResource({
Name = "Exoplanet Textures",
Type = "HttpSynchronization",
Identifier = "exoplanets_textures",
Version = 1
Version = 2
})
asset.onInitialize(function ()
local starTexture = TexturesPath .. "/sun.jpg"
local noDataTexture = TexturesPath .. "/grid-32.png"
local discTexture = TexturesPath .. "/disc_bw_texture.png"
local starGlareTexture = sunTextures .. "/halo.png"
local hzTexture = habitableZoneTextures .. "/hot_to_cold_faded.png"
-- Set the default textures used for the exoplanet system creation
-- (Check if already set, to not override value in config file)
local p = "Modules.Exoplanets.StarTexture";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, starTexture)
end
local p = "Modules.Exoplanets.StarGlareTexture";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, starGlareTexture)
end
p = "Modules.Exoplanets.NoDataTexture";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, noDataTexture)
end
p = "Modules.Exoplanets.OrbitDiscTexture";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, discTexture)
end
p = "Modules.Exoplanets.HabitableZoneTexture";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, hzTexture)
end
end)
asset.export("TexturesPath", TexturesPath)
asset.meta = {
Name = "Exoplanet Textures",
Version = "2.0",
Description = [[ Adds all textures that are required for the exoplanet system
visualizations]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
}

View File

@@ -0,0 +1,17 @@
local TexturesPath = asset.syncedResource({
Name = "Habitable Zone Textures",
Type = "HttpSynchronization",
Identifier = "habitable_zone_textures",
Version = 1
})
asset.export("TexturesPath", TexturesPath)
asset.meta = {
Name = "Habitable Zone Textures",
Version = "1.0",
Description = [[ Default textures that can be used for the habitable zone
rendering]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
}

View File

@@ -9,7 +9,7 @@ local sync = asset.syncedResource({
Name = "Orion Nebula Model",
Type = "HttpSynchronization",
Identifier = "orion_nebula_model",
Version = 1
Version = 2
})
local NebulaHolder = {
@@ -59,11 +59,7 @@ local OrionNebulaModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = sync .. "/orion_nebula.obj",
ColorTexture = sync .. "/heic0601a_masked.png"
}},
GeometryFile = sync .. "/orion_nebula.obj",
Opacity = 1.0,
DisableFaceCulling = false,
SpecularIntensity = 0.0,
@@ -92,11 +88,7 @@ local OrionNebulaShocksModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = sync .. "/orishocks.obj",
ColorTexture = "${DATA}/colors/pink.png"
}},
GeometryFile = sync .. "/orishocks.obj",
Opacity = 1.0,
DisableFaceCulling = false,
SpecularIntensity = 0.0,
@@ -125,11 +117,7 @@ local OrionNebulaProplydsModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = sync .. "/proplyds.obj",
ColorTexture = "${DATA}/colors/pink.png"
}},
GeometryFile = sync .. "/proplyds.obj",
Opacity = 1.0,
DisableFaceCulling = false,
SpecularIntensity = 0.0,

View File

@@ -31,16 +31,17 @@ local Charon = {
Enable = false,
FileName = labelsPath .. "/charon.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 40.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 2000000.0,
FadeOutStartingDistance = 800000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 250000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -31,16 +31,17 @@ local Pluto = {
Enable = false,
FileName = labelsPath .. "/pluto.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 28.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 4000000.0,
FadeOutStartingDistance = 650000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 500000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -56,11 +56,7 @@ local Apollo11Model = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj",
ColorTexture = models .. "/gray.png"
}},
GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj",
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},
GUI = {
@@ -175,11 +171,7 @@ local Apollo11LemDescentModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = lem_model.modelFolder .. "/lmremoved.obj",
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg"
}},
GeometryFile = lem_model.modelFolder .. "/lmremoved.obj",
SpecularIntensity = 0.0,
RotationVector = { 273.750,28.0,309.85 },
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
@@ -205,11 +197,7 @@ local Apollo11LemLandedModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj",
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg"
}},
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj",
SpecularIntensity = 0.0,
RotationVector = { 273.750,28.0,309.85 },
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)

View File

@@ -36,11 +36,7 @@ local Apollo11LemModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj",
ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg"
}},
GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj",
RotationVector = { 91.044090,171.229706,111.666664 },
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)
},

View File

@@ -34,11 +34,7 @@ local Apollo17LemModel = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj",
ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg"
}},
GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj",
SpecularIntensity = 0.0,
RotationVector = { 110.255219,171.229706,126.666664 },
LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier)

View File

@@ -1,51 +0,0 @@
--apollo_lem.asset (hopeful title)
-- This asset exports a function to create an Apollo Lunar Excursion Module (LEM).
-- Instead of hard-coding the scene graph node parent,
-- client assets can decide which object that the LEM should be attached to.
-- Usage example: createLem(Apollo11Lem.Idenfitier)
-- ...where Apollo11Lem is the scene graph node identifier to attach the LEM to.
local asset_helper = asset.require('util/asset_helper')
local sun_transforms = asset.require('scene/solarsystem/sun/transforms')
local models = asset.syncedResource({
Name = "Apollo Models",
Type = "HttpSynchronization",
Identifier = "apollo_lem_model",
Version = 1
})
local partsInfo = {
-- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading
-- Exterior
{ "black", "black.png", true },
{ "blue_glass", "blue_glass.png", true },
{ "booster", "booster3.png", true },
{ "bright_white", "white.png", true },
{ "dark_grey_dish", "dark_gray.png", true },
{ "dull_white", "dull_white.png", true },
{ "gold", "gold.png", true },
{ "light_grey", "light_gray.png", true },
{ "mid_grey", "gray.png", true },
{ "orange", "orange.png", true },
{ "texture_lem_flag", "texture_lem_flag.png", true },
{ "texture_lem_unitedstates", "texture_lem_unitedstates.png", true },
{ "yellow_buttons", "yellow.png", true }
}
asset.export("createLem", function (parentNodeIdentifier)
local parts = {}
for i, info in ipairs(partsInfo) do
parts[#parts + 1] = asset_helper.createModelPart(
parentNodeIdentifier,
sun_transforms.SolarSystemBarycenter.Identifier,
models,
info[1],
info[2],
info[3]
)
end
return parts
end)

View File

@@ -2,7 +2,7 @@ local modelFolder = asset.syncedResource({
Name = "Apollo Lem Models",
Type = "HttpSynchronization",
Identifier = "apollo_lem_model",
Version = 3
Version = 4
})
asset.export('modelFolder', modelFolder)

View File

@@ -650,11 +650,7 @@ local Dawn = {
Renderable = {
Type = "RenderableModel",
Body = "DAWN",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/mainbodydawn.obj",
ColorTexture = textures .. "/gray.png"
}},
GeometryFile = models .. "/mainbodydawn.obj",
LightSources = LightSources
},
GUI = {
@@ -682,11 +678,7 @@ local DawnSolarArray1 = {
Renderable = {
Type = "RenderableModel",
Body = "DAWN",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/solarpanelleft.obj",
ColorTexture = textures .. "/gray.png"
}},
GeometryFile = models .. "/solarpanelleft.obj",
LightSources = LightSources
},
GUI = {
@@ -713,11 +705,7 @@ local DawnSolarArray2 = {
Renderable = {
Type = "RenderableModel",
Body = "DAWN",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/solarpanelright.obj",
ColorTexture = textures .. "/gray.png"
}},
GeometryFile = models .. "/solarpanelright.obj",
LightSources = LightSources
},
GUI = {

View File

@@ -45,11 +45,7 @@ local Vesta = {
},
Renderable = {
Type = "RenderableModelProjection",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/VestaComet_5000.obj",
ColorTexture = textures .. "/dummy.jpg"
},
GeometryFile = models .. "/VestaComet_5000.obj",
BoundingSphereRadius = 10.0,
Projection = {
Sequence = images,

View File

@@ -2,19 +2,11 @@ local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local textures = asset.syncedResource({
Name = "Gaia Textures",
Type = "HttpSynchronization",
Identifier = "gaia_textures",
Version = 1
})
local model = asset.syncedResource({
Name = "Gaia Model",
Type = "HttpSynchronization",
Identifier = "gaia_model",
Version = 1
Version = 2
})
@@ -39,11 +31,7 @@ local Gaia = {
Renderable = {
Type = "RenderableModel",
Body = "GAIA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = model .. "/gaia.obj",
ColorTexture = textures .. "/gaia-baked.png"
}},
GeometryFile = model .. "/gaia.obj",
LightSources = {
{
Type = "SceneGraphLightSource",

View File

@@ -2,65 +2,13 @@ asset.require('spice/base')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local assetHelper = asset.require('util/asset_helper')
local models_chutes = asset.syncedResource({
local models = asset.syncedResource({
Name = "Insight Models Chutes",
Type = "HttpSynchronization",
Identifier = "insight_models_chutes",
Version = 1
Identifier = "insight_models",
Version = 2
})
local models_cruise_arrays = asset.syncedResource({
Name = "Insight Models Cruise Arrays",
Type = "HttpSynchronization",
Identifier = "insight_models_cruise_arrays",
Version = 1
})
local models_cruise_cone = asset.syncedResource({
Name = "Insight Models Cruise Cone",
Type = "HttpSynchronization",
Identifier = "insight_models_cruise_cone",
Version = 1
})
local models_lander_lander_deck = asset.syncedResource({
Name = "Insight Models Lander Deck",
Type = "HttpSynchronization",
Identifier = "insight_models_lander_lander_deck",
Version = 1
})
local models_lander_legs_deploy = asset.syncedResource({
Name = "Insight Models Lander Legs Deploy",
Type = "HttpSynchronization",
Identifier = "insight_models_lander_legs_deploy",
Version = 1
})
local models_lander_legs_stow = asset.syncedResource({
Name = "Insight Models Lander Legs Stow",
Type = "HttpSynchronization",
Identifier = "insight_models_lander_legs_stow",
Version = 1
})
local models_lander_panels_deploy = asset.syncedResource({
Name = "Insight Models Lander Panels Deploy",
Type = "HttpSynchronization",
Identifier = "insight_models_lander_panels_deploy",
Version = 1
})
local models_lander_panels_stow = asset.syncedResource({
Name = "Insight Models Lander Panels Stow",
Type = "HttpSynchronization",
Identifier = "insight_models_lander_panels_stow",
Version = 1
})
local ikernels = asset.syncedResource({
Name = "Insight Kernels",
Type = "HttpSynchronization",
@@ -167,11 +115,7 @@ local Insight_Entry_CapsuleA = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_cruise_cone .. "/cruise_insight_doubleside2_newcapsule_diffuse.obj",
ColorTexture = models_cruise_cone .. "/insight_newcapsule_diffuse.jpg"
}},
GeometryFile = models .. "/cruise_insight_doubleside2_newcapsule_diffuse.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -192,11 +136,7 @@ local Insight_Entry_Capsule_Ring = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_cruise_cone .. "/insight_cruise_cone_ring_foil_gold.obj",
ColorTexture = models_cruise_cone .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/insight_cruise_cone_ring_foil_gold.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -217,11 +157,7 @@ local Insight_Entry_Capsule_Plugs = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_cruise_cone .. "/insight_cruise_cone_capsule_diffuse.obj",
ColorTexture = models_cruise_cone .. "/insight_capsule_diffuse.png"
}},
GeometryFile = models .. "/insight_cruise_cone_capsule_diffuse.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -242,11 +178,7 @@ local Insight_Entry_Heatshield = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_cruise_cone .. "/insight_cruise_heatshield_foil_gold.obj",
ColorTexture = models_cruise_cone .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/insight_cruise_heatshield_foil_gold.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -267,11 +199,7 @@ local Insight_Parachute_0 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/insight_chute_frame01_diff1.obj",
ColorTexture = models_chutes .. "/chute_diff.png"
}},
GeometryFile = models .. "/insight_chute_frame01_diff1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -292,11 +220,7 @@ local Insight_Parachute_Cords_0 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/insight_chute_frame01_cords1.obj",
ColorTexture = models_chutes .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/insight_chute_frame01_cords1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -317,11 +241,7 @@ local Insight_Parachute_20 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/insight_chute_frame20_diff1.obj",
ColorTexture = models_chutes .. "/chute_diff.png"
}},
GeometryFile = models .. "/insight_chute_frame20_diff1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -342,11 +262,7 @@ local Insight_Parachute_Cords_20 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/insight_chute_frame20_cords1.obj",
ColorTexture = models_chutes .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/insight_chute_frame20_cords1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -367,11 +283,7 @@ local Insight_Parachute_40 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/chute_doubleside_frame40_diff.obj",
ColorTexture = models_chutes .. "/chute_diff.png"
}},
GeometryFile = models .. "/chute_doubleside_frame40_diff.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -392,11 +304,7 @@ local Insight_Parachute_Cords_40 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_chutes .. "/insight_chute_frame40_cords1.obj",
ColorTexture = models_chutes .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/insight_chute_frame40_cords1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -417,11 +325,7 @@ local Insight_Lander_A001 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO01.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_01.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -442,11 +346,7 @@ local Insight_Lander_A002 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO02.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_02.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO02.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -467,11 +367,7 @@ local Insight_Lander_A003 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO03.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_03.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO03.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -492,11 +388,7 @@ local Insight_Lander_A004 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO04.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_04.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO04.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -517,11 +409,7 @@ local Insight_Lander_A005 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO05.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_05.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO05.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -542,11 +430,7 @@ local Insight_Lander_A006 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO06.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_06.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO06.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -567,11 +451,7 @@ local Insight_Lander_A007 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO07.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_07.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO07.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -592,11 +472,7 @@ local Insight_Lander_A008 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO08.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_08.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_AO08.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -617,11 +493,7 @@ local Insight_Lander_foil1 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_foil1.obj",
ColorTexture = models_lander_lander_deck .. "/foil_silver_ramp.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_foil1.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -642,11 +514,7 @@ local Insight_Lander_Tex01 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_tex01.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_tex_01.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_tex01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -667,11 +535,7 @@ local Insight_Lander_Tex02 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_tex02.obj",
ColorTexture = models_lander_lander_deck .. "/InSIGHT_tex_02.jpg"
}},
GeometryFile = models .. "/insight_lander_deck_tex02.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -692,11 +556,7 @@ local Insight_Legs_Stowed_tex = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_legs_stow .. "/insight_lander_legs_stow_tex01.obj",
ColorTexture = models_lander_legs_stow .. "/InSIGHT_tex_01.jpg"
}},
GeometryFile = models .. "/insight_lander_legs_stow_tex01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -717,11 +577,7 @@ local Insight_Legs_Stowed_AO06 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_legs_stow .. "/insight_lander_legs_stow_AO06.obj",
ColorTexture = models_lander_legs_stow .. "/InSIGHT_AO_06.jpg"
}},
GeometryFile = models .. "/insight_lander_legs_stow_AO06.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -742,11 +598,7 @@ local Insight_Legs_Deployed_tex = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_legs_deploy .. "/insight_lander_legs_deploy_tex01.obj",
ColorTexture = models_lander_legs_deploy .. "/InSIGHT_tex_01.jpg"
}},
GeometryFile = models .. "/insight_lander_legs_deploy_tex01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -767,11 +619,7 @@ local Insight_Legs_Deployed_AO06 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_legs_deploy .. "/insight_lander_legs_deploy_AO06.obj",
ColorTexture = models_lander_legs_deploy .. "/InSIGHT_AO_06.jpg"
}},
GeometryFile = models .. "/insight_lander_legs_deploy_AO06.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -792,11 +640,7 @@ local Insight_Panels_Stowed_tex = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_tex01.obj",
ColorTexture = models_lander_panels_stow .. "/InSIGHT_tex_01.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_stow_tex01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -817,11 +661,7 @@ local Insight_Panels_Stowed_tex2 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_tex02.obj",
ColorTexture = models_lander_panels_stow .. "/InSIGHT_tex_02.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_stow_tex02.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -842,11 +682,7 @@ local Insight_Panels_Stowed_AO01 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_AO01.obj",
ColorTexture = models_lander_panels_stow .. "/InSIGHT_AO_01.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_stow_AO01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -867,11 +703,7 @@ local Insight_Panels_Deployed_tex = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_tex01.obj",
ColorTexture = models_lander_panels_deploy .. "/InSIGHT_tex_01.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_deploy_tex01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -892,11 +724,7 @@ local Insight_Panels_Deployed_tex2 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_tex02.obj",
ColorTexture = models_lander_panels_deploy .. "/InSIGHT_tex_02.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_deploy_tex02.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},
@@ -917,11 +745,7 @@ local Insight_Panels_Deployed_AO06 = {
Parent = Insight.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_AO01.obj",
ColorTexture = models_lander_panels_deploy .. "/InSIGHT_AO_01.jpg"
}},
GeometryFile = models .. "/insight_lander_panels_deploy_AO01.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources,
},

View File

@@ -3,18 +3,11 @@ local transforms = asset.require('scene/solarsystem/planets/jupiter/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local textures = asset.syncedResource({
Name = "Juno Textures",
Type = "HttpSynchronization",
Identifier = "juno_textures",
Version = 1
})
local model = asset.syncedResource({
Name = "Juno Model",
Type = "HttpSynchronization",
Identifier = "juno_model",
Version = 1
Version = 2
})
@@ -157,11 +150,7 @@ local Juno = {
},
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = model .. "/Juno.obj",
ColorTexture = textures .. "/gray.png"
}},
GeometryFile = model .. "/Juno.obj",
ModelTransform = RotationMatrix,
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
},
@@ -189,7 +178,7 @@ local JunoTrail = {
Color = { 0.70, 0.50, 0.20 },
StartTime = "2016 JUL 01",
EndTime = "2016 DEC 13",
SampleInterval = 2
SampleInterval = 3600
},
GUI = {
Name = "Juno Trail",

View File

@@ -7,7 +7,7 @@ local models = asset.syncedResource({
Name = "Messenger Models",
Type = "HttpSynchronization",
Identifier = "messenger_model",
Version = 1
Version = 2
})
local kernels = asset.syncedResource({
@@ -92,11 +92,7 @@ local MessengerProbeBlack = {
Parent = Messenger.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/MessengerProbe_black.obj",
ColorTexture = models .. "/Tex_black.png"
}},
GeometryFile = models .. "/MessengerProbe_black.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -111,11 +107,7 @@ local MessengerProbeFoil = {
Parent = Messenger.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/MessengerProbe_foil.obj",
ColorTexture = models .. "/foil_n2.png"
}},
GeometryFile = models .. "/MessengerProbe_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -130,11 +122,7 @@ local MessengerProbeHeatShield = {
Parent = Messenger.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/MessengerProbe_heatShield.obj",
ColorTexture = models .. "/AO_heatshield4.png"
}},
GeometryFile = models .. "/MessengerProbe_heatShield.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -149,11 +137,7 @@ local MessengerProbeMetal = {
Parent = Messenger.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/MessengerProbe_metal.obj",
ColorTexture = models .. "/Tex_grey.png"
}},
GeometryFile = models .. "/MessengerProbe_metal.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -169,11 +153,7 @@ local MessengerProbePanels = {
Parent = Messenger.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/MessengerProbe_panels.obj",
ColorTexture = models .. "/Messenger_tex.png"
}},
GeometryFile = models .. "/MessengerProbe_panels.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},

View File

@@ -14,11 +14,7 @@ local Labels = {
Renderable = {
Type = "RenderableModel",
Body = "NEW HORIZONS",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/Labels.obj",
ColorTexture = textures .. "/labels.png"
}},
GeometryFile = models .. "/Labels.obj",
AmbientIntensity = 0.8
},
GUI = {

View File

@@ -2,18 +2,11 @@ local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local textures = asset.syncedResource({
Name = "New Horizons Textures",
Type = "HttpSynchronization",
Identifier = "newhorizons_textures",
Version = 3
})
local models = asset.syncedResource({
Name = "New Horizons Model",
Type = "HttpSynchronization",
Identifier = "newhorizons_model",
Version = 1
Version = 2
})
local NewHorizons = {
@@ -22,11 +15,7 @@ local NewHorizons = {
Renderable = {
Type = "RenderableModel",
Body = "NEW HORIZONS",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/NewHorizonsCleanModel.obj",
ColorTexture = textures .. "/NHTexture.jpg"
}},
GeometryFile = models .. "/NewHorizonsCleanModel.obj",
AmbientIntensity = 0.0,
DiffuseIntensity = 1.0,
SpecularIntensity = 1.0,
@@ -51,5 +40,4 @@ local NewHorizons = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { NewHorizons })
asset.export("NewHorizonsTextures", textures)
asset.export("NewHorizonsModels", models)

View File

@@ -2,15 +2,6 @@ local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local textures = asset.syncedResource({
Name = "Bennu Textures",
Type = "HttpSynchronization",
Identifier = "bennu_textures",
Version = 1
})
local models = asset.syncedResource({
Name = "Bennu Models",
Type = "HttpSynchronization",
@@ -34,11 +25,7 @@ local Bennu = {
Renderable = {
Type = "RenderableModelProjection",
Body = BENNU_BODY,
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/BennuTextured.obj",
ColorTexture = textures .. "/gray.png"
},
GeometryFile = models .. "/BennuUntextured.obj",
Projection = {
Sequence = asset.localResource('InstrumentTimes'),
SequenceType = "instrument-times",

View File

@@ -12,18 +12,11 @@ local kernels = asset.syncedResource({
Version = 1
})
local textures = asset.syncedResource({
Name = "Osiris Rex Textures",
Type = "HttpSynchronization",
Identifier = "osirisrex_textures",
Version = 1
})
local models = asset.syncedResource({
Name = "Osiris Rex Models",
Type = "HttpSynchronization",
Identifier = "osirisrex_models",
Version = 1
Version = 2
})
local BENNU_BODY = "2101955"
@@ -216,11 +209,7 @@ local OsirisRex = {
Renderable = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/orx_base_resized_12_sep_2016.obj",
ColorTexture = textures .. "/osirisTex.png"
}},
GeometryFile = models .. "/orx_base_resized_12_sep_2016.obj",
LightSources = LightSources
},
GUI = {
@@ -246,11 +235,7 @@ local PolyCam = {
Renderable = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/orx_polycam_resized_12_sep_2016.obj",
ColorTexture = textures .. "/osirisTex.png"
}},
GeometryFile = models .. "/orx_polycam_resized_12_sep_2016.obj",
LightSources = LightSources
},
GUI = {
@@ -265,11 +250,7 @@ local Rexis = {
Renderable = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/orx_rexis_resized_12_sep_2016.obj",
ColorTexture = textures .. "/osirisTex.png"
}},
GeometryFile = models .. "/orx_rexis_resized_12_sep_2016.obj",
LightSources = LightSources
},
Transform = {

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ local kernelsList = {kernelsFolder .. '/p10-a.bsp'}
local Pioneer10NAIF = "-23"
local Pioneer10 = {
Identifier = "Pioneer10",
Identifier = "Pioneer_10",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
@@ -27,13 +27,15 @@ local Pioneer10 = {
},
Renderable = model.PioneerModel,
GUI = {
Name = "Pioneer 10",
Path = "/Solar System/Missions/Pioneer/10"
Name = "Pioneer 10 Spacecraft",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 10 Spacecraft. Positioned by SPICE data.]]
}
}
local Pioneer10Trail = {
Identifier = "Pioneer10Trail",
Identifier = "Pioneer_10Trail",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
@@ -51,8 +53,10 @@ local Pioneer10Trail = {
-- 6545 is the number of days between the Start and End time (aka sample every 2d)
},
GUI = {
Name = "Pioneer 10 Trail",
Path = "/Solar System/Missions/Pioneer/10"
Name = "Pioneer 10 Trail (SPICE)",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 10 Trail, spanning March 3rd, 1972 to January 2nd, 1990.
Data from SPICE]]
}
}
@@ -60,3 +64,15 @@ assetHelper.registerSceneGraphNodesAndExport(asset, {
Pioneer10,
Pioneer10Trail,
})
asset.meta = {
Name = "Pioneer 10",
Version = "1.0",
Description = [[ Pioneer 10 Model and Trail. Driven by SPICE data for high accuracy
from March 3rd, 1972 to January 2nd, 1990.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"Pioneer_10", "Pioneer_10Trail"}
}

View File

@@ -30,13 +30,14 @@ local Pioneer11 = {
},
Renderable = model.PioneerModel,
GUI = {
Name = "Pioneer 11",
Path = "/Solar System/Missions/Pioneer/11"
Name = "Pioneer 11 Spacecraft",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 11 Spacecraft. Positioned by SPICE data.]]
}
}
local Pioneer11Trail = {
Identifier = "Pioneer11Trail",
Identifier = "Pioneer_11Trail",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
@@ -54,8 +55,10 @@ local Pioneer11Trail = {
--6087 is the number of days between the Start and End time (so sample every 2d)
},
GUI = {
Name = "Pioneer 11 Trail",
Path = "/Solar System/Missions/Pioneer/11"
Name = "Pioneer 11 Trail (SPICE)",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 11 Trail, spanning April 6th, 1973 to January 2nd, 1990.
Data from SPICE.]]
}
}
@@ -63,3 +66,15 @@ assetHelper.registerSceneGraphNodesAndExport(asset, {
Pioneer11,
Pioneer11Trail,
})
asset.meta = {
Name = "Pioneer 11",
Version = "1.0",
Description = [[ Pioneer 11 Model and Trail. Driven by SPICE data for high accuracy
from April 6th, 1973 to January 2nd, 1990.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"Pioneer_11", "Pioneer_11Trail"}
}

View File

@@ -1,5 +1,5 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local modelFolder = asset.syncedResource({
Name = "Pioneer 10/11 Models",
@@ -21,3 +21,13 @@ local ModelRenderable = {
}
asset.export("PioneerModel", ModelRenderable)
asset.meta = {
Name = "Pioneer Model",
Version = "1.0",
Description = [[ Pioneer model asset. Used by both pioneer 10 and pioneer 11 asset.
Untextured version of model from NASA 3D resources.]],
Author = "NASA",
URL = "https://nasa3d.arc.nasa.gov/detail/eoss-pioneer",
License = "NASA"
}

View File

@@ -54,11 +54,7 @@ local Comet67P = {
},
Renderable = {
Type = "RenderableModelProjection",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/67P_rotated_5_130.obj",
ColorTexture = textures .. "/gray.jpg"
},
GeometryFile = models .. "/67P_rotated_5_130.obj",
Projection = {
Sequence = { imagesDestination },
SequenceType = "image-sequence",

View File

@@ -3,19 +3,11 @@ local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local transforms = asset.require('./67p')
local textures = asset.syncedResource({
Name = "Rosetta Textures",
Type = "HttpSynchronization",
Identifier = "rosetta_textures",
Version = 2
})
local models = asset.syncedResource({
Name = "Rosetta Models",
Type = "HttpSynchronization",
Identifier = "rosetta_model",
Version = 3
Version = 4
})
local kernels = asset.syncedResource({
@@ -138,11 +130,7 @@ local RosettaBlackFoil = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/black_foil.obj",
ColorTexture = textures .. "/foil_silver_ramp.png"
}},
GeometryFile = models .. "/black_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -158,11 +146,7 @@ local RosettaBlackParts = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/black_parts.obj",
ColorTexture = textures .. "/foil_silver_ramp.png"
}},
GeometryFile = models .. "/black_parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -178,11 +162,7 @@ local RosettaDish = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/dish.obj",
ColorTexture = textures .. "/dish_AO.png"
}},
GeometryFile = models .. "/dish.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -198,11 +178,7 @@ local RosettaParts = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/parts.obj",
ColorTexture = textures .. "/parts2_AO.png"
}},
GeometryFile = models .. "/parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -218,11 +194,7 @@ local RosettaSilverFoil = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/silver_foil.obj",
ColorTexture = textures .. "/foil_silver_ramp.png"
}},
GeometryFile = models .. "/silver_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -238,11 +210,7 @@ local RosettaVents = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/vents.obj",
ColorTexture = textures .. "/tex_01.png"
}},
GeometryFile = models .. "/vents.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -258,11 +226,7 @@ local RosettaWingA = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .."/wingA.obj",
ColorTexture = textures .. "/tex_01.png"
}},
GeometryFile = models .."/wingA.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -278,11 +242,7 @@ local RosettaWingB = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/wingB.obj",
ColorTexture = textures .. "/tex_01.png"
}},
GeometryFile = models .. "/wingB.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -298,11 +258,7 @@ local RosettaYellowFoil = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/yellow_foil.obj",
ColorTexture = textures .. "/foil_gold_ramp.png"
}},
GeometryFile = models .. "/yellow_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -347,11 +303,7 @@ local PhilaeFoil = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/lander_foil.obj",
ColorTexture = textures .. "/foil_silver_ramp.png"
}},
GeometryFile = models .. "/lander_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -367,11 +319,7 @@ local PhilaeLids = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/lander_lids.obj",
ColorTexture = textures .. "/parts2_AO.png"
}},
GeometryFile = models .. "/lander_lids.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -387,11 +335,7 @@ local PhilaeParts = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/lander_parts.obj",
ColorTexture = textures .. "/foil_silver_ramp.png"
}},
GeometryFile = models .. "/lander_parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -407,11 +351,7 @@ local PhilaeSolarPanels = {
Renderable = {
Type = "RenderableModel",
Body = "ROSETTA",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/lander_solarp.obj",
ColorTexture = textures .. "/tex_01.png"
}},
GeometryFile = models .. "/lander_solarp.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -463,7 +403,7 @@ local ImagePlane = {
Spacecraft = "ROSETTA",
Instrument = "ROS_NAVCAM-A",
Moving = false,
Texture = textures .. "/defaultProj.png"
Texture = models .. "/defaultProj.png"
},
GUI = {
Name = "Rosetta Image Plane",

View File

@@ -0,0 +1,8 @@
local models = asset.syncedResource({
Name = "New Horizons Model",
Type = "HttpSynchronization",
Identifier = "voyager_model",
Version = 1
})
asset.export('modelFolder', models)

View File

@@ -1,14 +1,6 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local models = asset.syncedResource({
Name = "Voyager 1 Models",
Type = "HttpSynchronization",
Identifier = "voyager1_model",
Version = 1
})
local models = asset.require("./model" ).modelFolder;
local kernels = asset.syncedResource({
Name = "Voyager 1 Kernels",
@@ -80,11 +72,7 @@ local Voyager1Main = {
Parent = Voyager1.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/voyager-main.obj",
ColorTexture = models .. "/voyager-main.jpg"
}},
GeometryFile = models .. "/voyager-main.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -99,11 +87,7 @@ local Voyager1Antenna = {
Parent = Voyager1.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/voyager-antenna.obj",
ColorTexture = models .. "/voyager-antenna.png"
}},
GeometryFile = models .. "/voyager-antenna.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},

View File

@@ -1,15 +1,8 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local models = asset.require("./model" ).modelFolder;
local models = asset.syncedResource({
Name = "Voyager 2 Models",
Type = "HttpSynchronization",
Identifier = "voyager2_model",
Version = 1
})
local kernels = asset.syncedResource({
Name = "Voyager 2 Kernels",
Type = "HttpSynchronization",
@@ -83,11 +76,7 @@ local Voyager2Main = {
Parent = Voyager2.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/voyager-main.obj",
ColorTexture = models .. "/voyager-main.jpg"
}},
GeometryFile = models .. "/voyager-main.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},
@@ -102,11 +91,7 @@ local Voyager2Antenna = {
Parent = Voyager2.Identifier,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/voyager-antenna.obj",
ColorTexture = models .. "/voyager-antenna.png"
}},
GeometryFile = models .. "/voyager-antenna.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
},

View File

@@ -20,8 +20,10 @@ local voyager1 = {
TimeStampSubsampleFactor = 1
},
GUI = {
Name = "Voyager 1",
Path = "/Solar System/Missions"
Name = "Voyager 1 Trail",
Path = "/Solar System/Missions/Voyager",
Description = [[Voyager 1 Trail, spanning September 6th, 1977 to December 31st,
2030. Data from JPL Horizons.]]
}
}
@@ -43,8 +45,10 @@ local voyager2 = {
TimeStampSubsampleFactor = 1
},
GUI = {
Name = "Voyager 2",
Path = "/Solar System/Missions"
Name = "Voyager 2 Trail",
Path = "/Solar System/Missions/Voyager",
Description = [[Voyager 2 Trail, spanning August 21st, 1977 to December 31st, 2030.
Data from JPL Horizons.]]
}
}
@@ -66,8 +70,10 @@ local pioneer10 = {
TimeStampSubsampleFactor = 1
},
GUI = {
Name = "Pioneer 10",
Path = "/Solar System/Missions"
Name = "Pioneer 10 Trail",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 10 Trail, spanning March 4th, 1972 to December 31st, 2030.
Data from JPL Horizons.]]
}
}
@@ -89,9 +95,24 @@ local pioneer11 ={
TimeStampSubsampleFactor = 1
},
GUI = {
Name = "Pioneer 11",
Path = "/Solar System/Missions"
Name = "Pioneer 11 Trail",
Path = "/Solar System/Missions/Pioneer",
Description = [[Pioneer 11 Trail, spanning April 7th, 1973 to December 31st, 2030.
Data from JPL Horizons.]]
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { voyager1, voyager2, pioneer10, pioneer11 })
asset.meta = {
Name = "Pioneer and Voyager Trails",
Version = "1.0",
Description = [[ Pioneer 10, Pioneer 11, Voyager 1 and Voyager 2 trails. Driven by JPL
Horizons data for better performance then spice but lower resolution. Data is from
shortly after mission launches until December 31st, 2030.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"Pioneer10", "Pioneer11", "Voyager1", "Voyager2"}
}

View File

@@ -8,6 +8,8 @@ asset.require('./jupiter/ganymede/default_layers')
asset.require('./jupiter/io/default_layers')
asset.require('./mars/default_layers')
asset.require('./mars/moons/layers/colorlayers/deimos_viking')
asset.require('./mars/moons/layers/colorlayers/phobos_viking')
asset.require('./mercury/default_layers')

View File

@@ -26,15 +26,15 @@ local Earth = {
Enable = false,
FileName = labelsPath .. "/Earth.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 41.0,
LabelsSize = 0.52,
LabelsFontSize = 40.0,
LabelsSize = 4.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
LabelsFadeOutEnabled = false,
FadeInStartingDistance = 50000.0,
FadeOutStartingDistance = 80000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 300000.0,
FadeOutStartingDistance = 10000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1500000.0,
LabelsColor = { 1.0, 0.0, 0.0 }

View File

@@ -1,6 +1,6 @@
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Water_Mask/default/2013-08-21/250m/${z}/${y}/${x}.png</ServerUrl>
<ServerUrl>https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_L3_Land_Water_Mask/default/2015-08-21/250m/${z}/${y}/${x}.png</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-180.0</UpperLeftX>

View File

@@ -43,8 +43,9 @@ local Moon = {
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
FadeOutStartingDistance = 100000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsColor = { 1.0, 1.0, 0.0 }

View File

@@ -59,153 +59,36 @@ local initializeAndAddNodes = function()
},
Renderable = {
Type = "RenderableModel",
Geometry = {
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/0.obj",
ColorTexture = models .. "/0.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/1.obj",
ColorTexture = models .. "/1.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/2.obj",
ColorTexture = models .. "/2.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/3.obj",
ColorTexture = models .. "/3.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/4.obj",
ColorTexture = models .. "/4.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/5.obj",
ColorTexture = models .. "/5.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/6.obj",
ColorTexture = models .. "/6.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/7.obj",
ColorTexture = models .. "/7.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/8.obj",
ColorTexture = models .. "/8.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/10.obj",
ColorTexture = models .. "/10.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/11.obj",
ColorTexture = models .. "/11.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/13.obj",
ColorTexture = models .. "/13.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/14.obj",
ColorTexture = models .. "/14.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/15.obj",
ColorTexture = models .. "/15.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/16.obj",
ColorTexture = models .. "/16.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/17.obj",
ColorTexture = models .. "/17.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/19.obj",
ColorTexture = models .. "/19.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/21.obj",
ColorTexture = models .. "/21.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/22.obj",
ColorTexture = models .. "/22.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/23.obj",
ColorTexture = models .. "/23.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/24.obj",
ColorTexture = models .. "/24.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/25.obj",
ColorTexture = models .. "/25.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/foilsilver.obj",
ColorTexture = models .. "/foilsilver.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/olive.obj",
ColorTexture = models .. "/olive.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/basemetal.obj",
ColorTexture = models .. "/basemetal.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/white_20.obj",
ColorTexture = models .. "/white_20.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/plasticblack.obj",
ColorTexture = models .. "/plasticblack.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/ecostresswhite.obj",
ColorTexture = models .. "/ecostresswhite.png"
},
{
Type = "MultiModelGeometry",
GeometryFile = models .. "/plain.obj",
ColorTexture = models .. "/plain.png"
},
GeometryFile = {
models .. "/0.obj",
models .. "/1.obj",
models .. "/2.obj",
models .. "/3.obj",
models .. "/4.obj",
models .. "/5.obj",
models .. "/6.obj",
models .. "/7.obj",
models .. "/8.obj",
models .. "/10.obj",
models .. "/11.obj",
models .. "/13.obj",
models .. "/14.obj",
models .. "/15.obj",
models .. "/16.obj",
models .. "/17.obj",
models .. "/19.obj",
models .. "/21.obj",
models .. "/22.obj",
models .. "/23.obj",
models .. "/24.obj",
models .. "/25.obj",
models .. "/foilsilver.obj",
models .. "/olive.obj",
models .. "/basemetal.obj",
models .. "/white_20.obj",
models .. "/plasticblack.obj",
models .. "/ecostresswhite.obj",
models .. "/plain.obj"
},
LightSources = {
{

View File

@@ -37,8 +37,9 @@ local Callisto = {
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 15000000.0,
FadeOutStartingDistance = 1000000.0,
FadeOutStartingDistance = 5000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsColor = { 1.0, 1.0, 0.0 }

View File

@@ -32,15 +32,16 @@ local Europa = {
FileName = labelsPath .. "/europa.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 40.0,
LabelsSize = 10.5,
LabelsSize = 10.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 15000000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 8000000.0,
FadeOutStartingDistance = 5000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 700000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -37,10 +37,11 @@ local Ganymede = {
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 15000000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 8000000.0,
FadeOutStartingDistance = 2250000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 1750000.0,
LabelsColor = {1.0, 1.0, 0.0}
}
},

View File

@@ -32,15 +32,16 @@ local Io = {
FileName = labelsPath .. "/io.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 40.0,
LabelsSize = 10.5,
LabelsSize = 10.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 15000000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 8500000.0,
FadeOutStartingDistance = 4000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 1000000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -4,7 +4,7 @@ local globeIdentifier = asset.require("./../../mars").Mars.Identifier
local layer = {
Identifier = "HiRISE-LS-DEM",
Name = "HiRISE Local Set DEM",
FilePath = mapServiceConfigs .. "/ESRI/HiRISE/HiRISE_DEM.wms",
FilePath = mapServiceConfigs .. "/ESRI/HiRISE/HiRISE_DEM.dem",
Description = [[ HiRISE (High Resolution Imaging Science Experiment) is the most
powerful camera ever sent to another planet, one of six instruments onboard the
Mars Reconnaissance Orbiter. We launched in 2005, arrived at Mars in 2006 and have

View File

@@ -1,6 +1,6 @@
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x}</ServerUrl>
<ServerUrl>http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/raw/tile/${z}/${y}/${x}</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-180</UpperLeftX> <UpperLeftY>90</UpperLeftY>
@@ -11,7 +11,7 @@
<Projection>GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]]</Projection>
<BlockSizeX>512</BlockSizeX> <BlockSizeY>512</BlockSizeY>
<BandsCount>1</BandsCount> <DataType>Int16</DataType>
<DataValues NoData="-32768" Min="-8528" Max="21226"/>
<DataValues NoData="0" Min="-8528" Max="21226"/>
<MaxConnections>5</MaxConnections>
<ZeroBlockHttpCodes>404,400</ZeroBlockHttpCodes>
</GDAL_WMS>

View File

@@ -1,17 +0,0 @@
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x}</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-180</UpperLeftX> <UpperLeftY>90</UpperLeftY>
<LowerRightX>180</LowerRightX> <LowerRightY>-90</LowerRightY>
<SizeX>20971520</SizeX> <SizeY>10485760</SizeY>
<TileLevel>15</TileLevel> <YOrigin>top</YOrigin>
</DataWindow>
<Projection>GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]]</Projection>
<BlockSizeX>512</BlockSizeX> <BlockSizeY>512</BlockSizeY>
<BandsCount>1</BandsCount> <DataType>Int16</DataType>
<DataValues NoData="0" Min="-10000" Max="10000"></DataValues>
<MaxConnections>5</MaxConnections>
<ZeroBlockHttpCodes>404,400</ZeroBlockHttpCodes>
</GDAL_WMS>

View File

@@ -27,15 +27,16 @@ local Mars = {
FileName = labelsPath .. "/mars.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsSize = 8.0,
LabelsSize = 9.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 2000000.0,
FadeOutStartingDistance = 750000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 2500000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -0,0 +1,29 @@
local globeIdentifier = asset.require("./../../deimos").Deimos.Identifier
local layer = {
Identifier = "Deimos_Global_Mosaic_USGS",
Name = "Deimos Global Mosaic [USGS]",
Enabled = true,
FilePath = "WMS:https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/maps/mars/deimos_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Deimos_Simple_Cylindrical_Rasters&SRS=EPSG:4326&BBOX=-180,-90,360,90",
Description = [[ This Viking-based cylindrical map of Deimos was created by Philip
Stooke with the assistance of Chris Jongkind and Megan Arntz. Control is based on a
shape model and mosaic by Peter Thomas and colleagues at Cornell University. Date
released 26 October 2001. (Description from URL)]]
}
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.export("layer", layer)
asset.meta = {
Name = "Deimos Global Mosaic [USGS]",
Version = "1.0",
Author = "Philip Stooke/NASA",
URL = "https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html",
License = "NASA/PDS",
Identifiers = {'Deimos_Global_Mosaic_USGS'}
}

View File

@@ -0,0 +1,26 @@
local globeIdentifier = asset.require("./../../phobos").Phobos.Identifier
local layer = {
Identifier = "Phobos_Global_Shaded_Relief_USGS",
Name = "Phobos Global Shaded Relief [USGS]",
Enabled = true,
FilePath = "WMS:https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/maps/mars/phobos_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Phobos_Simple_Cylindrical_Rasters&SRS=EPSG:4326&BBOX=-180,-90,360,90",
Description = [[ Viking-base Phobos shaded relief created by USGS.]]
}
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.export("layer", layer)
asset.meta = {
Name = "Phobos Global Shaded Relief [USGS]",
Version = "1.0",
Author = "USGS/NASA",
URL = "https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html",
License = "NASA/PDS",
Identifiers = {'Phobos_Global_Shaded_Relief_USGS'}
}

View File

@@ -27,13 +27,15 @@ local Mercury = {
Enable = false,
FileName = labelsPath .. "/Mercury.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 40.0,
LabelsFontSize = 22.0,
LabelsSize = 10.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
FadeInStartingDistance = 40000000.0,
FadeOutStartingDistance = 80000.0,
LabelsFadeInEnabled = true,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 5000000.0,
FadeOutStartingDistance = 1800000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1500000.0,
LabelsColor = { 1.0, 1.0, 0.0 }

View File

@@ -14,6 +14,8 @@ asset.require('./earth/moon/trail')
asset.require('./mars/mars')
asset.require('./mars/atmosphere')
asset.require('./mars/moons/phobos')
asset.require('./mars/moons/deimos')
asset.require('./jupiter/jupiter')
asset.require('./jupiter/major_moons')

View File

@@ -29,16 +29,17 @@ local Dione = {
Enable = false,
FileName = labelsPath .. "/dione.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 32.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 3500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 200000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -29,16 +29,17 @@ local Enceladus = {
Enable = false,
FileName = labelsPath .. "/enceladus.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 22.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 1000000.0,
FadeOutStartingDistance = 500000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 100000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -29,16 +29,17 @@ local Iapetus = {
Enable = false,
FileName = labelsPath .. "/iapetus.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 30.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 3500000.0,
FadeOutStartingDistance = 600000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 250000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -35,10 +35,11 @@ local Mimas = {
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 1000000.0,
FadeOutStartingDistance = 400000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 25000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -29,16 +29,17 @@ local Rhea = {
Enable = false,
FileName = labelsPath .. "/rhea.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 40.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 2500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 250000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -21,7 +21,19 @@ local Saturn = {
SegmentsPerPatch = 64,
Layers = {},
Rings = {
Texture = texturesPath .. "/saturn_rings.png",
-- Single Texture Values:
--Texture = texturesPath .. "/saturn_rings.png",
--ColorFilter = 0.15,
-- MultiTexture Valeus:
TextureFwrd = texturesPath .. "/forward_original_single.png",
TextureBckwrd = texturesPath .. "/back_original_single.png",
TextureUnlit = texturesPath .. "/unlit_original_single.png",
TextureColor = texturesPath .. "/color_original_single.png",
TextureTransparency = texturesPath .. "/trans_original_single.png",
ColorFilter = 0.8,
NightFactor = 1.0,
Size = 140445000,
Offset = { 74500 / 140445.100671159, 1.0 }, -- min / max extend
},

View File

@@ -2,6 +2,6 @@ local TexturesPath = asset.syncedResource({
Type = "HttpSynchronization",
Name = "Saturn textures",
Identifier = "saturn_textures",
Version = 3
Version = 4
})
asset.export("TexturesPath", TexturesPath)

View File

@@ -29,16 +29,17 @@ local Tethys = {
Enable = false,
FileName = labelsPath .. "/tethys.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsFontSize = 24.0,
LabelsSize = 8.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 1500000.0,
FadeOutStartingDistance = 500000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsDistanceEPS = 200000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -30,13 +30,14 @@ local Titan = {
FileName = labelsPath .. "/titan.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 14.0,
LabelsSize = 8.0,
LabelsSize = 10.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 7500000.0,
FadeOutStartingDistance = 6000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 1350000.0,
LabelsColor = { 1.0, 1.0, 0.0 }

View File

@@ -30,15 +30,17 @@ local Venus = {
FileName = labelsPath .. "/venus.labels",
LabelAlignmentOption = "Horizontally", -- or Circularly
LabelsFontSize = 40.0,
LabelsSize = 12.0,
LabelsSize = 10.0,
LabelsMinSize = 1.0,
LabelsMaxSize = 1500.0,
ProximityEnabled = false,
LabelsFadeInEnabled = true,
FadeInStartingDistance = 500000.0,
FadeOutStartingDistance = 1000000.0,
LabelsFadeInEnabled = true,
LabelsFadeOutEnabled = true,
FadeInStartingDistance = 7000000.0,
FadeOutStartingDistance = 2000000.0,
LabelsForceDomeRendering = true,
LabelsDistanceEPS = 3500000.0,
LabelsDistanceEPS = 4000000.0,
LabelsColor = { 1.0, 1.0, 0.0 }
}
},

View File

@@ -0,0 +1,35 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("./transforms")
local textures = asset.require('scene/milkyway/habitable_zones/habitable_zone_textures').TexturesPath
local HabitableZone = {
Identifier = "SunHabitableZone",
Parent = transforms.SunECLIPJ2000.Identifier,
Renderable = {
Type = "RenderableHabitableZone",
Enabled = false,
Texture = textures .. "/hot_to_cold_faded.png",
EffectiveTemperature = 5780, -- Kelvin
Luminosity = 1, -- solar
Opacity = 0.1,
Optimistic = true
},
GUI = {
Name = "Sun Habitable Zone",
Path = "/Solar System/Sun",
Description = "Habitable zone for the sun in our solar system."
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { HabitableZone })
asset.meta = {
Name = "Sun Habitable Zone",
Version = "1.0",
Description = [[ The habitable zone around our sun, computed using formula and
coefficients by Kopparapu et al. (2015) https://arxiv.org/abs/1404.5292]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"SunHabitableZone"}
}

View File

@@ -165,11 +165,7 @@ local createModelPart = function (parent, sunLightSourceNode, models, geometry,
Parent = parent,
Renderable = {
Type = "RenderableModel",
Geometry = {{
Type = "MultiModelGeometry",
GeometryFile = models .. "/" .. geometry .. ".obj",
ColorTexture = models .. "/" .. texture
}},
GeometryFile = models .. "/" .. geometry .. ".obj",
LightSources = lightSources,
PerformShading = performShading,
DisableFaceCulling = true

View File

@@ -41,7 +41,7 @@ local addGrid = function (specification)
Type = "RenderableSphericalGrid",
Enabled = true,
LineWidth = 2.0,
GridColor = color
Color = color
},
GUI = {
Name = name,

View File

@@ -36,7 +36,7 @@ local getBookmarks = function (guiPath, bookmarkfile)
Type = 'RenderableSphericalGrid',
Enabled = false,
Opacity = 0.3,
GridColor = { 0.3, 0.84, 1.0},
Color = { 0.3, 0.84, 1.0},
LineWidth = linewidth
},
GUI = {

View File

@@ -85,7 +85,9 @@ function satellites(title, file, color, group)
SegmentQuality = 3,
Color = color,
Fade = 1.5,
RenderBinMode = "PostDeferredTransparent"
RenderBinMode = "PostDeferredTransparent",
StartRenderIdx = group.StartRenderIdx,
RenderSize = group.RenderSize
},
Tag = { "earth_satellites" },
GUI = {

View File

@@ -39,7 +39,7 @@
"is_local": false,
"key": "I",
"name": "Setup scene for insight EDL",
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
},
{
"documentation": "Disable Mars layer settings used for insight EDL",
@@ -47,7 +47,7 @@
"is_local": false,
"key": "SHIFT+I",
"name": "Unset Insight Landing",
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', false);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', false);"
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', false);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', false);"
},
{
"documentation": "Sets time and layers for Perseverance landing",
@@ -55,7 +55,7 @@
"is_local": false,
"key": "P",
"name": "Setup and Goto Perseverance",
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
"script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});"
}
],
"mark_nodes": [
@@ -77,6 +77,6 @@
},
"version": {
"major": 1,
"minor": 0
"minor": 1
}
}

View File

@@ -42,7 +42,7 @@
"is_local": false,
"key": "A",
"name": "Focus on New Horizons",
"script": "\"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);"
"script": "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);"
},
{
"documentation": "Anchor at New Horizons, Aim at Pluto",
@@ -194,7 +194,7 @@
"is_local": false,
"key": "SHIFT+T",
"name": "Toggle Shadows",
"script": "openspace.setPropertyValueSingle('Scene.PlutoShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.PlutoShadow.Renderable.Enabled'));"
"script": "openspace.setPropertyValueSingle('Scene.PlutoShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.PlutoShadow.Renderable.Enabled'));openspace.setPropertyValueSingle('Scene.CharonShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.CharonShadow.Renderable.Enabled'));"
},
{
"documentation": "Toggles the trail of New Horizons",
@@ -243,4 +243,4 @@
"major": 1,
"minor": 0
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -66,6 +66,8 @@ struct TestResult {
std::string offender;
/// The Reason that caused this offense
Reason reason;
/// An optional explanation for when a verification fails
std::string explanation;
};
/**
@@ -79,7 +81,7 @@ struct TestResult {
* The reason for the warning
*/
enum class Reason {
Deprecated ///< The value is marked as deprecated and should not used
Deprecated ///< The value is marked as deprecated and should not used
};
/// The offending key that caused the Warning. In the case of a nested table,
@@ -323,4 +325,11 @@ std::string to_string(const openspace::documentation::TestResult::Warning::Reaso
} // namespace ghoul
// The verifier header depends on the classes defined in here, but we want to make it
// easier for consumers of this header to just have access to all verifiers without
// needing to include this file separately. Particularly with the use of the codegen, it
// might lead to some unexcepted error messages about recognized identifiers in the
// generated code which look scary
#include <openspace/documentation/verifier.h>
#endif // __OPENSPACE_CORE___DOCUMENTATION___H__

View File

@@ -158,6 +158,28 @@ struct StringVerifier : public TemplateVerifier<std::string> {
std::string type() const override;
};
/**
* A Verifier that checks whether a given key inside a ghoul::Dictionary is a string and
* refers to an existing file on disk.
*/
struct FileVerifier : public StringVerifier {
TestResult operator()(const ghoul::Dictionary& dict,
const std::string& key) const override;
std::string type() const override;
};
/**
* A Verifier that checks whether a given key inside a ghoul::Dictionary is a string and
* refers to an existing directory on disk.
*/
struct DirectoryVerifier : public StringVerifier {
TestResult operator()(const ghoul::Dictionary& dict,
const std::string& key) const override;
std::string type() const override;
};
/**
* A Verifier that checks whether a given key inside a ghoul::Dictionary is another
* ghoul::Dictionary. The constructor takes a list of DocumentationEntry%s, which are used
@@ -243,39 +265,48 @@ struct IntListVerifier : public TableVerifier {
*/
struct VectorVerifier {};
/**
* This Verifier checks whether the value is of type <code>glm::tvec2<T></code>
*/
/// This Verifier checks whether the value is of type <code>glm::tvec2<T></code>
template <typename T>
struct Vector2Verifier : public TemplateVerifier<glm::tvec2<T>>, public VectorVerifier {
std::string type() const override;
};
/**
* This Verifier checks whether the value is of type <code>glm::tvec3<T></code>
*/
/// This Verifier checks whether the value is of type <code>glm::tvec3<T></code>
template <typename T>
struct Vector3Verifier : public TemplateVerifier<glm::tvec3<T>>, public VectorVerifier {
std::string type() const override;
};
/**
* This Verifier checks whether the value is of type <code>glm::tvec4<T></code>
*/
/// This Verifier checks whether the value is of type <code>glm::tvec4<T></code>
template <typename T>
struct Vector4Verifier : public TemplateVerifier<glm::tvec4<T>>, public VectorVerifier {
std::string type() const override;
};
struct Color3Verifier : public Vector3Verifier<double> {
TestResult operator()(const ghoul::Dictionary& dictionary,
const std::string& key) const override;
std::string type() const override;
};
struct Color4Verifier : public Vector4Verifier<double> {
TestResult operator()(const ghoul::Dictionary& dictionary,
const std::string& key) const override;
std::string type() const override;
};
/**
* A Verifier that checks whether all values contained in a Table are of
* type <code>glm::tvec2<T></code>
*/
template <typename T>
struct Vector2ListVerifier : public TableVerifier {
Vector2ListVerifier(std::string elementDocumentation = "") : TableVerifier({
Vector2ListVerifier(std::string elementDocumentation = "")
: TableVerifier({
{ "*", new Vector2Verifier<T>, Optional::No, std::move(elementDocumentation) }
})
})
{}
std::string type() const override {
@@ -289,9 +320,10 @@ struct Vector2ListVerifier : public TableVerifier {
*/
template <typename T>
struct Vector3ListVerifier : public TableVerifier {
Vector3ListVerifier(std::string elementDocumentation = "") : TableVerifier({
{ "*", new Vector3Verifier<T>, Optional::No, std::move(elementDocumentation) }
})
Vector3ListVerifier(std::string elementDocumentation = "")
: TableVerifier({
{ "*", new Vector3Verifier<T>, Optional::No, std::move(elementDocumentation) }
})
{}
std::string type() const override {
@@ -305,15 +337,17 @@ struct Vector3ListVerifier : public TableVerifier {
*/
template <typename T>
struct Vector4ListVerifier : public TableVerifier {
Vector4ListVerifier(std::string elementDocumentation = "") : TableVerifier({
{ "*", new Vector4Verifier<T>, Optional::No, std::move(elementDocumentation) }
})
Vector4ListVerifier(std::string elementDocumentation = "")
: TableVerifier({
{ "*", new Vector4Verifier<T>, Optional::No, std::move(elementDocumentation) }
})
{}
std::string type() const override {
return "List of ints";
}
};
//----------------------------------------------------------------------------------------
// Matrix verifiers
//----------------------------------------------------------------------------------------
@@ -330,8 +364,7 @@ struct MatrixVerifier {};
* This Verifier checks whether the value is of type <code>glm::mat2x2<T></code>
*/
template <typename T>
struct Matrix2x2Verifier :
public TemplateVerifier<glm::tmat2x2<T>>, public MatrixVerifier
struct Matrix2x2Verifier : public TemplateVerifier<glm::tmat2x2<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -340,8 +373,8 @@ struct Matrix2x2Verifier :
* This Verifier checks whether the value is of type <code>glm::mat2x3<T></code>
*/
template <typename T>
struct Matrix2x3Verifier :
public TemplateVerifier<glm::tmat2x3<T>>, public MatrixVerifier {
struct Matrix2x3Verifier : public TemplateVerifier<glm::tmat2x3<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -349,8 +382,8 @@ struct Matrix2x3Verifier :
* This Verifier checks whether the value is of type <code>glm::mat2x4<T></code>
*/
template <typename T>
struct Matrix2x4Verifier :
public TemplateVerifier<glm::tmat2x4<T>>, public MatrixVerifier {
struct Matrix2x4Verifier : public TemplateVerifier<glm::tmat2x4<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -358,8 +391,8 @@ struct Matrix2x4Verifier :
* This Verifier checks whether the value is of type <code>glm::mat3x2<T></code>
*/
template <typename T>
struct Matrix3x2Verifier :
public TemplateVerifier<glm::tmat3x2<T>>, public MatrixVerifier {
struct Matrix3x2Verifier : public TemplateVerifier<glm::tmat3x2<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -367,8 +400,8 @@ struct Matrix3x2Verifier :
* This Verifier checks whether the value is of type <code>glm::mat3x3<T></code>
*/
template <typename T>
struct Matrix3x3Verifier :
public TemplateVerifier<glm::tmat3x3<T>>, public MatrixVerifier {
struct Matrix3x3Verifier : public TemplateVerifier<glm::tmat3x3<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -376,8 +409,8 @@ struct Matrix3x3Verifier :
* This Verifier checks whether the value is of type <code>glm::mat3x4<T></code>
*/
template <typename T>
struct Matrix3x4Verifier :
public TemplateVerifier<glm::tmat3x4<T>>, public MatrixVerifier {
struct Matrix3x4Verifier : public TemplateVerifier<glm::tmat3x4<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -385,8 +418,8 @@ struct Matrix3x4Verifier :
* This Verifier checks whether the value is of type <code>glm::mat4x2<T></code>
*/
template <typename T>
struct Matrix4x2Verifier :
public TemplateVerifier<glm::tmat4x2<T>>, public MatrixVerifier {
struct Matrix4x2Verifier : public TemplateVerifier<glm::tmat4x2<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -394,8 +427,8 @@ struct Matrix4x2Verifier :
* This Verifier checks whether the value is of type <code>glm::mat4x3<T></code>
*/
template <typename T>
struct Matrix4x3Verifier :
public TemplateVerifier<glm::tmat4x3<T>>, public MatrixVerifier {
struct Matrix4x3Verifier : public TemplateVerifier<glm::tmat4x3<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -403,8 +436,8 @@ struct Matrix4x3Verifier :
* This Verifier checks whether the value is of type <code>glm::mat4x4<T></code>
*/
template <typename T>
struct Matrix4x4Verifier :
public TemplateVerifier<glm::tmat4x4<T>>, public MatrixVerifier {
struct Matrix4x4Verifier : public TemplateVerifier<glm::tmat4x4<T>>, public MatrixVerifier
{
std::string type() const override;
};
@@ -465,18 +498,11 @@ struct OperatorVerifier : public T {
*/
template <typename T>
struct LessVerifier : public OperatorVerifier<T, std::less<typename T::Type>> {
static_assert(!std::is_base_of<BoolVerifier, T>::value, "T cannot be BoolVerifier");
static_assert(
!std::is_base_of<BoolVerifier, T>::value,
"T cannot be BoolVerifier"
);
static_assert(
!std::is_base_of<StringVerifier, T>::value,
"T cannot be StringVerifier"
);
static_assert(
!std::is_base_of<TableVerifier, T>::value,
"T cannot be TableVerifier"
!std::is_base_of<StringVerifier, T>::value, "T cannot be StringVerifier"
);
static_assert(!std::is_base_of<TableVerifier, T>::value, "T cannot be TableVerifier");
static_assert(
!std::is_base_of<VectorVerifier, T>::value,
"T cannot be VectorVerifier"
@@ -496,18 +522,12 @@ struct LessVerifier : public OperatorVerifier<T, std::less<typename T::Type>> {
*/
template <typename T>
struct LessEqualVerifier : public OperatorVerifier<T, std::less_equal<typename T::Type>> {
static_assert(
!std::is_base_of<BoolVerifier, T>::value,
"T cannot be BoolVerifier"
);
static_assert(!std::is_base_of<BoolVerifier, T>::value, "T cannot be BoolVerifier");
static_assert(
!std::is_base_of<StringVerifier, T>::value,
"T cannot be StringVerifier"
);
static_assert(
!std::is_base_of<TableVerifier, T>::value,
"T cannot be TableVerifier"
);
static_assert(!std::is_base_of<TableVerifier, T>::value, "T cannot be TableVerifier");
static_assert(
!std::is_base_of<VectorVerifier, T>::value,
"T cannot be VectorVerifier"
@@ -527,22 +547,16 @@ struct LessEqualVerifier : public OperatorVerifier<T, std::less_equal<typename T
*/
template <typename T>
struct GreaterVerifier : public OperatorVerifier<T, std::greater<typename T::Type>> {
static_assert(
!std::is_base_of<BoolVerifier, T>::value,
"T cannot be BoolVerifier"
);
static_assert(!std::is_base_of<BoolVerifier, T>::value, "T cannot be BoolVerifier");
static_assert(
!std::is_base_of<StringVerifier, T>::value,
"T cannot be StringVerifier"
);
static_assert(
!std::is_base_of<TableVerifier, T>::value,
"T cannot be TableVerifier"
);
);
static_assert(!std::is_base_of<TableVerifier, T>::value, "T cannot be TableVerifier");
static_assert(
!std::is_base_of<VectorVerifier, T>::value,
"T cannot be VectorVerifier"
);
);
using OperatorVerifier<T, std::greater<typename T::Type>>::OperatorVerifier;
@@ -560,18 +574,12 @@ template <typename T>
struct GreaterEqualVerifier : public OperatorVerifier<T,
std::greater_equal<typename T::Type>>
{
static_assert(
!std::is_base_of<BoolVerifier, T>::value,
"T cannot be BoolVerifier"
);
static_assert(!std::is_base_of<BoolVerifier, T>::value, "T cannot be BoolVerifier");
static_assert(
!std::is_base_of<StringVerifier, T>::value,
"T cannot be StringVerifier"
);
static_assert(
!std::is_base_of<TableVerifier, T>::value,
"T cannot be TableVerifier"
);
static_assert(!std::is_base_of<TableVerifier, T>::value, "T cannot be TableVerifier");
static_assert(
!std::is_base_of<VectorVerifier, T>::value,
"T cannot be VectorVerifier"

View File

@@ -29,6 +29,18 @@
namespace openspace::documentation {
template <>
TestResult TemplateVerifier<glm::ivec2>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const;
template <>
TestResult TemplateVerifier<glm::ivec3>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const;
template <>
TestResult TemplateVerifier<glm::ivec4>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const;
template <typename T>
TestResult TemplateVerifier<T>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const
@@ -122,7 +134,22 @@ TestResult OperatorVerifier<T, Operator>::operator()(const ghoul::Dictionary& di
{
TestResult res = T::operator()(dict, key);
if (res.success) {
if (Operator()(dict.value<typename T::Type>(key), value)) {
typename T::Type val;
if constexpr (std::is_same_v<typename T::Type, int>) {
const double d = dict.value<double>(key);
double intPart;
bool isInt = modf(d, &intPart) == 0.0;
if (isInt) {
val = static_cast<int>(d);
}
else {
return { false, { { key, TestResult::Offense::Reason::WrongType } }, {} };
}
}
else {
val = dict.value<typename T::Type>(key);
}
if (Operator()(val, value)) {
return { true, {}, {} };
}
else {
@@ -270,7 +297,21 @@ TestResult InRangeVerifier<T>::operator()(const ghoul::Dictionary& dict,
{
TestResult res = T::operator()(dict, key);
if (res.success) {
typename T::Type val = dict.value<typename T::Type>(key);
typename T::Type val;
if constexpr (std::is_same_v<typename T::Type, int>) {
const double d = dict.value<double>(key);
double intPart;
bool isInt = modf(d, &intPart) == 0.0;
if (isInt) {
val = static_cast<int>(d);
}
else {
return { false, { { key, TestResult::Offense::Reason::WrongType } }, {} };
}
}
else {
val = dict.value<typename T::Type>(key);
}
if (val >= lower && val <= upper) {
return { true, {}, {} };
@@ -303,7 +344,21 @@ TestResult NotInRangeVerifier<T>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const {
TestResult res = T::operator()(dict, key);
if (res.success) {
typename T::Type val = dict.value<typename T::Type>(key);
typename T::Type val;
if constexpr (std::is_same_v<typename T::Type, int>) {
const double d = dict.value<double>(key);
double intPart;
bool isInt = modf(d, &intPart) == 0.0;
if (isInt) {
val = static_cast<int>(d);
}
else {
return { false, { { key, TestResult::Offense::Reason::WrongType } }, {} };
}
}
else {
val = dict.value<typename T::Type>(key);
}
if (val >= lower && val <= upper) {
return { false, { { key, TestResult::Offense::Reason::Verification } }, {} };

View File

@@ -86,6 +86,7 @@ public:
void touchDetectionCallback(TouchInput input);
void touchUpdateCallback(TouchInput input);
void touchExitCallback(TouchInput input);
void handleDragDrop(const std::string& file);
std::vector<std::byte> encode();
void decode(std::vector<std::byte> data);
@@ -98,6 +99,7 @@ public:
void writeSceneDocumentation();
void writeStaticDocumentation();
void createUserDirectoriesIfNecessary();
/**
* Returns the Lua library that contains all Lua functions available to affect the
@@ -139,4 +141,11 @@ private:
} // namespace openspace
// Lua functions - exposed for testing
namespace openspace::luascriptfunctions {
int createSingeColorImage(lua_State* L);
} // openspace::luascriptfunctions
#endif // __OPENSPACE_CORE___OPENSPACEENGINE___H__

View File

@@ -294,7 +294,6 @@ public:
// Generate JSON for documentation
std::string generateJson() const override;
protected:
/// The unique identifier of this PropertyOwner
std::string _identifier;

View File

@@ -61,7 +61,7 @@ public:
};
static ghoul::mm_unique_ptr<Renderable> createFromDictionary(
const ghoul::Dictionary& dictionary);
ghoul::Dictionary dictionary);
Renderable(const ghoul::Dictionary& dictionary);
virtual ~Renderable() = default;

View File

@@ -0,0 +1,72 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2021 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___TEXTURECOMPONENT___H__
#define __OPENSPACE_CORE___TEXTURECOMPONENT___H__
#include <ghoul/opengl/texture.h>
namespace ghoul::filesystem { class File; }
namespace ghoul::opengl {class Texture; }
namespace openspace {
class TextureComponent {
public:
using Texture = ghoul::opengl::Texture;
const Texture* texture() const;
Texture* texture();
void setFilterMode(Texture::FilterMode filterMode);
void setWrapping(Texture::WrappingMode wrapping);
void setShouldWatchFileForChanges(bool value);
void setShouldPurgeFromRAM(bool value);
void bind();
void uploadToGpu();
// Loads a texture from a file on disk
void loadFromFile(const std::string& path);
// Function to call in a renderable's update function to make sure
// the texture is kept up to date
void update();
private:
std::unique_ptr<ghoul::filesystem::File> _textureFile;
std::unique_ptr<Texture> _texture;
Texture::FilterMode _filterMode = Texture::FilterMode::LinearMipMap;
Texture::WrappingMode _wrappingMode = Texture::WrappingMode::Repeat;
bool _shouldWatchFile = true;
bool _shouldPurgeFromRAM = true;
bool _fileIsDirty = false;
bool _textureIsDirty = false;
};
} // namespace openspace
#endif // __OPENSPACE_CORE___TEXTURECOMPONENT___H__

Some files were not shown because too many files have changed in this diff Show More