Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
d6dd1575
Commit
d6dd1575
authored
3 years ago
by
Alexander Bock
Browse files
Options
Download
Email Patches
Plain Diff
Adapt the ImGui GIBS panel to the new tileprovider format (closes #2108)
parent
6189985e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/base/rendering/screenspacedashboard_lua.inl
+1
-1
modules/base/rendering/screenspacedashboard_lua.inl
modules/imgui/src/guigibscomponent.cpp
+28
-7
modules/imgui/src/guigibscomponent.cpp
with
29 additions
and
8 deletions
+29
-8
modules/base/rendering/screenspacedashboard_lua.inl
+
1
-
1
View file @
d6dd1575
...
...
@@ -24,7 +24,7 @@
namespace {
//Adds a new dashboard item to an existing SceenSpaceDashboard.
//
Adds a new dashboard item to an existing SceenSpaceDashboard.
[[codegen::luawrap]] void addDashboardItemToScreenSpace(std::string identifier,
ghoul::Dictionary dashboard)
{
...
...
This diff is collapsed.
Click to expand it.
modules/imgui/src/guigibscomponent.cpp
+
28
-
7
View file @
d6dd1575
...
...
@@ -104,6 +104,7 @@ void GuiGIBSComponent::render() {
ImGui
::
InputText
(
"Image Format"
,
ImageFormatBuffer
.
data
(),
ImageFormatBuffer
.
size
());
if
(
ImGui
::
Button
(
"Add Layer"
))
{
// Extract values from the ImGui fields
std
::
string
layer
=
std
::
string
(
LayerBuffer
.
data
());
std
::
string
startDate
=
std
::
string
(
StartDateBuffer
.
data
());
std
::
string
endDate
=
std
::
string
(
EndDateBuffer
.
data
());
...
...
@@ -112,17 +113,37 @@ void GuiGIBSComponent::render() {
std
::
string
imageRes
=
std
::
string
(
ImageResolutionBuffer
.
data
());
std
::
string
imageFormat
=
std
::
string
(
ImageFormatBuffer
.
data
());
// Construct the components of the Lua function
std
::
string
xmlFunc
=
fmt
::
format
(
"openspace.globebrowsing.createTemporalGibsGdalXml("
"'{}', '{}', '{}', '{}', '{}', '{}', '{}')"
,
layer
,
startDate
,
endDate
,
temporalRes
,
imageRes
,
imageFormat
,
temporalFormat
"openspace.globebrowsing.createTemporalGibsGdalXml('{}', '{}', '{}')"
,
layer
,
imageRes
,
imageFormat
);
if
(
startDate
==
"Present"
)
{
startDate
.
clear
();
}
std
::
string
layerScript
=
fmt
::
format
(
"{{"
" Identifier = '{}',"
" Type = 'TemporalTileLayer',"
" Enabled = true,"
" Mode = 'Prototyped',"
" Prototyped = {{"
" Time = {{"
" Start = '{}',"
" End = '{}'"
" }},"
" TemporalResolution = '{}',"
" TimeFormat = '{}',"
" Prototype = {}"
" }}"
"}}"
,
layer
,
startDate
,
endDate
,
temporalRes
,
temporalFormat
,
xmlFunc
);
std
::
string
script
=
fmt
::
format
(
"openspace.globebrowsing.addLayer('Earth', 'ColorLayers', {{ "
"Identifier = '{}', Enabled = true, Type = 'TemporalTileLayer', "
"FilePath = {} }})"
,
layer
,
xmlFunc
"openspace.globebrowsing.addLayer('Earth', 'ColorLayers', {})"
,
layerScript
);
global
::
scriptEngine
->
queueScript
(
script
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help