Commit Graph

77 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
6e29d898cf Update copyright header 2024-02-06 15:53:24 +01: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
Emma Broman
352c9dd5ec Touch module code cleanup (#2465)
* Remove unused feature that allowed us to "pick" nodes using touch (it didn't really work and had some nasty hardcoded and costly implementation). Fixes Touch interaction picking refactor #1041

* General refactoring of code and removing redundant code

* Make touch markers prettier (change default color and smoothen edges)

* Add module property to control which renderable types are "directly touchable"

* Add SGN property to control which individual nodes are "directly touchable" ("SupportsDirectInteraction")

* Fix stuttering when zooming in closer than the orbitalnavigator allows
2023-02-14 13:55:24 +01:00
Emma Broman
a0f9e88432 Feature/touch fixes (#2463)
* Add Ceres to touch interaction list (Forgotten in previous commit. OBS! This list will be removed)

* Small code updates (Logical ordering of functions, code standard)

* Fix compilation issue when using debug define

* Make touch navigation abort idle behavior

* Make reset a trigger property

* Fix some broken property sliders (the default step size was too big)

* Update interaction monitor state on touch interaction with WebGui

* Add some documentation of what "LM" means, and make unit test a developer property
2023-02-01 12:44:34 +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
664eb60f4f Increase the compile times by including more precompiled headers (#2217)
* Define WIN32_LEAN_AND_MEAN and VC_EXTRALEAN globally
* Use forked version of TUIO, some more work on precompiled headers
* Improvements for the Kameleon module
2022-08-26 16:32:21 +02:00
Alexander Bock
dd272ddf3c Move the disabling of the touch module to the beginning of the PreSync function to hopefully prevent errant inputs 2022-04-21 11:54:19 +02:00
Alexander Bock
d7d279ea16 Happy new year 2022-01-01 12:32:55 +01:00
Emma Broman
1b3597fac4 Update navigation includes in touch module 2021-07-07 10:44:17 +02:00
Alexander Bock
7004c02b86 Happy new year 2021-01-02 15:26:51 +01:00
Alexander Bock
51470c0a0d Issue/1355 (#1424)
* Move glfw init after macOS window is ready
* MacOS fixes for BigSur
* Compile fixs
* Rename hirise.asset since linux filenames are case-sensitive
* Modified globals DataStorage method to make Linux and Mac happy
* Switched to unsecure http URLs for satellites due to httprequest problem
* Keep the QApplication around on Mac because of some reason otherwise the keyboard handler crashes
* Add comment explaining the madness
* Apply same techniques to the globalscallback file

Co-authored-by: Micah Acinapura <micahnyc@gmail.com>
Co-authored-by: Gene Payne <payne.gene@gmail.com>
2020-12-07 23:41:20 +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
Mikael Pettersson
a991a80525 Made pinch input default to continuous zoom
- Added a directTouch bool field to touch step function
- Some logic of how to gather accumulated zoom value
2020-03-10 09:57:07 +01:00
Alexander Bock
d8e9db76a3 Update the copyright header to 2020 2020-02-10 21:51:01 +01:00
Mikael Pettersson
f3659c2249 Forgot to add the property 2020-01-14 08:07:23 +01:00
Mikael Pettersson
629597f3d0 Added TouchActive as a field in TouchModule
This can be used to inactivate navigational touch input
2020-01-13 15:48:38 +01:00
Mikael Pettersson
4e75b161db Feature/internal touchhandling (#1038)
* Removal of dead code and compiler warnings

* Added basic internal touch

This commit only adds the description-shell of the touch implementation

* Added callbacks and first WIP of internal touch

Makes use of the TouchInput/TouchInputs class in the TouchModule.
Internally we cache the TouchInputs as an input deque and utilizes it
for motion-vectors.
This commit has bugs and issues, which will be worked upon.

* Happy new year!

Bumped year on branch-local files

* Improvements to internal touch

Almost reached feature-parity with tuio-handled touch events

- Added most of the touch-logic to touchinteraction
- Added helper functions to new TouchInput/TouchInputs classes

* Naming changes to touch interface

* Translate TUIO to TouchInput

This commit translates TUIO messages to an internal TouchInput structure
while still trying to keep feature parity.
Removed TUIO-dependencies from many files.
Changed behavior on tuioear to lock-swap its content.

* Minor cleanup and fixes

- Should fix touch roll
- Simplified some functions

* Build fix

* Use internal touch in webgui

- Added consume-logic to touch callbacks
- Constrained touch-input to either webgui or 3D application as mouse is
  - This fixes some flaws with previous implementation,
    such as ghost inputs

- Initialize touchmodule through init-functions rather than constructor

* Cleanup of comments

* Simplified touch classes

Added timestamp through constructor meaning no more sprinkled timestamps
Renamed TouchInputs to TouchInputHolder for clarity
Added helper functions to the Holder to see if it holds an input
Remade addInput as tryAddInput which return true on successful insertion
+ other cleanup

* Code style cleanup and tweaks

Removed avoidable zero-comparison for code clarity
Cleanup of code style

* Added comments to DirectInputSolver

Clarifying the use of the DirectInputSolver.

* Changes for coding style
Change SGCT version to make it checkout-able

* Clarify magic bitmask

* const -> constexpr const for magic bitmasks

Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
2020-01-13 08:27:13 +01:00
Mikael Pettersson
43296979d8 Fixed rotation matrices in touch
Fixed rotation matrices in the touchmodule, while at it I also moved out
the lev-marq solver from the touchinteraction.cpp to its own file, in an
effort to make the code lighter to read.

Also changed some logic in how touch intersection is made with the
scenenodes.
2019-12-10 15:15:52 +01:00
Mikael Pettersson
a33057d830 Feature/integrated touchserver (#1015)
* WINDOWS: Touch server integrated into module

The touch server functionality has been integrated into the touch module
which is enabled by-default when the touch module is used on a windows
build.
The touch-hook checks for a connected digitizer (pen or touchscreen, but
I haven't tested pen)

This commit should also fix two potential low-risk race conditions in
the tuioear.cpp file.

* Added comment regarding which window we use

* Added copyright notice on the win32_touch files

Also changed from #pragma to #ifndef

* Fixes based on review

- Added anonymous namespace
- Put win32hook in openspace namespace
- Fixed indentations and linebreaks
- Fixed an issue regarding global state deinitialization
2019-12-02 14:09:15 +01:00
Emil Axelsson
c96794bf27 Update modules to call InteractionMonitor.markInteraction 2019-10-30 16:20:26 +01:00
liuloppan
da8beff8e9 Feature/interaction monitor (#999)
* interaction monitor first commit

* Renaming some member variables with underscore

* Interaction monitor registering mouse events and touch events

* Added setIdleTime

* Adding to CMakeLists

* Moved interactionmoitor.cpp to correct locatioN

* Cleanup after review. Removed interaction type string and fixed indentation

* Changed documentation description

* Renamed hasNewWebInput to processNewWebInput

* Some cleanup

* Rename registerInteraction to markInteraction
Add markInteraction calls to mouse and keyboard event sin OpenSpaceEngine
2019-10-30 13:18:46 +01:00
Emil Axelsson
0dcf65ce4f Feature/cef speedup (#806)
* Improve cmake errors
  * Calling doMessageLoopWork more often to increase gui performance
  * Introduce frequent callbacks
  * Restructure browser update callbacks
  * Cleanup cef speedup
  * Add flag to toggle updating browser between renderable calls
  * CEF should not be used in single process mode
  * Update CEF version
  * Postbuild step for finding framework from web helper
  * Load libcef dynamically to fix issue with CEF update
  * Only include dynamic library loader on mac
  * Improve keyboard mapping support on MacOS
  * Add arrow keys
  * Rename manifest
  * Fix bug with missing blinking cursor in text fields
  * Bump minimum cmake version
  * CEF fixes: Runtime and correct helper path
  * Be true to actual sandbox compatibility specified by CEF
  * Cleanup
2019-04-24 10:53:46 +02:00
Alexander Bock
bb3db7ada7 Feature/jenkins fix (#816)
* Cleanup
* CMake cleanups
* Update current year
* Update copyright header
* Use script to return list of all modules
* Update credits, license and ghoul
2019-03-24 11:19:39 +01:00
Gene Payne
63c1ac89fb Changes to touch module to allow it to build with or without webbrowser module enabled (#808) 2019-03-07 11:15:45 +01:00
Gene Payne
c44290fe1f Feature/touch web gui support (#798)
* Added touch support for web GUI

* Code cleanup after master merge, no functionality changes

* Fixed alignment of function arguments
2019-02-21 07:35:47 -07:00
Emil Axelsson
2e71eaa4cb Feature/anchor and aim (#799)
Introduce the ability to navigate using an anchor and aim.
Example use: Set spacecraft as anchor and planet as aim to always look down at a planet, while followin the spacecraft in its orbit.
2019-02-19 18:46:58 +01:00
Alexander Bock
9f1c4e847d Feature/globals (#690)
* Move global objects out of OpenSpaceEngine
 * General cleanup of main.cpp
 * Add default_joystick asset to all scenes
 * No longer suppress mouse interaction on slave nodes
 * Window delegate uses function pointers rather than subclassing
 * Fix for false overwriting of ImGUI configuration file
 * Change default color and tilt angle of fisheye rendering
 * Restructured performance manager
 * Simplify screenshot handling
2018-08-30 11:38:47 -04:00
Alexander Bock
a3c849843f Feature/new formatting (#547)
* Change to new logging format (closes #542)
 * Adds a screenshots folder that uses the application startup time
 * Creating focus nodes for VRT files if the info files contain location information
 * Fix issue with removing virtual properties
 * Add a method for returning the cartesian coordinates for a geolocation on a planet
2018-03-07 18:10:32 -05:00
Alexander Bock
dcfef3557f Update copyright header 2017-12-29 20:11:22 +01:00
Emil Axelsson
75cf6dcf71 Asset work in progress 2017-12-15 13:21:10 +01:00
Alexander Bock
afa1d6d33e Add strict test for whitespace at end of line
More work on coding style
2017-11-09 23:47:51 -05:00
Alexander Bock
b50b52d351 Cleanup for coding style
Add strict mode to check_style_guide script
2017-11-08 10:35:39 -06:00
Alexander Bock
a1505422d2 First step of turning touch classes into lower case 2017-07-18 15:52:26 -04:00
Alexander Bock
0e9edaeb12 Fix byte order mark commits
Update Ghoul
2017-07-17 15:54:00 -04:00
Alexander Bock
6a198c5d93 Started some warning cleanup 2017-07-14 14:21:01 -04:00
Kalle Bladin
2e4f31ded8 Interaction Updates (#353)
* Interaction speed is not dependent on framerate

* Split up interaction code in files and perform smooth interpolation when changing focus

* Abstract interaction code in to functions.

* Interpolation time is dependent on angle to focus node.

* Use correct delta time when interpolating

* Fix bug regarding decomposition of camera rotation.

* Make orbital interaction mode behave as globe browsing and no longer use interactiondepth below ellipsoid.

* Do not always rotate with object. Depending on distance

* Remove interaction depth below ellipsoid. Now able to interact without renderable

* Remove specification of interactionDepthBelowEllipsoid and cameraMinHeight

* Remove GlobeBrowsingInteractionMode

* Rename OrbitalInteractionMode to OrbitalNavigator and no longer extend interactionmode.

* Move properties from interaction handler to orbital navigator

* Use smooth step for follow rotation interpolator

* Rename KeyframeInteractionMode to KeyframeNavigator

* Rename files

* Clean up.

* Separate mousestate from orbitalnavigator

* Clean up

* Split keybindingmanager from interactionhandler interactionhandler

* Rename interactionhandler to navigationhandler

* Rename files

* Clean up

* Take back usage of gotochunk and gotogeo

* Rename lua library navigation

* Move functionality from navigationhandler to keyframenavigator

* Update scripts for navigation

* Comment code

* Clean up

* Solve but that caused NaN values for camera position when being in center of globe and setting focus to the globe.

* Update jenkins file to remove build folder before building.

* Fix error in jenkins script

* Update jenkins file

* Update jenkins file

* Revert jenkins file

* I hope this makes Jenkins happy.

* Line endings God damnit

* Line endings

* Clean up

* Fix compilation issue

* Take back default scene.

* Fix indentation

* Move functions goToGeo and goToChunk to GlobeBrowsingModule.

* Include algorithm for std::find

* Remove auto and other clean up
2017-07-14 17:17:17 +02:00
Jonathan Bosson
d9fa55581f changes from PR comments 2017-07-13 20:10:35 -06:00
Jonathan Bosson
c4e4e141af spaces instead of tabs 2017-07-13 13:09:25 -06:00
Jonathan Bosson
30e1b2b4f1 make touchmarkers render on render callback over postdraw 2017-07-12 11:18:55 -06:00
Jonathan Bosson
7f39ebb49c cleanup and commented all code 2017-06-20 15:06:38 -06:00
Jonathan Bosson
c53bcaac05 markers working, alpha and textures are not 2017-06-13 13:54:43 -06:00
Jonathan Bosson
d3f574ba23 render TouchMarkers, currently causes crash on runtime 2017-06-09 15:24:36 -06:00
Jonathan Bosson
c3e1f54b45 stubb for TouchMarker class to render where the contact points are on the screen 2017-05-24 16:25:16 -06:00
Jonathan Bosson
612b207d19 mute mouse input when we have touch input (for feedback on linux) 2017-05-18 19:19:26 -06:00
Jonathan Bosson
fb79cfe5f3 classes defined in module class and cleanup 2017-05-12 11:18:17 -06:00
Alexander Bock
3a6f2a54e5 Add some comments 2017-05-11 23:25:13 -04:00
Jonathan Bosson
cb3e31212a do a unit test on the LM algorithm and save the data to .csv 2017-05-11 13:37:45 -06:00