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
dd32a812
Commit
dd32a812
authored
8 years ago
by
Alexander Bock
Browse files
Options
Download
Email Patches
Plain Diff
Change tabs to spaces
parent
87aa34f8
master
content/2012EventProfile
elumenati/spout-implementation
elumenati/spoutImplementation
feature/2012Fieldlines
feature/DSGWrapper
feature/WSA
feature/apollo-missions
feature/arrow-renderable
feature/asset-helper
feature/asset-meta-update-part2
feature/asset-require
feature/atmosphere-stars-rendering
feature/bufferTransferTestings
feature/camera-control-during-path
feature/camera-path-stability
feature/cef-update
feature/change-renderbin-runtime
feature/cmake
feature/codegen-lua
feature/codegen-lua-jenkins
feature/compile-times
feature/direction-hint-renderable
feature/downscaledATM
feature/du-meshes-selection
feature/fieldlines
feature/gamma-correction
feature/geojson
feature/geojson-renderable
feature/getting-started-tour
feature/grid-labels
feature/grids-update
feature/gui-mouseinteraction-fix
feature/horizons-framework
feature/horizons-unit-tests
feature/idle-behavior-updates
feature/imageTestKeys2Actions
feature/jenkins-codegen
feature/jenkins-fix
feature/jenkins-timeout
feature/juice
feature/jwst-pointing
feature/jwst-trail-update
feature/jwst-update
feature/labels-rendering
feature/location-measure
feature/macos
feature/mars-moons
feature/mas-model
feature/missions
feature/model-opacity
feature/molecule_rendering
feature/mollwide-projection
feature/multiple-endpoints
feature/multiresvolume
feature/orientation-check
feature/paper-atmosphere
feature/properties-visibility
feature/renderable-enabled-event
feature/rover-visualization
feature/roverterrain
feature/roverterrain-mergefix
feature/satellites
feature/saturn-shepherd-moons
feature/science-on-the-sphere
feature/sgct-framebuffer-fixes
feature/sgct-gui
feature/sgct-gui-editable
feature/sgct-gui-jenkins
feature/sgct-json
feature/sgct-ui
feature/side-by-side-removal
feature/skybrowser
feature/skybrowser-cleanup
feature/skybrowser-drag-and-drop
feature/skybrowser-reload
feature/solarbrowsing
feature/spacecraft-instruments
feature/spaceweather-stream
feature/spice-update
feature/state-with-time
feature/tileprovider-minlevel
feature/tileproviders
feature/tle-bodymass
feature/touchEventListener
feature/transparency-rendering-last
feature/ubuntu2204
feature/unit-tests
feature/updateTSP
feature/userproperties
feature/various-changes
feature/video-on-globe
feature/visual-testing
feature/visual-testing-try2
feature/volume-fixes
feature/warnings
feature/wormhole
feature/xbox-update
hotfix/scaling
integration/atm-paper-fixes-2
integration/moon-mars-show
integration/paper-atmosphere
issue/1043
issue/1161
issue/1279
issue/1366-2
issue/1479
issue/1559
issue/1607
issue/1666
issue/1707
issue/1751
issue/1814
issue/1827
issue/1842
issue/1845
issue/1851
issue/1905
issue/1908
issue/1910
issue/1911
issue/1964
issue/1989
issue/1995
issue/2029
issue/2055
issue/2093
issue/2111
issue/2118
issue/2121
issue/2127
issue/2133
issue/2137
issue/2194
issue/2207
issue/2209
issue/2212
issue/2236
issue/2259
issue/2261
issue/2266
issue/2269
issue/843
issue/888
issue/hdrModels
jenkins/1
jenkins/2
jenkins/2286
jenkins/utah-test-1
project/2021-wisdome-installation
project/climate
project/exoplanet-explorer
project/exoplanets-expert-tool
project/lights-2020-installation
project/spaceship-installation
project/spvl
rc/0.18.1
temp/skybrowser-animation-fixes-merge
thesis/2017/mars-rover-visualization
thesis/2018/data-loader
thesis/2018/dsn
thesis/2018/flightcontroller
thesis/2018/mas-model
thesis/2019/spaceDebris
thesis/2019/spaceweather-stream
thesis/2020/software-integration
thesis/2020/sonification
thesis/2021/airtraffic
thesis/2021/fieldlines
thesis/2021/multiuser-collab
thesis/2021/multiuser-collab3
thesis/2021/skybrowser
thesis/2022/climate
thesis/2022/cosmic-view
thesis/2022/fieldline-rendering
thesis/2022/remote-streaming
thesis/2022/software-integration
thesis/2022/software-integration_dod
thesis/2022/software-integration_receive-ra-dec
thesis/2022/software-integration_refactor-simp
thesis/2022/software-integration_velocity-support
thesis/2022/streaming
0
vislabs/release/2.1
research/dynamic-scene-graph
research/atmospheres
releases/v0.18.0
releases/v0.17.2
releases/v0.17.1
releases/v0.17.0
releases/v0.16.1
releases/v0.16.0
releases/v0.15.2
releases/v0.15.1
releases/v0.15.0
releases/v0.14.1
releases/v0.14.0
releases/v0.13.0
releases/v0.12.0
releases/v0.11.1
releases/v0.11.0
releases/v0.10.0
releases/v0.9.0
releases/v0.8.0
releases/prerelease/earth-day-2017
releases/prerelease/astronomylive-2017
releases/prerelease/astc-2017
releases/beta/beta-9
releases/beta/beta-8
releases/beta/beta-7
releases/beta/beta-5
releases/beta/beta-4_2
releases/beta/beta-4
releases/beta/beta-3
releases/beta/beta-2
releases/beta/beta-1_2
releases/beta/beta-1
rc/ccmc-panelreview
dev/fc-port-change
beta/beta-4_2
beta/beta-4
beta/beta-3
beta/beta-2
beta/beta-1_2
beta/beta-1
No related merge requests found
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
include/openspace/util/distanceconstants.h
+4
-4
include/openspace/util/distanceconstants.h
modules/globebrowsing/cache/memoryawarecacheable.h
+9
-9
modules/globebrowsing/cache/memoryawarecacheable.h
modules/globebrowsing/cache/memoryawaretilecache.h
+1
-1
modules/globebrowsing/cache/memoryawaretilecache.h
modules/globebrowsing/rendering/chunkrenderer.cpp
+12
-12
modules/globebrowsing/rendering/chunkrenderer.cpp
modules/globebrowsing/rendering/layer/layerrendersettings.cpp
+11
-11
...les/globebrowsing/rendering/layer/layerrendersettings.cpp
modules/globebrowsing/rendering/layer/layerrendersettings.h
+1
-1
modules/globebrowsing/rendering/layer/layerrendersettings.h
modules/globebrowsing/tile/chunktile.h
+5
-5
modules/globebrowsing/tile/chunktile.h
modules/globebrowsing/tile/loadjob/tileloadjob.cpp
+2
-2
modules/globebrowsing/tile/loadjob/tileloadjob.cpp
modules/globebrowsing/tile/rawtiledatareader/rawtiledatareader.cpp
+2
-2
...lobebrowsing/tile/rawtiledatareader/rawtiledatareader.cpp
modules/globebrowsing/tile/tile.h
+38
-38
modules/globebrowsing/tile/tile.h
modules/globebrowsing/tile/tileprovider/cachingtileprovider.cpp
+1
-1
...s/globebrowsing/tile/tileprovider/cachingtileprovider.cpp
modules/globebrowsing/tile/tileprovider/projectiontileprovider.cpp
+1
-1
...lobebrowsing/tile/tileprovider/projectiontileprovider.cpp
modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp
+2
-2
...s/globebrowsing/tile/tileprovider/singleimageprovider.cpp
modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp
+4
-4
...ebrowsing/tile/tileprovider/sizereferencetileprovider.cpp
modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp
+14
-27
.../globebrowsing/tile/tileprovider/temporaltileprovider.cpp
modules/globebrowsing/tile/tileselector.h
+3
-3
modules/globebrowsing/tile/tileselector.h
modules/kameleonvolume/tasks/kameleondocumentationtask.cpp
+1
-1
modules/kameleonvolume/tasks/kameleondocumentationtask.cpp
src/rendering/renderable.cpp
+2
-2
src/rendering/renderable.cpp
src/rendering/screenspacerenderable.cpp
+2
-2
src/rendering/screenspacerenderable.cpp
with
115 additions
and
128 deletions
+115
-128
include/openspace/util/distanceconstants.h
+
4
-
4
View file @
dd32a812
...
...
@@ -28,10 +28,10 @@
namespace
openspace
{
namespace
distanceconstants
{
const
float
EarthRadius
=
6371
;
const
float
LightYear
=
9.4607304725808E15
;
const
float
AstronomicalUnit
=
1.495978707E11
;
const
float
Parsec
=
3.0856776E16
;
const
float
EarthRadius
=
6371
;
const
float
LightYear
=
9.4607304725808E15
;
const
float
AstronomicalUnit
=
1.495978707E11
;
const
float
Parsec
=
3.0856776E16
;
}
}
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/cache/memoryawarecacheable.h
+
9
-
9
View file @
dd32a812
...
...
@@ -38,17 +38,17 @@ namespace cache {
*/
class
MemoryAwareCacheable
{
public:
/**
* \param memoryImpact is the memory impact of the object. Can for example be given
* in kilobytes.
*/
MemoryAwareCacheable
(
size_t
memoryImpact
)
:
_memoryImpact
(
memoryImpact
)
{};
~
MemoryAwareCacheable
()
{};
/**
* \param memoryImpact is the memory impact of the object. Can for example be given
* in kilobytes.
*/
MemoryAwareCacheable
(
size_t
memoryImpact
)
:
_memoryImpact
(
memoryImpact
)
{};
~
MemoryAwareCacheable
()
{};
size_t
memoryImpact
()
{
return
_memoryImpact
;
};
size_t
memoryImpact
()
{
return
_memoryImpact
;
};
protected:
size_t
_memoryImpact
;
size_t
_memoryImpact
;
};
}
// namespace cache
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/cache/memoryawaretilecache.h
+
1
-
1
View file @
dd32a812
...
...
@@ -103,7 +103,7 @@ private:
static
MemoryAwareTileCache
*
_singleton
;
MemoryAwareLRUCache
<
ProviderTileKey
,
Tile
,
ProviderTileHasher
>
_tileCache
;
static
std
::
mutex
_mutexLock
;
static
std
::
mutex
_mutexLock
;
};
}
// namespace cache
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/rendering/chunkrenderer.cpp
+
12
-
12
View file @
dd32a812
...
...
@@ -107,18 +107,18 @@ ghoul::opengl::ProgramObject* ChunkRenderer::getActivatedProgramWithTileData(
std
::
to_string
(
debugProps
.
showHeightResolution
));
pairs
.
emplace_back
(
"showHeightIntensities"
,
std
::
to_string
(
debugProps
.
showHeightIntensities
));
pairs
.
emplace_back
(
"defaultHeight"
,
std
::
to_string
(
Chunk
::
DEFAULT_HEIGHT
));
pairs
.
emplace_back
(
"tilePaddingStart"
,
"ivec2("
+
std
::
to_string
(
RawTileDataReader
::
padding
.
start
.
x
)
+
","
+
std
::
to_string
(
RawTileDataReader
::
padding
.
start
.
y
)
+
")"
);
pairs
.
emplace_back
(
"tilePaddingSizeDiff"
,
"ivec2("
+
std
::
to_string
(
RawTileDataReader
::
padding
.
numPixels
.
x
)
+
","
+
std
::
to_string
(
RawTileDataReader
::
padding
.
numPixels
.
y
)
+
")"
);
pairs
.
emplace_back
(
"defaultHeight"
,
std
::
to_string
(
Chunk
::
DEFAULT_HEIGHT
));
pairs
.
emplace_back
(
"tilePaddingStart"
,
"ivec2("
+
std
::
to_string
(
RawTileDataReader
::
padding
.
start
.
x
)
+
","
+
std
::
to_string
(
RawTileDataReader
::
padding
.
start
.
y
)
+
")"
);
pairs
.
emplace_back
(
"tilePaddingSizeDiff"
,
"ivec2("
+
std
::
to_string
(
RawTileDataReader
::
padding
.
numPixels
.
x
)
+
","
+
std
::
to_string
(
RawTileDataReader
::
padding
.
numPixels
.
y
)
+
")"
);
// Now the shader program can be accessed
ghoul
::
opengl
::
ProgramObject
*
programObject
=
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/rendering/layer/layerrendersettings.cpp
+
11
-
11
View file @
dd32a812
...
...
@@ -39,23 +39,23 @@ LayerRenderSettings::LayerRenderSettings()
}
float
LayerRenderSettings
::
performLayerSettings
(
float
currentValue
)
const
{
float
newValue
=
currentValue
;
float
newValue
=
currentValue
;
newValue
=
glm
::
sign
(
newValue
)
*
glm
::
pow
(
glm
::
abs
(
newValue
),
gamma
);
newValue
=
newValue
*
multiplier
;
newValue
=
newValue
*
opacity
;
newValue
=
glm
::
sign
(
newValue
)
*
glm
::
pow
(
glm
::
abs
(
newValue
),
gamma
);
newValue
=
newValue
*
multiplier
;
newValue
=
newValue
*
opacity
;
return
newValue
;
return
newValue
;
}
glm
::
vec4
LayerRenderSettings
::
performLayerSettings
(
glm
::
vec4
currentValue
)
const
{
glm
::
vec4
newValue
=
glm
::
vec4
(
performLayerSettings
(
currentValue
.
r
),
performLayerSettings
(
currentValue
.
g
),
performLayerSettings
(
currentValue
.
b
),
performLayerSettings
(
currentValue
.
a
));
glm
::
vec4
newValue
=
glm
::
vec4
(
performLayerSettings
(
currentValue
.
r
),
performLayerSettings
(
currentValue
.
g
),
performLayerSettings
(
currentValue
.
b
),
performLayerSettings
(
currentValue
.
a
));
return
newValue
;
return
newValue
;
}
}
// namespace globebrowsing
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/rendering/layer/layerrendersettings.h
+
1
-
1
View file @
dd32a812
...
...
@@ -41,7 +41,7 @@ struct LayerRenderSettings : public properties::PropertyOwner {
/// This function matches the function with the same name in the
/// shader code
float
performLayerSettings
(
float
currentValue
)
const
;
/// This function matches the function with the same name in the
/// This function matches the function with the same name in the
/// shader code
glm
::
vec4
performLayerSettings
(
glm
::
vec4
currentValue
)
const
;
};
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/chunktile.h
+
5
-
5
View file @
dd32a812
...
...
@@ -34,11 +34,11 @@ namespace openspace {
namespace
globebrowsing
{
struct
ChunkTile
{
ChunkTile
()
:
tile
(
Tile
::
TileUnavailable
)
{};
ChunkTile
(
Tile
tile
,
TileUvTransform
uvTransform
,
TileDepthTransform
depthTransform
)
:
tile
(
tile
),
uvTransform
(
uvTransform
),
depthTransform
(
depthTransform
)
{};
ChunkTile
()
:
tile
(
Tile
::
TileUnavailable
)
{};
ChunkTile
(
Tile
tile
,
TileUvTransform
uvTransform
,
TileDepthTransform
depthTransform
)
:
tile
(
tile
),
uvTransform
(
uvTransform
),
depthTransform
(
depthTransform
)
{};
Tile
tile
;
TileUvTransform
uvTransform
;
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/loadjob/tileloadjob.cpp
+
2
-
2
View file @
dd32a812
...
...
@@ -31,8 +31,8 @@ namespace globebrowsing {
TileLoadJob
::
TileLoadJob
(
std
::
shared_ptr
<
RawTileDataReader
>
rawTileDataReader
,
const
TileIndex
&
tileIndex
)
:
_rawTileDataReader
(
rawTileDataReader
)
,
_chunkIndex
(
tileIndex
)
{}
:
_rawTileDataReader
(
rawTileDataReader
)
,
_chunkIndex
(
tileIndex
)
{}
void
TileLoadJob
::
execute
()
{
_rawTile
=
_rawTileDataReader
->
readTileData
(
_chunkIndex
);
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/rawtiledatareader/rawtiledatareader.cpp
+
2
-
2
View file @
dd32a812
...
...
@@ -132,9 +132,9 @@ TileDepthTransform RawTileDataReader::getDepthTransform() const {
std
::
array
<
double
,
6
>
RawTileDataReader
::
getGeoTransform
()
const
{
std
::
array
<
double
,
6
>
padfTransform
;
GeodeticPatch
globalCoverage
(
Geodetic2
(
0
,
0
),
Geodetic2
(
M_PI
/
2.0
,
M_PI
));
padfTransform
[
1
]
=
Angle
<
double
>::
fromRadians
(
padfTransform
[
1
]
=
Angle
<
double
>::
fromRadians
(
globalCoverage
.
size
().
lon
).
asDegrees
()
/
rasterXSize
();
padfTransform
[
5
]
=
-
Angle
<
double
>::
fromRadians
(
globalCoverage
.
size
().
lat
).
asDegrees
()
/
rasterYSize
();
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tile.h
+
38
-
38
View file @
dd32a812
...
...
@@ -51,42 +51,42 @@ public:
* Describe if this Tile is good for usage (OK) or otherwise
* the reason why it is not.
*/
enum
class
Status
{
/**
* E.g when texture data is not currently in memory.
* texture and tileMetaData are both null
*/
Unavailable
,
/**
* Can be set by <code>TileProvider</code>s if the requested
* <code>TileIndex</code> is undefined for that particular
* provider.
* texture and metaData are both null
*/
OutOfRange
,
/**
* An IO Error happend
* texture and metaData are both null
*/
IOError
,
/**
* The Texture is uploaded to the GPU and good for usage.
* texture is defined. metaData may be defined.
*/
OK
};
enum
class
Status
{
/**
* E.g when texture data is not currently in memory.
* texture and tileMetaData are both null
*/
Unavailable
,
/**
* Can be set by <code>TileProvider</code>s if the requested
* <code>TileIndex</code> is undefined for that particular
* provider.
* texture and metaData are both null
*/
OutOfRange
,
/**
* An IO Error happend
* texture and metaData are both null
*/
IOError
,
/**
* The Texture is uploaded to the GPU and good for usage.
* texture is defined. metaData may be defined.
*/
OK
};
Tile
(
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
texture
,
std
::
shared_ptr
<
TileMetaData
>
metaData
,
Status
status
);
~
Tile
()
=
default
;
std
::
shared_ptr
<
TileMetaData
>
metaData
()
const
{
return
_metaData
;
};
Status
status
()
const
{
return
_status
;
};
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
texture
()
const
{
return
_texture
;
};
std
::
shared_ptr
<
TileMetaData
>
metaData
()
const
{
return
_metaData
;
};
Status
status
()
const
{
return
_status
;
};
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
texture
()
const
{
return
_texture
;
};
/**
* Instantiates a new tile with a single color.
...
...
@@ -102,16 +102,16 @@ public:
glm
::
vec2
sizeDiff
,
glm
::
uvec2
resolution
,
glm
::
vec2
tileUV
);
static
glm
::
vec2
TileUvToTextureSamplePosition
(
const
TileUvTransform
&
uvTransform
,
glm
::
vec2
tileUV
,
glm
::
uvec2
resolution
);
/**
* A tile with status unavailable that any user can return to
* indicate that a tile was unavailable.
*/
static
const
Tile
TileUnavailable
;
/**
* A tile with status unavailable that any user can return to
* indicate that a tile was unavailable.
*/
static
const
Tile
TileUnavailable
;
private:
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
_texture
;
std
::
shared_ptr
<
TileMetaData
>
_metaData
;
Status
_status
;
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
_texture
;
std
::
shared_ptr
<
TileMetaData
>
_metaData
;
Status
_status
;
};
}
// namespace globebrowsing
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileprovider/cachingtileprovider.cpp
+
1
-
1
View file @
dd32a812
...
...
@@ -50,7 +50,7 @@ namespace tileprovider {
CachingTileProvider
::
CachingTileProvider
(
const
ghoul
::
Dictionary
&
dictionary
)
:
TileProvider
(
dictionary
)
,
_framesSinceLastRequestFlush
(
0
)
,
_defaultTile
(
Tile
::
TileUnavailable
)
,
_defaultTile
(
Tile
::
TileUnavailable
)
{
std
::
string
name
=
"Name unspecified"
;
dictionary
.
getValue
(
"Name"
,
name
);
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileprovider/projectiontileprovider.cpp
+
1
-
1
View file @
dd32a812
...
...
@@ -112,7 +112,7 @@ documentation::Documentation ProjectionTileProvider::Documentation() {
ProjectionTileProvider
::
ProjectionTileProvider
(
const
ghoul
::
Dictionary
&
dictionary
)
:
_fboProgramObject
(
nullptr
)
,
_capture
(
false
)
,
_defaultTile
(
Tile
::
TileUnavailable
)
,
_defaultTile
(
Tile
::
TileUnavailable
)
{
ghoul
::
Dictionary
geometryDictionary
;
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp
+
2
-
2
View file @
dd32a812
...
...
@@ -49,7 +49,7 @@ SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary)
SingleImageProvider
::
SingleImageProvider
(
const
std
::
string
&
imagePath
)
:
_imagePath
(
imagePath
)
,
_tile
(
nullptr
,
nullptr
,
Tile
::
Status
::
Unavailable
)
,
_tile
(
nullptr
,
nullptr
,
Tile
::
Status
::
Unavailable
)
{
reset
();
}
...
...
@@ -87,7 +87,7 @@ void SingleImageProvider::reset() {
tileTexture
->
uploadTexture
();
tileTexture
->
setFilter
(
ghoul
::
opengl
::
Texture
::
FilterMode
::
Linear
);
_tile
=
Tile
(
tileTexture
,
tileMetaData
,
tileStatus
);
_tile
=
Tile
(
tileTexture
,
tileMetaData
,
tileStatus
);
}
int
SingleImageProvider
::
maxLevel
()
{
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp
+
4
-
4
View file @
dd32a812
...
...
@@ -46,7 +46,7 @@ namespace {
}
SizeReferenceTileProvider
::
SizeReferenceTileProvider
(
const
ghoul
::
Dictionary
&
dictionary
)
:
_backgroundTile
(
Tile
::
TileUnavailable
)
:
_backgroundTile
(
Tile
::
TileUnavailable
)
{
_fontSize
=
50
;
_font
=
OsEng
.
fontManager
().
font
(
"Mono"
,
_fontSize
);
...
...
@@ -58,9 +58,9 @@ SizeReferenceTileProvider::SizeReferenceTileProvider(const ghoul::Dictionary& di
_ellipsoid
=
Ellipsoid
(
radii
);
auto
backgroundTileStatus
=
Tile
::
Status
::
Unavailable
;
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
backgroundTileTexture
;
std
::
shared_ptr
<
ghoul
::
opengl
::
Texture
>
backgroundTileTexture
;
std
::
string
backgroundImagePath
;
std
::
string
backgroundImagePath
;
if
(
dictionary
.
getValue
(
KeyBackgroundImagePath
,
backgroundImagePath
))
{
using
namespace
ghoul
::
io
;
std
::
string
imgAbsPath
=
absPath
(
backgroundImagePath
);
...
...
@@ -69,7 +69,7 @@ SizeReferenceTileProvider::SizeReferenceTileProvider(const ghoul::Dictionary& di
backgroundTileTexture
->
setFilter
(
ghoul
::
opengl
::
Texture
::
FilterMode
::
Linear
);
backgroundTileStatus
=
Tile
::
Status
::
OK
;
}
_backgroundTile
=
Tile
(
backgroundTileTexture
,
nullptr
,
backgroundTileStatus
);
_backgroundTile
=
Tile
(
backgroundTileTexture
,
nullptr
,
backgroundTileStatus
);
}
void
SizeReferenceTileProvider
::
renderText
(
const
ghoul
::
fontrendering
::
FontRenderer
&
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp
+
14
-
27
View file @
dd32a812
...
...
@@ -166,7 +166,7 @@ Tile TemporalTileProvider::getTile(const TileIndex& tileIndex) {
}
Tile
TemporalTileProvider
::
getDefaultTile
()
{
return
getTileProvider
()
->
getDefaultTile
();
return
getTileProvider
()
->
getDefaultTile
();
}
int
TemporalTileProvider
::
maxLevel
()
{
...
...
@@ -228,33 +228,20 @@ std::shared_ptr<TileProvider> TemporalTileProvider::getTileProvider(TimeKey time
}
std
::
shared_ptr
<
TileProvider
>
TemporalTileProvider
::
initTileProvider
(
TimeKey
timekey
)
{
std
::
string
gdalDatasetXml
=
getGdalDatasetXML
(
timekey
);
try
{
gdalDatasetXml
=
absPath
(
gdalDatasetXml
);
}
catch
(
ghoul
::
filesystem
::
FileSystem
::
ResolveTokenException
&
e
)
{
const
std
::
vector
<
std
::
string
>
AllowedToken
=
{
// From: http://www.gdal.org/frmt_wms.html
// @FRAGILE: What happens if a user specifies one of these as path tokens?
// ---abock
"${x}"
,
"${y}"
,
"${z}"
,
"${version}"
,
"${format}"
,
"${layer}"
};
auto
it
=
std
::
find
(
AllowedToken
.
begin
(),
AllowedToken
.
end
(),
e
.
token
);
if
(
it
==
AllowedToken
.
end
())
{
throw
;
}
LINFOC
(
"TemporalTileProvider"
,
fmt
::
format
(
"Ignoring '{}' in absolute path resolve"
,
e
.
token
)
);
}
static
const
std
::
vector
<
std
::
string
>
AllowedToken
=
{
// From: http://www.gdal.org/frmt_wms.html
// @FRAGILE: What happens if a user specifies one of these as path tokens?
// ---abock
"${x}"
,
"${y}"
,
"${z}"
,
"${version}"
,
"${format}"
,
"${layer}"
};
std
::
string
gdalDatasetXml
=
getGdalDatasetXML
(
timekey
);
FileSys
.
expandPathTokens
(
gdalDatasetXml
,
AllowedToken
);
_initDict
.
setValue
<
std
::
string
>
(
KeyFilePath
,
gdalDatasetXml
);
auto
tileProvider
=
std
::
make_shared
<
CachingTileProvider
>
(
_initDict
);
...
...
This diff is collapsed.
Click to expand it.
modules/globebrowsing/tile/tileselector.h
+
3
-
3
View file @
dd32a812
...
...
@@ -41,10 +41,10 @@ namespace tileselector {
ChunkTile
getHighestResolutionTile
(
const
LayerGroup
&
layerGroup
,
const
TileIndex
&
tileIndex
);
std
::
vector
<
ChunkTile
>
getTilesSortedByHighestResolution
(
const
LayerGroup
&
layerGroup
,
const
TileIndex
&
tileIndex
);
const
TileIndex
&
tileIndex
);
std
::
vector
<
std
::
pair
<
ChunkTile
,
const
LayerRenderSettings
*>
>
getTilesAndSettingsSortedByHighestResolution
(
const
LayerGroup
&
layerGroup
,
const
TileIndex
&
tileIndex
);
getTilesAndSettingsSortedByHighestResolution
(
const
LayerGroup
&
layerGroup
,
const
TileIndex
&
tileIndex
);
void
ascendToParent
(
TileIndex
&
tileIndex
,
TileUvTransform
&
uv
);
...
...
This diff is collapsed.
Click to expand it.
modules/kameleonvolume/tasks/kameleondocumentationtask.cpp
+
1
-
1
View file @
dd32a812
...
...
@@ -109,7 +109,7 @@ void KameleonDocumentationTask::perform(const Task::ProgressCallback & progressC
file
.
exceptions
(
~
std
::
ofstream
::
goodbit
);
file
.
open
(
_outputPath
);
std
::
stringstream
html
;
std
::
stringstream
html
;
html
<<
"<!DOCTYPE html>
\n
"
<<
"<html>
\n
"
<<
"
\t
<head>
\n
"
...
...
This diff is collapsed.
Click to expand it.
src/rendering/renderable.cpp
+
2
-
2
View file @
dd32a812
...
...
@@ -119,13 +119,13 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary)
addTag
(
std
::
move
(
tagName
));
}
else
if
(
dictionary
.
hasKeyAndValue
<
ghoul
::
Dictionary
>
(
KeyTag
))
{
ghoul
::
Dictionary
tagNames
=
dictionary
.
value
<
ghoul
::
Dictionary
>
(
KeyTag
);
std
::
vector
<
std
::
string
>
keys
=
tagNames
.
keys
();
std
::
vector
<
std
::
string
>
keys
=
tagNames
.
keys
();
std
::
string
tagName
;
for
(
const
std
::
string
&
key
:
keys
)
{
tagName
=
tagNames
.
value
<
std
::
string
>
(
key
);
if
(
!
tagName
.
empty
())
addTag
(
std
::
move
(
tagName
));
}
}
}
if
(
_startTime
!=
""
&&
_endTime
!=
""
)
{
...
...
This diff is collapsed.
Click to expand it.
src/rendering/screenspacerenderable.cpp
+
2
-
2
View file @
dd32a812
...
...
@@ -152,13 +152,13 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary
addTag
(
std
::
move
(
tagName
));
}
else
if
(
dictionary
.
hasKeyAndValue
<
ghoul
::
Dictionary
>
(
KeyTag
))
{
ghoul
::
Dictionary
tagNames
=
dictionary
.
value
<
ghoul
::
Dictionary
>
(
KeyTag
);
std
::
vector
<
std
::
string
>
keys
=
tagNames
.
keys
();
std
::
vector
<
std
::
string
>
keys
=
tagNames
.
keys
();
std
::
string
tagName
;
for
(
const
std
::
string
&
key
:
keys
)
{
tagName
=
tagNames
.
value
<
std
::
string
>
(
key
);
if
(
!
tagName
.
empty
())
addTag
(
std
::
move
(
tagName
));
}
}
}
// Setting spherical/euclidean onchange handler
...
...
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