Commit Graph

110 Commits

Author SHA1 Message Date
Alexander Bock
3ba346a227 Remove fmt::format and replace with std::format 2024-03-24 20:19:14 +01:00
Alexander Bock
e0ab7ae1d6 Coding style fixes 2024-03-19 14:49:44 +01:00
Alexander Bock
534f92c485 Second linting pass and adding .clang_tidy file (#3128) 2024-03-18 22:46:17 +01:00
Alexander Bock
2759c00e4b Pass through the code to address clang-tidy linting (#3083) 2024-03-17 00:58:50 +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
6e29d898cf Update copyright header 2024-02-06 15:53:24 +01:00
Emma Broman
c165098cdc Point cloud rewrite (RIP RenderableBillboardsCloud) (#2932)
* Start refactoring billboardscloud renderable

* Remove extra unit computation in geometry shader

* More refactor and fix size parameter not working without colormap (it never did)

* Remove redundant bool in shader

* Divide settings into property owners

* Refactor colormap

* More refactoring (utilize properties for visiblity)

* Remove redundant extra data structures for options

* Move data logic to the colormap settings structure

* Remove confusing correction size properties

* Separate polygon cloud into its own renderable

* Clean up some unused code

* Update some property descriptions

* Split some more code out into functions

* Remove odd and unused "linear filtering"

Should be reimplemented ina better way in a general color map overhaul

* Start refactoring some more properties

* Make color optional and remove redundant color assignments in assets

* Refactor color-parameter input and make range mapping work correctly

* Code cleanup (unused code and fix data types)

* Rename ScaleFactor to ScaleExponent

* Add a scale factor as well, as they're easier to use, and clarify documentation

* Fix faultily renamed scale factors

* Remove confusing multiplication for scale exponent

* Fix problem with points not appearing when _drawElements was set to true

* Move all colormapsettings into its own table in the asset files

* Move scaling/sizing into its own table as well

* Group sizing properties and remove min pixel size limit (was always zero)

* Add some docs and rename a parameter to avoid repetition

* Remove IsExact colormap and add an option to hide outliers

OBS! Still need to update the actual cmap files

* Add property to disable size mapping

* Increase pixel size of polyon texture - reduces jagged edges

* Remove unused points class

* Rename files and billboard class, to make it clearer that it is a point cloud

* Move size mapping into size settings

* Move color map properties out into its own component

* Move color map related computations into the new component

* Add outlier colors, to cover some specific color mapping issues

* Automatically fill parameter options if no colormap parameters were defined

* Move all color-related parameters to under one property owner

* Inlcude changes from matrix maintenance

* Add a checkbox to disable additive blending

* Remove a unused variable in shader

* DO color maping on the graphics card instead of CPU, using a texture

* WIP remove old "Outliers" and start introducing concept of no data colors instead

* Move speck loader to core and divide into a general data loader and a speck specific loader (In preparation for adding CSV support)

* More labelscomponent to core

* Fix a faulty header

* Handle NaN values

* Rename color map component property owner

It's not just the color map, but the settings for the entire mapping

* Hide point with nan value is show missing data is not selected

* Fix labels component documentation after move

* Add option to not provide any texture, and use a sphere generated form the shader

* Don't crash when loading unsupported data formats :)

* Add some TODO comments that should be addressed before merge

* Move renderables from DU module to base, and do some header cleanup

* Move colormapping component to core ad rename it to make it clear that it is not the color map itself

* Add above, below and nan color values to cmap loading

* Remove missing Data value specs in asset (and use belowRange in cmap instead)

* Make warning about wrong color number more verbose

* Add TODO comment about colormap, and actually used color in prev version, to localdwarfs

* WIP: Load CSV files

* Update some property visbility

* Check if chosen parameter options actually exist

* Fix fault column check

* Update example asset to cover more different cases

* Use new asset.resource loading

* Update asset versions (major update)

* Add parent documentation for RenderablePolygonCloud

* Add point cloud example with size scaling and add TODO comment

* Add example with textured points

* Don't blend textured points

* Fix problem with shaders being confused about texture units

* Bring back deepsky points color

* Start implementing more sophisticated datamapping for point data files

* Allow reading datamapping from input dictionary

* Load dataset in constructor instead

Solves problem with color map columns not loading for big datasets when loaded the first time

* Fix crash from reading column value that is interpreted as inf

* Inlcude information about data mapping when caching dataset

Updating the parameters now leads to an updated caching of the data file

* Adapt to tolower update

* Add option to specify columns to exclude in load (for CSV files)

* Start updating some docs

* Add a readonly property that shows the number of data points

* Rename example asset to shorter name

* Add option for not using cache when loading dataset

* Fix some errors in example asset

* Set scaleExponent from max position if not specified

That way the points are always visible, even when no exponent is given

* Restructure and add explanations in example asset

* Add option to not cache labels component data file

* Add example file with labels and units

* Compute fade distances in model coordinates instead of world space (issue #1746)

* Add possiblity to invert fading and add exmaple asset

* Make a separate propertyowner for fading settings

* Update docs

* Add example asset with custom data mapping

* Address some of my own review comments

* Read provided Parameter from asset

* Read ValueRange from asset

* Add example asset for more advanced color mapping settings

* Allow using the same column for two position coordinate axes

* Update src/rendering/colormappingcomponent.cpp

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Update src/data/datamapping.cpp

* Use helper function for tolowercase

* Simplify some std::optional handling, and fix broken assignment from code review fix

* Update data file versions to get updated cmap files

* Include a progress bar to show progress of CSV data loading

* Update csv data-to-float parsing for clang

* Add a description about why `openspace.absPath` is used in the file instead of `asset.resource`

* Apply suggestions from code review

* Apply suggestions from code review

* Add some missing info in documentation

* Place size-related property descriptions next to each other

* Remove the explicitly set renderbin

* Fix overly complicated description

* Fix polygon texture not being used

* Add polygon cloud example

* only bind texture and activate texture unit when required

* Rename alpha to opacity in shader

* Fix value range not loading, and make first parameter in list the default

* Rename Pixel Size property

* Use base 10 for scale exponent instead of base e

* Update src/data/datamapping.cpp

* Update modules/base/shaders/billboardpoint_gs.glsl

* Remove some redundant asset settings (Home label)

* Review comments

* Add TODO comment for localdwarfs asset (Speck file reading problems)

* Oops, forgot part of the comment

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* More code review fixes

* Fix faulty isReady check when labels are included

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

* More code review updates

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-12-19 13:20:07 +01:00
Malin E
ce789fcd22 Feature/matrix maintenance (#2875)
* Split RenderableSphere class into a local and an online sphere

* Make the video sphere derive from the regular sphere

* Make RenderableTimeVaryingSphere derive from RenderableSphere

* Some clean up

* Add general functions for renderable matrix calculations

* Make RenderableSphere and Plane use them

* Fix an issue with the RenderablePlane shader

* Make one function that returns all three types of render matrices

* Make more Renderables use the general matric calculation function

* Make more Renderable use the general matrix function

* Simplify alternative transforms for matrix calculations

* Small clean-up

* Update RenderableModel (again) to use new transform functions

* Make calc all matrix function to return tuple

* Update some more places
2023-09-21 14:22:36 +02:00
Alexander Bock
7483b912e0 Update submodules to fix compilation error on newer Clang and GCC (#2890)
* Update submodules

* Update Ghoul
2023-09-13 09:51:30 +02:00
Alexander Bock
ca916877b2 Adapt the visibility settings for all properties 2023-04-15 09:33:31 +02:00
Alexander Bock
7565a91196 Cleanup lambda expressions and directly address Fadeable properties when adding properties 2023-04-12 23:20:53 +02:00
Alexander Bock
9022aad479 Adding static Settings to Renderable (#2578)
* Add settings to Renderable to control whether the renderbin is updated based on Opacity
* Remove duplicate RenderBin specification for RenderableSphere
* Remove unnecessary RenderBin specifications of Lagrange points
* Don't automatically update the renderbin for RenderableLabel and RenderablePlane
* Remove extra `setRenderBinFromOpacity` from RenderableSpheres
* Move information about whether a renderable should be updated when disabled
* Some cleanup of Renderable class
* Don't update the renderbin automatically if the user specified the renderbin manually
2023-04-10 20:49:01 +02:00
Alexander Bock
d8ff505f33 Fix small spelling error 2023-01-21 22:15:36 +01:00
Alexander Bock
a2a1554c9a Small cleanup of property documentation 2023-01-09 00:11:58 +01:00
Alexander Bock
4f4764209f Happy new year 2023-01-02 11:19:33 +01:00
Alexander Bock
6249fa6d89 Collection of a number of changes (#2286)
* Cleanup Property code
* Remove NOLINT statements
* Return Property class types as string_view
* Remove getStringValue function
* Simplify string value retrieval
* Ensure that image paths in the ImageSequenceTileProvider are sorted (closes #2205)
* Some cleanup of OpenSpaceEngine
* Cleanup documentation
* Some more cleanup of engine classes
* Some more cleanup
* Update SGCT repository
* Use new Jenkins node identifiers as the old method broke with update
2022-10-30 12:54:14 +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
c1252902c7 More Code Cleanup (#2192)
* Harmonizing ( and ) in function calls
* static const -> constexpr
* Fix compile issue
* Unify shader tab size
* Add _fs and _vs to shaders
* Harmonize spacing
2022-07-26 11:22:41 +02:00
Alexander Bock
9cc4c595a8 Code Cleanup (#2191)
* constexpr const -> constexpr
* const char* -> std::string_view
2022-07-25 15:57:45 +02:00
Micah Acinapura
bdda36b41e Protect against crash when changing colormaps (#2082) 2022-05-06 08:52:32 -04:00
Alexander Bock
02adcf570e Add a hidden "Fade" property that modifies the effective opacity to enable other functionality (closes #1970) 2022-04-05 23:53:33 +02:00
Alexander Bock
21df9066e1 Make use of the new map feature in codegen (#1801) 2022-01-02 13:36:41 +01:00
Alexander Bock
d7d279ea16 Happy new year 2022-01-01 12:32:55 +01:00
Alexander Bock
76b9c7587b Adapt to explicit specifcation of texture size (#1794)
* Adapt to explicit specifcation of texture size
2021-12-26 19:19:04 +01:00
Alexander Bock
4a860fb01d Some code facelifting 2021-10-14 10:31:46 +02:00
Alexander Bock
87da9a27ab Feature/path normalization (#1674)
* Path normalization (making sure there are fewer cases of '"..."'
* Using more std::filesystem::path instead of std::string
* Update Ghoul
2021-07-01 23:46:22 +02:00
Emma Broman
1695937749 Feature/numeric slider updates (#1609)
* Remove Logarithmic ViewOption and instead always use exponent of NumericalProperty + set exponent of some renderables' properties

* Add MinMaxRange ViewOption for Vec2 properties

* Add MinMaxRange viewoption to some existing vec2 properties and combine some other related properties to be able to utilize it. For example Min and Max label sizes, fade in/out distances, inner and outer radius. OBS! Includes renaming several properties (**breaking change**)

* Refactor and document labels code. OBS! Includes renaming several properties (**breaking change**)

* Add comments for some assets that have labels that are not working correctly


Renderables with rename properties: RenderableLabels , GlobeLabelsComponent, RenderableBillboardsCloud, RenderableDUMeshes, RenderableRadialGrid )
2021-05-28 17:00:55 +02:00
Alexander Bock
63cbf270ee Adapt to changes in codegen that require specifying the identifier in the codegen::doc function 2021-05-25 23:10:12 +02:00
Alexander Bock
63e9deab5f Feature/stars (#1598)
* Add the ability to remap SPECK variables to usage values
2021-05-23 00:42:44 +02:00
Alexander Bock
205d4c9db1 Feature/speck loader (#1585)
* Implement a shared speckfile loader
* Apply new speck loader to RenderableBillboardsCloud, RenderablePlanesCloud, RenderablePoints
2021-05-17 13:59:54 +02:00
Alexander Bock
92432caed2 Adapt to changes in Ghoul that made absPath return a std::filesystem::path instead of a std::string 2021-05-17 00:23:15 +02:00
Alexander Bock
ccdc5a5dc3 Feature/filesystem cleanup (#1587)
* Adapting to the changes in Ghoul
* First step of moving filesystem functions to std
* Remove persistence flag from cachemanager
2021-05-16 20:26:49 +02:00
Alexander Bock
2aa540a112 Feature/interactionsphere (#1561)
* Add ability to render the bounding sphere as a debug option
* Separate boundingsphere and interactionspheres
* Correctly compute BoundingSpheres for more renderables (RenderablePlanesCloud, RenderableOrbitalKepler)
2021-04-26 13:13:36 +02:00
Alexander Bock
d9a1a0233b Remove apple clang warnings 2021-03-30 22:12:53 +02:00
Alexander Bock
e88650f22c Tiny coding style fixups 2021-03-27 23:49:02 +01:00
Alexander Bock
dfa223abef Make use of std::filesystem::path and cleanup specification error messages 2021-02-13 12:00:26 +01:00
Alexander Bock
6d821d4f91 Feature/codegen (#1480)
* Add the ability to automatically generate code to extract values out of a Dictionary (see https://github.com/openspace/codegen for more information on how to use this)
* Applied this technique to a large number of cases in the codebase
* Don't add _codegen files to the repository

Co-authored-by: Emma Broman <emma.broman@liu.se>
2021-02-09 09:12:43 +01:00
Jonathas Costa
65803e134d Issue/1447 (#1451)
* Fixed missing calls to OpenGL cache system.
2021-01-12 10:28:49 +01:00
Alexander Bock
7004c02b86 Happy new year 2021-01-02 15:26:51 +01:00
Alexander Bock
067c0f4b27 Introduction of new Dictionary class (#1446)
* Adapting to introduction of new Dictionary class in Ghoul
 * Mainly replacing usage of float instead of doubles as expected
 * Adjust to the lack of the hasKeyAndValue function
2021-01-02 15:07:11 +01:00
Alexander Bock
ad8af3ffeb Feature/CMake (#1443)
General CMake cleanup/overhaul
* Enable precompiled headers for all projects
* Move specifications itto separate CMakeLists files
  * Add openspace-core as a subdirectory
  * Move handle_modules functionality into modules/CMakeLists.txt
  * Move handleapplications logic into apps/CMakeLists.txt
* Introduce openspace-module-collection interface library to simplify inclusion of modules in applications
* Turn module initialization into a two-step process to adapt to the new minimal dependency scenario
* Compile time speedup
  * Remove circular dependencies between modules and core preventing multithreaded compilation on MSVC
  * Build Spice multithreaded and as static library
  * Remove dependency from core to module-webbrowser
  * Remove unused dependency from kameleon
  * Remove additional unnecessary dependencies
  * Cleanup volume/kameleon/kameleonvolume modules
  * Fix visibility issues. Restrict include paths
  * Compile kameleon in parallel
* Other cleanup
  * Only copy CEF files from one target (hard-coded to OpenSpace right now)
  * Remove unused instrumentation code
  * Remove the ability to render AABB for globes as it caused a circular dependency between GlobeBrowsing and Debugging
  * Removing compiler and cppcheck warnings
  * Turn almost all includes into non-system includes
  * Don't warn on deprecrated copy
* Updated submodules
2020-12-28 18:26:57 +01:00
Alexander Bock
86bb19d81c Feature/warnings (#1425)
* Remove MSVC, GCC, Clang compiler warnings
* Remove cppcheck warnings
2020-12-07 23:43:05 +01:00
Micah Acinapura
d7f799da63 Load psf texture on init so its readey for rendertime (#1356) 2020-10-28 14:24:37 +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
1eea6eedeb Prevent crash when setting a PSF texture for Stars that didn't exist (closes #1222) 2020-10-20 23:46:42 +02:00
Alexander Bock
2cca451898 Coding style adaptations
Adapt to changes in Ghoul
2020-08-25 13:47:03 +02:00
Jonathas Costa
f0c397d6be Merged maste. Changed code in multiple places to have the new memory pool working on linux (experimental yet). 2020-08-20 15:34:40 -04:00
Jonathas Costa
393fbdca3d OpenGL State Caching. 2020-07-31 15:59:28 -04:00
Alexander Bock
f1fe2f197b General code cleanup 2020-04-14 15:48:58 +02:00
Alexander Bock
5e29145395 Coding style cleanup 2020-02-14 19:37:06 +01:00