Commit Graph

78 Commits

Author SHA1 Message Date
Alexander Bock 820e90eab4 Happy new year 2025-01-14 16:21:08 +01:00
Alexander Bock e24cff1d19 Handle warnings and coding style adaptations 2024-09-12 16:30:09 +02:00
Emma Broman b8c2701931 Fix forgotten renamed variables 2024-06-13 11:18:52 +02:00
Emma Broman d67fa4bc8d Clean up globebrowsing script function documentation and adapt to new format (#3307)
* Clean up globebrowsing script function documentation and adapt to new format
2024-06-13 10:50:54 +02:00
Alexander Bock 866aad2187 Global pass over the coding style 2024-06-12 14:51:25 +02:00
Emma Broman 09a40f62dc Rename goToGeo -> jumpToGeo (#3296)
* Remove unused bool argument in globebrowsing functions
* Refactor some globe browsing functions
* Start updating goToGeo function to fade instead of just jump
* Add choice for whtehr to use default or arrival height when flying to a geo2
* Update / add docs for fly-to and go-to functions
* Rename function and add deprecated version of `goToGeo`
2024-06-04 16:18:03 +02:00
Alexander Bock 88decaf414 Remove the ability to have optional parameters in the beginning of Lua functions (closes #3151). Make the goToGeo and flyToGeo globe first parameter required 2024-04-07 17:29:01 +02:00
Alexander Bock 4328476d26 Use more filesystem::path where applicable 2024-04-06 23:55:59 +02:00
Alexander Bock 3ba346a227 Remove fmt::format and replace with std::format 2024-03-24 20:19:14 +01:00
Alexander Bock 9a6fe47d17 Fix up text formatting as path's no longer get quoted 2024-03-08 20:19:06 +01:00
Alexander Bock fff6f8a627 General pass for code cleanup 2024-03-08 00:36:54 +01:00
Alexander Bock 6e29d898cf Update copyright header 2024-02-06 15:53:24 +01:00
Emma Broman c525565e84 Utilize new functions for converting strings to upper/lower case (#2956)
* Utilize new functions for converting strings to upper/lower case

* Adapt to updated file name

* Use new function signature

* Update ghoul
2023-11-28 14:57:01 +01:00
Emma Broman 722c58f50a Allow zero duration when flying to globe position
Consistent with other fly to functions
2023-11-21 13:59:05 +01:00
Alexander Bock 57fafe48f4 Rename Lua function to bring them more in line with the function naming in C++ (#2840)
* Rename Lua function to bring them more in line with the function naming in C++
2023-08-05 19:20:08 +02:00
Emma Broman 091697c5b7 Make geojson file extension parsing more flexible in lua function (closes #2797)
Now allows geojson files with caps in the extension, as well as files with the .json extension.

Note that .json files will not be handled by drag-n-drop  (we might want to use that extension for something else)
2023-08-03 09:46:55 +02:00
Emma Broman c714a7f57d Feature/geojson (#2595)
Add the option to add geojson components to globes, from geojson files. One geojson file creates one GeoJsonComponent, which in turn may contain multiple GlobeGeometryFeatures

Geojson is a format that supports points, lines, and polygons. In addition to the basic functionality, extra features have been added that will long-term allow rendering the geometry needed to represent KML files (another format for geospatial geometry data). Here are links to references for both formats:

    Geojson: https://geojson.org/
    KML: https://developers.google.com/kml/documentation/kmlreference

data/assets/examples/geojson includes some example files that I have used for testing. Any geojson file can also be added through drag-n-drop. Note however that you might need to change the AltitudeMode or HeightOffset properties for the feature to be visible.
2023-04-15 11:35:28 +02:00
Joakim Kilby b219638e29 Add ability to cache globe data using MRFs (#2565)
Enables globe-browsing data to be cached using caching mrf's as it is loaded from the original dataset. Subsequent reads of tiles that have been cached do not query the original dataset but picks it up from the mrf data.
Supports anything that can be used a dataset for a gdal raster but raw images such as JPGs are explicitly disallowed as they lack necessary geotransform data.

Activated on a global scale by setting the following keys in openspace.cfg (ModuleConfigurations/GlobeBrowsing)
MRFCacheEnabled = true,
MRFCacheLocation = "<somepath>",
Settings can be overriden on a per-layer basis by adding the following entries to the layer entity of an asset
CacheSettings = { Enabled = true, Compression = "LERC", BlockSize = 512, Quality=25 },

The following per-layer settings are available and override the global module settings:
Enabled : enable/disable caching for this layer.
Compression: The compression algorithm to use for tile cache storage. (JPEG, PNG, or LERC)
BlockSize: Size of tiles in cache, should be a multiple of 2 although this is not required.
Quality: The quality setting of the JPEG compression (when used)

Note that heightlayers must use LERC compresison and this is the default unless overridden by a layer.
2023-04-11 08:46:25 +02:00
Alexander Bock 80e2aaf564 Remove whitespaces at the end of files, ' and - characters 2023-04-05 16:58:45 +02:00
Alexander Bock db361b4a48 Add the ability to move globe layers based on their name (closes #2411) 2023-01-21 19:12:29 +01:00
Alexander Bock 4f4764209f Happy new year 2023-01-02 11:19:33 +01:00
Alexander Bock 163ac4dcef Cleanup of mostly asset files
- Fixes for all files
 - constexpr cleanup
 - Cosmetic changes
 - Remove punctuation from the end of messages
2022-07-28 17:21:59 +02:00
Alexander Bock edb8bc2fdc Cleanup of the globebrowsing support code 2022-07-27 15:57:21 +02:00
Alexander Bock 9cc4c595a8 Code Cleanup (#2191)
* constexpr const -> constexpr
* const char* -> std::string_view
2022-07-25 15:57:45 +02:00
Alexander Bock 99d2bddf7c Address coding style and remove compiler warnings in many places 2022-04-11 18:31:45 +02:00
Alexander Bock c206da4a98 Coding style adaptations 2022-04-10 23:25:37 +02:00
Micah Acinapura 5917ac598a Feature/location measure (#1987)
* wip commit for measuring

* wip;fixing for codegene change

* adding asset file

* clean up comments

* pr comment cleanup
2022-04-08 14:13:23 -04:00
Alexander Bock acfb5d76ef Fix error introduced in the Lua function codegen update that accidentally changed some function names 2022-03-29 17:31:48 +02:00
Alexander Bock 3844df20c9 Feature/codegen lua (#1906)
Adapting Lua functions to new codegen functionality
Improve the documentation itself
Add some styling to generated documentation
Have parameter names for Lua-defined Lua function documentation

Co-authored-by: Emma Broman <emma.broman@liu.se>
2022-03-21 09:05:37 +01:00
Emma Broman d0fcec569c Address stability problems for camera paths and make them more useful in general
* Change spline curve parameter interval from [0,1] to [0,nSegments], for slightly increased precision
* Use linear paths whenever precision isn't enough/paths are too long (and traverse linear paths differently, to make them less depending on the distance)
* Remove OrbitalNavigator.LinearFlight and instead add "Zoom to" helper functions (closes #1837 )
* Add check to prevent triggering awkward short paths, for example when flying to the current target or to the same geo position twice
* Refactor speed code and handle speed when path is shorter than start+closeup distance
* Add easing to speed dampening
* Add topic for engine mode (to be used for UI later)
* Cleaner log when creating paths (some previous info messages are now debug messages)

Related PR: OpenSpace/OpenSpace-WebGuiFrontend#70
2022-02-25 08:49:19 +01:00
Alexander Bock 8b74493d96 Removing the asset_helper file (#1868)
- Remove the asset_helper file and call the onInitialize and onDeinitialize functions directly
 - Small compile fix on Windows
 - Removes the need for the registerIdentifierWithMeta function by automatically doing that for all asset.export statements
 - Allow the passing of either identifiers (as before) or entire tables to the removeSceneGraphNode, removeScreenSpaceRenderable, deleteLayer, removeAction, and export methods. In that case, the Identifier key from the table is extracted and used instead
2022-02-01 23:44:36 +01:00
Emma Broman 7c3d6b4c4d Change how moveLayer works slightly, so it is easier to use in a GUI implementation
* "newPosition" is now considered to be the item's new position (index) in the list
* also update the documentation a little
2022-01-12 09:39:12 +01:00
Alexander Bock d7d279ea16 Happy new year 2022-01-01 12:32:55 +01:00
Alexander Bock 4a860fb01d Some code facelifting 2021-10-14 10:31:46 +02:00
Emma Broman 37d39868a9 Make flyTogeo work again
Broke after lua function cleanup PR
2021-08-20 16:41:54 +02:00
Alexander Bock af617d1d10 Feature/lua function cleanup (#1719)
General cleanup of Lua functions and handling of variable extract from a Lua state
2021-08-19 16:02:14 +02:00
Emma Broman 11a901fa2f Fix forgotten property rename when creating camera path 2021-08-17 15:39:01 +02:00
Emma Broman 5cf5824607 Add option to flyToGeo with North as up vector 2021-08-15 18:47:15 +02:00
Emma Broman 16173d7afe Merge branch 'master' into thesis/2019/camera-paths and resolve conflicts
# Conflicts:
#	modules/globebrowsing/globebrowsingmodule.cpp
#	modules/globebrowsing/globebrowsingmodule_lua.inl
2021-07-09 15:43:17 +02:00
Emma Broman d4c06951da Update faulty docs and function name for getGeoPosition (#1662) (#1677)
New name: getLocalPositionFromGeo
2021-07-06 23:37:53 -04:00
Emma Broman a247f9d1b3 Move geo path creation to globebrowsing module 2021-06-23 15:07:05 +02:00
Emma Broman 77bdfaefd6 Move camera path code into core and refactor navigation code a bit 2021-06-23 09:12:36 +02:00
Alexander Bock 7004c02b86 Happy new year 2021-01-02 15:26:51 +01:00
Alexander Bock efffc25ce0 Feature/globals handling (#1352)
* Cleaner handling of global state
* Prevent Lua memory corruption (closes #982)
* Initialize glfw first thing to prevent weird joystick loading bug during startup
2020-10-21 22:30:05 +02:00
Alexander Bock 88b6fdd9fe Add more Tracy markers in different renderables 2020-08-18 12:58:40 +02:00
Alexander Bock 77db3b6ce8 Remove caching of inverse model transform for every scene graph node 2020-08-11 11:43:50 +02:00
Alexander Bock d8e9db76a3 Update the copyright header to 2020 2020-02-10 21:51:01 +01:00
Alexander Bock c7c8375ca0 Coding style fixes 2019-07-31 11:13:29 +02:00
Alexander Bock 4a070c939f Add the ability to query and rearrange globebrowsing layers at runtime 2019-07-30 14:28:23 +02:00
Emil Axelsson f43bcadee3 Feature/navigation state (#930)
* Replace setCameraState with setNavigationState + equivalents
* Add documentation and verification of NavigationState-related interfaces
* Documentation and verification fixes
* Change reference frame behavior
* Scene fixes
* Replace earthrise recording with navigation state and time
2019-07-16 13:13:33 +02:00