Compare commits

..
430 Commits
Author SHA1 Message Date
Mamadou Babaei b6acf03c95 bump the plugin version to v1.9.3 2024-02-03 04:52:57 +01:00
Mamadou Babaei a0c4e96349 rephrase fixed changes 2024-02-03 04:52:57 +01:00
Mamadou Babaei 6251cb0d37 bump the copyright years 2024-02-03 04:52:57 +01:00
Mamadou Babaei dfda4f28fb minor changelog fixes 2024-02-03 04:52:56 +01:00
Mamadou Babaei 5054063a8a fix the wrong version numbers inside the paltform support matrix and the main .uplugin file 2024-02-03 04:52:56 +01:00
Mamadou Babaei c6294a1f16 apply a few critical fixes backported from the next major release 2024-02-03 04:52:56 +01:00
Mamadou Babaei 1cbe39fd5e a minor changelog fix 2024-02-03 04:52:56 +01:00
Mamadou Babaei f0db0b0846 bump the plugin version to v1.9.2 2023-11-03 18:35:09 +01:00
Mamadou Babaei 5e1cb6a637 fix a bug where released actor is going to be null whenever the OnActorReleased event fires 2023-11-03 18:35:08 +01:00
Mamadou Babaei eca69677b1 restructure the planned features completion status 2023-11-03 18:35:08 +01:00
Mamadou Babaei fbe415c7ae update the list of planned features and their completion status 2023-11-03 18:35:08 +01:00
Mamadou Babaei 0b052356ee update the list of planned features and their completion status 2023-11-03 18:35:07 +01:00
Mamadou Babaei 42316edb95 update the list of planned features and their completion status 2023-11-03 18:35:07 +01:00
Mamadou Babaei 932bdb26d4 add a list of planned features and their completion status to the main readme file 2023-11-03 18:35:07 +01:00
Mamadou Babaei 4fe5281cd8 bump the plugin version to v1.9.1 2023-10-11 17:02:50 +02:00
Mamadou Babaei dcbe1015f8 add the missing unreal header that defines ENGINE_*_VERSION macros in order to pass epic store builds for ue 5.3 2023-10-11 17:02:49 +02:00
Mamadou Babaei 6ebee2aa2f bump the plugin version to v1.9.0 2023-10-10 17:29:53 +02:00
Mamadou Babaei 7c8f26e978 change the ufunction specifier for sgpawn blueprint implementable events to blueprint native event in order to allow overrides from c++ as well 2023-10-10 17:29:53 +02:00
Mamadou Babaei bf234d720b add a missing release note fix for v1.8.0 to the changelog file 2023-10-10 17:29:52 +02:00
Mamadou Babaei 702fdf19fa bump the plugin version to v1.8.0 2023-10-10 16:12:51 +02:00
Mamadou Babaei 0364f67ae2 This single commit inroduces the following changes:
- Introduced new SGPawn events: OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch.
- Exposed OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch events to Blueprint as BlueprintImplementableEvent.

- Fix a bug where the OnTouchStateUpdated event is mistakenly triggered instead of the OnGrabStateUpdated when the right thumb fingertip grab collider overlaps with a grabbable actor.
2023-10-10 16:12:50 +02:00
Mamadou Babaei 0efd382edb bump the plugin version to v1.7.0 2023-09-14 18:50:05 +02:00
Mamadou Babaei 28b88a5a72 bump senseglove headers and libraries for linux and android to v2.12.0-19c9854 2023-09-14 18:50:05 +02:00
Mamadou Babaei eab9892a5d bump senseglove libraries for windows to v2.12.0-19c9854 2023-09-14 18:50:04 +02:00
Mamadou Babaei da3449b7df move SGCoreImpl/SGPlatform to SGBuildHacks/SGPlatform and introduce SG_CPP20 and SG_CAPTURE_THIS 2023-09-14 18:50:04 +02:00
Mamadou Babaei 25e0d49eea update the changelog 2023-09-14 18:50:04 +02:00
Mamadou Babaei 01fe621704 update the changelog with unreleased changes 2023-09-14 18:50:04 +02:00
Mamadou Babaei ce325f1219 introduce senseglove backend and backend kismet modules in order to properly initialize the backend in order to avoid a bug where sgcoonect::init gets called every frame 2023-09-14 18:50:04 +02:00
Mamadou Babaei 8ce4caadc9 update the changelog with unreleased changes 2023-09-14 18:50:04 +02:00
Mamadou Babaei 2588eade1f remove a duplicate log 2023-09-14 18:50:04 +02:00
Mamadou Babaei 98921356cd add sggameinstance for future use 2023-09-14 18:50:04 +02:00
Mamadou Babaei 7a35364713 remove a duplicated slash in a header's path 2023-09-14 18:50:04 +02:00
Mamadou Babaei 1cac3a70e3 bump the plugin version to v1.6.1 2023-08-14 21:22:20 +02:00
Mamadou Babaei 083a1690e8 fix the platform support matrix 2023-08-14 21:22:19 +02:00
Mamadou Babaei c2244c8ff8 add a missing header that causes build issues on ue 5.0 2023-08-14 21:22:19 +02:00
Mamadou Babaei 8b7bcdd8b8 bump the plugin version to v1.6.0 2023-08-14 17:25:59 +02:00
Mamadou Babaei f0d67ce035 update the changelog 2023-08-14 17:25:59 +02:00
Mamadou Babaei 49bcfbc2d4 update the changelog 2023-08-14 17:25:58 +02:00
Mamadou Babaei 9ed0015db0 do not cache grabbed actors as overlapped actors 2023-08-14 17:25:58 +02:00
Mamadou Babaei 5951ac9c33 inline some pimpl methods in order to improve function call performance for regularly called methods 2023-08-14 17:25:57 +02:00
Mamadou Babaei be3647e310 cache all overlapped actors with the real/virtual hands 2023-08-14 17:25:57 +02:00
Mamadou Babaei 3e35246b39 initial working implementation of the separated virtual/real hand rendering 2023-08-14 17:25:56 +02:00
Mamadou Babaei 8087719bbb fix the wrong default gizmo colors when initialized using the default constructor. 2023-08-14 17:25:56 +02:00
Mamadou Babaei 5ca1da7730 fix ue 5.3 build issues 2023-08-14 17:25:55 +02:00
Mamadou Babaei 41196d69c1 add support for the upcoming unreal engine 5.3 and native toolchain v22 libs to the build system 2023-08-14 17:25:55 +02:00
Mamadou Babaei ead76bb4f5 bump senseglove libraries for windows to v2.11.0-b775a05 2023-08-14 17:25:54 +02:00
Mamadou Babaei 529e751e07 update the changelog 2023-08-14 17:25:53 +02:00
Mamadou Babaei 1b2300d18c remove any mention of msvc 2017 and ue 4.27 third-party libs from the readme file 2023-08-14 17:25:53 +02:00
Mamadou Babaei dbabec4583 bump senseglove headers and libraries for linux and android to v2.11.0-b775a05 2023-08-14 17:25:51 +02:00
Mamadou Babaei e1fea5d60b initial attempt at separating the hand rendering from the real hand 2023-08-14 17:25:50 +02:00
Mamadou Babaei 43bdec8601 alternative velocity calculation for released actors based on the hand's cached position history 2023-08-14 17:25:49 +02:00
Mamadou Babaei a5a8e7149f alternative velocity calculation for released actors based on a cached position history 2023-08-14 17:25:49 +02:00
Mamadou Babaei bb63748644 apply the hand's velocity to the grabbed actor after release 2023-08-14 17:25:48 +02:00
Mamadou Babaei d4e92546e3 bump the plugin version to v1.5.3 2023-07-19 18:22:49 +02:00
Mamadou Babaei daa4031e6b bump senseglove libraries for windows to v2.10.1-3b0e7c9 2023-07-19 18:22:48 +02:00
Mamadou Babaei bc39905bc6 a minor changelog fix 2023-07-19 18:22:47 +02:00
Mamadou Babaei 1fdb94d5c9 bump senseglove libraries for linux and android to v2.10.1-3b0e7c9 2023-07-19 18:22:47 +02:00
Mamadou Babaei 7c9e1b2462 bump the plugin version to v1.5.2 2023-07-19 01:19:59 +02:00
Mamadou Babaei ef6d5b6295 fix a build issue with android shipping builds 2023-07-19 01:13:21 +02:00
Mamadou Babaei 6794a36b0f whitespace fix 2023-07-19 01:13:20 +02:00
Mamadou Babaei 6c77fb0ca9 remove redundant whitespaces 2023-07-19 01:13:20 +02:00
Mamadou Babaei f5d9a02dab fix a grammatical error in the changelog 2023-07-19 01:13:19 +02:00
Mamadou Babaei 75eaea13a4 bump the plugin version to v1.5.1 2023-07-13 19:49:16 +02:00
Mamadou Babaei b2f89c4694 fix grab/release bug for the right hand 2023-07-13 17:27:28 +02:00
Mamadou Babaei b4e547f755 fix a wrist tracker bug where hands are getting tracked in reverse 2023-07-13 17:26:49 +02:00
Mamadou Babaei 8125ad2fc6 do checks against the right hand which is cleaner to read 2023-07-13 17:26:02 +02:00
Mamadou Babaei f7f997019d bump the plugin version to v1.5.0 2023-06-16 02:02:57 +02:00
Mamadou Babaei 914f0c34ac update the changelog 2023-06-16 02:02:56 +02:00
Mamadou Babaei 8e9b45ddc0 fix the motion source options crashes 2023-06-16 02:02:56 +02:00
Mamadou Babaei bf4e1f53f6 refactor the newly added motion source settings and off-load them from the wrist tracker to the settings system, though this causes crashes still 2023-06-16 02:02:55 +02:00
Mamadou Babaei 5c40592070 bump senseglove libraries for windows to v.2.10.0-12133ac 2023-06-16 02:02:55 +02:00
Mamadou Babaei 3fb66fa469 bump senseglove libraries for linux and android to v.2.10.0-12133ac 2023-06-16 02:02:53 +02:00
Mamadou Babaei c0c6d6b262 update the changelog with the latest changes 2023-06-16 02:02:53 +02:00
Mamadou Babaei 03e698de32 remove not yet implemented from ViveTracker and ViveFocus3WristTracker enums' names 2023-06-16 02:02:52 +02:00
Mamadou Babaei 4c0d886518 fix a bug where SteamVR trackers such as HTC VIVE and HTC VIVE Focus 3's wrist orientation and location were not being tracked. 2023-06-16 02:02:52 +02:00
Mamadou Babaei c63c182ab0 bump senseglove libraries and headers for linux and android to v2.9.0-21c54c5 2023-06-16 02:02:51 +02:00
Mamadou Babaei 51af76bf55 update the changelog to reflect the latest changes 2023-06-16 02:02:50 +02:00
Mamadou Babaei a95e067e85 bump senseglove libraries for windows to v2.9.0-21c54c5 2023-06-16 02:02:49 +02:00
Mamadou Babaei e05347f2a4 add (not implemented yet) to the blueprint display name for positional tracking hardware that is not implemented yet 2023-06-16 02:02:48 +02:00
Mamadou Babaei d85428a30f add support for vive focus 3 positional tracking hardwares 2023-06-16 02:02:48 +02:00
Mamadou Babaei 0f5e0e1c7f add support for oculus quest pro positional tracking hardwares 2023-06-16 02:02:47 +02:00
Mamadou Babaei a7efdb75c7 remove support for oculus touch, pico neo 2, and pico neo 3 positional tracking hardwares 2023-06-16 02:02:47 +02:00
Mamadou Babaei f849252dc8 fix ESGPositionalTrackingHardware enum display names and comments 2023-06-16 02:02:46 +02:00
Mamadou Babaei be76335a46 update the changelog 2023-06-16 02:02:46 +02:00
Mamadou Babaei d6f1e21804 fully refactor the top-level configurations in the settings system into ustructs 2023-06-16 02:02:45 +02:00
Mamadou Babaei 08657ceda2 update the platform support matrix to reflect the latest support status 2023-06-16 02:02:45 +02:00
Mamadou Babaei 1f57ae7a8f bump senseglove libraries for windows v2.8.0-ff14904 2023-06-16 02:02:45 +02:00
Mamadou Babaei fcf9bdb0a5 bump senseglove libraries for linux and android to v2.8.0-ff14904 2023-06-16 02:02:43 +02:00
Mamadou Babaei 5cec1ac563 drop support for native toolchain v19, msvc v141 (2017), and thus ue 4.27 in the build system 2023-06-16 02:02:42 +02:00
Mamadou Babaei b6bd971bc8 bump the plugin version to v1.4.3 2023-06-01 23:30:20 +02:00
Mamadou Babaei 3088a60d5a update the changelog 2023-06-01 23:30:20 +02:00
Mamadou Babaei e22625ae34 fix a critical Android crash that happens where the default development hand meshes are not found 2023-06-01 23:30:19 +02:00
Mamadou Babaei 30720e5bd5 add a complementary internal method to IsUsingUserMesh, IsUsingDefaultMesh for checking various hand meshes 2023-06-01 23:30:19 +02:00
Mamadou Babaei a2b8e186b5 fix the changelog release formatting and drop the v prefix in the release titles 2023-06-01 23:30:18 +02:00
Mamadou Babaei 882665e386 bump the plugin version to v1.4.2 2023-06-01 21:44:38 +02:00
Mamadou Babaei 265759e080 update the changelog 2023-06-01 21:44:38 +02:00
Mamadou Babaei cac1c475dc fix the changelog typos and errors 2023-06-01 21:44:37 +02:00
Mamadou Babaei 8478b7caf8 minor grammatical fix 2023-06-01 21:44:37 +02:00
Mamadou Babaei 6b2e5dbcf7 update the changelog with unreleased changes 2023-06-01 21:44:37 +02:00
Mamadou Babaei ae81b15c91 fix an edit condition parsing failure that caused a bug in the settings
system where the virtual hand and the wrist tracker debug gizmos where
always drawn, regardless of chosen settings
2023-06-01 21:44:36 +02:00
Mamadou Babaei 5a8feb24ac fix error C2440: 'initializing': cannot convert from 'void' to 'bool' when engine versio is < 5.2 2023-06-01 21:44:36 +02:00
Mamadou Babaei 418133432f fix typos in the changelog 2023-06-01 21:44:35 +02:00
Mamadou Babaei 0d5c2ee04e fix a typo in the changelog 2023-06-01 21:44:35 +02:00
Mamadou Babaei edad54bd36 fix the changelog 2023-06-01 21:44:34 +02:00
Mamadou Babaei bed8269eba fix a typo in the changelog 2023-06-01 21:44:34 +02:00
Mamadou Babaei 598b0942e4 minor fix in the changelog 2023-06-01 21:44:33 +02:00
Mamadou Babaei a1a36901ea bump the plugin version v1.4.1 2023-05-29 02:08:48 +02:00
Mamadou Babaei 1ee517f392 log unreleased changes 2023-05-29 02:08:48 +02:00
Mamadou Babaei 558e2ffcff remove dead gradle code from the android module 2023-05-29 02:08:47 +02:00
Mamadou Babaei b5452ff3a8 supress a grade warning for non-arm64 archs when the build target is android 2023-05-29 02:08:47 +02:00
Mamadou Babaei 267e518f44 fix an android gradle build issue which happens when the games package name won't start with com.senseglove.* 2023-05-29 02:08:46 +02:00
Mamadou Babaei a6ae25e581 bump the plugin version to v1.4.0 2023-05-19 19:01:37 +02:00
Mamadou Babaei 946df25210 fix linux aarch64 build issues on ue 5.0 2023-05-19 18:35:44 +02:00
Mamadou Babaei 88a57106ff remove SenseGloveCoreTypes from the directory structure 2023-05-19 18:35:44 +02:00
Mamadou Babaei a98e88d27f implement an optional feature in order to automatically stop all haptics on the end play event 2023-05-19 18:04:47 +02:00
Mamadou Babaei 25e095ab11 temporarily disable the debug gizmo for the virtual hand and the wrist tracker due to an esoteric bug in the settings system 2023-05-19 18:04:46 +02:00
Mamadou Babaei 360c669dfd remove commented code 2023-05-19 18:04:46 +02:00
Mamadou Babaei 6fab1830f1 increase the default finger tips collider sizes 2023-05-19 18:04:46 +02:00
Mamadou Babaei 69e13a1de2 get root component instead of iterating over the components in order to disable/enable the actor physics 2023-05-19 18:04:45 +02:00
Mamadou Babaei b7416f1559 fix a potential crash 2023-05-19 18:04:45 +02:00
Mamadou Babaei 6c821bf80d stop all haptics on end play in order to make sure the glove won't get stuck in haptics feedbacks 2023-05-19 18:04:44 +02:00
Mamadou Babaei 318ba52835 set the default attachment rotation rule to keep relative 2023-05-19 18:04:44 +02:00
Mamadou Babaei 3a44a177fd set the default attachment scale rule to snap to target 2023-05-19 18:04:43 +02:00
Mamadou Babaei 7d4c839f9f do not affect collision when grab/release 2023-05-19 18:04:43 +02:00
Mamadou Babaei f17a7ecde8 refactor and remove the need to cache the component in the grab/release workflow 2023-05-19 18:04:42 +02:00
Mamadou Babaei 783f1b317c refactor the grab/touch logic and data structure and also cache the component ready to be grabbed in order to affect its physics state 2023-05-19 18:04:42 +02:00
Mamadou Babaei fcd038d2fc try an alternative approach for the grab/release functionality by disabling/enabling physics simulation 2023-05-19 18:04:42 +02:00
Mamadou Babaei c2f67fce2d add grab sucess/fail checks with error messages 2023-05-19 18:04:41 +02:00
Mamadou Babaei caf9340641 add ensure checks on the grab socket name 2023-05-19 18:04:41 +02:00
Mamadou Babaei 0906a60b66 move socket name to a temp var for easier debugging 2023-05-19 18:04:40 +02:00
Mamadou Babaei cb51f36d87 move attachment rules to a temp var for easier debugging 2023-05-19 18:04:40 +02:00
Mamadou Babaei 7a23dddbe0 fix a release-detection logic error 2023-05-19 18:04:39 +02:00
Mamadou Babaei db7433fe26 clean up and simplify the touch callback lambda 2023-05-19 18:04:39 +02:00
Mamadou Babaei 81a663ae91 update the changelog 2023-05-19 18:04:38 +02:00
Mamadou Babaei ce9590ae65 force off haptic commands when collision ends 2023-05-19 18:04:38 +02:00
Mamadou Babaei 072cf1ea86 only send force-feedback and buzz commands when they are not zero 2023-05-19 18:04:38 +02:00
Mamadou Babaei e5a378a9fa update the platform support matrix with the distribution channels and their remarks 2023-05-19 18:04:37 +02:00
Mamadou Babaei e25004b9e9 add a note about abi/api breaking changes 2023-05-19 18:04:37 +02:00
Mamadou Babaei b9ca46a906 bump senseglove binaries for windows to v2.7.1-965f90c 2023-05-19 18:04:36 +02:00
Mamadou Babaei 7e9d7d9a6b removed the redundant SenseGloveCoreTypes module which causes all kinds of packaging issues with certain versions of the engine. 2023-05-19 18:04:35 +02:00
Mamadou Babaei bc485b9baf try to fix various build issues with the senseglove core types module 2023-05-19 18:04:35 +02:00
Mamadou Babaei 6be4ab7a5b fix linux aarch64 build issues and for older unreal engine versions 2023-05-19 18:04:34 +02:00
Mamadou Babaei 66031095dd whitelist all modules for linuxarm64 target platform 2023-05-19 18:04:34 +02:00
Mamadou Babaei b4968ebd05 fix linux aarch64 build issues and for ue 4.27 up to 5.2 2023-05-19 18:04:33 +02:00
Mamadou Babaei 79d292e159 fix a build error where engine versions are < 5.2 2023-05-19 18:04:33 +02:00
Mamadou Babaei f09bd379d8 add linux aarch64 platform support for unreal 5.2+ and bump senseglove libraries to v2.7.1-965f90c 2023-05-19 18:04:32 +02:00
Mamadou Babaei 5de114f9a4 fix a circular dependency build issue 2023-05-19 18:04:31 +02:00
Mamadou Babaei a78e8cade7 add a missing dependency that causes packaging issues 2023-05-19 18:04:30 +02:00
Mamadou Babaei 65e1670974 capture by reference in the buzz timer callback lambda or otherwise crash 2023-05-19 18:04:30 +02:00
Mamadou Babaei b2ddd29d4c fix a crash due to uninitialized pimpl object 2023-05-19 18:04:29 +02:00
Mamadou Babaei 43070d8ce3 fix lambda crashes and ensure logic bugs 2023-05-19 18:04:29 +02:00
Mamadou Babaei b9fe67814d complete the implementation for the touch functionality and its feedbacks 2023-05-19 18:02:26 +02:00
Mamadou Babaei 67042c7466 add the initial implementation for the touch functionality and its feedbacks 2023-05-19 18:02:26 +02:00
Mamadou Babaei 684331075f expose the connected glove in the virtual hand's api 2023-05-19 18:02:25 +02:00
Mamadou Babaei 5f6641af12 add static get component methods for quickly accessing grab/touch components 2023-05-19 18:02:25 +02:00
Mamadou Babaei 77e62eba30 remove the variable names from the grab/touch signatures 2023-05-19 18:02:24 +02:00
Mamadou Babaei 48152dfcdd add the grab/touch state update events 2023-05-19 18:02:24 +02:00
Mamadou Babaei d7f55e1a78 update the changelog 2023-05-19 18:02:23 +02:00
Mamadou Babaei aa8e2f097e fix a crash by removing wrong delegate binds 2023-05-19 18:02:23 +02:00
Mamadou Babaei 4452b308f5 add a buzz timeout uproperty 2023-05-19 18:02:22 +02:00
Mamadou Babaei ffabc4159c merge all properties inside the grab component into one group 2023-05-19 18:02:22 +02:00
Mamadou Babaei 7941fca732 simplify and merge separate buzz/force-feedback levels into one value on the touch component 2023-05-19 18:02:22 +02:00
Mamadou Babaei 2c0c3a2dbf Revert "move force-feedback properties from the touch component to the grab component"
This reverts commit 9faa9d2ca4.
2023-05-19 18:02:21 +02:00
Mamadou Babaei 9d92e2600b move force-feedback properties from the touch component to the grab component 2023-05-19 18:02:21 +02:00
Mamadou Babaei f3afbccb2b cache which finger can grab or touch objects 2023-05-19 18:02:20 +02:00
Mamadou Babaei b7ea384fd7 set up the overlap events for the grab/touch fingertip colliders 2023-05-19 18:02:20 +02:00
Mamadou Babaei 852f398755 add the api for getting/setting touch properties 2023-05-19 18:02:19 +02:00
Mamadou Babaei 933d75bd63 add the api for getting/setting grab properties 2023-05-19 18:02:19 +02:00
Mamadou Babaei 9721eaa275 add a grab socket uproperty, getters, and setters 2023-05-19 18:01:26 +02:00
Mamadou Babaei afb14d3b89 whitespace fix 2023-05-19 18:01:26 +02:00
Mamadou Babaei 2d77ee8b5d differentiate the default grab/touch socket names 2023-05-19 17:45:02 +02:00
Mamadou Babaei 4485d2b786 integrate the touch component and colliders and rename the grab ones 2023-05-19 17:45:02 +02:00
Mamadou Babaei 508ef0976e add a touch component intended to be used for force-feedback 2023-05-19 17:45:01 +02:00
Mamadou Babaei f45f2ea73d add the api and setup the required components and uproperties in order to implement the basic grab functionality 2023-05-19 17:45:01 +02:00
Mamadou Babaei 434bcf12c5 document the unreleased changes 2023-05-19 17:45:00 +02:00
Mamadou Babaei af18e5453d fix blueprint signatures and make all bp exposed functions static 2023-05-19 17:45:00 +02:00
Mamadou Babaei cb894ef7a8 formatting fix 2023-05-19 17:44:59 +02:00
Mamadou Babaei 75855bcca2 document a missing changelog item 2023-05-19 17:44:59 +02:00
Mamadou Babaei 380d83717c Revert "temporarily revert changes that are not part of the v1.3.1 release"
This reverts commit 116935f54b.
2023-05-19 17:44:59 +02:00
Mamadou Babaei 9a3d44dc81 bump the plugin version to v1.3.1 2023-04-28 02:09:50 +02:00
Mamadou Babaei 22e782e8e5 temporarily revert changes that are not part of the v1.3.1 release 2023-04-28 02:09:50 +02:00
Mamadou Babaei 2ce7439fbf fix runuat rocket build issues by adding the missing headers 2023-04-28 02:09:49 +02:00
Mamadou Babaei ec1c5c9c8a document the senseglove debug module 2023-04-28 02:09:49 +02:00
Mamadou Babaei d32f59a8cb document unreleased changes 2023-04-28 02:09:49 +02:00
Mamadou Babaei dc0cf37e45 Revert "temporarily revert changes that are not part of the v1.3.0 release"
This reverts commit 6a0f2a00a1.
2023-04-28 02:09:48 +02:00
Mamadou Babaei dbd252f487 bump the plugin version to v1.3.0 2023-04-28 01:19:56 +02:00
Mamadou Babaei 37efb4cf51 temporarily revert changes that are not part of the v1.3.0 release 2023-04-28 01:19:56 +02:00
Mamadou Babaei eded9f5ad5 bump senseglove libraries for linux and android to v2.6.0-aac3d56 2023-04-28 01:19:55 +02:00
Mamadou Babaei 82c3993ea9 bump the senseglove libraries for windows/msvc to v2.6.0-aac3d56 2023-04-28 01:19:55 +02:00
Mamadou Babaei 873a850498 document recent changes 2023-04-28 01:19:54 +02:00
Mamadou Babaei a1d78fa767 document the senseglove libraries bump in the changelog 2023-04-28 01:19:54 +02:00
Mamadou Babaei 7b4b06e3d0 adjust senseglove/unreal coordinate system conversions according to changes in the recent sgcore release 2023-04-28 01:19:54 +02:00
Mamadou Babaei daa22b3940 fix a gramatical error 2023-04-28 01:19:54 +02:00
Mamadou Babaei cf8fc5fcda add a debug virtual hand and some other fixes 2023-04-28 01:19:54 +02:00
Mamadou Babaei 7b57334ed0 fix the hand right hand offset 2023-04-28 01:19:54 +02:00
Mamadou Babaei 22ca963bd6 remove redundant headers 2023-04-28 01:19:54 +02:00
Mamadou Babaei 66d0201d12 fix debug gizmo default colors 2023-04-28 01:19:54 +02:00
Mamadou Babaei 3b68860eeb refactor the debug gizmo draw method 2023-04-28 01:19:54 +02:00
Mamadou Babaei 649d88e85d update the changelog with unreleased changes 2023-04-28 01:19:54 +02:00
Mamadou Babaei 2ff9e6f984 refactor the wrist tracker's debug gzmo settings into a ustruct in order to be re-used 2023-04-28 01:19:54 +02:00
Mamadou Babaei 51e1d5f252 fix gizmo drawing issue happens due to a null world object 2023-04-28 01:19:54 +02:00
Mamadou Babaei 66aec3cdea add a new generic senseglove debug module 2023-04-28 01:19:54 +02:00
Mamadou Babaei 1426e2b2c2 add the base implementation for the senseglove grab component 2023-04-28 01:19:54 +02:00
Mamadou Babaei cb9a319a6a increase the default DebugWristTrackerGizmoLength value in the plugin's settings 2023-04-28 01:19:54 +02:00
Mamadou Babaei 1539b09925 increase the default DebugWristTrackerGizmoLength value on the wrist tracker 2023-04-28 01:19:54 +02:00
Mamadou Babaei fd9b8d6a01 document unreleased changes 2023-04-28 01:19:54 +02:00
Mamadou Babaei e1353bb0ec fix the wrong hand offset calculations 2023-04-28 01:19:54 +02:00
Mamadou Babaei 7481d2cd8e fix the wrong tracker origin calculations 2023-04-28 01:19:54 +02:00
Mamadou Babaei 3d0e7fe8d2 fix the platform support matrix for unreal versions >= 5.0 2023-04-20 15:54:59 +02:00
Mamadou Babaei da7bc22ed7 minor code improvements and clean up 2023-04-20 15:54:59 +02:00
Mamadou Babaei a54d252971 fix the directory structure 2023-04-11 21:05:17 +02:00
Mamadou Babaei d711d42562 remove the development virtual hand mesh from master and all the release branches 2023-04-11 20:57:34 +02:00
Mamadou Babaei 3c56af0e1f bump the plugin version to v1.2.1 2023-03-30 06:42:46 +02:00
Mamadou Babaei 9cbdf5cea7 add the engine settings module into the private include paths for the senseglove settings module in order to solve run uat build issues 2023-03-30 06:22:27 +02:00
Mamadou Babaei 032422de1c remove the engine settings module from the senseglove module's private dependencies list 2023-03-30 06:14:59 +02:00
Mamadou Babaei 0f89d1c4dd remove the launch and settings from the android module's private includes 2023-03-30 05:58:15 +02:00
Mamadou Babaei 8d289c0f2f bump the plugin version to v1.2.0 2023-03-28 21:38:59 +02:00
Mamadou Babaei 62a2dd44f0 add the new dev/test hand model (this hand mesh is not meant to be published) 2023-03-28 18:28:01 +02:00
Mamadou Babaei c3001c588c alternative approach to constructor helpers in order to set the default hand mesh as it won't causes annoying ue pop-up cdo messages 2023-03-28 18:28:01 +02:00
Mamadou Babaei f3b21fecfa remove the old virtual hand model mesh 2023-03-28 18:28:00 +02:00
Mamadou Babaei 94e1b9ffcb fix the hand animation implementation and angle conversions to work with the standard ue5.1+ hand from epic 2023-03-28 18:28:00 +02:00
Mamadou Babaei 01078b6cd6 add missing paths headers that causes uat build issues 2023-03-28 11:45:17 +02:00
Mamadou Babaei a62f615036 add missing vershon headers and clean up unused headers 2023-03-28 11:45:16 +02:00
Mamadou Babaei 5213282f25 fix uat errors C4458 when building the virtual hand component 2023-03-28 11:22:22 +02:00
Mamadou Babaei 58712b48ad remove SGContentBrowserExtension_SKeleton and clean up the editor module 2023-03-28 10:34:53 +02:00
Mamadou Babaei 1684a40c20 remove SGAssetTypeActions_Skeleton, SGSkeletonEditor, and SGSkeletonEditorCommands classes 2023-03-28 10:34:53 +02:00
Mamadou Babaei cbcb6abaee add a content browser extension as an alternative to modify the ref pose 2023-03-28 10:34:53 +02:00
Mamadou Babaei 1ff21f70c7 add log template specialization for ftransform 2023-03-28 10:34:53 +02:00
Mamadou Babaei 3020fcdd7a add new experiments with the SGAssetTypeActions_Skeleton 2023-03-28 10:34:53 +02:00
Mamadou Babaei d3467ac7f2 add custom asset type actions for skeletons 2023-03-28 10:34:53 +02:00
Mamadou Babaei 4a212edbca add a message dialog and instruct the user to use the context menu in order to save the skeleton asset 2023-03-28 10:34:53 +02:00
Mamadou Babaei 5ebcb583f6 fix a deprecation warning on ue5 2023-03-28 10:34:53 +02:00
Mamadou Babaei 9b99399641 minor changelog fix 2023-03-28 10:34:52 +02:00
Mamadou Babaei 691fd43cd1 document the android calibration in the changelog 2023-03-28 10:34:52 +02:00
Mamadou Babaei 716ce49ca7 add virtual destructors 2023-03-28 10:34:52 +02:00
Mamadou Babaei f4a368a61c fix the skeleton editor crash with a working button from senseglove on the toolbar 2023-03-28 10:34:52 +02:00
Mamadou Babaei 22c97d2d77 first attemp at extending the skeleton editor that also crashes the editor once opened 2023-03-28 10:34:52 +02:00
Mamadou Babaei e89643f8d0 add missing header that causes build issues on ue 4.27 2023-03-28 10:34:52 +02:00
Mamadou Babaei 24eb573007 update the changelog 2023-03-28 10:34:52 +02:00
Mamadou Babaei 3b29f54622 clean up editor code from the virtual hand actor in order to fix wrist tracking issues 2023-03-28 10:34:52 +02:00
Mamadou Babaei 61e4aa2e6a force the wrist tracker to track the right hand on init/begin/construct 2023-03-28 10:34:52 +02:00
Mamadou Babaei 0dccac6432 add event handler lambdas for wrist tracker component of the virtual ahnd actor 2023-03-28 10:34:52 +02:00
Mamadou Babaei 12bfcfe80d functional wrist tracker component 2023-03-28 10:34:52 +02:00
Mamadou Babaei 407d4ea14c add an almost complete wrist tracker component implementation 2023-03-28 10:34:52 +02:00
Mamadou Babaei 1dff735623 fix multiple issues with the virtual hand component and the plugin settings 2023-03-28 10:34:52 +02:00
Mamadou Babaei 1834ea5d5c explicitly assign motion controllers to the proper hands 2023-03-28 10:34:52 +02:00
Mamadou Babaei 29d2aad490 bump senseglove libraries windows/msvc to v2.5.0-8069342 2023-03-28 10:34:52 +02:00
Mamadou Babaei 82f354e340 bump senseglove libraries and headers for linux and android to v2.5.0-8069342 2023-03-28 10:34:51 +02:00
Mamadou Babaei d4b06e062e add new settings accessors for c++ and blueprints 2023-03-28 10:34:50 +02:00
Mamadou Babaei 4a005a85b0 add wrist tracking debug settings 2023-03-28 10:34:50 +02:00
Mamadou Babaei 919e7f17dd allow setting custom hardware offset through the plugin settings 2023-03-28 10:34:50 +02:00
Mamadou Babaei 31cb7ee20b add missing engine module that causes build issues on android 2023-03-28 10:34:50 +02:00
Mamadou Babaei ae268ebde7 move the pimpl initialization to the constructor 2023-03-28 10:34:50 +02:00
Mamadou Babaei 220ddf28a6 move the defaults to the constructor 2023-03-28 10:34:50 +02:00
Mamadou Babaei 091b0ade32 make the senseglove settings a singleton with engine subsystem lifetime and fix the blueprint accessors 2023-03-28 10:34:50 +02:00
Mamadou Babaei b0c32ccad4 add the senseglove settings kismet module 2023-03-28 10:34:50 +02:00
Mamadou Babaei 838b5fe557 some improvements for the settings module 2023-03-28 10:34:49 +02:00
Mamadou Babaei 78735026c2 minor fixes in the settings module 2023-03-28 10:34:49 +02:00
Mamadou Babaei e1ced44a69 add a senseglove settings manager module 2023-03-28 10:34:49 +02:00
Mamadou Babaei f92e870c56 fix the changelog typos and errors 2023-03-28 10:34:49 +02:00
Mamadou Babaei a4941d4d7d whitespace fix 2023-03-28 10:34:49 +02:00
Mamadou Babaei 4a72839ece add special android directory methods and initialization args 2023-03-28 10:34:49 +02:00
Mamadou Babaei 1a89f202c5 initial attempt at implementing android calibration 2023-03-28 10:34:49 +02:00
Mamadou Babaei f1b14c7673 bump senseglove libraries and headers for linux and android to v2.4.3-2eceacb 2023-03-28 10:34:48 +02:00
Mamadou Babaei a35e706283 virtual hand fixes especially for android 2023-03-28 10:34:48 +02:00
Mamadou Babaei 708fce2f0c fix virtual hand crashes and editor visibility issues 2023-03-28 10:34:47 +02:00
Mamadou Babaei 9116e4a234 fix comments 2023-03-28 10:34:47 +02:00
Mamadou Babaei 9ee7e3f0df fix android architecture detection issues on ue 5.2 2023-03-28 10:34:47 +02:00
Mamadou Babaei 4a03aedb3c add a temporary workaround for the android crashes and the hidden if glove not found functionality 2023-03-28 10:34:47 +02:00
Mamadou Babaei 1eadfd249b fix native-toolchain v19 build issues 2023-03-28 10:34:47 +02:00
Mamadou Babaei d2a1583217 integrate the virtual hand into the sgpawn 2023-03-28 10:34:47 +02:00
Mamadou Babaei 786c7d8380 clarify android on 5.2 is not supported, yet 2023-03-28 10:34:47 +02:00
Mamadou Babaei 53a70569bd minor fixes 2023-03-28 10:34:47 +02:00
Mamadou Babaei 4f01d61640 update the changelog in order to reflect the latest status of unreleased changes 2023-03-28 10:34:47 +02:00
Mamadou Babaei a0bd230c73 dump some animation errors to the logs inside the editor instead of crashing 2023-03-28 10:34:47 +02:00
Mamadou Babaei 81eb3bb90c working in-editor hand animation 2023-03-28 10:34:47 +02:00
Mamadou Babaei 8253ec277d distinguish between virtual hand actor and component and animate the component 2023-03-28 10:34:47 +02:00
Mamadou Babaei 9598c772fc add a new component-based class for the virtual hand 2023-03-28 10:34:47 +02:00
Mamadou Babaei 01eed66701 add an empty sgpawn kismet library class 2023-03-28 10:34:47 +02:00
Mamadou Babaei 9ae0b1ea2f document the new senseglove core types module 2023-03-28 10:34:46 +02:00
Mamadou Babaei a6baab575c add the virtual hand kismet library 2023-03-28 10:34:46 +02:00
Mamadou Babaei 79c31ecf50 minor commit fix 2023-03-28 10:34:46 +02:00
Mamadou Babaei d80697ee72 drop the redundant sgconnecttypes 2023-03-28 10:34:46 +02:00
Mamadou Babaei 50f76c7a0d move all sg array types into their corresponding *core modules 2023-03-28 10:34:46 +02:00
Mamadou Babaei 846dac5a88 minor api validation fixes 2023-03-28 10:34:46 +02:00
Mamadou Babaei c314920d89 minor fix 2023-03-28 10:34:46 +02:00
Mamadou Babaei 55405672f8 bump senseglove libraries windows to v2.4.2-ba98cec 2023-03-28 10:34:46 +02:00
Mamadou Babaei f2656f1bea bump senseglove libraries and headers for linux and android to v2.4.2-ba98cec 2023-03-28 10:34:44 +02:00
Mamadou Babaei eead79b8f5 remove the redundant sgplatform from the sgconnectimpl module 2023-03-28 10:34:43 +02:00
Mamadou Babaei 5ae86cbf66 purge the core impl module's dead code for the dropped engine versions: 4.22 to 4.26 and define SG_NOEXCEPT 2023-03-28 10:34:43 +02:00
Mamadou Babaei 5902aafff0 document 4.22 to 4.26 purge in the changelog 2023-03-28 10:34:43 +02:00
Mamadou Babaei 4e591d6290 initial attempt to cleanup dead code from the dropped engine versions: 4.22 to 4.26 2023-03-28 10:34:43 +02:00
Mamadou Babaei 46f885fa5a update the remarks section in readme file to reflect the latest platform support state 2023-03-28 10:34:43 +02:00
Mamadou Babaei 51190d6ead update the changelog for unreleased changes 2023-03-28 10:34:43 +02:00
Mamadou Babaei 96fb9c3c8e update the platform support matrix 2023-03-28 10:34:43 +02:00
Mamadou Babaei 9bde1878ed whitespace fix 2023-03-28 10:34:43 +02:00
Mamadou Babaei 7c271d30ce update the changelog for unreleased changes 2023-03-28 10:34:43 +02:00
Mamadou Babaei d61183a960 update unreal api to take care of radians/degrees conversions where possible 2023-03-28 10:34:43 +02:00
Mamadou Babaei caa0bf259a add more utility functions and templates for angles, specifically for handling floats 2023-03-28 10:34:43 +02:00
Mamadou Babaei e9a6fc3df0 almost working hand mondel animation adjusted to the api changes 2023-03-28 10:34:43 +02:00
Mamadou Babaei bdfb75920b rename sguitls/sgcoordinates utility class to sgangles and convert angles from radians to degrees and vice-versa between unreal and senseglove 2023-03-28 10:34:43 +02:00
Mamadou Babaei 2e5ba17d89 minor initialization fixes 2023-03-28 10:34:42 +02:00
Mamadou Babaei 25dca3f8f3 minor fix: move temp a variable 2023-03-28 10:34:42 +02:00
Mamadou Babaei b4cdbec91a mark a method as const 2023-03-28 10:34:42 +02:00
Mamadou Babaei 58ca6a5bca clean up redundant hand animation code 2023-03-28 10:34:42 +02:00
Mamadou Babaei f29c428b16 remove redundant reset to ref pose call 2023-03-28 10:34:42 +02:00
Mamadou Babaei 759c94bcbf use rotators instead of quats 2023-03-28 10:34:42 +02:00
Mamadou Babaei 4393af7317 improve the virtual hand model animation 2023-03-28 10:34:42 +02:00
Mamadou Babaei a31b14d48c rely on the reference pose instead of caching poses 2023-03-28 10:34:42 +02:00
Mamadou Babaei 854ce6a198 improved virtual hand model animation 2023-03-28 10:34:42 +02:00
Mamadou Babaei e0e743b63d bump senseglove libraries for windows/msvc to v2.4.1-d551398 2023-03-28 10:34:41 +02:00
Mamadou Babaei e32453dfef mention functional linux development support in the changelog 2023-03-28 10:34:41 +02:00
Mamadou Babaei d57d3ffa4a bump senseglove libraries and headers for linux and android to v2.4.1-d551398 2023-03-28 10:34:39 +02:00
Mamadou Babaei 8194072025 bump senseglove libraries for windows/msvc to v2.4.0-dc6c34b 2023-03-28 10:34:39 +02:00
Mamadou Babaei cf7fba949d bump senseglove libraries and headers for linux and android to v2.4.0-dc6c34b 2023-03-28 10:34:37 +02:00
Mamadou Babaei 0dd745bbe6 bump senseglove libraries for windows/msvc to v2.3.0-a9726bf 2023-03-28 10:34:37 +02:00
Mamadou Babaei 0ca24adee3 bump senseglove libraries for linux and android to the first fully linux-aware version: v2.3.0-a9726bf 2023-03-28 10:34:36 +02:00
Mamadou Babaei b947685598 apply the transform to the output pose 2023-03-28 10:34:35 +02:00
Mamadou Babaei 11534229f4 try a component transform 2023-03-28 10:34:35 +02:00
Mamadou Babaei 77d7b4eb23 add quat template specialization to the sglog module 2023-03-28 10:34:35 +02:00
Mamadou Babaei 25e8fd2d07 fix the EvaluateSkeletalControl_AnyThread crash 2023-03-28 10:34:35 +02:00
Mamadou Babaei dafc7c0ad6 revert back the last commit and ignore the last joint 2023-03-28 10:34:35 +02:00
Mamadou Babaei 2b818dd11b try an alternate implementation for copying animation data in order to remedy the virtual hand crash 2023-03-28 10:34:35 +02:00
Mamadou Babaei cf115e2782 bump senseglove thrid-party libraries for windows to v2.2.4-1eda0d8 2023-03-28 10:34:35 +02:00
Mamadou Babaei f709be4935 bump senseglove libraries for linux and android to v2.2.4-1eda0d8 2023-03-28 10:34:33 +02:00
Mamadou Babaei a0f3b84aab bump senseglove headers and libraries for linux and android to v2.2.3-39b3c2b 2023-03-28 10:34:32 +02:00
Mamadou Babaei de83672ef1 bump senseglove thrid-party libraries for windows to v2.2.3-39b3c2b 2023-03-28 10:34:31 +02:00
Mamadou Babaei a465321f9d bump senseglove headers and libraries for linux and android to v2.2.2-1725b91 2023-03-28 10:34:31 +02:00
Mamadou Babaei 392fcd4932 bump senseglove thrid-party libraries for windows to v2.2.2-1725b91 2023-03-28 10:34:30 +02:00
Mamadou Babaei 8a1e9ff300 add the msvc141 third-party directory to the directory tree 2023-03-28 10:34:30 +02:00
Mamadou Babaei fd257711c2 add the android module to the directory tree 2023-03-28 10:34:30 +02:00
Mamadou Babaei ff59e7f712 document the directory structure changes 2023-03-28 10:34:30 +02:00
Mamadou Babaei 06b27847cb bump windows/msvc binaries to v2.2.1-ca2f23d 2023-03-28 10:34:30 +02:00
Mamadou Babaei 94301a321c update senseglove libraries to v2.2.1-ca2f23d with per engine segregated android ndk support 2023-03-28 10:34:23 +02:00
Mamadou Babaei 0ea98272a9 updated documentation for the directory structure 2023-03-28 10:34:23 +02:00
Mamadou Babaei 14a43e0630 remove redundant Source/ThirdParty/lib/oculus directories 2023-03-28 10:34:23 +02:00
Mamadou Babaei a7f4a83850 updated documentation for the directory structure 2023-03-28 10:34:22 +02:00
Mamadou Babaei 9101d2061a update the platform support matrix 2023-03-28 10:34:22 +02:00
Mamadou Babaei 3e025f3e47 bump senseglove headers and libraries for windows/msvc to v2.2.0-eed9611 2023-03-28 10:34:22 +02:00
Mamadou Babaei 2ba5c0f2fc log the unreleased changes 2023-03-28 10:34:21 +02:00
Mamadou Babaei 66e60ff18a bump senseglove headers and libraries for linux and android to v2.2.0-eed9611 2023-03-28 10:34:21 +02:00
Mamadou Babaei 25f8ef6393 remove archaic pre-public-release dead code 2023-03-28 10:34:21 +02:00
Mamadou Babaei e30ca2c9ed virtual hand implementation with a crash from calling EvaluateSkeletalControl_AnyThread 2023-03-28 10:34:21 +02:00
Mamadou Babaei adcfa63415 fix impl owners 2023-03-28 10:34:20 +02:00
Mamadou Babaei 02cb09d504 add partion implementation of the virtual hand 2023-03-28 10:34:20 +02:00
Mamadou Babaei 89a9200413 fix vr hand asset issues 2023-03-28 10:34:20 +02:00
Mamadou Babaei e50a65ca92 add senseglove module base classes 2023-03-28 10:34:20 +02:00
Mamadou Babaei 955bb69cf9 add the virtual hand assets 2023-03-28 10:34:20 +02:00
Mamadou Babaei 3335ee2ec3 punctuation fix 2023-03-28 10:34:18 +02:00
Mamadou Babaei b0113a908e bump the plugin version to v1.1.1 2023-02-07 12:12:19 +01:00
Mamadou Babaei 50971e6051 move launch and settings module to PrivateIncludePathModuleNames from PrivateDependencyModuleNames in order to pass runuat tests 2023-02-07 12:12:18 +01:00
Mamadou Babaei 78bb5adff6 Bump SenseGlove libraries for Windows/MSVC to v2.1.2-95ec6e7 2023-02-07 12:12:18 +01:00
Mamadou Babaei 95fb454576 fix formatting 2023-02-07 12:12:18 +01:00
Mamadou Babaei c0d4a50f76 add support for android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a 2023-02-07 12:12:17 +01:00
Mamadou Babaei 092f4a1327 bump senseglove libraries for linux to v2.1.2-95ec6e7 2023-02-07 12:12:17 +01:00
Mamadou Babaei 5bbb51b0fe update the changelog with initiali support for ue5.2 2023-02-07 12:12:17 +01:00
Mamadou Babaei 6006a22c06 add initial ue5.2 support to the build system along with linux third-party libraries 2023-02-07 12:12:17 +01:00
Mamadou Babaei ffdb3657d6 fix gitignore rules for the Source/ThirdParty directory 2023-02-07 12:12:17 +01:00
Mamadou Babaei f5b93b45ed bump senseglove libraries for windows/msvc to v2.1.1-0569c74 2023-02-07 12:12:16 +01:00
Mamadou Babaei 08e8eec206 bump the plugin version to v1.1.0 2023-02-03 13:43:41 +01:00
Mamadou Babaei b47de02afe switch to sgconnect for android v1.1.0 extracted from the .arr file shipped with our unity plugin 2023-02-03 13:43:41 +01:00
Mamadou Babaei e58522bfd1 bump senseglove libraries to v2.1.1-0569c74 2023-02-03 13:43:41 +01:00
Mamadou Babaei a3827277b1 use the correct writehaptics signature extracted from the .jar file 2023-02-03 13:43:41 +01:00
Mamadou Babaei 5c6f9ad18b mention sgconnect for android as an added dependency in the changelog 2023-02-03 13:43:41 +01:00
Mamadou Babaei f3845ef65f update the platform support matrix and the directory structure 2023-02-03 13:43:41 +01:00
Mamadou Babaei 1c7b1891f7 log the unreleased changes 2023-02-03 13:43:41 +01:00
Mamadou Babaei 54bda06bdc bump sgconnect and sgcore to v2.1.0-9080621 and add an almost functional android implementation 2023-02-03 13:43:40 +01:00
Mamadou Babaei f9dbc1f11e try to offload android to sgcore/sgconnect third-party libraries and drop linux third-party libraries for earlier versions of the engine prior to 4.27 2023-02-03 13:43:40 +01:00
Mamadou Babaei 16df85607d minor documentation fixes 2023-02-03 13:43:40 +01:00
Mamadou Babaei 7ec9e80c3a drop linux third-party libraries for earlier versions of the engine prior to 4.27 2023-02-03 13:43:40 +01:00
Mamadou Babaei 0f514a2f95 fix a bug in the jni call write haptics 2023-02-03 13:43:40 +01:00
Mamadou Babaei 14ebc3327b replace more method calls on android with the equivalents from sgconnect for android 2023-02-03 13:43:40 +01:00
Mamadou Babaei 3b6a2341fa bump copyright years 2023-02-03 13:43:40 +01:00
Mamadou Babaei fb5babc0f1 add an android module with working jni calls to Init(), Dispose(), and GetLibraryVersion() 2023-02-03 13:43:39 +01:00
Mamadou Babaei 4db4bf397a log the unreleased changes 2023-02-03 13:43:39 +01:00
Mamadou Babaei 6ef49c204c remove the enum utils class due to ANY_PACKAGE deprecation warnings in unreal engine 5.1 2023-02-03 13:43:39 +01:00
Mamadou Babaei 2785c1ae38 conform to the class naming standards 2023-02-03 13:43:39 +01:00
Mamadou Babaei 756abf819d apply const correctness 2023-02-03 13:43:39 +01:00
Mamadou Babaei 7bfb6c1517 whitelist android as a target platform 2023-02-03 13:43:39 +01:00
Mamadou Babaei f916999716 fix android build issues caused by the log module 2023-02-03 13:43:39 +01:00
Mamadou Babaei 672209ab03 bump the plugin version to v1.0.4 2022-12-02 12:35:07 +01:00
Mamadou Babaei e215d7192f simplify the move constructors / move assignment operators' noexcept ifdefs 2022-12-02 12:35:07 +01:00
Mamadou Babaei 9ea20a2bc8 fix ue 4.22 - 4.27 build issues on msvc 2017 2022-12-02 12:35:07 +01:00
Mamadou Babaei fae227db6c move sgplatform headers to the public folder 2022-12-02 12:35:07 +01:00
Mamadou Babaei 4d18afb9d6 update the platform support matrix 2022-12-02 12:35:07 +01:00
Mamadou Babaei f9bc33f2fd fix ue >= 5.0 ubt errors 2022-12-02 12:35:07 +01:00
Mamadou Babaei ae46cb6240 upgrade senseglove third-party libraries for linux and android to to v2.0.4 2022-12-02 12:35:06 +01:00
Mamadou Babaei 225f2d3d30 add macros for C++17 detection 2022-12-02 12:35:04 +01:00
Mamadou Babaei acd955f815 apply const correctness to method parameters 2022-12-02 12:35:04 +01:00
Mamadou Babaei a07f54dea8 upgrade sglibraries binaries for windows/msvc to to v2.0.4 and add msvc 2017 binaries 2022-12-02 12:35:03 +01:00
Mamadou Babaei 729e10681b upgrade sglibraries third-party headers to v2.0.4 2022-12-02 12:35:03 +01:00
Mamadou Babaei 3289fadcde add support for msvc 2017 to the build.cs files 2022-12-02 12:35:01 +01:00
Mamadou Babaei d958ae6382 bump the plugin version to v1.0.3 2022-11-30 14:32:51 +01:00
Mamadou Babaei c8ca169f3b adjust Config/FilterPlugin.ini in order to conform to Epic's market place guidelines 2022-11-30 14:28:00 +01:00
Mamadou Babaei c391c0a794 bump the plugin version to v1.0.2 2022-11-27 14:42:36 +01:00
Mamadou Babaei 4a3ca10802 fix the third-party license mark down file formatting 2022-11-27 14:42:36 +01:00
Mamadou Babaei 5bf4e8264f add the SenseGlove SDK license 2022-11-27 14:42:36 +01:00
Mamadou Babaei cb388efd30 fix readme typos and errors 2022-11-27 14:13:56 +01:00
Mamadou Babaei 2d2b43d4ad add missing the copyright notice and include directive 2022-11-27 14:13:56 +01:00
Mamadou Babaei bb3452ce7c list the dot files inside the FilterPlugin.ini file 2022-11-27 13:55:25 +01:00
Mamadou Babaei fbcf503351 add the marketplace url to the .uplugin file 2022-11-27 13:55:25 +01:00
Mamadou Babaei 88832fd6bd bump the plugin version to v1.0.1 2022-11-25 15:20:15 +01:00
Mamadou Babaei f25259c556 * Expose SenseGloveTypes as a public dependency in SenseGloveConnect and
SenseGloveCore modules, so that the C++ users of the API don't need to
 explicitly add it as a dependency
* Clean up the redundant headers/modules dependency from SGCore headers
* Fix RunUAT build issues for Epic Store submission
2022-11-25 15:04:02 +01:00
Mamadou Babaei ce1a342b28 update documentation, add changelog, and prepare for v1.0.0 release 2022-11-24 17:09:41 +01:00
Mamadou Babaei 18b0ea9eea huge patch fixing 4.22 through 4.24 build issues on msvc and llvm/clang 2022-11-24 01:18:08 +01:00
Mamadou Babaei 49bd844c1c fix a mangled method name in layer 4 2022-11-23 21:18:55 +01:00
Mamadou Babaei 8c15c54077 replace IMPLEMENT_GAME_MODULE with IMPLEMENT_MODULE 2022-11-19 13:06:33 +01:00
Mamadou Babaei 2312b75c85 fix module types and loading order 2022-11-19 13:06:33 +01:00
Mamadou Babaei 696d77f629 add the docs url 2022-11-18 15:06:29 +01:00
Mamadou Babaei 3ffbd72def import sg libraries v2.0.3 binaries for msvc/windows 2022-11-18 15:01:54 +01:00
Mamadou Babaei 29e3458cd1 import sg libraries headers v2.0.3 and linux binaries and adjust to the latest changes 2022-11-18 15:01:54 +01:00
Mamadou Babaei 344027b781 add more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 8e86d9f656 add missing sense glove wrappers in layer 1/2/3/4 of the api and also more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 37b30cd099 add missing nova glove info rotator conversions to layer 3/4 of the api and also more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 45b1c36cf7 add missing nova glove hand profile wrappers in layer 3/4 of the api and also more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 340503b61d add more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 6b076bb5fb add missing sg device wrappers in layer 4 of the api and also more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei f5050ac081 add more documentation 2022-11-18 15:01:53 +01:00
Mamadou Babaei 1ab4410c21 document some parts of the layer 3 and 4 api 2022-11-18 15:01:53 +01:00
Mamadou Babaei b683aa22af translate senseglove/unreal angles/directions 2022-11-18 15:01:53 +01:00
Mamadou Babaei aac0bb8a05 implement proper mm/cm conversions 2022-11-17 02:23:04 +01:00
Mamadou Babaei 4903e11dee introduce more utility templates for metric unit conversions 2022-11-17 02:23:04 +01:00
Mamadou Babaei b3b0639e72 remove unit conversions from the internal vect3d wrappers 2022-11-17 02:23:04 +01:00
Mamadou Babaei ae43aead8c bump sg libraries to v2.0.2 and adjust to the latest changes 2022-11-17 02:23:03 +01:00
Mamadou Babaei 4f08fe0286 consider millimeters/centimeters conversion, introduce units, and minor array utils refactoring 2022-11-17 02:23:03 +01:00
Mamadou Babaei 4b28a863f0 fix wrong readme header 2022-11-17 02:23:03 +01:00
Mamadou Babaei ed0cfe18c3 shorten mangled blueprint nodes in order to avoid doc generation issues 2022-11-14 17:14:28 +01:00
Mamadou Babaei 85e4ddaac5 separate the unreal c++/bp implementation of SGConnect wrappers 2022-11-11 14:53:21 +01:00
Mamadou Babaei 4225eeaaf6 add FRotator overloads for every method that accepts or returns FQuat and some other bug fixes 2022-11-11 11:28:33 +01:00
Mamadou Babaei 2477c97588 fix unreal/senseglove coordinates translation calculations 2022-11-11 11:28:33 +01:00
640 changed files with 28093 additions and 23765 deletions
+2 -121
View File
@@ -5,130 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.2] - 2024-04-25
This is a patch release with no code changes.
### Added
- Introduce official Unreal Engine 5.4 support to the Unreal Engine Marketplace.
### Changed
- Updated the Platform Support Matrix with the latest changes. This is the last release to support Unreal Engine 5.1 as we no longer are able to push updates for this release to the Unreal Engine Marketplace. The v2.0.1 release for Unreal Engine 5.1 can be obtained from the Unreal Engine Marketplace, and v2.0.2 through our Microsoft Azure DevOps repositories. Please note that there are no actual code changes between these two releases and in terms of functionality they are almost identical.
## [2.0.1] - 2024-04-15
This is a bugfix release.
### Fixed
- Fix a bug inside both SGVirtualHandComponent and SGWristTrackerComponent where the connected glove's UObject instance gets destroyed and re-instantiated every frame. With this fix now the glove instance will be created or destroyed only when a glove connects to or disconnects from the system.
- Update the outdated Platform Support Matrix and its remarks section to reflect the latest status information.
- Fix the wrong header file description sections for the header files inside <code>SenseGloveKismet/Public/SGKismet/</code>.
### Changed
- SenseGlove libraries have been updated to v2.102.0-35d4de3f.
- Together, SenseGlove libraries v2.102.0-35d4de3f and SenseCom v1.6.1 remove the need to call ResetCalibration every time and are able to store and load calibration profiles from disk.
- SesenGloveBackend module is no longer calling FSGHandLayer::ResetCalibration on every backend initialization.
## [2.0.0] - 2024-03-22
This is the second major release of the SenseGlove Unreal Engine Plugin adding support for Nova 2 with enormous breaking changes to the current C++ and Blueprint APIs.
### Added
- Added support for the SenseGlove Nova 2 devices.
- Added support for Quest 3 controllers.
- Various classes have been added to the API in order to implement the new functionalities and features from the latest upstream SenseGlove libraries.
- Added initial support for the upcoming Unreal Engine 5.4 release.
- Added a pair of default production-ready virtual hand meshes for the left and right hands, courtesy of [Allbreaker LLC Columbia](https://www.allbreaker.co/). For usage and redistribution, please consult the [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) file.
### Fixed
- A few critical bug fixes that have already been backported to the v1.x.x series through v1.9.3 to v1.9.8 releases.
- Revamped the way we do FVector <-> SGVect3D, FQuat <-> SGQuat, and SenseGlove <-> Unreal Engine angles conversions in order to properly translate between the SenseGlove and Unreal Engine coordinate systems.
- Allow the C++ compiler the opportunity to perform RVO/NRVO if applicable.
- Fix the modules' order inside the .uplugin file.
- Fix a build issue inside FSGArrayUtils::FromStdVector introduced by newer MVSC updates due to stricter implicit uint64 to int32 conversions.
- Fix a build issues inside FSGArrayUtils when performing non-Unity builds due to the missing <string> header.
- Fix other build issues in USGDevice, USGNovaGloveSensorData, FSGDeviceImpl, and FSGSenseGloveVarsImpl when performing non-Unity builds due to the missing relevant headers.
- Fix changelog formatting.
- Some other improverment and fixes.
### Changed
- SenseGlove libraries have been updated to v2.101.12-62b1be11.
- The SenseGlove Unreal Engine Plugin now declares the OpenXR plugin as a dependency, so that the OpenXR plugin will be enabled automatically as soon as the SenseGlove Unreal Engine Plugin gets enabled.
- Various classes and parts of the API have been changed in order to reflect and adhere to upstream SenseGlove libraries.
- Reverse the Platform Support Matrix order from newer Unreal Engine versions to the older ones.
- Clarify the engine support policy in the main readme file by adding the corresponding references from the Epic Marketplace Guidelines and a URL to their guidelines page.
- The SGTouchComponent uproperties BuzzDuration and BuzzLevel now utilize different different names in order to correspond to the underlying API changes. They have been renamed to VibrotactileDuration and VibrotacktileLevel.
- The SGTouchComponent uproperties ForceFeedbackLevel and BuzzLevel (now VibrotacktileLevel) parameters type have changed from int32 to float with the value range varying between 0.0f to 1.0f instead of 1 to 100 in order to correspond to the underlying API changes.
- The SGVirtualHandComponent now assumes the default grab point's name as GenericGrabPoint instead of GrabPoint as default if not specified in the Unreal Blueprint Editor.
- The SGPawn on UE 5.2+ now utilizes UXRDeviceVisualizationComponent in order to properly display the controller meshes shipped with Unreal Engine's OpenXR plugin, or a user-provided mesh. On UE 5.1 this could still be set on the WristTrackerLeft and WristTrackerRight components. Please note that despite the fact that on UE 5.2+ it's still possible to utilize the WristTrackerLeft and WristTrackerRight for setting the controller meshes, this has been deprecated in UE 5.2+ and is no longer supported.
### Removed
- Various classes and parts of the API have been removed in order to reflect and adhere to upstream SenseGlove libraries.
- Removed the redundant SGIC_int32_Ref interop type.
## [1.9.8] - 2024-03-12
This is a bugfix release that contains bugfixes backported from the next major release of the plugin as documented below.
### Fixed
- Fix a bug where the right-hand mesh is always hidden inside the game no matter whether the right glove is connected or not.
- Fix a crash inside the USGHandPose::FromHandAngles method.
- Some performance optimizations by utilizing MoveTemp in return statements.
- Some improvements applied to the source code.
- Some other minor fixes.
### Changed
- The BonesRotations TMap is no longer a public field of FSGVirtualHandAnimInstanceProxy and instead could be retrieved by calling the GetBonesRotations() method.
## [1.9.7] - 2024-02-18
This is a bugfix release that contains bugfixes backported from the next major release of the plugin as documented below.
### Fixed
- Fix various bugs inside the SGPlayerController which occur when the thumb and pinky fingers are simultaneously touching different SGTouchComponents, or only one of them is in touch with such a component. In this case pinky's buzz and force-feedback levels are determined from the SGTouchComponent that is in collision with the thumb instead of the one that is touched by the pinky. Or, the pinky could ignore the buzz and force-feedback level if the thumb is not in collision with an SGTouchComponent. Or, the pinky could have reacted with a buzz or force feedback while only the thumb is in contact with an SGTouchComponent.
- Fix the BuzzDuration UPROPERTY range in order not to get clamped at 100.0f and also use float values for ClampMin and UIMin specifiers instead of integer values.
## [1.9.6] - 2024-02-14
This is a bugfix release.
### Fixed
- Fix a few critical bugs inside the NovaGlove class where the higher levels of the API including constructors, Parse, and NewNovaGlove methods mistakenly instantiate a SenseGloveImpl class instead of a NovaGloveImpl class.
## [1.9.5] - 2024-02-09
This is a bugfix release.
### Fixed
- Fix a wrong type-casting inside SGDeviceModel::ParseFirmware where OutMainVersion and OutSubVersion arguments are getting passed to the lower levels of the API. This could potentially result in a segfault at the FFI boundary between lower and higher levels of the API.
## [1.9.4] - 2024-02-08
This is a bugfix release addressing mostly Blueprint API issues with ABI breaking changes inside the Blueprint layer, backported from the next major release of the plugin as documented below.
### Fixed
- Fix the Blueprint Parse function signature for the NovaGloveInfoKismetLibrary where the OutGloveInfo passed by the caller was never actually assigned as it was not getting passed by reference.
- Changelog formatting.
## [1.9.3] - 2024-02-03
This is a hotfix release addressing a few critical issues that might result in crashes or malfunctions for users of the low-level SenseGlove API, backported from the next major release of the plugin as documented below.
### Fixed
# Fixed
- Fix a potential memory corruption inside one of the SGBasicHandModel constructors where the StartPositions parameter gets passed as the StartRotations parameter to lower levels of the API.
- Fix a potential memory corruption inside one of the SGSenseGloveInfo constructors where the StartPositions parameter gets passed as the Functions parameter to lower levels of the API.
@@ -144,7 +25,7 @@ This is a hotfix release addressing a few critical issues that might result in c
## [1.9.2] - 2023-11-03
### Added
# Added
- Added a list of planned features and their completion status to the main README file.
Binary file not shown.
-13
View File
@@ -85,16 +85,3 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
## Allbreaker Virtual Hand Models
```
The virtual hand model mesh included in this plugin, situated within the
Contents/Meshes/Allbreaker folder, is graciously supplied by Allbreaker LLC
Colombia. This provision is made pursuant to an agreement between SenseGlove
B.V. and Allbreaker LLC. Users of this plugin are bound by the terms outlined in
the license agreement and are advised to review the terms and conditions
specified therein.
Please visit https://www.allbreaker.co/ to obtain information about the work of
Allbreaker.
```
+44 -21
View File
@@ -8,17 +8,16 @@ This repository relies on Git LFS for storing binary blobs (e.g. third-party lib
| | **Windows (MSVC 2017)** | **Windows (MSVC 2019)** | **Windows (MSVC 2022)** | **Linux x86-64 (Native Toolchain)** | **Linux AArch64 (Native Toolchain)** | **Android (NDK)** | **UE Marketplace Version** | **Azure DevOps Version** |
|----------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------------------:|:------------------------------------:|:-----------------:|:--------------------------:|:------------------------:|
| **5.4** | ❌ | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
| **5.3** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
| **5.2** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
| **5.1** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ⚠️ v2.0.1 | ✅ v2.0.2 |
| **5.0** | ❌ | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x (r21e) | ⚠️ v1.6.1 | ⚠️ v1.6.1 |
| **4.27** | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x (r21e) | ⚠️ v1.3.1 | ⚠️ v1.4.3 |
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.22** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.27** | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x (r21e) | ⚠️ v1.3.1 | ⚠️ v1.4.3 |
| **5.0** | ❌ | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x (r21e) | ⚠️ v1.6.1 | ⚠️ v1.6.1 |
| **5.1** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.3 | ✅ v1.9.3 |
| **5.2** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.3 | ✅ v1.9.3 |
| **5.3** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.3 | ✅ v1.9.3 |
* <code>✅</code> Supported
* <code>⚠️</code> Not supported by the latest release and might be lacking features
@@ -26,10 +25,12 @@ This repository relies on Git LFS for storing binary blobs (e.g. third-party lib
* <code>❓</code> Unknown or untested
Remarks:
* Per [Epic's Marketplace Guidelines](https://www.unrealengine.com/en-US/marketplace-guidelines) in regards to Code Plugins (sections 2.6.3.d and 3.1.b), we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
* Per Epic's Marketplace policy regarding Code Plugins, we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
* Microsoft Visual Studio 2022 is not supported by Unreal Engine 4.22 through 4.26.
* All third-party libraries on Windows built against Windows SDK 10.0.
* Oculus and VIVE support is only provided through the recommended Android NDK versions by Epic Games.
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully.
* Oculus support is only provided through the recommended Android NDK versions by Epic Games.
* The Unreal Engine 4.27+ support is provided for Android/Oculus development.
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully, thus some older NDKs such as r14b.
* All third-party libraries target Android NDK API Level 29, thus any project relying on the plug-in should be build with the same NDK API Level.
## Changelog
@@ -54,13 +55,12 @@ Please note that modules postfixed with **Impl** are intended for interal use an
## Planned Features Completion Status
### Implemented as of v2.0.2
### Implemented as of v1.9.3
- [X] Full SenseGlove low-level core API access through Unreal C++.
- [X] Full SenseGlove low-level core API access through Blueprint.
- [X] DK 1 Support.
- [X] Nova 1 Support.
- [X] Nova 2 Support.
- [X] Support for Microsoft Windows as a development platform.
- [X] Support for GNU/Linux as a development platform.
- [X] Support for Microsoft Windows as a deployment platform.
@@ -80,11 +80,12 @@ Please note that modules postfixed with **Impl** are intended for interal use an
- [X] Easy wrist/hand tracking debugging using the SenseGlove Debug module.
- [X] A generic Settings module with the ability to override settings.
- [X] C++/Blueprint interaction events such as OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch.
- [X] A default hand mesh rigged with the standard SenseGlove default hand pose.
### Upcoming features planned for the v2.1.0 release
### Upcoming features planned for the v2.0.0 release
- [ ] A default hand mesh rigged with the standard SenseGlove default hand pose.
- [ ] Hand tracking compatible with OpenXR (or other generic hand tracking format).
- [ ] Nova 2 Support.
### Planned features long-term
@@ -113,10 +114,6 @@ Please note that modules postfixed with **Impl** are intended for interal use an
├── SenseGloveAndroid (the Android-specific module)
├── SenseGloveBackend (responsible for initialization and deinitialization of the backend libraries)
├── SenseGloveBackendKismet (exposes Blueprints-specific functionality from the SenseGloveBackend module)
├── SenseGloveBuildHacks (uses Exceptions and RTTI, internally used for compiler-specific build hacks)
├── SenseGloveConnect (exposes part of the SGConnect low-level API to C++)
@@ -169,6 +166,32 @@ Please note that modules postfixed with **Impl** are intended for interal use an
├── android
│ │
│ ├── r21e (Android NDK r21e dependencies for UE 4.27 and 5.0)
│ │ │
│ │ ├── arm64 (64-bit ARM variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ ├── armv7 (32-bit ARM variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ ├── x64 (64-bit x86-64 variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ └── x86 (32-bit x86 variant of Android)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ └── r25b (Android NDK r21b dependencies for UE 5.1)
│ │
│ ├── arm64 (64-bit ARM variant of Android)
+13 -25
View File
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "2.0.2",
"VersionName": "1.9.3",
"FriendlyName": "SenseGlove",
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
"Category": "Virtual Reality",
@@ -10,7 +10,6 @@
"DocsURL": "https://senseglove.gitlab.io/unreal-blueprint-docs/",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/5e1d408f517b4966a269ec1035de0b9e",
"SupportURL": "https://www.senseglove.com/support/",
"EngineVersion": "5.1.0",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
@@ -43,6 +42,17 @@
"Win64"
]
},
{
"Name": "SenseGloveBuildHacks",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveBackend",
"Type": "Runtime",
@@ -65,17 +75,6 @@
"Win64"
]
},
{
"Name": "SenseGloveBuildHacks",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveConnect",
"Type": "Runtime",
@@ -240,16 +239,5 @@
"Win64"
]
}
],
"Plugins": [
{
"Name": "OpenXR",
"Enabled": true,
"PlatformAllowList": [
"Android",
"Linux",
"Win64"
]
}
]
}
}
@@ -99,10 +99,10 @@ USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
ForceFeedbackLevel = 1.0f;
BuzzLevel = 0;
BuzzDuration = 0.25f;
VibrotactileDuration = 0.25f;
VibrotactileLevel = 0.0f;
ForceFeedbackLevel = 100;
}
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
@@ -36,9 +36,11 @@
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Animation/Skeleton.h"
#include "Components/SphereComponent.h"
#include "Components/SkeletalMeshComponent.h"
#include "Engine/SkeletalMesh.h"
#include "Templates/UnrealTypeTraits.h"
#include "Kismet/GameplayStatics.h"
#include "Runtime/Launch/Resources/Version.h"
#include "UObject/ConstructorHelpers.h"
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
@@ -57,29 +59,29 @@ struct USGVirtualHandComponent::FImpl
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")};
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")};
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")};
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")};
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
return Path;
}
@@ -211,7 +213,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
bAutoStopAllHapticsOnEndPlay = true;
GrabSocketName = FName{TEXT("GenericGrabPoint")};
GrabSocketName = FName{TEXT("GrabPoint")};
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
@@ -257,7 +259,7 @@ void USGVirtualHandComponent::SetRight(const bool bInRight)
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
{
ensureAlwaysMsgf((TIsDerivedFrom<decltype(NewClass), USGVirtualHandAnimInstance>::IsDerived),
ensureAlwaysMsgf(Cast<USGVirtualHandAnimInstance>(NewClass),
TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!"));
Super::SetAnimClass(NewClass);
@@ -387,7 +389,13 @@ USGHandPose* USGVirtualHandComponent::GetHandPose()
if (IsValid(Glove))
{
#if ! PLATFORM_ANDROID
Glove->GetHandPose(this, HandPose);
#else /* ! PLATFORM_ANDROID */
const UWorld* World{GetWorld()};
const float DeltaTime = UGameplayStatics::GetWorldDeltaSeconds(World);
Glove->GetHandPose(this, DeltaTime, HandPose);
#endif /* ! PLATFORM_ANDROID */
}
return HandPose;
@@ -423,8 +431,8 @@ const FTransform& USGVirtualHandComponent::GetFingerBoneRefTransform(const int32
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
{
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
return BoneRotation;
FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
return MoveTemp(BoneRotation);
}
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
@@ -433,16 +441,16 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
if (!IsGloveConnected())
{
return Rotations;
return MoveTemp(Rotations);
}
const USGHandPose* HandPose = GetHandPose();
if (!IsValid(HandPose))
{
return Rotations;
return MoveTemp(Rotations);
}
const TArray<TArray<FVector>>& HandAngles{HandPose->GetHandAngles()};
const TArray<TArray<FVector>> HandAngles{HandPose->GetHandAngles()};
for (int32 FingerIndex = 0; FingerIndex < HandAngles.Num(); ++FingerIndex)
{
@@ -451,7 +459,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
{
const FVector& JointAngle{FingerJointAngles[JointIndex]};
const FQuat JointRotation{FQuat::MakeFromEuler(FVector{-JointAngle.Y, -JointAngle.X, -JointAngle.Z})};
const FQuat JointRotation{FQuat::MakeFromEuler(JointAngle)};
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
@@ -463,7 +471,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
}
}
return Rotations;
return MoveTemp(Rotations);
}
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
@@ -497,7 +505,7 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
}
return SkeletalMeshPath;
return MoveTemp(SkeletalMeshPath);
}
bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() const
@@ -565,12 +573,25 @@ USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
{
Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
// FIXME
// Since we dont ship a default virtual hand mesh at the moment, calling SetDefaultMesh causes the following failed
// assertion due the fact that the engine won't be able to find the asset at the default location:
// Assertion failed: IsInGameThread()
// Unable to load /SenseGlove/Meshes/SK_SenseGlove_VirtualHand_*. Objects and Packages can only be loaded from the
// One workaround would be disabling the async loading or as an alternative simply disabling this portion of the
// code should be a good-enough fix until we address this issue in it's own time.
//Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
}
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
{
return Owner->GetSkeletalMeshAsset();
return Owner->
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
GetSkeletalMeshAsset()
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
SkeletalMesh
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
;
}
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
@@ -598,18 +619,13 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
}
}
bool bGloveConnected;
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
{
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bGloveConnected)
{
Owner->Glove = nullptr;
}
}
else
{
bGloveConnected = true;
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
}
const bool bIsEditor = IsEditor();
@@ -618,7 +634,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
const bool bIsVisible = Owner->IsVisible();
if (Owner->bHiddenInGameIfNoGloveDetected)
{
if (bGloveConnected)
if (bFoundGlove)
{
if (!bIsVisible)
{
@@ -642,7 +658,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
}
}
return bGloveConnected;
return bFoundGlove;
}
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
@@ -250,22 +250,21 @@ bool USGWristTrackerComponent::FImpl::CheckGlove() const
}
}
bool bGloveConnected;
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
{
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bGloveConnected)
{
Owner->Glove = nullptr;
}
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
}
else
if (bFoundGlove)
{
bGloveConnected = true;
UpdateWristTrackingData();
}
return bGloveConnected;
return bFoundGlove;
}
void USGWristTrackerComponent::FImpl::UpdateMotionSource() const
@@ -39,9 +39,7 @@
#include "Components/PrimitiveComponent.h"
#include "Components/SphereComponent.h"
#include "Kismet/KismetMathLibrary.h"
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
#include "XRDeviceVisualizationComponent.h"
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
#include "Runtime/Launch/Resources/Version.h"
#include "UObject/UObjectGlobals.h"
#include "SenseGlove/Components/SGGrabComponent.h"
@@ -50,8 +48,6 @@
#include "SenseGlove/Components/SGWristTrackerComponent.h"
#include "SGLog/SGLog.h"
static constexpr float SG_HAND_MESH_YAW_CORRECTION_OFFSET = -90.0f;
struct ASGPawn::FImpl
{
/************************
@@ -177,15 +173,6 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
WristTrackerLeft->SetupAttachment(GetRootComponent());
WristTrackerLeft->SetRight(false);
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
ControllerVisualizerLeft = ObjectInitializer.CreateDefaultSubobject<UXRDeviceVisualizationComponent>(
this, TEXT("ControllerVisualizerLeft"));
ControllerVisualizerLeft->SetupAttachment(WristTrackerLeft);
ControllerVisualizerLeft->SetDisplayModelSource(FName("OpenXR"));
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
WristTrackerLeft->SetDisplayModelSource(FName("OpenXR"));
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
HandLeft = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandLeft"));
HandLeft->SetupAttachment(GetRootComponent());
HandLeft->SetCanEverAffectNavigation(false);
@@ -203,7 +190,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
HandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
HandLeft->SetRight(false);
HandLeft->SetHiddenIfNoGloveDetected(true);
HandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
HandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
false, nullptr, ETeleportType::None);
HandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -227,7 +214,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
RealHandLeft->SetRight(false);
Pimpl->SetVisibility(RealHandLeft, false);
RealHandLeft->SetHiddenIfNoGloveDetected(true);
RealHandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
RealHandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
false, nullptr, ETeleportType::None);
RealHandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -404,15 +391,6 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
WristTrackerRight->SetupAttachment(GetRootComponent());
WristTrackerRight->SetRight(true);
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
ControllerVisualizerRight = ObjectInitializer.CreateDefaultSubobject<UXRDeviceVisualizationComponent>(
this, TEXT("ControllerVisualizerRight"));
ControllerVisualizerRight->SetupAttachment(WristTrackerRight);
ControllerVisualizerRight->SetDisplayModelSource(FName("OpenXR"));
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
WristTrackerRight->SetDisplayModelSource(FName("OpenXR"));
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
HandRight = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandRight"));
HandRight->SetupAttachment(GetRootComponent());
HandRight->SetCanEverAffectNavigation(false);
@@ -429,8 +407,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
HandRight->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block);
HandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
HandRight->SetRight(true);
HandRight->SetHiddenInGame(true);
HandRight->SetHiddenIfNoGloveDetected(true);
HandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
HandRight->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
false, nullptr, ETeleportType::None);
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -454,7 +433,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
RealHandRight->SetRight(true);
Pimpl->SetVisibility(RealHandRight, false);
RealHandRight->SetHiddenIfNoGloveDetected(true);
RealHandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
RealHandRight->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
false, nullptr, ETeleportType::None);
RealHandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -1831,24 +1810,20 @@ void ASGPawn::FImpl::UpdateHandRotation(const bool bRight, const FRotator& Rotat
void ASGPawn::FImpl::UpdateLeftHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
{
static const FQuat Offset{FQuat::MakeFromEuler(FVector{0.0f, 0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET})};
const FQuat NewRotation{Rotation.Quaternion() * Offset};
if (bUpdateVirtualHand)
{
Owner->HandLeft->SetWorldRotation(NewRotation);
Owner->HandLeft->SetWorldRotation(Rotation);
}
Owner->RealHandLeft->SetWorldRotation(NewRotation);
Owner->RealHandLeft->SetWorldRotation(Rotation);
}
void ASGPawn::FImpl::UpdateRightHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
{
static const FQuat Offset{FQuat::MakeFromEuler(FVector{0.0f, 0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET})};
const FQuat NewRotation{Rotation.Quaternion() * Offset};
if (bUpdateVirtualHand)
{
Owner->HandRight->SetWorldRotation(NewRotation);
Owner->HandRight->SetWorldRotation(Rotation);
}
Owner->RealHandRight->SetWorldRotation(NewRotation);
Owner->RealHandRight->SetWorldRotation(Rotation);
}
void ASGPawn::FImpl::UpdateHandLocationAndRotation(
@@ -45,12 +45,14 @@
#include "TimerManager.h"
#include "SenseGlove/Components/SGGrabComponent.h"
#include "SenseGlove/Components/SGTouchComponent.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "SenseGlove/GameFramework/SGPawn.h"
#include "SenseGlove/Haptics/SGGrabState.h"
#include "SenseGlove/Haptics/SGTouchState.h"
#include "SGBuildHacks/SGPlatform.h"
#include "SGCore/SGBuzzCommand.h"
#include "SGCore/SGForceFeedbackCommand.h"
#include "SGCore/SGHapticGlove.h"
struct ASGPlayerController::FImpl
@@ -59,32 +61,18 @@ struct ASGPlayerController::FImpl
* Static methods
************************/
static float GetForceFeedbackLevel(const AActor* Actor);
static int32 GetBuzzLevel(const AActor* Actor);
static float GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching);
static float GetVibrotactileDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching);
static float GetVibrotactileLevel(const AActor* Actor);
static TArray<float> GetForceFeedbackLevels(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching);
static TArray<float> GetVibrotactileLevels(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching);
static int32 GetForceFeedbackLevel(const AActor* Actor);
/************************
* Member variables
************************/
FTimerHandle TouchVibrotactileStopTimer;
FTimerHandle TouchBuzzStopTimer;
/************************
* Owner object
@@ -110,137 +98,96 @@ struct ASGPlayerController::FImpl
* Methods
************************/
USGBuzzCommand* GetBuzzCommand(
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const;
USGForceFeedbackCommand* GetForceFeedbackCommand(
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const;
void UpdateHapticsFeedback(const FSGTouchState& TouchState);
};
float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
int32 ASGPlayerController::FImpl::GetBuzzLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetForceFeedbackLevel();
return TouchComponent->GetBuzzLevel();
}
}
return 0.0f;
return 0;
}
float ASGPlayerController::FImpl::GetVibrotactileDuration(const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching)
float ASGPlayerController::FImpl::GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching)
{
if (IsValid(ActorThumbTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorThumbTouching);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileDuration();
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorIndexTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileDuration();
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorMiddleTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileDuration();
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorRingTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileDuration();
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorPinkyTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileDuration();
return TouchComponent->GetBuzzDuration();
}
}
return 0.0f;
}
float ASGPlayerController::FImpl::GetVibrotactileLevel(const AActor* Actor)
int32 ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (IsValid(TouchComponent))
if (TouchComponent)
{
return TouchComponent->GetVibrotactileLevel();
return TouchComponent->GetForceFeedbackLevel();
}
}
return 0.0f;
}
TArray<float> ASGPlayerController::FImpl::GetForceFeedbackLevels(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching)
{
const float ThumbForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
const float IndexForceFeedbackLevel = GetForceFeedbackLevel(ActorIndexTouching);
const float MiddleForceFeedbackLevel = GetForceFeedbackLevel(ActorMiddleTouching);
const float RingForceFeedbackLevel = GetForceFeedbackLevel(ActorRingTouching);
const float PinkyForceFeedbackLevel = GetForceFeedbackLevel(ActorPinkyTouching);
const TArray<float> ForceFeedbackLevels{
ThumbForceFeedbackLevel,
IndexForceFeedbackLevel,
MiddleForceFeedbackLevel,
RingForceFeedbackLevel,
PinkyForceFeedbackLevel,
};
return ForceFeedbackLevels;
}
TArray<float> ASGPlayerController::FImpl::GetVibrotactileLevels(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching)
{
const float ThumbVibrotactileLevel = GetVibrotactileLevel(ActorThumbTouching);
const float IndexVibrotactileLevel = GetVibrotactileLevel(ActorIndexTouching);
const float MiddleVibrotactileLevel = GetVibrotactileLevel(ActorMiddleTouching);
const float RingVibrotactileLevel = GetVibrotactileLevel(ActorRingTouching);
const float PinkyVibrotactileLevel = GetVibrotactileLevel(ActorPinkyTouching);
const TArray<float> ForceFeedbackLevels{
ThumbVibrotactileLevel,
IndexVibrotactileLevel,
MiddleVibrotactileLevel,
RingVibrotactileLevel,
PinkyVibrotactileLevel,
};
return ForceFeedbackLevels;
return 0;
}
ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer)
@@ -304,10 +251,69 @@ ASGPlayerController::FImpl::FImpl(ASGPlayerController* InOwner)
ASGPlayerController::FImpl::~FImpl() = default;
USGBuzzCommand* ASGPlayerController::FImpl::GetBuzzCommand(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const
{
const int32 ThumbBuzzLevel = GetBuzzLevel(ActorThumbTouching);
const int32 IndexBuzzLevel = GetBuzzLevel(ActorIndexTouching);
const int32 MiddleBuzzLevel = GetBuzzLevel(ActorMiddleTouching);
const int32 RingBuzzLevel = GetBuzzLevel(ActorRingTouching);
const int32 PinkyBuzzLevel = GetBuzzLevel(ActorThumbTouching);
if (ThumbBuzzLevel <= 0 && IndexBuzzLevel <= 0 && MiddleBuzzLevel <= 0 && RingBuzzLevel <= 0 && PinkyBuzzLevel <= 0)
{
return nullptr;
}
USGBuzzCommand* BuzzCommand = USGBuzzCommand::NewBuzzCommand(
Owner,
GetBuzzLevel(ActorThumbTouching),
GetBuzzLevel(ActorIndexTouching),
GetBuzzLevel(ActorMiddleTouching),
GetBuzzLevel(ActorRingTouching),
GetBuzzLevel(ActorPinkyTouching)
);
return BuzzCommand;
}
USGForceFeedbackCommand* ASGPlayerController::FImpl::GetForceFeedbackCommand(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const
{
const int32 ThumbForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
const int32 IndexForceFeedbackLevel = GetForceFeedbackLevel(ActorIndexTouching);
const int32 MiddleForceFeedbackLevel = GetForceFeedbackLevel(ActorMiddleTouching);
const int32 RingForceFeedbackLevel = GetForceFeedbackLevel(ActorRingTouching);
const int32 PinkyForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
if (ThumbForceFeedbackLevel <= 0 && IndexForceFeedbackLevel <= 0 && MiddleForceFeedbackLevel <= 0
&& RingForceFeedbackLevel <= 0 && PinkyForceFeedbackLevel <= 0)
{
return nullptr;
}
USGForceFeedbackCommand* ForceFeedbackCommand = USGForceFeedbackCommand::NewForceFeedbackCommand(
Owner,
GetForceFeedbackLevel(ActorThumbTouching),
GetForceFeedbackLevel(ActorIndexTouching),
GetForceFeedbackLevel(ActorMiddleTouching),
GetForceFeedbackLevel(ActorRingTouching),
GetForceFeedbackLevel(ActorPinkyTouching)
);
return ForceFeedbackCommand;
}
void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& TouchState)
{
static const TArray<float> VibrotactileOffCommand{0.0f, 0.0f, 0.0, 0.0, 0.0f};
if (!IsValid(TouchState.Hand))
{
return;
@@ -319,44 +325,48 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc
return;
}
// Queue the Force-Feedback command...
TArray<float> ForceFeedbackLevels{
GetForceFeedbackLevels(
const USGBuzzCommand* BuzzCommand{
GetBuzzCommand(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
TouchState.ActorRingTouching,TouchState.ActorPinkyTouching)
};
Glove->QueueForceFeedbackLevels(MoveTemp(ForceFeedbackLevels));
// Queue the Vibrotactile command...
TArray<float> VibrotactileLevels{
GetVibrotactileLevels(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
};
Glove->QueueVibroLevels(MoveTemp(VibrotactileLevels));
// Send the haptics commands!
Glove->SendHaptics();
// Stop the Vibrotactile command after the timeout if a.
const float VibrotactileDuration = FImpl::GetVibrotactileDuration(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching);
Owner->GetWorldTimerManager().ClearTimer(TouchVibrotactileStopTimer);
FTimerDelegate TouchVibrotactileStopHandler;
TouchVibrotactileStopHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
if (IsValid(BuzzCommand))
{
if (IsValid(Glove))
{
Glove->QueueVibroLevels(VibrotactileOffCommand);
Glove->SendHaptics();
}
});
Glove->SendHaptics(BuzzCommand);
Owner->GetWorldTimerManager().SetTimer(
TouchVibrotactileStopTimer, TouchVibrotactileStopHandler, VibrotactileDuration, false, -1.0f);
const float Duration = FImpl::GetBuzzDuration(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching);
Owner->GetWorldTimerManager().ClearTimer(TouchBuzzStopTimer);
FTimerDelegate TouchBuzzStopHandler;
TouchBuzzStopHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
{
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
});
Owner->GetWorldTimerManager().SetTimer(
TouchBuzzStopTimer, TouchBuzzStopHandler, Duration, false, -1.0f);
}
else
{
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
}
const USGForceFeedbackCommand* ForceFeedbackCommand{
GetForceFeedbackCommand(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching)
};
if (IsValid(ForceFeedbackCommand))
{
Glove->SendHaptics(ForceFeedbackCommand);
}
else
{
Glove->SendHaptics(USGForceFeedbackCommand::Off(Owner));
}
}
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
@@ -40,12 +40,12 @@
void FSenseGloveModule::StartupModule()
{
SGLOG("Starting up the SenseGlove module...");
SGLOG("Starting up SenseGlove module...");
}
void FSenseGloveModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGlove module...");
SGLOG("Unloading SenseGlove module...");
}
void FSenseGloveModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveModule::PostLoadCallback()
void FSenseGloveModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGlove module...");
SGLOG("Shutting down SenseGlove module...");
}
#undef LOCTEXT_NAMESPACE
@@ -46,19 +46,13 @@ struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProx
{
GENERATED_USTRUCT_BODY()
private:
public:
TMap<FName, FRotator> BonesRotations;
public:
FSGVirtualHandAnimInstanceProxy();
FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance);
public:
FORCEINLINE const TMap<FName, FRotator>& GetBonesRotations() const
{
return BonesRotations;
}
protected:
virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override;
@@ -54,15 +54,16 @@ public:
private:
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
float ForceFeedbackLevel;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false", ClampMin = "0.0", UIMin = "0.0"))
float VibrotactileDuration;
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
int32 BuzzLevel;
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
float VibrotactileLevel;
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
float BuzzDuration;
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
int32 ForceFeedbackLevel;
private:
struct FImpl;
@@ -76,32 +77,33 @@ private:
FImplDeleter PimplDeleter;
public:
FORCEINLINE float GetForceFeedbackLevel() const
FORCEINLINE int32 GetBuzzLevel() const
{
return BuzzLevel;
}
FORCEINLINE void SetBuzzLevel(const int32 Level)
{
BuzzLevel = Level;
}
FORCEINLINE float GetBuzzDuration() const
{
return BuzzDuration;
}
FORCEINLINE void SetBuzzDuration(const float Duration)
{
BuzzDuration = Duration;
}
FORCEINLINE int32 GetForceFeedbackLevel() const
{
return ForceFeedbackLevel;
}
FORCEINLINE void SetForceFeedbackLevel(const float Level)
FORCEINLINE void SetForceFeedbackLevel(const int32 Level)
{
ForceFeedbackLevel = Level;
}
FORCEINLINE float GetVibrotactileDuration() const
{
return VibrotactileDuration;
}
FORCEINLINE void SetVibrotactileDuration(const float Duration)
{
VibrotactileDuration = Duration;
}
FORCEINLINE float GetVibrotactileLevel() const
{
return VibrotactileLevel;
}
FORCEINLINE void SetVibrotactileLevel(const float Level)
{
VibrotactileLevel = Level;
}
};
@@ -37,7 +37,7 @@
#include "Containers/Array.h"
#include "GameFramework/Pawn.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Templates/UniquePtr.h"
#include "SenseGlove/Haptics/SGGrabState.h"
@@ -244,13 +244,6 @@ public:
return WristTrackerLeft;
}
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
FORCEINLINE UXRDeviceVisualizationComponent* GetControllerVisualizerLeft() const
{
return ControllerVisualizerLeft;
}
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
{
return HandLeft;
@@ -306,13 +299,6 @@ public:
return WristTrackerRight;
}
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
FORCEINLINE UXRDeviceVisualizationComponent* GetControllerVisualizerRight() const
{
return ControllerVisualizerLeft;
}
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
{
return HandRight;
+8 -9
View File
@@ -42,22 +42,21 @@ public class SenseGlove : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"AnimGraphRuntime",
"Core",
"CoreUObject",
"Engine",
"HeadMountedDisplay",
"InputCore",
// NOTE
// UE 5.3+ provides UXRDeviceVisualizationComponent as part of the XRBase plugin.
// UE 5.2 provides UXRDeviceVisualizationComponent as part of the HeadMountDisplay module.
// UE 5.1 does not provide the UXRDeviceVisualizationComponent type.
#if UE_5_3_OR_LATER
"XRBase",
#endif
"SenseGloveBackend",
"SenseGloveConnect",
"SenseGloveCore",
@@ -75,4 +74,4 @@ public class SenseGlove : ModuleRules
}
);
}
}
}
@@ -117,7 +117,7 @@ int32 FSGCoreJNI::Initialize()
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'WriteHaptics'...");
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(IILjava/lang/String;)I");
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(ILjava/lang/String;)I");
FAndroidApplication::CheckJavaException();
if (!WriteHapticsMethodID)
{
@@ -43,7 +43,7 @@
void FSenseGloveAndroidModule::StartupModule()
{
SGLOG("Starting up the SenseGloveAndroid module...");
SGLOG("Starting up SenseGloveAndroid module...");
#if PLATFORM_ANDROID
const int32 R1 = FSGConnectJNI::Initialize();
@@ -59,17 +59,17 @@ void FSenseGloveAndroidModule::StartupModule()
void FSenseGloveAndroidModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveAndroid module...");
SGLOG("Unloading SenseGloveAndroid module...");
}
void FSenseGloveAndroidModule::PostLoadCallback()
{
SGLOG("Loading the SenseGloveAndroid module has succeeded!");
SGLOG("Loading SenseGloveAndroid module has succeeded!");
}
void FSenseGloveAndroidModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveAndroid module...");
SGLOG("Shutting down SenseGloveAndroid module...");
}
#undef LOCTEXT_NAMESPACE
@@ -43,22 +43,22 @@ public class SenseGloveAndroid : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"SenseGloveConnectImpl",
"SenseGloveCoreImpl",
"SenseGloveLog",
}
);
PrivateIncludePathModuleNames.AddRange(
new string[]
{
"SenseGloveInterop",
"SenseGloveLog",
}
);
@@ -37,12 +37,9 @@
#include "Engine/Engine.h"
#if PLATFORM_ANDROID
#include "SGConnect/SGConnect.h"
#endif /* PLATFORM_ANDROID */
#include "SGCore/SGDeviceList.h"
#include "SGCore/SGHandLayer.h"
#include "SGCore/SGHapticGloveHandProfiles.h"
#include "SGLog/SGLog.h"
struct USGBackend::FImpl
@@ -118,6 +115,9 @@ bool USGBackend::InitializeBackend()
FSGDeviceList::Dispose();
FSGDeviceList::Reinitialize();
// Load the latest hand profiles.
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
bBackendInitialized = true;
return true;
@@ -42,10 +42,16 @@ public class SenseGloveBackend : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"InputCore",
@@ -41,12 +41,12 @@
void FSenseGloveBackendKismetModule::StartupModule()
{
SGLOG("Starting up the SenseGloveBackendKismet module...");
SGLOG("Starting up SenseGloveBackendKismet module...");
}
void FSenseGloveBackendKismetModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveBackendKismet module...");
SGLOG("Unloading SenseGloveBackendKismet module...");
}
void FSenseGloveBackendKismetModule::PostLoadCallback()
@@ -56,7 +56,7 @@ void FSenseGloveBackendKismetModule::PostLoadCallback()
void FSenseGloveBackendKismetModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveBackendKismet module...");
SGLOG("Shutting down SenseGloveBackendKismet module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,10 +42,16 @@ public class SenseGloveBackendKismet : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"SenseGloveBackend",
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_HandLayer.h"
#include "SGBuildHacks/SGInclude_Core_BuzzCommand.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_CalibrationDataPoint.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_FingerCommand.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_ForceFeedbackCommand.h"
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_Nova2Glove.h"
#include "SGBuildHacks/SGInclude_Core_HandProfile.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationSequence.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCommandBuffer.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveHandProfiles.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveQuickCalibration.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveCalibration.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveHandProfile.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SensorNormalization.h"
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SensorRange.h"
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h"
#include "SGBuildHacks/SGInclude_Core_ThumperCommand.h"
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_ThresholdCommand.h"
#include "SGBuildHacks/SGInclude_Core_TimedBuzzCommand.h"
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h"
#include "SGBuildHacks/SGInclude_Core_TimedThumpCommand.h"
@@ -40,12 +40,12 @@
void FSenseGloveBuildHacksModule::StartupModule()
{
SGLOG("Starting up the SenseGloveBuildHacks module...");
SGLOG("Starting up SenseGloveBuildHacks module...");
}
void FSenseGloveBuildHacksModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveBuildHacks module...");
SGLOG("Unloading SenseGloveBuildHacks module...");
}
void FSenseGloveBuildHacksModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveBuildHacksModule::PostLoadCallback()
void FSenseGloveBuildHacksModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveBuildHacks module...");
SGLOG("Shutting down SenseGloveBuildHacks module...");
}
#undef LOCTEXT_NAMESPACE
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HandLayer.hpp"
#include "SenseGlove/Core/BuzzCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/NormalizationState.hpp"
#include "SenseGlove/Core/CalibrationDataPoint.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/CustomWaveform.hpp"
#include "SenseGlove/Core/FingerCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/ForceFeedbackCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/Nova2Glove.hpp"
#include "SenseGlove/Core/HandProfile.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticGloveCalibrationCheck.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticGloveCalibrationSequence.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticGloveCommandBuffer.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticGloveHandProfiles.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticGloveQuickCalibration.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -1,44 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/Nova2GloveSensorData.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/NovaGloveCalibration.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/NovaGloveHandProfile.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/SenseGloveHandProfile.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -1,44 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/SenseGloveSensorNormalizer.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -1,44 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/SensorNormalization.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/ThresholdCommand.hpp"
#include "SenseGlove/Core/SensorRange.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/ThumperCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/TimedBuzzCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/HapticChannelInfo.hpp"
#include "SenseGlove/Core/TimedThumpCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -46,12 +46,16 @@ public class SenseGloveBuildHacks : ModuleRules
bEnableExceptions = true;
bUseRTTI = true;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SenseGloveLog",
}
);
@@ -42,14 +42,14 @@
void FSenseGloveConnectModule::StartupModule()
{
SGLOG("Starting up the SenseGloveConnect module...");
SGLOG("Starting up SenseGloveConnect module...");
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"),
*FSGConnect::GetLibraryVersion()));
}
void FSenseGloveConnectModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveConnect module...");
SGLOG("Unloading SenseGloveConnect module...");
}
void FSenseGloveConnectModule::PostLoadCallback()
@@ -59,7 +59,7 @@ void FSenseGloveConnectModule::PostLoadCallback()
void FSenseGloveConnectModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveConnect module...");
SGLOG("Shutting down SenseGloveConnect module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,22 +42,21 @@ public class SenseGloveConnect : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveConnectImpl",
"SenseGloveLog",
"SenseGloveTypes",
}
);
PrivateIncludePathModuleNames.AddRange(
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"SenseGloveConnectImpl",
"SenseGloveInterop",
"SenseGloveLog",
"SenseGloveTypes",
}
);
@@ -42,14 +42,14 @@
void FSenseGloveConnectImplModule::StartupModule()
{
SGLOG("Starting up the SenseGloveConnectImpl module...");
SGLOG("Starting up SenseGloveConnectImpl module...");
SGLOG(FString::Printf(TEXT("The low-level implementation of '%s' has been loaded successfully!"), *FSGConnectImpl::
GetLibraryVersion()));
}
void FSenseGloveConnectImplModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveConnectImpl module...");
SGLOG("Unloading SenseGloveConnectImpl module...");
}
void FSenseGloveConnectImplModule::PostLoadCallback()
@@ -59,7 +59,7 @@ void FSenseGloveConnectImplModule::PostLoadCallback()
void FSenseGloveConnectImplModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveConnectImpl module...");
SGLOG("Shutting down SenseGloveConnectImpl module...");
}
#undef LOCTEXT_NAMESPACE
@@ -36,9 +36,11 @@
#pragma once
/* Defines a C++ like static_assert. */
#if ! __cplusplus
#if __cplusplus
#include <cassert>
#else
#include <assert.h>
#endif /* ! __cplusplus */
#endif /* __cplusplus */
/* Contains __bool_true_false_are_defined macro that can be used in order to
check whether boolean type is supported by the compiler or not. */
@@ -56,7 +58,7 @@ static_assert(__bool_true_false_are_defined, "Error: bool, true, and false are n
#define SENSEGLOVECONNECTIMPL_PUBLIC_API DLLIMPORT
#endif /* defined ( SENSEGLOVE_BUILDING_CONNECT_IMPL_MODULE ) */
/* If C++ is used, switch to C mode in order to prevent the C++ name mangling of
/* If C++ is used, switch to C mode in order to prevent C++'s name mangling of
method names. */
#if __cplusplus
extern "C" {
@@ -48,23 +48,21 @@ public class SenseGloveConnectImpl : ModuleRules
bEnableExceptions = true;
bUseRTTI = true;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveBuildHacks",
"SenseGloveLog",
"SenseGloveUtils",
"SenseGloveTypes",
}
);
PrivateIncludePathModuleNames.AddRange(
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SenseGloveBuildHacks",
"SenseGloveInterop",
"SenseGloveLog",
"SenseGloveTypes",
"SenseGloveUtils",
}
);
@@ -191,8 +189,6 @@ public class SenseGloveConnectImpl : ModuleRules
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
break;
#endif
#if ! UE_5_4_OR_LATER && UE_5_0_OR_LATER
case WindowsCompiler.VisualStudio2019:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc142"));
break;
@@ -342,8 +338,6 @@ public class SenseGloveConnectImpl : ModuleRules
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
break;
#endif
#if ! UE_5_4_OR_LATER && UE_5_0_OR_LATER
case WindowsCompiler.VisualStudio2019:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc142"));
break;
@@ -40,12 +40,12 @@
void FSenseGloveConnectKismetModule::StartupModule()
{
SGLOG("Starting up the SenseGloveConnectKismet module...");
SGLOG("Starting up SenseGloveConnectKismet module...");
}
void FSenseGloveConnectKismetModule::PreUnloadCallback()
{
SGLOG("Unloading the SenseGloveConnectKismet module...");
SGLOG("Unloading SenseGloveConnectKismet module...");
}
void FSenseGloveConnectKismetModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveConnectKismetModule::PostLoadCallback()
void FSenseGloveConnectKismetModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGloveConnectKismet module...");
SGLOG("Shutting down SenseGloveConnectKismet module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,10 +42,16 @@ public class SenseGloveConnectKismet : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateDependencyModuleNames.AddRange(
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"SenseGloveConnect",
@@ -68,12 +68,6 @@ float FSGAnatomy::GetThumbJointLimit(const bool bRightHanded, const int32 Joint,
return SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
}
float FSGAnatomy::ClampJointAngle(
const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement)
{
return SGCoreImpl_FSGAnatomyImpl_ClampJointAngle(Value, Finger, bRightHand, Joint, Movement);
}
float FSGAnatomy::NormalizeFingerFlexion(const float FlexionInDegrees)
{
return SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(FlexionInDegrees);
@@ -88,26 +82,26 @@ TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(&OutAnglesContainer, bRightHanded);
return OutAnglesContainer.Array;
return MoveTemp(OutAnglesContainer.Array);
}
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
return OutAnglesContainer.Array;
return MoveTemp(OutAnglesContainer.Array);
}
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
return OutAnglesContainer.Array;
return MoveTemp(OutAnglesContainer.Array);
}
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
return OutAnglesContainer.Array;
return MoveTemp(OutAnglesContainer.Array);
}
@@ -35,6 +35,8 @@
#include "SGCore/SGBasicHandModel.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGFinger.h"
#include "SGInterop/SGIC_FQuat.h"
@@ -206,21 +208,21 @@ TArray<TArray<float>> USGBasicHandModel::GetBaseFingerLengths()
{
FSGIC_TArray_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths(&OutLengthsContainer);
return OutLengthsContainer.Array;
return MoveTemp(OutLengthsContainer.Array);
}
TArray<FVector> USGBasicHandModel::GetBaseJointPositions()
{
FSGIC_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(&OutPositionsContainer);
return OutPositionsContainer.Array;
return MoveTemp(OutPositionsContainer.Array);
}
TArray<FVector> USGBasicHandModel::GetBaseJointAngles()
{
FSGIC_TArray_FVector OutRotationsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer);
return OutRotationsContainer.Array;
return MoveTemp(OutRotationsContainer.Array);
}
USGBasicHandModel::USGBasicHandModel()
@@ -361,7 +363,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerLengths() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths(&InstanceContainer, &OutLengthsContainer);
return OutLengthsContainer.Array;
return MoveTemp(OutLengthsContainer.Array);
}
TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
@@ -371,7 +373,7 @@ TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger(&InstanceContainer, &OutLengthsContainer,
&FingerContainer);
return OutLengthsContainer.Array;
return MoveTemp(OutLengthsContainer.Array);
}
void USGBasicHandModel::SetFingerLengths(const ESGFinger Finger, const TArray<float>& Lengths)
@@ -395,7 +397,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerRatios() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_TArray_float OutRatiosContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios(&InstanceContainer, &OutRatiosContainer);
return OutRatiosContainer.Array;
return MoveTemp(OutRatiosContainer.Array);
}
TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
@@ -405,7 +407,7 @@ TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
FSGIC_TArray_float OutRatiosContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger(&InstanceContainer, &OutRatiosContainer,
&FingerContainer);
return OutRatiosContainer.Array;
return MoveTemp(OutRatiosContainer.Array);
}
TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
@@ -413,7 +415,7 @@ TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions(&InstanceContainer, &OutPositionsContainer);
return OutPositionsContainer.Array;
return MoveTemp(OutPositionsContainer.Array);
}
void USGBasicHandModel::SetStartJointPosition(const ESGFinger Finger, const FVector& Position)
@@ -437,7 +439,7 @@ TArray<FQuat> USGBasicHandModel::GetStartJointRotationsQ() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer);
return OutRotationsContainer.Array;
return MoveTemp(OutRotationsContainer.Array);
}
TArray<FRotator> USGBasicHandModel::GetStartJointRotations() const
@@ -454,7 +456,7 @@ FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
FSGIC_FVector OutPositionContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer);
return OutPositionContainer.Vector;
return MoveTemp(OutPositionContainer.Vector);
}
void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger)
@@ -471,7 +473,7 @@ FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const
FSGIC_FQuat OutRotationContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
return OutRotationContainer.Quat;
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
@@ -504,7 +506,7 @@ TArray<float> USGBasicHandModel::GetTotalLengths() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths(&InstanceContainer, &OutLengthsContainer);
return OutLengthsContainer.Array;
return MoveTemp(OutLengthsContainer.Array);
}
float USGBasicHandModel::GetTotalLength(const ESGFinger Finger) const
@@ -521,7 +523,7 @@ TArray<FVector> USGBasicHandModel::Get3DLengths(const ESGFinger Finger) const
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths(&InstanceContainer, &OutLengthsContainer,
&FingerContainer);
return OutLengthsContainer.Array;
return MoveTemp(OutLengthsContainer.Array);
}
bool USGBasicHandModel::Equals(const USGBasicHandModel* BasicHandModel) const
@@ -536,7 +538,7 @@ FString USGBasicHandModel::ToString() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_ToString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
@@ -544,7 +546,7 @@ FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly(&InstanceContainer, &OutStringContainer, bLengthsOnly);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
FString USGBasicHandModel::SGSerialize() const
@@ -552,7 +554,7 @@ FString USGBasicHandModel::SGSerialize() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_Serialize(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
USGBasicHandModel::FImpl::FImpl(USGBasicHandModel* InOwner)
@@ -36,6 +36,7 @@
#include "SGCore/SGBetaDevice.h"
#include "Engine/World.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGDeviceImplCast.h"
#include "SGCoreImpl/SGBetaDeviceImpl.h"
@@ -145,7 +146,7 @@ FString USGBetaDevice::GetDeviceId() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return OutIdContainer.String;
return MoveTemp(OutIdContainer.String);
}
FString USGBetaDevice::GetHardwareVersion() const
@@ -173,7 +174,7 @@ FString USGBetaDevice::GetConstantsString() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
FString USGBetaDevice::GetSensorData() const
@@ -181,7 +182,7 @@ FString USGBetaDevice::GetSensorData() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutDataContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetSensorData(&InstanceContainer, &OutDataContainer);
return OutDataContainer.String;
return MoveTemp(OutDataContainer.String);
}
FString USGBetaDevice::GetLastCommand() const
@@ -189,7 +190,7 @@ FString USGBetaDevice::GetLastCommand() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutCommandContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand(&InstanceContainer, &OutCommandContainer);
return OutCommandContainer.String;
return MoveTemp(OutCommandContainer.String);
}
bool USGBetaDevice::SendHaptics(const FString& Command) const
@@ -204,5 +205,5 @@ FString USGBetaDevice::ToString() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBetaDeviceImpl_ToString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
@@ -0,0 +1,180 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGBuzzCommand.h"
#include "SGFingerCommandImplCast.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGFinger.h"
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_FSGFingerCommandImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TArray_int32.h"
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const FSGBuzzCommandImpl& BuzzCommandImpl)
{
USGBuzzCommand* Instance = NewObject<USGBuzzCommand>(Outer);
Instance->SetFingerCommandImpl(BuzzCommandImpl);
return Instance;
}
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
{
USGBuzzCommand* Instance = NewObject<USGBuzzCommand>(Outer);
Instance->SetFingerCommandImpl(MoveTemp(BuzzCommandImpl));
return Instance;
}
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const TArray<int32>& BuzzLevels)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
SGCoreImpl_FSGBuzzCommandImpl_ctor_BuzzLevels_MakeShared(
&OutSharedPtrContainer, &BuzzLevelsContainer);
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const int32 Thumb, const int32 Index, const int32 Middle,
const int32 Ring, const int32 Pinky)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const ESGFinger Finger, const int32 BuzzLevel)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBuzzCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand* USGBuzzCommand::Off(UObject* Outer)
{
FSGIC_FSGBuzzCommandImpl OutContainer;
SGCoreImpl_FSGBuzzCommandImpl_Off(&OutContainer);
return NewBuzzCommand(Outer, OutContainer.BuzzCommandImpl);
}
USGBuzzCommand::USGBuzzCommand()
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
: USGFingerCommand(BuzzLevels)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
SGCoreImpl_FSGBuzzCommandImpl_ctor_BuzzLevels_MakeShared(
&OutSharedPtrContainer, &BuzzLevelsContainer);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand::USGBuzzCommand(
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBuzzCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGBuzzCommand::USGBuzzCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
: USGFingerCommand(BuzzCommandImpl)
{
}
USGBuzzCommand::USGBuzzCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
: USGFingerCommand(MoveTemp(BuzzCommandImpl))
{
}
USGBuzzCommand::~USGBuzzCommand() = default;
TSharedRef<FSGBuzzCommandImpl> USGBuzzCommand::ToBuzzCommandImpl() const
{
return FSGFingerCommandImplCast::ToBuzzCommandImpl(ToFingerCommandImpl());
}
USGBuzzCommand* USGBuzzCommand::Copy(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl InstanceContainer{ToBuzzCommandImpl()};
FSGIC_FSGBuzzCommandImpl OutBuzzCommandImplContainer;
SGCoreImpl_FSGBuzzCommandImpl_Copy(&InstanceContainer, &OutBuzzCommandImplContainer);
return NewBuzzCommand(Outer, MoveTemp(OutBuzzCommandImplContainer.BuzzCommandImpl));
}
USGBuzzCommand* USGBuzzCommand::Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl InstanceContainer{ToBuzzCommandImpl()};
FSGIC_FSGBuzzCommandImpl BuzzCommandImplContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
FSGIC_FSGBuzzCommandImpl OutBuzzCommandImplContainer;
SGCoreImpl_FSGBuzzCommandImpl_Merge(&InstanceContainer, &OutBuzzCommandImplContainer, &BuzzCommandImplContainer);
return NewBuzzCommand(Outer, MoveTemp(OutBuzzCommandImplContainer.BuzzCommandImpl));
}
@@ -0,0 +1,175 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGCalibrationDataPoint.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FSGCalibrationDataPointImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TArray_FVector.h"
struct USGCalibrationDataPoint::FImpl
{
/************************
* Member variables
************************/
FSGCalibrationDataPointImpl CalibrationDataPointImpl;
/************************
* Owner object
************************/
USGCalibrationDataPoint* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGCalibrationDataPoint* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
UObject* Outer, const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
{
USGCalibrationDataPoint* Instance = NewObject<USGCalibrationDataPoint>(Outer);
Instance->SetCalibrationDataPointImpl(CalibrationDataPointImpl);
return Instance;
}
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(UObject* Outer)
{
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
return NewCalibrationDataPoint(Outer, MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl));
}
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
UObject* Outer, const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
{
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_CurrentStage_CalibrationValues(
&OutCalibrationDataPointImplContainer, CurrentStage, &CalibrationValuesContainer);
return NewCalibrationDataPoint(Outer, MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl));
}
USGCalibrationDataPoint::USGCalibrationDataPoint()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl);
}
USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_CurrentStage_CalibrationValues(
&OutCalibrationDataPointImplContainer, CurrentStage, &CalibrationValuesContainer);
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl);
}
USGCalibrationDataPoint::USGCalibrationDataPoint(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
SetCalibrationDataPointImpl(CalibrationDataPointImpl);
}
USGCalibrationDataPoint::~USGCalibrationDataPoint() = default;
void USGCalibrationDataPoint::SetCalibrationDataPointImpl(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
{
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointContainer;
FSGIC_FSGCalibrationDataPointImpl RhsContainer{CalibrationDataPointImpl};
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_copy(&OutCalibrationDataPointContainer, &RhsContainer);
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointContainer.CalibrationDataPointImpl);
}
const FSGCalibrationDataPointImpl& USGCalibrationDataPoint::ToCalibrationDataPointImpl() const
{
return Pimpl->CalibrationDataPointImpl;
}
TArray<FVector> USGCalibrationDataPoint::GetCalibrationValues() const
{
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{ToCalibrationDataPointImpl()};
FSGIC_TArray_FVector OutValuesContainer;
SGCoreImpl_FSGCalibrationDataPointImpl_GetCalibrationValues(&InstanceContainer, &OutValuesContainer);
return MoveTemp(OutValuesContainer.Array);
}
int32 USGCalibrationDataPoint::GetStage() const
{
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{ToCalibrationDataPointImpl()};
return SGCoreImpl_FSGCalibrationDataPointImpl_GetStage(&InstanceContainer);
}
FString USGCalibrationDataPoint::ToLogData(const FString& Delimiter) const
{
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{Pimpl->CalibrationDataPointImpl};
FSGIC_FString DelimiterContainer{Delimiter};
FSGIC_FString OutDataContainer;
SGCoreImpl_FSGCalibrationDataPointImpl_ToLogData(&InstanceContainer, &OutDataContainer, &DelimiterContainer);
return MoveTemp(OutDataContainer.String);
}
USGCalibrationDataPoint::FImpl::FImpl(USGCalibrationDataPoint* InOwner)
: Owner(InOwner)
{
}
USGCalibrationDataPoint::FImpl::~FImpl() = default;
void USGCalibrationDataPoint::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,340 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGCustomWaveform.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGWaveformType.h"
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
#include "SGInterop/SGIC_FString.h"
struct USGCustomWaveform::FImpl
{
/************************
* Member variables
************************/
FSGCustomWaveformImpl CustomWaveformImpl;
/************************
* Owner object
************************/
USGCustomWaveform* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGCustomWaveform* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const FSGCustomWaveformImpl& CustomWaveformImpl)
{
USGCustomWaveform* Instance = NewObject<USGCustomWaveform>(Outer);
Instance->SetCustomWaveformImpl(CustomWaveformImpl);
return Instance;
}
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer);
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
}
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const float Amplitude, const float Duration)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration(
&OutCustomWaveformImplContainer, Amplitude, Duration);
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
}
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(
UObject* Outer, const float Amplitude, const float Duration, const float Frequency)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency(
&OutCustomWaveformImplContainer, Amplitude, Duration, Frequency);
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
}
FString USGCustomWaveform::ToString(const ESGWaveformType Type)
{
FSGIC_ESGWaveformType TypeContainer{Type};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGCustomWaveformImpl_ToString_Type(&OutStringContainer, &TypeContainer);
return OutStringContainer.String;
}
USGCustomWaveform::USGCustomWaveform()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer);
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
}
USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration(
&OutCustomWaveformImplContainer, Amplitude, Duration);
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
}
USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration, const float Frequency)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency(
&OutCustomWaveformImplContainer, Amplitude, Duration, Frequency);
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
}
USGCustomWaveform::USGCustomWaveform(const FSGCustomWaveformImpl& CustomWaveformImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
SetCustomWaveformImpl(CustomWaveformImpl);
}
USGCustomWaveform::~USGCustomWaveform() = default;
void USGCustomWaveform::SetCustomWaveformImpl(const FSGCustomWaveformImpl& CustomWaveformImpl)
{
FSGIC_FSGCustomWaveformImpl OutCustomWaveformContainer;
FSGIC_FSGCustomWaveformImpl RhsContainer{CustomWaveformImpl};
SGCoreImpl_FSGCustomWaveformImpl_ctor_copy(&OutCustomWaveformContainer, &RhsContainer);
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformContainer.CustomWaveformImpl);
}
const FSGCustomWaveformImpl& USGCustomWaveform::ToCustomWaveformImpl() const
{
return Pimpl->CustomWaveformImpl;
}
float USGCustomWaveform::GetAmplitude() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetAmplitude(&InstanceContainer);
}
void USGCustomWaveform::SetAmplitude(const float Amplitude)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetAmplitude(&InstanceContainer, Amplitude);
}
ESGWaveformType USGCustomWaveform::GetWaveType() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
FSGIC_ESGWaveformType OutTypeContainer;
SGCoreImpl_FSGCustomWaveformImpl_GetWaveType(&InstanceContainer, &OutTypeContainer);
return OutTypeContainer.Type;
}
void USGCustomWaveform::SetWaveType(const ESGWaveformType Type)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
FSGIC_ESGWaveformType TypeContainer{Type};
SGCoreImpl_FSGCustomWaveformImpl_SetWaveType(&InstanceContainer, &TypeContainer);
}
bool USGCustomWaveform::IsInfinite() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_IsInfinite(&InstanceContainer);
}
void USGCustomWaveform::SetInfinite(const bool bInfinite)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetInfinite(&InstanceContainer, bInfinite);
}
int32 USGCustomWaveform::GetRepeatAmount() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetRepeatAmount(&InstanceContainer);
}
void USGCustomWaveform::SetRepeatAmount(const int32 Amount)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetRepeatAmount(&InstanceContainer, Amount);
}
float USGCustomWaveform::GetAttackTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetAttackTime(&InstanceContainer);
}
void USGCustomWaveform::SetAttackTime(const float Time)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetAttackTime(&InstanceContainer, Time);
}
float USGCustomWaveform::GetSustainTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetSustainTime(&InstanceContainer);
}
void USGCustomWaveform::SetSustainTime(const float Time)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetSustainTime(&InstanceContainer, Time);
}
float USGCustomWaveform::GetDecayTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetDecayTime(&InstanceContainer);
}
void USGCustomWaveform::SetDecayTime(const float Time)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetDecayTime(&InstanceContainer, Time);
}
float USGCustomWaveform::GetFrequencyStart() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyStart(&InstanceContainer);
}
void USGCustomWaveform::SetFrequencyStart(const float Frequency)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyStart(&InstanceContainer, Frequency);
}
float USGCustomWaveform::GetFrequencyEnd() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyEnd(&InstanceContainer);
}
void USGCustomWaveform::SetFrequencyEnd(const float Frequency)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyEnd(&InstanceContainer, Frequency);
}
float USGCustomWaveform::GetFrequencySwitchTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchTime(&InstanceContainer);
}
void USGCustomWaveform::SetFrequencySwitchTime(const float Time)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchTime(&InstanceContainer, Time);
}
float USGCustomWaveform::GetFrequencySwitchFactor() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchFactor(&InstanceContainer);
}
void USGCustomWaveform::SetFrequencySwitchFactor(const float Time)
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchFactor(&InstanceContainer, Time);
}
float USGCustomWaveform::GetEffectTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetEffectTime(&InstanceContainer);
}
float USGCustomWaveform::GetTotalEffectTime() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_GetTotalEffectTime(&InstanceContainer);
}
bool USGCustomWaveform::FrequencyJumps() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_FrequencyJumps(&InstanceContainer);
}
bool USGCustomWaveform::Equals(const USGCustomWaveform* CustomWaveform) const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
FSGIC_FSGCustomWaveformImpl CustomWaveformContainer{CustomWaveform->ToCustomWaveformImpl()};
return SGCoreImpl_FSGCustomWaveformImpl_Equals(&InstanceContainer, &CustomWaveformContainer);
}
FString USGCustomWaveform::ToString() const
{
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGCustomWaveformImpl_ToString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
}
USGCustomWaveform::FImpl::FImpl(USGCustomWaveform* InOwner)
: Owner(InOwner)
{
}
USGCustomWaveform::FImpl::~FImpl() = default;
void USGCustomWaveform::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -35,38 +35,26 @@
#include "SGCore/SGDevice.h"
#include "SGDeviceImplCast.h"
#include "Engine/Engine.h"
#include "SGCore/SGBetaDevice.h"
#include "SGCore/SGHapticChannelInfo.h"
#include "SGCore/SGHapticGlove.h"
#include "SGCore/SGNova2Glove.h"
#include "SGCore/SGNovaGlove.h"
#include "SGCore/SGSenseGlove.h"
#include "Engine/GameViewportClient.h"
#include "Engine/World.h"
#include "Kismet/GameplayStatics.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGBetaDeviceImpl.h"
#include "SGCoreImpl/SGDeviceImpl.h"
#include "SGCoreImpl/SGHapticChannelInfoImpl.h"
#include "SGCoreImpl/SGHapticGloveImpl.h"
#include "SGCoreImpl/SGNova2GloveImpl.h"
#include "SGCoreImpl/SGNovaGloveImpl.h"
#include "SGCoreImpl/SGSenseGloveImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGConnectionType.h"
#include "SGInterop/SGIC_ESGDeviceType.h"
#include "SGInterop/SGIC_ESGHapticChannelType.h"
#include "SGInterop/SGIC_FSGBetaDeviceImpl.h"
#include "SGInterop/SGIC_FSGDeviceImpl.h"
#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h"
#include "SGInterop/SGIC_FSGHapticGloveImpl.h"
#include "SGInterop/SGIC_FSGNova2GloveImpl.h"
#include "SGInterop/SGIC_FSGNovaGloveImpl.h"
#include "SGInterop/SGIC_FSGSenseGloveImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h"
@@ -105,30 +93,12 @@ void USGDevice::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion,
SGCoreImpl_FSGDeviceImpl_ParseFirmware(&RawFirmwareContainer, &OutMainVersion, &OutSubVersion);
}
bool USGDevice::FirmwareNewerThan(
const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub,
const bool bInclusive)
{
return
SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive(
MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
}
bool USGDevice::FirmwareOlderThan(
const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub,
const bool bInclusive)
{
return
SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive(
MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
}
FString USGDevice::ToString(const ESGDeviceType DeviceType)
{
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
FSGIC_FString OutString;
SGCoreImpl_FSGDeviceImpl_ToString(&DeviceTypeContainer, &OutString);
return OutString.String;
return MoveTemp(OutString.String);
}
USGDevice::USGDevice()
@@ -170,16 +140,6 @@ USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGDevice::USGDevice(const FSGNova2GloveImpl& Nova2GloveImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl};
SGCoreImpl_FSGNova2GloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
@@ -218,12 +178,6 @@ USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl);
}
USGDevice::USGDevice(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl);
}
USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
@@ -262,14 +216,6 @@ void USGDevice::SetSGDeviceImpl(const FSGHapticGloveImpl& HapticGloveImpl)
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGDevice::SetSGDeviceImpl(const FSGNova2GloveImpl& Nova2GloveImpl)
{
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl};
SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGDevice::SetSGDeviceImpl(const FSGNovaGloveImpl& NovaGloveImpl)
{
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
@@ -301,11 +247,6 @@ void USGDevice::SetSGDeviceImpl(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl);
}
void USGDevice::SetSGDeviceImpl(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
{
Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl);
}
void USGDevice::SetSGDeviceImpl(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
{
Pimpl->SGDeviceImpl = MoveTemp(NovaGloveImpl);
@@ -321,91 +262,6 @@ TSharedRef<FSGDeviceImpl> USGDevice::ToSGDeviceImpl() const
return Pimpl->SGDeviceImpl.ToSharedRef();
}
bool USGDevice::IsABetaDevice() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_IsABetaDevice(&InstanceContainer);
}
bool USGDevice::IsAHapticGlove() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_IsAHapticGlove(&InstanceContainer);
}
bool USGDevice::IsANova2Glove() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_IsANova2Glove(&InstanceContainer);
}
bool USGDevice::IsANovaGlove() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_IsANovaGlove(&InstanceContainer);
}
bool USGDevice::IsASenseGlove() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_IsASenseGlove(&InstanceContainer);
}
USGBetaDevice* USGDevice::AsBetaDevice(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtr;
SGCoreImpl_FSGDeviceImpl_AsBetaDevice(&InstanceContainer, &OutSharedPtr);
USGBetaDevice* BetaDevice = NewObject<USGBetaDevice>(Outer);
BetaDevice->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
return BetaDevice;
}
USGHapticGlove* USGDevice::AsHapticGlove(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtr;
SGCoreImpl_FSGDeviceImpl_AsHapticGlove(&InstanceContainer, &OutSharedPtr);
USGHapticGlove* HapticGlove = NewObject<USGHapticGlove>(Outer);
HapticGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
return HapticGlove;
}
USGNova2Glove* USGDevice::AsNova2Glove(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtr;
SGCoreImpl_FSGDeviceImpl_AsNova2Glove(&InstanceContainer, &OutSharedPtr);
USGNova2Glove* Nova2Glove = NewObject<USGNova2Glove>(Outer);
Nova2Glove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
return Nova2Glove;
}
USGNovaGlove* USGDevice::AsNovaGlove(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtr;
SGCoreImpl_FSGDeviceImpl_AsNovaGlove(&InstanceContainer, &OutSharedPtr);
USGNovaGlove* NovaGlove = NewObject<USGNovaGlove>(Outer);
NovaGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
return NovaGlove;
}
USGSenseGlove* USGDevice::AsSenseGlove(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtr;
SGCoreImpl_FSGDeviceImpl_AsSenseGlove(&InstanceContainer, &OutSharedPtr);
USGSenseGlove* SenseGlove = NewObject<USGSenseGlove>(Outer);
SenseGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
return SenseGlove;
}
ESGDeviceType USGDevice::GetDeviceType() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
@@ -425,21 +281,7 @@ FString USGDevice::GetFirmwareString() const
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGDeviceImpl_GetFirmwareString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
}
bool USGDevice::FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_bInclusive(
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
}
bool USGDevice::FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_bInclusive(
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
return MoveTemp(OutStringContainer.String);
}
FString USGDevice::GetAddress() const
@@ -515,32 +357,12 @@ bool USGDevice::GetBatteryLevel(float& OutLevel)
return bResult;
}
void USGDevice::SetHapticChannels(const USGHapticChannelInfo* Channels)
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_FSGHapticChannelInfoImpl ChannelsContainer{Channels->ToHapticChannelInfoImpl()};
SGCoreImpl_FSGDeviceImpl_SetHapticChannels(&InstanceContainer, &ChannelsContainer);
}
int32 USGDevice::GetHapticChannelCount() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount(&InstanceContainer);
}
int32 USGDevice::GetHapticChannelCount(ESGHapticChannelType ChannelType) const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_ESGHapticChannelType ChannelTypeContainer{ChannelType};
return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount_ChannelType(&InstanceContainer, &ChannelTypeContainer);
}
FString USGDevice::ToString() const
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGDeviceImpl_ToString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
USGDevice::FImpl::FImpl(USGDevice* InOwner)
@@ -39,13 +39,11 @@
#include "SGCoreImpl/SGDeviceImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGHapticGloveImpl.h"
#include "SGCoreImpl/SGNova2GloveImpl.h"
#include "SGCoreImpl/SGNovaGloveImpl.h"
#include "SGCoreImpl/SGSenseGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h"
@@ -65,14 +63,6 @@ TSharedRef<FSGHapticGloveImpl> FSGDeviceImplCast::ToHapticGloveImpl(TSharedRef<F
return OutSharedPtrContainer.Ptr.ToSharedRef();
}
TSharedRef<FSGNova2GloveImpl> FSGDeviceImplCast::ToNova2GloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)};
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
SGCoreImpl_FSGDeviceImpl_ToNova2GloveImplRef(&InstanceContainer, &OutSharedPtrContainer);
return OutSharedPtrContainer.Ptr.ToSharedRef();
}
TSharedRef<FSGNovaGloveImpl> FSGDeviceImplCast::ToNovaGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
{
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)};
@@ -40,7 +40,6 @@
class FSGBetaDeviceImpl;
class FSGDeviceImpl;
class FSGHapticGloveImpl;
class FSGNova2GloveImpl;
class FSGNovaGloveImpl;
class FSGSenseGloveImpl;
@@ -51,8 +50,6 @@ public:
static TSharedRef<FSGHapticGloveImpl> ToHapticGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
static TSharedRef<FSGNova2GloveImpl> ToNova2GloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
static TSharedRef<FSGNovaGloveImpl> ToNovaGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
static TSharedRef<FSGSenseGloveImpl> ToSenseGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
@@ -38,7 +38,6 @@
#include "SGCore/SGBetaDevice.h"
#include "SGCore/SGDevice.h"
#include "SGCore/SGDeviceImplCast.h"
#include "SGCore/SGNova2Glove.h"
#include "SGCore/SGNovaGlove.h"
#include "SGCore/SGSenseGlove.h"
#include "SGCoreImpl/SGBetaDeviceImpl.h"
@@ -93,12 +92,6 @@ TArray<USGDevice*> FSGDeviceList::GetDevices(UObject* Outer)
Devices.Push(BetaDevice);
}
break;
case ESGDeviceType::Nova2:
{
TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{FSGDeviceImplCast::ToNova2GloveImpl(DeviceImpl)};
USGNova2Glove* Nova2Glove = USGNova2Glove::NewNova2Glove(Outer, MoveTemp(Nova2GloveImpl));
Devices.Push(Nova2Glove);
}
case ESGDeviceType::Nova:
{
TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{FSGDeviceImplCast::ToNovaGloveImpl(DeviceImpl)};
@@ -172,12 +165,11 @@ bool FSGDeviceList::GetSensorDataString(const int32 IpcIndex, const FString& Ipc
return bReturn;
}
bool FSGDeviceList::SendHaptics(
const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands)
bool FSGDeviceList::SendHaptics(const int32 IpcIndex, const FString& IpcAddress, const FString& Commands)
{
FSGIC_FString IpcAddressContainer{IpcAddress};
FSGIC_FString CommandsContainer{Commands};
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, ChannelIndex, &CommandsContainer);
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, &CommandsContainer);
}
FString FSGDeviceList::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, const int32 Index)
@@ -35,6 +35,8 @@
#include "SGCore/SGDeviceModel.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FSGDeviceModelImpl.h"
#include "SGInterop/SGIC_FString.h"
@@ -101,7 +103,7 @@ TArray<bool> USGDeviceModel::ParseFunctions(const int32 Value, const int32 Size)
{
FSGIC_TArray_bool OutParseFunctionsContainer;
SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(&OutParseFunctionsContainer, Value, Size);
return OutParseFunctionsContainer.Array;
return MoveTemp(OutParseFunctionsContainer.Array);
}
void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion)
@@ -163,7 +165,7 @@ FString USGDeviceModel::GetDeviceId() const
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGDeviceModelImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return OutIdContainer.String;
return MoveTemp(OutIdContainer.String);
}
FString USGDeviceModel::GetHardwareVersion() const
@@ -171,7 +173,7 @@ FString USGDeviceModel::GetHardwareVersion() const
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
FSGIC_FString OutVersionContainer;
SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
return OutVersionContainer.String;
return MoveTemp(OutVersionContainer.String);
}
int32 USGDeviceModel::GetFirmwareVersion() const
@@ -186,22 +188,6 @@ int32 USGDeviceModel::GetSubFirmwareVersion() const
return SGCoreImpl_FSGDeviceModelImpl_GetSubFirmwareVersion(&InstanceContainer);
}
bool USGDeviceModel::FirmwareNewerThan(const int32 FirmwareMain, const int32 FirmwareSub,
const bool bInclusive) const
{
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
return SGCoreImpl_FSGDeviceModelImpl_FirmwareNewerThan(
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
}
bool USGDeviceModel::FirmwareOlderThan(const int32 FirmwareMain, const int32 FirmwareSub,
const bool bInclusive) const
{
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
return SGCoreImpl_FSGDeviceModelImpl_FirmwareOlderThan(
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
}
USGDeviceModel::FImpl::FImpl(USGDeviceModel* InOwner)
: Owner(InOwner)
{
@@ -0,0 +1,274 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGFingerCommand.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_FSGFingerCommandImpl.h"
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_FSGTimedBuzzCommandImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TArray_int32.h"
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGFingerCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGTimedBuzzCommandImpl.h"
struct USGFingerCommand::FImpl
{
/************************
* Member variables
************************/
TSharedPtr<FSGFingerCommandImpl> FingerCommandImpl;
/************************
* Owner object
************************/
USGFingerCommand* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGFingerCommand* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGFingerCommand::USGFingerCommand()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGFingerCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
FSGIC_TArray_int32 LevelsContainer{InLevels};
SGCoreImpl_FSGFingerCommandImpl_ctor_Levels_MakeShared(&OutSharedPtrContainer, &LevelsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
SGCoreImpl_FSGFingerCommandImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
SGCoreImpl_FSGBuzzCommandImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->FingerCommandImpl = MoveTemp(FingerCommandImpl);
}
USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
}
USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
}
USGFingerCommand::USGFingerCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
}
USGFingerCommand::~USGFingerCommand() = default;
void USGFingerCommand::SetFingerCommandImpl(const FSGFingerCommandImpl& FingerCommandImpl)
{
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
SGCoreImpl_FSGFingerCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGFingerCommand::SetFingerCommandImpl(const FSGBuzzCommandImpl& BuzzCommandImpl)
{
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
SGCoreImpl_FSGBuzzCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGFingerCommand::SetFingerCommandImpl(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGFingerCommand::SetFingerCommandImpl(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
{
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
{
Pimpl->FingerCommandImpl = MoveTemp(FingerCommandImpl);
}
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
{
Pimpl->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
}
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
{
Pimpl->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
}
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
{
Pimpl->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
}
TSharedRef<FSGFingerCommandImpl> USGFingerCommand::ToFingerCommandImpl() const
{
return Pimpl->FingerCommandImpl.ToSharedRef();
}
TArray<int32> USGFingerCommand::GetLevels() const
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
FSGIC_TArray_int32 OutLevelsContainer;
SGCoreImpl_FSGFingerCommandImpl_GetLevels(&InstanceContainer, &OutLevelsContainer);
return MoveTemp(OutLevelsContainer.Array);
}
int32 USGFingerCommand::GetLevel(const int32 Finger) const
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
const int32 Level = SGCoreImpl_FSGFingerCommandImpl_GetLevel(&InstanceContainer, Finger);
return Level;
}
void USGFingerCommand::SetLevel(const int32 Finger, const int32 Value)
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
SGCoreImpl_FSGFingerCommandImpl_SetLevel(&InstanceContainer, Finger, Value);
}
bool USGFingerCommand::Equals(const USGFingerCommand* FingerCommand) const
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
FSGIC_FSGFingerCommandImpl FingerCommandImplContainer{FingerCommand->ToFingerCommandImpl().Get()};
const bool bEquals = SGCoreImpl_FSGFingerCommandImpl_Equals(&InstanceContainer, &FingerCommandImplContainer);
return bEquals;
}
FString USGFingerCommand::ToString() const
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGFingerCommandImpl_ToString(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
}
USGFingerCommand::FImpl::FImpl(USGFingerCommand* InOwner)
: Owner(InOwner)
{
}
USGFingerCommand::FImpl::~FImpl() = default;
void USGFingerCommand::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -0,0 +1,70 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGFingerCommandImplCast.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGFingerCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGFingerCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGTimedBuzzCommandImpl.h"
TSharedRef<FSGBuzzCommandImpl> FSGFingerCommandImplCast::ToBuzzCommandImpl(
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGFingerCommandImpl_ToBuzzCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
return OutSharedPtrContainer.Ptr.ToSharedRef();
}
TSharedRef<FSGForceFeedbackCommandImpl> FSGFingerCommandImplCast::ToForceFeedbackCommandImpl(
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGFingerCommandImpl_ToForceFeedbackCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
return OutSharedPtrContainer.Ptr.ToSharedRef();
}
TSharedRef<FSGTimedBuzzCommandImpl> FSGFingerCommandImplCast::ToTimedBuzzCommandImpl(
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
{
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGFingerCommandImpl_ToTimedBuzzCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
return OutSharedPtrContainer.Ptr.ToSharedRef();
}
@@ -0,0 +1,55 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Templates/SharedPointer.h"
class FSGFingerCommandImpl;
class FSGBuzzCommandImpl;
class FSGForceFeedbackCommandImpl;
class FSGTimedBuzzCommandImpl;
class SENSEGLOVECORE_API FSGFingerCommandImplCast
{
public:
static TSharedRef<FSGBuzzCommandImpl> ToBuzzCommandImpl(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
static TSharedRef<FSGForceFeedbackCommandImpl> ToForceFeedbackCommandImpl(
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
static TSharedRef<FSGTimedBuzzCommandImpl> ToTimedBuzzCommandImpl(
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
};
@@ -0,0 +1,187 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGForceFeedbackCommand.h"
#include "SGFingerCommandImplCast.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGFinger.h"
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_TArray_int32.h"
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer,
const FSGForceFeedbackCommandImpl&
ForceFeedbackCommandImpl)
{
USGForceFeedbackCommand* Instance = NewObject<USGForceFeedbackCommand>(Outer);
Instance->SetFingerCommandImpl(ForceFeedbackCommandImpl);
return Instance;
}
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer,
TSharedRef<FSGForceFeedbackCommandImpl>
ForceFeedbackCommandImpl)
{
USGForceFeedbackCommand* Instance = NewObject<USGForceFeedbackCommand>(Outer);
Instance->SetFingerCommandImpl(MoveTemp(ForceFeedbackCommandImpl));
return Instance;
}
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
UObject* Outer, const TArray<int32>& ForceFeedbackLevels)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_ForceFeedbackLevels_MakeShared(
&OutSharedPtrContainer, &ForceFeedbackLevelsContainer);
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
UObject* Outer, const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
UObject* Outer, ESGFinger Finger, const int32 BuzzLevel)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand* USGForceFeedbackCommand::Off(UObject* Outer)
{
FSGIC_FSGForceFeedbackCommandImpl OutContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_Off(&OutContainer);
return NewForceFeedbackCommand(Outer, OutContainer.ForceFeedbackCommandImpl);
}
USGForceFeedbackCommand::USGForceFeedbackCommand()
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels)
: USGFingerCommand(ForceFeedbackLevels)
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_ForceFeedbackLevels_MakeShared(
&OutSharedPtrContainer, &ForceFeedbackLevelsContainer);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand::USGForceFeedbackCommand(
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const int32 BuzzLevel)
: USGFingerCommand()
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGForceFeedbackCommand::USGForceFeedbackCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
: USGFingerCommand(ForceFeedbackCommandImpl)
{
}
USGForceFeedbackCommand::USGForceFeedbackCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
: USGFingerCommand(MoveTemp(ForceFeedbackCommandImpl))
{
}
USGForceFeedbackCommand::~USGForceFeedbackCommand() = default;
TSharedRef<FSGForceFeedbackCommandImpl> USGForceFeedbackCommand::ToForceFeedbackCommandImpl() const
{
return FSGFingerCommandImplCast::ToForceFeedbackCommandImpl(ToFingerCommandImpl());
}
USGForceFeedbackCommand* USGForceFeedbackCommand::Copy(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl InstanceContainer{ToForceFeedbackCommandImpl()};
FSGIC_FSGForceFeedbackCommandImpl OutForceFeedbackCommandImplContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_Copy(&InstanceContainer, &OutForceFeedbackCommandImplContainer);
return NewForceFeedbackCommand(Outer, MoveTemp(OutForceFeedbackCommandImplContainer.ForceFeedbackCommandImpl));
}
USGForceFeedbackCommand* USGForceFeedbackCommand::Merge(UObject* Outer,
const USGForceFeedbackCommand* ForceFeedbackCommand) const
{
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl InstanceContainer{ToForceFeedbackCommandImpl()};
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandImplContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
FSGIC_FSGForceFeedbackCommandImpl OutForceFeedbackCommandImplContainer;
SGCoreImpl_FSGForceFeedbackCommandImpl_Merge(&InstanceContainer, &OutForceFeedbackCommandImplContainer,
&ForceFeedbackCommandImplContainer);
return NewForceFeedbackCommand(Outer, MoveTemp(OutForceFeedbackCommandImplContainer.ForceFeedbackCommandImpl));
}
@@ -35,6 +35,8 @@
#include "SGCore/SGHandInterpolator.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGInterpolationSet.h"
#include "SGCoreImpl/SGInterpolationSetImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
@@ -48,8 +50,6 @@
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_FVector.h"
#include "SGInterop/SGIC_TArray_FVector.h"
#include "SGInterop/SGIC_TArray_float.h"
#include "SGInterop/SGIC_TArray_TArray_float.h"
#include "SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h"
#include "SGInterop/SGIC_TArray_TArray_FVector.h"
#include "SGUtils/SGArrayUtils.h"
@@ -99,26 +99,155 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer)
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer, const bool bRightHanded)
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
bRightHanded);
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
&JointInterpolationsContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer,
const FString& SerializedString, const bool bRightHanded)
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
&JointInterpolationsContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FQuat& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::Default(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
SGCoreImpl_FSGHandInterpolatorImpl_Default(&OutHandInterpolatorImplContainer, bRightHanded);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer, const FString& SerializedString)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_FString SerializedStringContainer{SerializedString};
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer,
&SerializedStringContainer, bRightHanded);
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer, &SerializedStringContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
TArray<FVector> USGHandInterpolator::InterpolateFingerAngles(const ESGFinger Finger,
const USGHandInterpolator* Interpolator,
const FVector& TotalGloveAngles)
{
FSGIC_TArray_FVector OutAnglesContainer;
FSGIC_ESGFinger FingerContainer{Finger};
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
FSGIC_FVector TotalGloveAnglesContainer{TotalGloveAngles};
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateFingerAngles(&OutAnglesContainer, &FingerContainer,
&InterpolatorContainer, &TotalGloveAnglesContainer);
return MoveTemp(OutAnglesContainer.Array);
}
TArray<FVector> USGHandInterpolator::InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
const FVector& TotalGloveAngles)
{
FSGIC_TArray_FVector OutAnglesContainer;
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
FSGIC_FVector TotalGloveAnglesContainer{TotalGloveAngles};
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateThumbAngles(&OutAnglesContainer, &InterpolatorContainer,
&TotalGloveAnglesContainer);
return MoveTemp(OutAnglesContainer.Array);
}
TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(const USGHandInterpolator* Interpolator,
const TArray<FVector>& TotalAngles)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
FSGIC_TArray_FVector TotalAnglesContainer{TotalAngles};
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles(&OutAnglesContainer, &InterpolatorContainer,
&TotalAnglesContainer);
return MoveTemp(OutAnglesContainer.Array);
}
USGHandInterpolator::USGHandInterpolator()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
@@ -128,12 +257,97 @@ USGHandInterpolator::USGHandInterpolator()
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const bool bRightHanded)
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
bRightHanded);
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
&JointInterpolationsContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
&JointInterpolationsContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
const FQuat& CmcStartRotation)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
const FRotator& CmcStartRotation)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FQuat& CmcStartRotation)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FRotator& CmcStartRotation)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
@@ -159,36 +373,104 @@ const FSGHandInterpolatorImpl& USGHandInterpolator::ToHandInterpolatorImpl() con
return Pimpl->HandInterpolatorImpl;
}
float USGHandInterpolator::CalculateAngle(
const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) const
TArray<TArray<USGInterpolationSet*>> USGHandInterpolator::GetJointInterpolations(UObject* Outer) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGFingerMovement MovementContainer{Movement};
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits(
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
FSGIC_TArray_TArray_FSGInterpolationSetImpl OutInterpolationsContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetJointInterpolations(&InstanceContainer, &OutInterpolationsContainer);
TArray<TArray<USGInterpolationSet*>> JointInterpolations{
FSGArrayUtils::FromImplType<FSGInterpolationSetImpl, USGInterpolationSet,
&USGInterpolationSet::NewInterpolationSet>(
Outer, MoveTemp(OutInterpolationsContainer.Array))
};
return JointInterpolations;
}
FQuat USGHandInterpolator::GetCmcStartRotationQ() const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGHandInterpolator::GetCmcStartRotation() const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGFinger FingerContainer{Finger};
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_int32Movement_Value(
&InstanceContainer, &FingerContainer, Movement, Value);
return Angle;
}
float USGHandInterpolator::CalculateAngle(
const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) const
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const ESGFingerMovement Movement,
const float Value) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGFinger FingerContainer{Finger};
FSGIC_ESGFingerMovement MovementContainer{Movement};
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_ESGFingerMovement_Value(
&InstanceContainer, &FingerContainer, &MovementContainer, Value);
return Angle;
}
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const ESGThumbMovement Movement,
const float Value) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGFinger FingerContainer{Finger};
FSGIC_ESGThumbMovement MovementContainer{Movement};
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_ESGThumbMovement_Value(
&InstanceContainer, &FingerContainer, &MovementContainer, Value);
return Angle;
}
void USGHandInterpolator::SetInterpolation(const int32 Finger, const int32 Movement, const float InputAt0,
const float InputAt1, const float AngleAt0, const float AngleAt1)
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_int32Finger_int32Movement_InputAt0_InputAt1_AngleAt0_AngleAt1(
&InstanceContainer, Finger, Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
}
void USGHandInterpolator::SetInterpolation(const ESGFinger Finger, const ESGFingerMovement Movement,
const float InputAt0, const float InputAt1, const float AngleAt0,
const float AngleAt1)
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGFinger FingerContainer{Finger};
FSGIC_ESGFingerMovement MovementContainer{Movement};
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_ESGFinger_ESGFingerMovement_InputAt0_InputAt1_AngleAt0_AngleAt1(
&InstanceContainer, &FingerContainer, &MovementContainer, InputAt0, InputAt1, AngleAt0, AngleAt1);
}
void USGHandInterpolator::SetInterpolation(const ESGThumbMovement Movement, const float InputAt0, const float InputAt1,
const float AngleAt0, const float AngleAt1)
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGThumbMovement MovementContainer{Movement};
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits(
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
return Angle;
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_Movement_InputAt0_InputAt1_AngleAt0_AngleAt1(
&InstanceContainer, &MovementContainer, InputAt0, InputAt1, AngleAt0, AngleAt1);
}
TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(
const TArray<TArray<float>>& Flexions, const TArray<float>& Abductions, const float CmcTwist) const
USGInterpolationSet* USGHandInterpolator::GetInterpolation(UObject* Outer,
const int32 Finger, const int32 Movement) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_TArray_TArray_FVector OutAnglesContainer;
FSGIC_TArray_TArray_float FlexionsContainer{Flexions};
FSGIC_TArray_float AbductionsContainer{Abductions};
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles(
&InstanceContainer, &OutAnglesContainer, &FlexionsContainer, &AbductionsContainer, CmcTwist);
return OutAnglesContainer.Array;
FSGIC_FSGInterpolationSetImpl OutInterpolationContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetInterpolation(&InstanceContainer, &OutInterpolationContainer, Finger,
Movement);
return USGInterpolationSet::NewInterpolationSet(Outer, MoveTemp(OutInterpolationContainer.InterpolationSetImpl));
}
bool USGHandInterpolator::Equals(const USGHandInterpolator* HandInterpolator) const
@@ -204,7 +486,7 @@ FString USGHandInterpolator::SGSerialize() const
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandInterpolatorImpl_Serialize(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
USGHandInterpolator::FImpl::FImpl(USGHandInterpolator* InOwner)
@@ -1,222 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGHandLayer.h"
#include "SGCore/SGCustomWaveform.h"
#include "SGCore/SGHandPose.h"
#include "SGCore/SGHapticGlove.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGDeviceType.h"
#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h"
#include "SGInterop/SGIC_ESGHapticLocation.h"
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
#include "SGInterop/SGIC_FQuat.h"
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_FVector.h"
#include "SGInterop/SGIC_TArray_float.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
bool FSGHandLayer::DeviceConnected(const bool bRightHanded)
{
return SGCoreImpl_FSGHandLayerImpl_DeviceConnected(bRightHanded);
}
ESGDeviceType FSGHandLayer::GetDeviceType(const bool bRightHanded)
{
FSGIC_ESGDeviceType DeviceTypeContainer;
SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&DeviceTypeContainer, bRightHanded);
return DeviceTypeContainer.Type;
}
bool FSGHandLayer::GetFirstGloveHandedness()
{
return SGCoreImpl_FSGHandLayerImpl_GetFirstGloveHandedness();
}
int32 FSGHandLayer::GlovesConnected()
{
return SGCoreImpl_FSGHandLayerImpl_GlovesConnected();
}
bool FSGHandLayer::GetGloveInstance(UObject* Outer, const bool bRightHanded, USGHapticGlove*& OutGlove)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetGloveInstance(bRightHanded, &OutGloveContainer);
OutGlove = USGHapticGlove::NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
return bResult;
}
ESGHapticGloveCalibrationState FSGHandLayer::GetCalibrationState(const bool bRightHanded)
{
FSGIC_ESGHapticGloveCalibrationState HapticGloveCalibrationStateContainer;
SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&HapticGloveCalibrationStateContainer, bRightHanded);
return HapticGloveCalibrationStateContainer.State;
}
FString FSGHandLayer::GetCalibrationInstructions(const bool bRightHanded)
{
FSGIC_FString CalibrationInstructionsContainer;
SGCoreImpl_FSGHandLayerImpl_GetCalibrationInstructions(&CalibrationInstructionsContainer, bRightHanded);
return CalibrationInstructionsContainer.String;
}
void FSGHandLayer::ResetCalibration(const bool bRightHanded)
{
SGCoreImpl_FSGHandLayerImpl_ResetCalibration(bRightHanded);
}
void FSGHandLayer::EndCalibration(const bool bRightHanded)
{
SGCoreImpl_FSGHandLayerImpl_EndCalibration(bRightHanded);
}
bool FSGHandLayer::GetHandPose(UObject* Outer, const bool bRightHanded, USGHandPose*& OutHandPose)
{
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetHandPose(bRightHanded, &OutHandPoseContainer);
OutHandPose = USGHandPose::NewHandPose(Outer, OutHandPose->ToHandPoseImpl());
return bResult;
}
void FSGHandLayer::GetWristLocation(
const bool bRightHanded, const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FQuat& OutWristRotation)
{
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGHandLayerImpl_GetWristLocation(
bRightHanded, &ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void FSGHandLayer::StopAllHaptics(const bool bRightHanded)
{
SGCoreImpl_FSGHandLayerImpl_StopAllHaptics(bRightHanded);
}
bool FSGHandLayer::SendHaptics(const bool bRightHanded)
{
return SGCoreImpl_FSGHandLayerImpl_SendHaptics(bRightHanded);
}
bool FSGHandLayer::SupportsCustomWaveform(
const bool bRightHanded, const ESGHapticLocation AtLocation)
{
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
return SGCoreImpl_FSGHandLayerImpl_SupportsCustomWaveform(bRightHanded, &AtLocationContainer);
}
bool FSGHandLayer::SendCustomWaveform(
const bool bRightHanded, USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
{
FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()};
FSGIC_ESGHapticLocation LocationContainer{Location};
return SGCoreImpl_FSGHandLayerImpl_SendCustomWaveform(bRightHanded, &OutWaveformContainer, &LocationContainer);
}
bool FSGHandLayer::QueueCommand_ForceFeedbackLevel(
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
{
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate);
}
bool FSGHandLayer::QueueCommand_ForceFeedbackLevels(
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
{
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevels(
bRightHanded, &Levels01Container, bSendImmediate);
}
bool FSGHandLayer::QueueCommand_VibroLevels(
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
{
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevels(bRightHanded, &Levels01Container, bSendImmediate);
}
bool FSGHandLayer::QueueCommand_VibroLevel(
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
{
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_Finger_Level0_bSendImmediate(
bRightHanded, Finger, Level01, bSendImmediate);
}
bool FSGHandLayer::QueueCommand_VibroLevel(
const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate)
{
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_AtLocation_Level01_bSendImmediate(
bRightHanded, &AtLocationContainer, Level01, bSendImmediate);
}
bool FSGHandLayer::SupportsWristSqueeze(const bool bRightHanded)
{
return SGCoreImpl_FSGHandLayerImpl_SupportsWristSqueeze(bRightHanded);
}
bool FSGHandLayer::QueueCommand_WristSqueeze(
const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate)
{
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate);
}
bool FSGHandLayer::SupportsFlexionLocks(const bool bRightHanded)
{
return SGCoreImpl_FSGHandLayerImpl_SupportsFlexionLocks(bRightHanded);
}
bool FSGHandLayer::QueueCommand_FlexionLock(
const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate)
{
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate);
}
bool FSGHandLayer::QueueCommand_ClearFlexionLock(
const bool bRightHanded, const int32 Finger, const bool bSendImmediate)
{
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate);
}
@@ -35,6 +35,8 @@
#include "SGCore/SGHandPose.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGBasicHandModel.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGHandPoseImpl.h"
@@ -187,7 +189,7 @@ USGHandPose* USGHandPose::FromHandAngles(UObject* Outer,
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()};
SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded_HandDimensions(
&OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandDimensionsContainer);
&OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandAnglesContainer);
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
@@ -392,7 +394,7 @@ TArray<TArray<FVector>> USGHandPose::GetJointPositions() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGHandPoseImpl_GetJointPositions(&InstanceContainer, &OutPositionsContainer);
return OutPositionsContainer.Array;
return MoveTemp(OutPositionsContainer.Array);
}
TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
@@ -400,7 +402,7 @@ TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
return OutRotationsContainer.Array;
return MoveTemp(OutRotationsContainer.Array);
}
TArray<TArray<FRotator>> USGHandPose::GetJointRotations() const
@@ -416,11 +418,12 @@ TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGHandPoseImpl_GetHandAngles(&InstanceContainer, &OutAnglesContainer);
return OutAnglesContainer.Array;
return MoveTemp(OutAnglesContainer.Array);
}
bool USGHandPose::Equals(const USGHandPose* HandPose) const
{
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FSGHandPoseImpl HandPoseContainer{HandPose->ToHandPoseImpl()};
return SGCoreImpl_FSGHandPoseImpl_Equals(&InstanceContainer, &HandPoseContainer);
@@ -439,7 +442,7 @@ TArray<float> USGHandPose::GetNormalizedFlexion(const bool bClamp01) const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_float OutFlexionContainer;
SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_bClamp01(&InstanceContainer, &OutFlexionContainer, bClamp01);
return OutFlexionContainer.Array;
return MoveTemp(OutFlexionContainer.Array);
}
FString USGHandPose::ToString(const bool bShortFormat) const
@@ -447,7 +450,7 @@ FString USGHandPose::ToString(const bool bShortFormat) const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandPoseImpl_ToString(&InstanceContainer, &OutStringContainer, bShortFormat);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
FString USGHandPose::SGSerialize() const
@@ -455,7 +458,7 @@ FString USGHandPose::SGSerialize() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandPoseImpl_Serialize(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
return MoveTemp(OutStringContainer.String);
}
USGHandPose::FImpl::FImpl(USGHandPose* InOwner)
@@ -0,0 +1,284 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGHandProfile.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGNovaGloveHandProfile.h"
#include "SGCore/SGSenseGloveHandProfile.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGHandProfileImpl.h"
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
#include "SGInterop/SGIC_FSGNovaGloveHandProfileImpl.h"
#include "SGInterop/SGIC_FSGSenseGloveHandProfileImpl.h"
#include "SGInterop/SGIC_FString.h"
struct USGHandProfile::FImpl
{
/************************
* Member variables
************************/
FSGHandProfileImpl HandProfileImpl;
/************************
* Owner object
************************/
USGHandProfile* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGHandProfile* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer, const FSGHandProfileImpl& HandProfileImpl)
{
USGHandProfile* Instance = NewObject<USGHandProfile>(Outer);
Instance->SetHandProfileImpl(HandProfileImpl);
return Instance;
}
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer)
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
}
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer, const bool bRightHanded,
const USGSenseGloveHandProfile* SenseGloveHandProfile,
const USGNovaGloveHandProfile* NovaGloveHandProfile)
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
{SenseGloveHandProfile->ToSenseGloveHandProfileImpl()};
FSGIC_FSGNovaGloveHandProfileImpl NovaGloveHandProfileContainer
{NovaGloveHandProfile->ToNovaGloveHandProfileImpl()};
SGCoreImpl_FSGHandProfileImpl_ctor_bRightHanded_SenseGloveHandProfile_NovaGloveHandProfile(
&OutHandProfileImplContainer, bRightHanded, &SenseGloveHandProfileContainer, &NovaGloveHandProfileContainer);
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
}
USGHandProfile* USGHandProfile::Default(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
SGCoreImpl_FSGHandProfileImpl_Default(&OutHandProfileImplContainer, bRightHanded);
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
}
USGHandProfile* USGHandProfile::Deserialize(UObject* Outer, const FString& SerializedString)
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
FSGIC_FString SerializedStringContainer{SerializedString};
SGCoreImpl_FSGHandProfileImpl_Deserialize(&OutHandProfileImplContainer,
&SerializedStringContainer);
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
}
FString USGHandProfile::GetProfileDirectory()
{
FSGIC_FString OutDirectoryContainer;
SGCoreImpl_FSGHandProfileImpl_GetProfileDirectory(&OutDirectoryContainer);
return MoveTemp(OutDirectoryContainer.String);
}
FString USGHandProfile::GetLeftHandFileName()
{
FSGIC_FString OutFileName;
SGCoreImpl_FSGHandProfileImpl_GetLeftHandFileName(&OutFileName);
return MoveTemp(OutFileName.String);
}
FString USGHandProfile::GetRightHandFileName()
{
FSGIC_FString OutFileName;
SGCoreImpl_FSGHandProfileImpl_GetRightHandFileName(&OutFileName);
return MoveTemp(OutFileName.String);
}
FString USGHandProfile::GetProfileFileName(const bool bRightHanded)
{
FSGIC_FString OutFileName;
SGCoreImpl_FSGHandProfileImpl_GetProfileFileName(&OutFileName, bRightHanded);
return MoveTemp(OutFileName.String);
}
bool USGHandProfile::GetLatestProfile(UObject* Outer, const bool bRightHanded, USGHandProfile*& OutLatestProfile)
{
FSGIC_FSGHandProfileImpl OutLatestProfileContainer;
const bool bResult = SGCoreImpl_FSGHandProfileImpl_GetLatestProfile(bRightHanded, &OutLatestProfileContainer);
if (bResult)
{
OutLatestProfile = NewHandProfile(Outer, MoveTemp(OutLatestProfileContainer.HandProfileImpl));
}
return bResult;
}
bool USGHandProfile::StoreProfile(const USGHandProfile* ProfileToStore)
{
FSGIC_FSGHandProfileImpl ProfileToStoreContainer{ProfileToStore->ToHandProfileImpl()};
return SGCoreImpl_FSGHandProfileImpl_StoreProfile(&ProfileToStoreContainer);
}
bool USGHandProfile::ResetCalibration(const bool bRightHanded, const bool bOnDisk)
{
return SGCoreImpl_FSGHandProfileImpl_ResetCalibration_bRightHanded_bOnDisk(bRightHanded, bOnDisk);
}
void USGHandProfile::ResetCalibration(const bool bOnDisk)
{
return SGCoreImpl_FSGHandProfileImpl_ResetCalibration_bOnDisk(bOnDisk);
}
USGHandProfile::USGHandProfile()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileImplContainer.HandProfileImpl);
}
USGHandProfile::USGHandProfile(const bool bRightHanded,
const USGSenseGloveHandProfile* SenseGloveHandProfile,
const USGNovaGloveHandProfile* NovaGloveHandProfile)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
{SenseGloveHandProfile->ToSenseGloveHandProfileImpl()};
FSGIC_FSGNovaGloveHandProfileImpl NovaGloveHandProfileContainer
{NovaGloveHandProfile->ToNovaGloveHandProfileImpl()};
SGCoreImpl_FSGHandProfileImpl_ctor_bRightHanded_SenseGloveHandProfile_NovaGloveHandProfile(
&OutHandProfileImplContainer, bRightHanded, &SenseGloveHandProfileContainer, &NovaGloveHandProfileContainer);
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileImplContainer.HandProfileImpl);
}
USGHandProfile::USGHandProfile(const FSGHandProfileImpl& HandProfileImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
SetHandProfileImpl(HandProfileImpl);
}
USGHandProfile::~USGHandProfile() = default;
void USGHandProfile::SetHandProfileImpl(const FSGHandProfileImpl& HandProfileImpl)
{
FSGIC_FSGHandProfileImpl OutHandProfileContainer;
FSGIC_FSGHandProfileImpl RhsContainer{HandProfileImpl};
SGCoreImpl_FSGHandProfileImpl_ctor_copy(&OutHandProfileContainer, &RhsContainer);
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileContainer.HandProfileImpl);
}
const FSGHandProfileImpl& USGHandProfile::ToHandProfileImpl() const
{
return Pimpl->HandProfileImpl;
}
bool USGHandProfile::IsRight() const
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
return SGCoreImpl_FSGHandProfileImpl_IsRight(&InstanceContainer);
}
USGSenseGloveHandProfile* USGHandProfile::GetSenseGloveHandProfile(UObject* Outer) const
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
FSGIC_FSGSenseGloveHandProfileImpl OutProfileContainer;
SGCoreImpl_FSGHandProfileImpl_GetSenseGloveHandProfile(&InstanceContainer, &OutProfileContainer);
return USGSenseGloveHandProfile::NewSenseGloveHandProfile(
Outer, MoveTemp(OutProfileContainer.SenseGloveHandProfileImpl));
}
USGNovaGloveHandProfile* USGHandProfile::GetNovaGloveHandProfile(UObject* Outer) const
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
FSGIC_FSGNovaGloveHandProfileImpl OutProfileContainer;
SGCoreImpl_FSGHandProfileImpl_GetNovaGloveHandProfile(&InstanceContainer, &OutProfileContainer);
return USGNovaGloveHandProfile::NewNovaGloveHandProfile(
Outer, MoveTemp(OutProfileContainer.NovaGloveHandProfileImpl));
}
bool USGHandProfile::Equals(const USGHandProfile* HandProfile) const
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
return SGCoreImpl_FSGHandProfileImpl_Equals(&InstanceContainer, &HandProfileContainer);
}
void USGHandProfile::Reset()
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
SGCoreImpl_FSGHandProfileImpl_Reset(&InstanceContainer);
}
FString USGHandProfile::SGSerialize() const
{
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandProfileImpl_Serialize(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
}
USGHandProfile::FImpl::FImpl(USGHandProfile* InOwner)
: Owner(InOwner)
{
}
USGHandProfile::FImpl::~FImpl() = default;
void USGHandProfile::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,236 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGHapticChannelInfo.h"
#include "SGCoreImpl/SGHapticChannelInfoImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGHapticChannelType.h"
#include "SGInterop/SGIC_ESGWaveformType.h"
#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TArray_FString.h"
#include "SGInterop/SGIC_TArray_int32.h"
struct USGHapticChannelInfo::FImpl
{
/************************
* Member variables
************************/
FSGHapticChannelInfoImpl HapticChannelInfoImpl;
/************************
* Owner object
************************/
USGHapticChannelInfo* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGHapticChannelInfo* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer,
const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
{
USGHapticChannelInfo* Instance = NewObject<USGHapticChannelInfo>(Outer);
Instance->SetHapticChannelInfoImpl(HapticChannelInfoImpl);
return Instance;
}
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer)
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer);
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
}
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(
UObject* Outer,
const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex)
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
FSGIC_TArray_int32 StreamIndexContainer{StreamIndex};
FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex};
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex(
&OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer);
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
}
FString USGHapticChannelInfo::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex)
{
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHapticChannelInfoImpl_GenerateAddress(&OutStringContainer, DeviceIndex, ChannelIndex);
return OutStringContainer.String;
}
USGHapticChannelInfo* USGHapticChannelInfo::Parse(UObject* Outer, const FString& IpcString)
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
FSGIC_FString IpcStringContainer{IpcString};
SGCoreImpl_FSGHapticChannelInfoImpl_Parse(&OutHapticChannelInfoImplContainer, &IpcStringContainer);
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
}
int32 USGHapticChannelInfo::GetStreamingType()
{
return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamingType();
}
int32 USGHapticChannelInfo::GetFireAndForgetType()
{
return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetType();
}
USGHapticChannelInfo::USGHapticChannelInfo()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer);
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl);
}
USGHapticChannelInfo::USGHapticChannelInfo(const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex)
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
FSGIC_TArray_int32 StreamIndexContainer{StreamIndex};
FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex};
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex(
&OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer);
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl);
}
USGHapticChannelInfo::USGHapticChannelInfo(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
SetHapticChannelInfoImpl(HapticChannelInfoImpl);
}
USGHapticChannelInfo::~USGHapticChannelInfo() = default;
void USGHapticChannelInfo::SetHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
{
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoContainer;
FSGIC_FSGHapticChannelInfoImpl RhsContainer{HapticChannelInfoImpl};
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy(&OutHapticChannelInfoContainer, &RhsContainer);
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoContainer.HapticChannelInfoImpl);
}
const FSGHapticChannelInfoImpl& USGHapticChannelInfo::ToHapticChannelInfoImpl() const
{
return Pimpl->HapticChannelInfoImpl;
}
int32 USGHapticChannelInfo::GetStreamChannelCount() const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamChannelCount(&InstanceContainer);
}
int32 USGHapticChannelInfo::GetFireAndForgetChannelCount() const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetChannelCount(&InstanceContainer);
}
int32 USGHapticChannelInfo::GetTotalChannelCount() const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
return SGCoreImpl_FSGHapticChannelInfoImpl_GetTotalChannelCount(&InstanceContainer);
}
FString USGHapticChannelInfo::GetAddress_Unguarded(const ESGHapticChannelType Type, const int32 TypeIndex) const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
FSGIC_FString OutStringContainer;
FSGIC_ESGHapticChannelType TypeContainer{Type};
SGCoreImpl_FSGHapticChannelInfoImpl_GetAddress_Unguarded(
&InstanceContainer, &OutStringContainer, &TypeContainer, TypeIndex);
return OutStringContainer.String;
}
void USGHapticChannelInfo::GetIpcParams_Unguarded(
const ESGHapticChannelType Type, const int32 TypeIndex, int32& OutIndex, FString& OutAddressString) const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
FSGIC_ESGHapticChannelType TypeContainer{Type};
FSGIC_FString OutAddressStringContainer;
SGCoreImpl_FSGHapticChannelInfoImpl_GetIpcParams_Unguarded(
&InstanceContainer, &TypeContainer, TypeIndex, &OutIndex, &OutAddressString);
OutAddressString = MoveTemp(OutAddressStringContainer.String);
}
void USGHapticChannelInfo::RegenerateAddresses(const int32 ForDeviceIndex)
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
SGCoreImpl_FSGHapticChannelInfoImpl_RegenerateAddresses(&InstanceContainer, ForDeviceIndex);
}
TArray<FString> USGHapticChannelInfo::GetAllAddresses() const
{
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
FSGIC_TArray_FString* OutArrayContainer;
SGCoreImpl_FSGHapticChannelInfoImpl_GetAllAddresses(&InstanceContainer, &OutArrayContainer);
return OutArrayContainer->Array;
}
USGHapticChannelInfo::FImpl::FImpl(USGHapticChannelInfo* InOwner)
: Owner(InOwner)
{
}
USGHapticChannelInfo::FImpl::~FImpl() = default;
void USGHapticChannelInfo::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -35,29 +35,27 @@
#include "SGCore/SGHapticGlove.h"
#include "SGCore/SGBasicHandModel.h"
#include "SGCore/SGCustomWaveform.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGBuzzCommand.h"
#include "SGCore/SGForceFeedbackCommand.h"
#include "SGCore/SGDeviceImplCast.h"
#include "SGCore/SGSenseGlove.h"
#include "SGCoreImpl/SGBasicHandModelImpl.h"
#include "SGCoreImpl/SGCustomWaveformImpl.h"
#include "SGCoreImpl/SGDeviceImpl.h"
#include "SGCoreImpl/SGHapticGloveImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGDeviceType.h"
#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h"
#include "SGInterop/SGIC_ESGHapticLocation.h"
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
#include "SGInterop/SGIC_FQuat.h"
#include "SGInterop/SGIC_FSGBasicHandModelImpl.h"
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_FVector.h"
#include "SGInterop/SGIC_TArray_FVector.h"
#include "SGInterop/SGIC_TArray_TArray_FVector.h"
#include "SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h"
#include "SGInterop/SGIC_TArray_float.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer, const FSGHapticGloveImpl& HapticGloveImpl)
@@ -82,10 +80,10 @@ USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer)
return NewHapticGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer, const bool bConnectedOnly)
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer)
{
FSGIC_TArray_TSharedRef_FSGHapticGloveImpl OutGlovesContainer;
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer, bConnectedOnly);
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer);
TArray<USGHapticGlove*> HapticGloves;
for (TSharedRef<FSGHapticGloveImpl> HapticGloveImpl: OutGlovesContainer.Array)
{
@@ -111,8 +109,7 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
{
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove(
bRightHanded, &OutGloveContainer);
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove(bRightHanded, &OutGloveContainer);
if (bResult)
{
OutGlove = NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
@@ -121,22 +118,6 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
return bResult;
}
FString USGHapticGlove::ToString(const ESGHapticGloveCalibrationState State)
{
FSGIC_ESGHapticGloveCalibrationState StateContainer{State};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHapticGloveImpl_ToString_State(&StateContainer, &OutStringContainer);
return OutStringContainer.String;
}
FString USGHapticGlove::ToString(const ESGHapticLocation Location)
{
FSGIC_ESGHapticLocation LocationContainer{Location};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHapticGloveImpl_ToString_Location(&LocationContainer, &OutStringContainer);
return OutStringContainer.String;
}
USGHapticGlove::USGHapticGlove()
: USGDevice()
{
@@ -156,11 +137,6 @@ USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
{
}
USGHapticGlove::USGHapticGlove(const FSGNova2GloveImpl& Nova2GloveImpl)
: USGDevice(Nova2GloveImpl)
{
}
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
: USGDevice(NovaGloveImpl)
{
@@ -181,11 +157,6 @@ USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
{
}
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
: USGDevice(MoveTemp(Nova2GloveImpl))
{
}
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
: USGDevice(MoveTemp(NovaGloveImpl))
{
@@ -216,7 +187,7 @@ FString USGHapticGlove::GetDeviceId() const
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGHapticGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return OutIdContainer.String;
return MoveTemp(OutIdContainer.String);
}
FString USGHapticGlove::GetHardwareVersion() const
@@ -224,7 +195,7 @@ FString USGHapticGlove::GetHardwareVersion() const
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutVersionContainer;
SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
return OutVersionContainer.String;
return MoveTemp(OutVersionContainer.String);
}
int32 USGHapticGlove::GetFirmwareVersion() const
@@ -274,7 +245,41 @@ bool USGHapticGlove::GetImuRotation(FRotator& OutImu)
}
bool USGHapticGlove::GetHandPose(
UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const
UObject* Outer,
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandGeometry_HandProfile_OutHandPose(
&InstanceContainer, &HandGeometryContainer, &HandProfileContainer, &OutHandPoseContainer);
if (bResult)
{
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
}
return bResult;
}
bool USGHapticGlove::GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandProfile_OutHandPose(
&InstanceContainer, &HandProfileContainer, &OutHandPoseContainer);
if (bResult)
{
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
}
return bResult;
}
bool USGHapticGlove::GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
@@ -305,63 +310,22 @@ bool USGHapticGlove::GetHandPose(UObject* Outer, USGHandPose*& OutHandPose)
return bResult;
}
bool USGHapticGlove::GetHandAngles(TArray<TArray<FVector>>& OutHandAngles) const
#if PLATFORM_ANDROID
bool USGHapticGlove::GetHandPose(UObject* Outer, const float DeltaTime, USGHandPose*& OutHandPose)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_TArray_FVector OutHandAnglesContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles(
&InstanceContainer, &OutHandAnglesContainer);
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_DeltaTime_OutHandPose(
&InstanceContainer, DeltaTime, &OutHandPoseContainer);
if (bResult)
{
OutHandAngles = MoveTemp(OutHandAnglesContainer.Array);
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
}
return bResult;
}
USGBasicHandModel* USGHapticGlove::GetHandGeometry(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBasicHandModelImpl OutBasicHandModelContainer;
SGCoreImpl_FSGHapticGloveImpl_GetHandGeometry(&InstanceContainer, &OutBasicHandModelContainer);
return USGBasicHandModel::NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelContainer.BasicHandModelImpl));
}
void USGHapticGlove::SetHandGeometry(const USGBasicHandModel* HandGeometry)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
SGCoreImpl_FSGHapticGloveImpl_SetHandGeometry(&InstanceContainer, &HandGeometryContainer);
}
ESGHapticGloveCalibrationState USGHapticGlove::GetCalibrationState() const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer;
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer);
return OutHapticGloveCalibrationStateContainer.State;
}
void USGHapticGlove::EndCalibration()
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveImpl_EndCalibration(&InstanceContainer);
}
void USGHapticGlove::ResetCalibration()
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveImpl_ResetCalibration(&InstanceContainer);
}
FString USGHapticGlove::GetCalibrationInstruction() const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationInstruction(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
}
#endif /* PLATFORM_ANDROID */
void USGHapticGlove::StopHaptics()
{
@@ -375,53 +339,113 @@ void USGHapticGlove::StopVibrations()
SGCoreImpl_FSGHapticGloveImpl_StopVibrations(&InstanceContainer);
}
bool USGHapticGlove::SendHaptics()
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
return SGCoreImpl_FSGHapticGloveImpl_SendHaptics(&InstanceContainer);
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
}
bool USGHapticGlove::QueueForceFeedbackLevels(const TArray<float>& Levels01)
void USGHapticGlove::SendHaptics(const USGBuzzCommand* BuzzCommand)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container);
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_BuzzCommand(&InstanceContainer, &BuzzCommandContainer);
}
bool USGHapticGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01)
void USGHapticGlove::SendHaptics(const USGThumperCommand* ThumperCommand)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01);
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ThumperCommand(&InstanceContainer, &ThumperCommandContainer);
}
bool USGHapticGlove::QueueVibroLevels(const TArray<float>& Levels01)
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
const USGBuzzCommand* BuzzCommand)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels(&InstanceContainer, &Levels01Container);
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand(
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer);
}
bool USGHapticGlove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01)
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
const USGBuzzCommand* BuzzCommand,
const USGThumperCommand* ThumperCommand)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_ESGHapticLocation LocationContainer{Location};
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel(&InstanceContainer, &LocationContainer, Level01);
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand(
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer, &ThumperCommandContainer);
}
bool USGHapticGlove::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const
bool USGHapticGlove::GetCalibrationValues(TArray<FVector>& OutValues)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
return SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform(&InstanceContainer, &AtLocationContainer);
FSGIC_TArray_FVector OutValuesContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetCalibrationValues(&InstanceContainer, &OutValuesContainer);
if (bResult)
{
OutValues = MoveTemp(OutValuesContainer.Array);
}
return bResult;
}
bool USGHapticGlove::SendCustomWaveform(USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
void USGHapticGlove::ResetCalibrationRange()
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()};
FSGIC_ESGHapticLocation LocationContainer{Location};
return SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform(
&InstanceContainer, &OutWaveformContainer, &LocationContainer);
SGCoreImpl_FSGHapticGloveImpl_ResetCalibrationRange(&InstanceContainer);
}
void USGHapticGlove::UpdateCalibrationRange()
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibrationRange(&InstanceContainer);
}
void USGHapticGlove::UpdateCalibrationRange(const TArray<FVector>& CalibrationValues)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibrationRange_CalibrationValues(
&InstanceContainer, &CalibrationValuesContainer);
}
void USGHapticGlove::GetCalibrationRange(TArray<FVector>& OutMinValues, TArray<FVector>& OutMaxValues)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_FVector OutMinValuesContainer;
FSGIC_TArray_FVector OutMaxValuesContainer;
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationRange(&InstanceContainer, &OutMinValues, &OutMaxValues);
OutMinValues = MoveTemp(OutMinValuesContainer.Array);
OutMaxValues = MoveTemp(OutMaxValuesContainer.Array);
}
void USGHapticGlove::UpdateCalibration(UObject* Outer, USGHandProfile*& OutProfile)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGHandProfileImpl OutProfileContainer;
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibration(&InstanceContainer, &OutProfileContainer);
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
}
void USGHapticGlove::ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGHandProfileImpl OutProfileContainer;
SGCoreImpl_FSGHapticGloveImpl_ApplyCalibration(&InstanceContainer, &OutProfileContainer);
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
}
void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
@@ -504,12 +528,4 @@ void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FR
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
FString USGHapticGlove::ToString() const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHapticGloveImpl_ToString(&InstanceContainer, &OutStringContainer);
return OutStringContainer.String;
}
@@ -0,0 +1,259 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGHapticGloveCalibrationCheck.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGSensorRange.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGCalibrationStage.h"
#include "SGInterop/SGIC_ESGDeviceType.h"
#include "SGInterop/SGIC_FSGHapticGloveCalibrationCheckImpl.h"
#include "SGInterop/SGIC_FSGSensorRangeImpl.h"
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
#include "SGInterop/SGIC_TArray_FVector.h"
#include "SGUtils/SGArrayUtils.h"
struct USGHapticGloveCalibrationCheck::FImpl
{
/************************
* Member variables
************************/
FSGHapticGloveCalibrationCheckImpl HapticGloveCalibrationCheckImpl;
/************************
* Owner object
************************/
USGHapticGloveCalibrationCheck* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGHapticGloveCalibrationCheck* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(
UObject* Outer, const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
{
USGHapticGloveCalibrationCheck* Instance = NewObject<USGHapticGloveCalibrationCheck>(Outer);
Instance->SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
return Instance;
}
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(UObject* Outer)
{
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
return NewHapticGloveCalibrationCheck(
Outer, MoveTemp(OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl));
}
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(
UObject* Outer, const USGSensorRange* LastCalibrationRange)
{
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_LastCalibrationRange(
&OutHapticGloveCalibrationCheckImplContainer, &LastCalibrationRangeContainer);
return NewHapticGloveCalibrationCheck(
Outer, MoveTemp(OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl));
}
float USGHapticGloveCalibrationCheck::GetSenseGloveThreshold()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveThreshold();
}
float USGHapticGloveCalibrationCheck::GetNovaGloveThreshold()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveThreshold();
}
float USGHapticGloveCalibrationCheck::GetSenseGloveMinFlexion()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveMinFlexion();
}
float USGHapticGloveCalibrationCheck::GetNovaGloveMinFlexion()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveMinFlexion();
}
float USGHapticGloveCalibrationCheck::GetSenseGloveMinAbduction()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveMinAbduction();
}
float USGHapticGloveCalibrationCheck::GetNovaGloveMinAbduction()
{
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveMinAbduction();
}
bool USGHapticGloveCalibrationCheck::NeedsCheck(const ESGDeviceType DeviceType)
{
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_NeedsCheck(&DeviceTypeContainer);
}
int32 USGHapticGloveCalibrationCheck::OutOfBounds(
const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues, const ESGDeviceType DeviceType)
{
FSGIC_FSGSensorRangeImpl PreviousRangeContainer{PreviousRange->ToSensorRangeImpl()};
FSGIC_TArray_FVector CurrentValuesContainer{CurrentValues};
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_OutOfBounds(
&PreviousRangeContainer, &CurrentValuesContainer, &DeviceTypeContainer);
}
bool USGHapticGloveCalibrationCheck::MovedMinimum(const TArray<FVector>& CurrentRange, const ESGDeviceType DeviceType)
{
FSGIC_TArray_FVector CurrentRangeContainer{CurrentRange};
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_MovedMinimum(&CurrentRangeContainer, &DeviceTypeContainer);
}
bool USGHapticGloveCalibrationCheck::MatchesLast(const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange,
const ESGDeviceType DeviceType)
{
FSGIC_TArray_FVector CurrentRangeContainer{CurrentRange};
FSGIC_TArray_FVector LastRangeContainer{LastRange};
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_MatchesLast(
&CurrentRangeContainer, &LastRangeContainer, &DeviceTypeContainer);
}
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl);
}
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_LastCalibrationRange(
&OutHapticGloveCalibrationCheckImplContainer, &LastCalibrationRangeContainer);
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl);
}
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
}
USGHapticGloveCalibrationCheck::~USGHapticGloveCalibrationCheck() = default;
void USGHapticGloveCalibrationCheck::SetHapticGloveCalibrationCheckImpl(
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
{
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckContainer;
FSGIC_FSGHapticGloveCalibrationCheckImpl RhsContainer{HapticGloveCalibrationCheckImpl};
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_copy(&OutHapticGloveCalibrationCheckContainer, &RhsContainer);
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
OutHapticGloveCalibrationCheckContainer.HapticGloveCalibrationCheckImpl);
}
const FSGHapticGloveCalibrationCheckImpl& USGHapticGloveCalibrationCheck::ToHapticGloveCalibrationCheckImpl() const
{
return Pimpl->HapticGloveCalibrationCheckImpl;
}
ESGCalibrationStage USGHapticGloveCalibrationCheck::GetCalibrationStage() const
{
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
FSGIC_ESGCalibrationStage OutStageContainer;
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetCalibrationStage(&InstanceContainer, &OutStageContainer);
return MoveTemp(OutStageContainer.Stage);
}
bool USGHapticGloveCalibrationCheck::ReachedConclusion() const
{
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ReachedConclusion(&InstanceContainer);
}
void USGHapticGloveCalibrationCheck::Reset()
{
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_Reset(&InstanceContainer);
}
void USGHapticGloveCalibrationCheck::CheckRange(
const TArray<FVector>& CurrentValues, const float DeltaSeconds, const ESGDeviceType DeviceType)
{
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
FSGIC_TArray_FVector CurrentValuesContainer{CurrentValues};
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_CheckRange(&InstanceContainer, &CurrentValuesContainer,
DeltaSeconds, &DeviceTypeContainer);
}
USGHapticGloveCalibrationCheck::FImpl::FImpl(USGHapticGloveCalibrationCheck* InOwner)
: Owner(InOwner)
{
}
USGHapticGloveCalibrationCheck::FImpl::~FImpl() = default;
void USGHapticGloveCalibrationCheck::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -0,0 +1,421 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2024 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCore/SGHapticGloveCalibrationSequence.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGCalibrationDataPoint.h"
#include "SGCore/SGHandPose.h"
#include "SGCore/SGHandProfile.h"
#include "SGCore/SGHapticGlove.h"
#include "SGCore/SGSensorRange.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGDeviceType.h"
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
#include "SGInterop/SGIC_FSGHapticGloveCalibrationSequenceImpl.h"
#include "SGInterop/SGIC_FSGHapticGloveQuickCalibrationImpl.h"
#include "SGInterop/SGIC_FSGSensorRangeImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_TArray_FSGCalibrationDataPointImpl.h"
#include "SGInterop/SGIC_TArray_FVector.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl.h"
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl.h"
#include "SGUtils/SGArrayUtils.h"
struct USGHapticGloveCalibrationSequence::FImpl
{
/************************
* Member variables
************************/
TSharedPtr<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl;
/************************
* Owner object
************************/
USGHapticGloveCalibrationSequence* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGHapticGloveCalibrationSequence* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
};
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequence)
{
USGHapticGloveCalibrationSequence* Instance = NewObject<USGHapticGloveCalibrationSequence>(Outer);
Instance->SetHapticGloveCalibrationSequenceImpl(HapticGloveCalibrationSequence);
return Instance;
}
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequence)
{
USGHapticGloveCalibrationSequence* Instance = NewObject<USGHapticGloveCalibrationSequence>(Outer);
Instance->SetHapticGloveCalibrationSequenceImpl(MoveTemp(HapticGloveCalibrationSequence));
return Instance;
}
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
return NewHapticGloveCalibrationSequence(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
const USGHapticGlove* LinkedGlove)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_LinkedGlove_MakeShared(
&OutSharedPtrContainer, &LinkedGloveContainer);
return NewHapticGloveCalibrationSequence(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
int32 USGHapticGloveCalibrationSequence::GetMaxDataPoints()
{
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetMaxDataPoints();
}
bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
const USGSensorRange* SensorRange, const ESGDeviceType ForDevice,
const bool bRightHanded, USGHandProfile*& OutProfile)
{
FSGIC_FSGSensorRangeImpl SensorRangeContainer{SensorRange->ToSensorRangeImpl()};
FSGIC_ESGDeviceType ForDeviceContainer{ForDevice};
FSGIC_FSGHandProfileImpl OutProfileContainer;
const bool bResult =
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileProfile_SensorRange_ForDevice_bRightHanded_OutProfile(
&SensorRangeContainer, &ForDeviceContainer, bRightHanded, &OutProfileContainer);
if (bResult)
{
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
}
return bResult;
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_LinkedGlove_MakeShared(
&OutSharedPtrContainer, &LinkedGloveContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_copy_MakeShared(
&OutSharedPtrContainer, &RhsContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
}
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
}
USGHapticGloveCalibrationSequence::~USGHapticGloveCalibrationSequence() = default;
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
{
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
}
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
{
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
}
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
{
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
}
TSharedRef<FSGHapticGloveCalibrationSequenceImpl>
USGHapticGloveCalibrationSequence::ToHapticGloveCalibrationSequenceImpl() const
{
return Pimpl->HapticGloveCalibrationSequenceImpl.ToSharedRef();
}
USGHapticGlove* USGHapticGloveCalibrationSequence::GetLinkedGlove(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetLinkedGlove(&InstanceContainer, &OutGloveContainer);
return USGHapticGlove::NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
}
void USGHapticGloveCalibrationSequence::SetLinkedGlove(const USGHapticGlove* LinkedGlove)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_SetLinkedGlove(&InstanceContainer, &LinkedGloveContainer);
}
TArray<USGCalibrationDataPoint*> USGHapticGloveCalibrationSequence::GetCalibrationPoints(UObject* Outer) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_TArray_FSGCalibrationDataPointImpl OutPoints;
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCalibrationPoints(&InstanceContainer, &OutPoints);
TArray<USGCalibrationDataPoint*> Points{
FSGArrayUtils::FromImplType<FSGCalibrationDataPointImpl, USGCalibrationDataPoint,
&USGCalibrationDataPoint::NewCalibrationDataPoint>(
Outer, MoveTemp(OutPoints.Array))
};
return MoveTemp(Points);
}
float USGHapticGloveCalibrationSequence::GetElapsedTime() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetElapsedTime(&InstanceContainer);
}
bool USGHapticGloveCalibrationSequence::IsManuallyCompleted() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_IsManuallyCompleted(&InstanceContainer);
}
int32 USGHapticGloveCalibrationSequence::GetCurrentStage() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCurrentStage(&InstanceContainer);
}
SIZE_T USGHapticGloveCalibrationSequence::GetCalibrationPointsCount() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCalibrationPointsCount(&InstanceContainer);
}
bool USGHapticGloveCalibrationSequence::AutoCompleted() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_AutoCompleted(&InstanceContainer);
}
bool USGHapticGloveCalibrationSequence::Completed() const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Completed(&InstanceContainer);
}
void USGHapticGloveCalibrationSequence::Reset()
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Reset(&InstanceContainer);
}
void USGHapticGloveCalibrationSequence::AddDataPoint(const TArray<FVector>& CalibrationPoints)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_TArray_FVector CalibrationPointsContainer{CalibrationPoints};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_AddDataPoint(&InstanceContainer, &CalibrationPointsContainer);
}
void USGHapticGloveCalibrationSequence::Update(const float DeltaSeconds)
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Update(&InstanceContainer, DeltaSeconds);
}
void USGHapticGloveCalibrationSequence::ConfirmCurrentStep()
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ConfirmCurrentStep(&InstanceContainer);
}
bool USGHapticGloveCalibrationSequence::CompileRange(UObject* Outer, USGSensorRange*& OutSensorRange) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_FSGSensorRangeImpl OutSensorRangeContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileRange(
&InstanceContainer, &OutSensorRangeContainer);
if (bResult)
{
OutSensorRange = USGSensorRange::NewSensorRange(Outer, MoveTemp(OutSensorRangeContainer.SensorRangeImpl));
}
return bResult;
}
bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
const ESGDeviceType ForDevice, const bool bRightHanded,
USGHandProfile*& OutProfile) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_ESGDeviceType ForDeviceContainer{ForDevice};
FSGIC_FSGHandProfileImpl OutProfileContainer;
const bool bResult =
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileProfile_ForDevice_bRightHanded_OutProfile(
&InstanceContainer, &ForDeviceContainer, bRightHanded, &OutProfileContainer);
if (bResult)
{
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
}
return bResult;
}
bool USGHapticGloveCalibrationSequence::GetHandPose(UObject* Outer, USGHandPose*& OutCurrentHandPose) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_FSGHandPoseImpl OutCurrentHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetHandPose_OutCurrentHandPose(
&InstanceContainer, &OutCurrentHandPoseContainer);
if (bResult)
{
OutCurrentHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutCurrentHandPoseContainer.HandPoseImpl));
}
return bResult;
}
bool USGHapticGloveCalibrationSequence::GetHandPose(UObject* Outer,
const bool bRightHanded, USGHandPose*& OutCurrentHandPose) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_FSGHandPoseImpl OutCurrentHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetHandPose_bRightHanded_OutCurrentHandPose(
&InstanceContainer, bRightHanded, &OutCurrentHandPoseContainer);
if (bResult)
{
OutCurrentHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutCurrentHandPoseContainer.HandPoseImpl));
}
return bResult;
}
FString USGHapticGloveCalibrationSequence::GetCurrentInstruction(const FString& NextStepKey) const
{
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
FSGIC_FString OutInstructionContainer;
FSGIC_FString NextStepKeyContainer{NextStepKey};
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCurrentInstruction(
&InstanceContainer, &OutInstructionContainer, &NextStepKeyContainer);
return MoveTemp(OutInstructionContainer.String);
}
USGHapticGloveCalibrationSequence::FImpl::FImpl(USGHapticGloveCalibrationSequence* InOwner)
: Owner(InOwner)
{
}
USGHapticGloveCalibrationSequence::FImpl::~FImpl() = default;
void USGHapticGloveCalibrationSequence::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}

Some files were not shown because too many files have changed in this diff Show More