Compare commits

..
512 Commits
Author SHA1 Message Date
Mamadou Babaei 2fc0f0b04a bump the plugin version to v2.0.2 2024-04-25 12:56:52 +02:00
Mamadou Babaei eeb287fc93 bump the plugin version to v2.0.1 2024-04-15 15:10:34 +02:00
Mamadou Babaei 8bdaeda9e6 do not call FSGHandLayer::ResetCalibration on every backend initialization 2024-04-15 15:10:34 +02:00
Mamadou Babaei cba9fe3688 only instantiate the connected glove once instead of recreating and destroying it every frame 2024-04-15 15:10:33 +02:00
Mamadou Babaei 3491fb7b85 bump senseglove libraries to v2.102.0-35d4de3f 2024-04-15 15:10:31 +02:00
Mamadou Babaei d777be920d fix the wrong header file description sections for the header files 2024-04-15 15:10:30 +02:00
Mamadou Babaei 3b7ea02a32 update the changelog with the unreleased changes 2024-04-15 15:10:29 +02:00
Mamadou Babaei c58f79865d update the outdated platform support matrix remarks 2024-03-23 17:25:02 +01:00
Mamadou Babaei 4e3babfd7b add ue 5.4 to the list of supported engines through azure devops 2024-03-23 17:25:02 +01:00
Mamadou Babaei 1b57cd9a9b bump the plugin version to v2.0.0 2024-03-22 21:36:15 +01:00
Mamadou Babaei da50494f86 update the changelog 2024-03-22 21:36:15 +01:00
Mamadou Babaei 47b4c872a3 add missing modules to the directory structure 2024-03-22 21:36:14 +01:00
Mamadou Babaei ab8303b4a3 do not expose any uproperty/ufunction that relies on UXRDeviceVisualizationComponent due to UHT/UBT errors and UE 5.1 incompability 2024-03-22 21:04:31 +01:00
Mamadou Babaei 3f1794f4c9 update the planned features status 2024-03-22 21:04:00 +01:00
Mamadou Babaei 065b01c2ea fix other build issues with non-unity builds 2024-03-22 21:04:00 +01:00
Mamadou Babaei 9e7382bc26 add the missing string header that causes build issues in non-unity builds 2024-03-22 21:04:00 +01:00
Mamadou Babaei e40f2401f3 remove the platform dependant build hacks inside FSGArrayUtils::FromStdVector as msvc is not able to deduce TArray<T>::SizeType 2024-03-22 21:04:00 +01:00
Mamadou Babaei 02cffaba07 bump the senseglove libraries to v2.101.12-62b1be11 2024-03-22 21:03:59 +01:00
Mamadou Babaei 4147ceea1a fix android build issue inside FSGArrayUtils::FromStdVector introduced by 0cdc7e03ac 2024-03-22 21:03:59 +01:00
Mamadou Babaei 48c4146e13 Revert "try to init/uninit the backend module at the module start/shutdown"
This reverts commit c45bcaf618.
2024-03-22 21:03:59 +01:00
Mamadou Babaei 55caf9fc2b fix a build issue inside FSGArrayUtils::FromStdVector introduced by newer msvc updates due to stricter implicit uint64 to int32 conversions 2024-03-22 21:03:59 +01:00
Mamadou Babaei 4e52fd5cbd bump the senseglove backend libraries to v2.101.11-2d6fe9ce 2024-03-22 21:03:58 +01:00
Mamadou Babaei 3fa790928b correct the module logs grammars 2024-03-22 21:03:58 +01:00
Mamadou Babaei 70e2e1dc94 try to init/uninit the backend module at the module start/shutdown 2024-03-22 21:03:58 +01:00
Mamadou Babaei ecd0d8ea48 allow the c++ compiler the opportunity to perform rvo/nrvo if applicable 2024-03-22 21:03:58 +01:00
Mamadou Babaei 48742cf897 bump senseglove libraries to v2.101.10-7e515114 2024-03-22 21:03:57 +01:00
Mamadou Babaei 163152598c update the changelog with added quest 3 controllers support 2024-03-22 21:03:57 +01:00
Mamadou Babaei 411c1c3fd1 integrate the virtual hand mesh from allbreaker 2024-03-22 21:03:57 +01:00
Mamadou Babaei b5f6dbfd59 remove redundant headers 2024-03-22 21:03:57 +01:00
Mamadou Babaei c9ca00d666 expose as little as dependencies as possible 2024-03-22 21:03:57 +01:00
Mamadou Babaei d5a7d1d139 correct the hand mesh yaw rotation inside the sgpawn after the squat/sgvect3d changes 2024-03-22 21:03:56 +01:00
Mamadou Babaei 092a66ca32 replace SupportedTargetPlatforms with PlatformAllowList 2024-03-22 21:03:56 +01:00
Mamadou Babaei afd8c44b16 clean up unsed unreal version headers 2024-03-22 21:03:56 +01:00
Mamadou Babaei 735c837b4c declare the openxr plugin as a dependency 2024-03-22 21:03:56 +01:00
Mamadou Babaei b2861b0068 utilize UXRDeviceVisualizationComponent to display meshes on UE 5.2 onwards 2024-03-22 21:03:56 +01:00
Mamadou Babaei 43232ba110 fix the changelog errors 2024-03-22 21:03:56 +01:00
Mamadou Babaei bac069c88c remove a changelog that is not valid anymore 2024-03-22 21:03:56 +01:00
Mamadou Babaei 23e9b91797 bump the senseglove libraries to v2.101.9-8abfc26d 2024-03-22 21:03:55 +01:00
Mamadou Babaei 4cb158bddc bump the plugin version to v1.9.8 2024-03-22 21:03:55 +01:00
Mamadou Babaei e8b00ff1a9 apply a temporary workaround in order to ameliorate the hand animation after sgquat, sgvect3d fixes 2024-03-22 21:03:55 +01:00
Mamadou Babaei 7bc10072c0 make bones rotations a private field 2024-03-22 21:03:55 +01:00
Mamadou Babaei 019ea4fe35 update the changelog 2024-03-22 21:03:55 +01:00
Mamadou Babaei c8bd51960d proper angle conversions for vectors 2024-03-22 21:03:55 +01:00
Mamadou Babaei 7587cd811e proper sgvect3d and squat conversions to fvector and fquat 2024-03-22 21:03:55 +01:00
Mamadou Babaei 24cfdc6f91 apply senseglove/unreal angle conversions in the gloves' api 2024-03-22 21:03:55 +01:00
Mamadou Babaei b80b2394eb fix a crash when calling one of the SGHandInterpolatorImpl constructors which happens due to unintialized pimpl object 2024-03-22 21:03:55 +01:00
Mamadou Babaei a065f4f436 update the changelog 2024-03-22 21:03:55 +01:00
Mamadou Babaei 35ea515c53 bump senseglove libraries to v2.101.8-a2a2075b which resolves the android writehaptics crash 2024-03-22 21:03:54 +01:00
Mamadou Babaei 6e509d8df5 update the change log with unreleased changes 2024-03-22 21:03:54 +01:00
Mamadou Babaei bb27a74033 bump senseglove libraries to v2.101.7-3580cd9f 2024-03-22 21:03:53 +01:00
Mamadou Babaei c8e1af983b bump senseglove libraries to v2.101.5-f0aff76b 2024-03-22 21:03:52 +01:00
Mamadou Babaei 7f80d9ef2f bump senseglove libraries to v2.101.4-6c860c42 with android fixes and fix a android crash 2024-03-22 21:03:51 +01:00
Mamadou Babaei e4821526e0 bump senseglove libraries to v2.101.3-e583f6de 2024-03-22 21:03:50 +01:00
Mamadou Babaei 7970cb1e2a implement the api updates and bump the senseglove libraries to v2.101.2-2eb7439f 2024-03-22 21:03:50 +01:00
Mamadou Babaei a787f208f4 force glove recalibration on backend initialize 2024-03-22 21:03:49 +01:00
Mamadou Babaei 0c79263544 add as*glove/device casting methods that resolves the sgpawn vibrotactile issues 2024-03-22 21:03:49 +01:00
Mamadou Babaei 177498d285 use device impl casts 2024-03-22 21:03:49 +01:00
Mamadou Babaei d347eb93a7 list nova 2 gloves in the get devices from the device list 2024-03-22 21:03:49 +01:00
Mamadou Babaei 331b022a46 another attempt at improving the glove casts 2024-03-22 21:03:49 +01:00
Mamadou Babaei f1c4c8ba78 try an alternative approach for glove instances upcasting at the lower levels of the api 2024-03-22 21:03:49 +01:00
Mamadou Babaei 46813b44ec try to add a solution for glove type-casting in higher levels of the api 2024-03-22 21:03:49 +01:00
Mamadou Babaei 121776964a fix the send custom waveform signature on the hand layer 2024-03-22 21:03:49 +01:00
Mamadou Babaei c25ebab1a2 fix a bug inside the ESGHapticLocation enum conversions 2024-03-22 21:03:49 +01:00
Mamadou Babaei 9996a74f00 bump senseglove libraries for v2.101.1-edc1163a 2024-03-22 21:03:48 +01:00
Mamadou Babaei 17228201b4 implement the nova2 api updates and bump the senseglove libraries to v2.101.0-3e1693fb 2024-03-22 21:03:47 +01:00
Mamadou Babaei a441e5ed36 bump the plugin version to v1.9.8 2024-03-12 20:33:04 +01:00
Mamadou Babaei 532d0af0a5 make bones rotations a private field 2024-03-12 20:33:03 +01:00
Mamadou Babaei 1745844225 fix a crash inside the USGHandPose::FromHandAngles in higher levels of the api 2024-03-12 20:33:03 +01:00
Mamadou Babaei 729c8ee51f drop the prefix for internal typedefs 2024-03-12 20:33:02 +01:00
Mamadou Babaei a5c4b40299 add some performance optimizations by utilizing MoveTemp in return statements 2024-03-12 20:33:02 +01:00
Mamadou Babaei ba9c5f5406 fix a bug where the right hand mesh is always hidden inside the game no matter whether the right glove is connected or not 2024-03-12 20:33:01 +01:00
Mamadou Babaei a92833135d fix a wrong variable name 2024-03-12 20:33:01 +01:00
Mamadou Babaei 286f62b534 only include the sgconnect header if the build platform is android 2024-03-12 20:33:00 +01:00
Mamadou Babaei cbc11557c0 bump the plugin version to v1.9.7 2024-02-18 20:30:19 +01:00
Mamadou Babaei b72917c927 apply vibrotactile and force-feedback fixes backported from next major release 2024-02-18 20:30:18 +01:00
Mamadou Babaei ef9849f82c bump the plugin version to v1.9.6 2024-02-14 14:56:30 +01:00
Mamadou Babaei 8ca702dc06 fix the NovaGlove class instantiation methods to initialize a NovaGloveImpl instead of a SenseGloveImpl 2024-02-14 14:56:30 +01:00
Mamadou Babaei 34a722c633 bump the plugin version to v1.9.5 2024-02-09 10:53:46 +01:00
Mamadou Babaei 7770c939c3 fix a potential segfault inside SGDeviceModel::ParseFirmware 2024-02-09 10:53:46 +01:00
Mamadou Babaei 7cf7294823 bump the plugin version to v1.9.4 2024-02-08 07:47:57 +01:00
Mamadou Babaei d41ffb25cd fix the bluprint parse fucntion signature to accept OutGloveInfo by reference 2024-02-08 07:47:57 +01:00
Mamadou Babaei 2a94bcfe1a fix changelog formatting 2024-02-08 07:47:57 +01:00
Mamadou Babaei 218c1ce2bf bump the plugin version to v1.9.3 2024-02-03 04:53:56 +01:00
Mamadou Babaei 38e4f6a539 rephrase fixed changes 2024-02-03 04:53:56 +01:00
Mamadou Babaei fa7ed71778 bump the copyright years 2024-02-03 04:53:55 +01:00
Mamadou Babaei 69e6fba707 minor changelog fixes 2024-02-03 04:53:55 +01:00
Mamadou Babaei 34a3e70c66 fix the wrong version numbers inside the paltform support matrix and the main .uplugin file 2024-02-03 04:53:55 +01:00
Mamadou Babaei 6922327c02 apply a few critical fixes backported from the next major release 2024-02-03 04:53:55 +01:00
Mamadou Babaei 317d385229 a minor changelog fix 2024-02-03 04:53:55 +01:00
Mamadou Babaei 82eb0ac58d bump the plugin version to v1.9.2 2023-11-03 18:39:06 +01:00
Mamadou Babaei 2ea9b94116 fix a bug where released actor is going to be null whenever the OnActorReleased event fires 2023-11-03 18:39:06 +01:00
Mamadou Babaei 2ed988f41a restructure the planned features completion status 2023-11-03 18:39:05 +01:00
Mamadou Babaei d96bd0369d update the list of planned features and their completion status 2023-11-03 18:39:05 +01:00
Mamadou Babaei 7ef1133130 update the list of planned features and their completion status 2023-11-03 18:39:05 +01:00
Mamadou Babaei f8b609082e update the list of planned features and their completion status 2023-11-03 18:39:04 +01:00
Mamadou Babaei 4c24a21584 add a list of planned features and their completion status to the main readme file 2023-11-03 18:39:04 +01:00
Mamadou Babaei 77e6e1b281 bump the plugin version to v1.9.1 2023-10-11 17:03:34 +02:00
Mamadou Babaei cc1ae7a80c 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:03:33 +02:00
Mamadou Babaei 458ca01d29 bump the plugin version to v1.9.0 2023-10-10 17:31:31 +02:00
Mamadou Babaei 669e11a8e8 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:31:30 +02:00
Mamadou Babaei be320666dd add a missing release note fix for v1.8.0 to the changelog file 2023-10-10 17:31:30 +02:00
Mamadou Babaei e8e9b1a880 bump the plugin version to v1.8.0 2023-10-10 16:14:07 +02:00
Mamadou Babaei 341f9d8443 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:14:06 +02:00
Mamadou Babaei d6813ded60 bump the plugin version to v1.7.0 2023-09-14 18:53:21 +02:00
Mamadou Babaei ace4479b7a bump senseglove headers and libraries for linux and android to v2.12.0-19c9854 2023-09-14 18:53:20 +02:00
Mamadou Babaei 69909bbc1b bump senseglove libraries for windows to v2.12.0-19c9854 2023-09-14 18:53:20 +02:00
Mamadou Babaei 6a872cd673 move SGCoreImpl/SGPlatform to SGBuildHacks/SGPlatform and introduce SG_CPP20 and SG_CAPTURE_THIS 2023-09-14 18:53:20 +02:00
Mamadou Babaei 8730c62ea8 update the changelog 2023-09-14 18:53:20 +02:00
Mamadou Babaei 47a718b85e update the changelog with unreleased changes 2023-09-14 18:53:19 +02:00
Mamadou Babaei 5904439412 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:53:19 +02:00
Mamadou Babaei b37697bf91 update the changelog with unreleased changes 2023-09-14 18:53:19 +02:00
Mamadou Babaei f070b32591 remove a duplicate log 2023-09-14 18:53:19 +02:00
Mamadou Babaei f9b20ab71c add sggameinstance for future use 2023-09-14 18:53:19 +02:00
Mamadou Babaei 72344754bb remove a duplicated slash in a header's path 2023-09-14 18:53:19 +02:00
Mamadou Babaei df6c343a11 bump the plugin version to v1.6.1 2023-08-14 21:23:46 +02:00
Mamadou Babaei 086a051853 fix the platform support matrix 2023-08-14 21:23:46 +02:00
Mamadou Babaei 892921de2c add a missing header that causes build issues on ue 5.0 2023-08-14 21:23:45 +02:00
Mamadou Babaei 6f48e38dd9 bump the plugin version to v1.6.0 2023-08-14 17:28:09 +02:00
Mamadou Babaei 811c634c33 update the changelog 2023-08-14 17:28:09 +02:00
Mamadou Babaei 67adf78c1f update the changelog 2023-08-14 17:28:08 +02:00
Mamadou Babaei cf8c684011 do not cache grabbed actors as overlapped actors 2023-08-14 17:28:08 +02:00
Mamadou Babaei c706550540 inline some pimpl methods in order to improve function call performance for regularly called methods 2023-08-14 17:28:07 +02:00
Mamadou Babaei 2e4a8b7904 cache all overlapped actors with the real/virtual hands 2023-08-14 17:28:07 +02:00
Mamadou Babaei 12365ff9b4 initial working implementation of the separated virtual/real hand rendering 2023-08-14 17:28:06 +02:00
Mamadou Babaei ed36d6e0e1 fix the wrong default gizmo colors when initialized using the default constructor. 2023-08-14 17:28:06 +02:00
Mamadou Babaei b32163d35e fix ue 5.3 build issues 2023-08-14 17:28:05 +02:00
Mamadou Babaei 41ba991fff add support for the upcoming unreal engine 5.3 and native toolchain v22 libs to the build system 2023-08-14 17:28:05 +02:00
Mamadou Babaei 64eeed521b bump senseglove libraries for windows to v2.11.0-b775a05 2023-08-14 17:28:04 +02:00
Mamadou Babaei 0bb03b0d10 update the changelog 2023-08-14 17:28:04 +02:00
Mamadou Babaei 17342f8629 remove any mention of msvc 2017 and ue 4.27 third-party libs from the readme file 2023-08-14 17:28:03 +02:00
Mamadou Babaei 396bc15fb6 bump senseglove headers and libraries for linux and android to v2.11.0-b775a05 2023-08-14 17:28:02 +02:00
Mamadou Babaei 0eb1e850da initial attempt at separating the hand rendering from the real hand 2023-08-14 17:28:01 +02:00
Mamadou Babaei 2552da9b10 alternative velocity calculation for released actors based on the hand's cached position history 2023-08-14 17:28:00 +02:00
Mamadou Babaei 7cf30bb4c4 alternative velocity calculation for released actors based on a cached position history 2023-08-14 17:28:00 +02:00
Mamadou Babaei db00266d29 apply the hand's velocity to the grabbed actor after release 2023-08-14 17:27:59 +02:00
Mamadou Babaei 8cdf76fc90 bump the plugin version to v1.5.3 2023-07-19 18:23:40 +02:00
Mamadou Babaei 86a9a2f696 bump senseglove libraries for windows to v2.10.1-3b0e7c9 2023-07-19 18:23:39 +02:00
Mamadou Babaei 6577660118 a minor changelog fix 2023-07-19 18:23:39 +02:00
Mamadou Babaei 197c376ccd bump senseglove libraries for linux and android to v2.10.1-3b0e7c9 2023-07-19 18:23:38 +02:00
Mamadou Babaei ba3c500767 bump the plugin version to v1.5.2 2023-07-19 01:20:36 +02:00
Mamadou Babaei 48e46dfb6b fix a build issue with android shipping builds 2023-07-19 01:14:28 +02:00
Mamadou Babaei a0cf4b13a1 whitespace fix 2023-07-19 01:14:28 +02:00
Mamadou Babaei 95f70e2679 remove redundant whitespaces 2023-07-19 01:14:27 +02:00
Mamadou Babaei bf5b7ba07b fix a grammatical error in the changelog 2023-07-19 01:14:27 +02:00
Mamadou Babaei e566f369df bump the plugin version to v1.5.1 2023-07-13 19:50:31 +02:00
Mamadou Babaei ef0588a903 fix grab/release bug for the right hand 2023-07-13 19:50:31 +02:00
Mamadou Babaei 9d51c63272 fix a wrist tracker bug where hands are getting tracked in reverse 2023-07-13 19:50:30 +02:00
Mamadou Babaei f39de70458 do checks against the right hand which is cleaner to read 2023-07-13 19:50:30 +02:00
Mamadou Babaei 77d1c14883 bump the plugin version to v1.5.0 2023-06-16 02:12:12 +02:00
Mamadou Babaei 9ae2c7f5b3 update the changelog 2023-06-16 02:12:12 +02:00
Mamadou Babaei 32c2201c82 fix the motion source options crashes 2023-06-16 02:12:12 +02:00
Mamadou Babaei e495b40218 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:12:12 +02:00
Mamadou Babaei 24be69b8f3 bump senseglove libraries for windows to v.2.10.0-12133ac 2023-06-16 02:12:12 +02:00
Mamadou Babaei 55573f341c bump senseglove libraries for linux and android to v.2.10.0-12133ac 2023-06-16 02:12:11 +02:00
Mamadou Babaei b6fb84dc91 update the changelog with the latest changes 2023-06-16 02:12:11 +02:00
Mamadou Babaei 8178133073 remove not yet implemented from ViveTracker and ViveFocus3WristTracker enums' names 2023-06-16 02:12:11 +02:00
Mamadou Babaei 5247825f31 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:12:10 +02:00
Mamadou Babaei 8eb690831f bump senseglove libraries and headers for linux and android to v2.9.0-21c54c5 2023-06-16 02:12:10 +02:00
Mamadou Babaei a0748cc33a update the changelog to reflect the latest changes 2023-06-16 02:12:09 +02:00
Mamadou Babaei e5594c2a22 bump senseglove libraries for windows to v2.9.0-21c54c5 2023-06-16 02:12:09 +02:00
Mamadou Babaei 080f0aa008 add (not implemented yet) to the blueprint display name for positional tracking hardware that is not implemented yet 2023-06-16 02:12:09 +02:00
Mamadou Babaei 3dbfcaea71 add support for vive focus 3 positional tracking hardwares 2023-06-16 02:12:09 +02:00
Mamadou Babaei 999de944ac add support for oculus quest pro positional tracking hardwares 2023-06-16 02:12:09 +02:00
Mamadou Babaei e72337d816 remove support for oculus touch, pico neo 2, and pico neo 3 positional tracking hardwares 2023-06-16 02:12:09 +02:00
Mamadou Babaei 97e6894995 fix ESGPositionalTrackingHardware enum display names and comments 2023-06-16 02:12:09 +02:00
Mamadou Babaei 4ef35c92e4 update the changelog 2023-06-16 02:12:09 +02:00
Mamadou Babaei b3f663826a fully refactor the top-level configurations in the settings system into ustructs 2023-06-16 02:12:09 +02:00
Mamadou Babaei 970aece892 update the platform support matrix to reflect the latest support status 2023-06-16 02:12:09 +02:00
Mamadou Babaei 76eecb7599 bump senseglove libraries for windows v2.8.0-ff14904 2023-06-16 02:12:09 +02:00
Mamadou Babaei 0b00e99828 bump senseglove libraries for linux and android to v2.8.0-ff14904 2023-06-16 02:12:08 +02:00
Mamadou Babaei 687a35e37d drop support for native toolchain v19, msvc v141 (2017), and thus ue 4.27 in the build system 2023-06-16 02:12:08 +02:00
Mamadou Babaei 07e484d65a bump the plugin version to v1.4.3 2023-06-01 23:31:22 +02:00
Mamadou Babaei 26925b2b0e update the changelog 2023-06-01 23:31:21 +02:00
Mamadou Babaei c485904a94 fix a critical Android crash that happens where the default development hand meshes are not found 2023-06-01 23:31:21 +02:00
Mamadou Babaei cb18cbd06b add a complementary internal method to IsUsingUserMesh, IsUsingDefaultMesh for checking various hand meshes 2023-06-01 23:31:20 +02:00
Mamadou Babaei 578798a970 fix the changelog release formatting and drop the v prefix in the release titles 2023-06-01 23:31:20 +02:00
Mamadou Babaei 0f7341dc8f bump the plugin version to v1.4.2 2023-06-01 21:46:39 +02:00
Mamadou Babaei e67df6ff00 update the changelog 2023-06-01 21:46:38 +02:00
Mamadou Babaei b8edd42370 fix the changelog typos and errors 2023-06-01 21:46:38 +02:00
Mamadou Babaei afb6e9c874 minor grammatical fix 2023-06-01 21:46:38 +02:00
Mamadou Babaei 58cefeb682 update the changelog with unreleased changes 2023-06-01 21:46:37 +02:00
Mamadou Babaei 0702f56f29 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:46:37 +02:00
Mamadou Babaei 6275699fae fix error C2440: 'initializing': cannot convert from 'void' to 'bool' when engine versio is < 5.2 2023-06-01 21:46:36 +02:00
Mamadou Babaei d720718c2f fix typos in the changelog 2023-06-01 21:46:36 +02:00
Mamadou Babaei 33b09428f7 fix a typo in the changelog 2023-06-01 21:46:35 +02:00
Mamadou Babaei a760890f62 fix the changelog 2023-06-01 21:46:35 +02:00
Mamadou Babaei edf2b5148c fix a typo in the changelog 2023-06-01 21:46:35 +02:00
Mamadou Babaei 166bf45296 minor fix in the changelog 2023-06-01 21:46:34 +02:00
Mamadou Babaei b75e887ea7 bump the plugin version v1.4.1 2023-05-29 02:10:05 +02:00
Mamadou Babaei adc5093a48 log unreleased changes 2023-05-29 02:10:04 +02:00
Mamadou Babaei 6ea8c24cd5 remove dead gradle code from the android module 2023-05-29 02:10:04 +02:00
Mamadou Babaei 16020a03fc supress a grade warning for non-arm64 archs when the build target is android 2023-05-29 02:10:03 +02:00
Mamadou Babaei c8c7fb3210 bump the plugin version to v1.4.0 2023-05-19 19:02:35 +02:00
Mamadou Babaei d190677a9b fix linux aarch64 build issues on ue 5.0 2023-05-19 18:36:39 +02:00
Mamadou Babaei bbcdbe70ec remove SenseGloveCoreTypes from the directory structure 2023-05-19 18:36:38 +02:00
Mamadou Babaei 29c3d7deeb implement an optional feature in order to automatically stop all haptics on the end play event 2023-05-19 18:14:57 +02:00
Mamadou Babaei 53ee42c65b 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:14:56 +02:00
Mamadou Babaei c1144fdaa8 remove commented code 2023-05-19 18:14:56 +02:00
Mamadou Babaei aa3ad76bee increase the default finger tips collider sizes 2023-05-19 18:14:55 +02:00
Mamadou Babaei 78845a75f3 get root component instead of iterating over the components in order to disable/enable the actor physics 2023-05-19 18:14:55 +02:00
Mamadou Babaei 01a407ac8e fix a potential crash 2023-05-19 18:14:54 +02:00
Mamadou Babaei 637150ea10 stop all haptics on end play in order to make sure the glove won't get stuck in haptics feedbacks 2023-05-19 18:14:54 +02:00
Mamadou Babaei 5f350b4b43 set the default attachment rotation rule to keep relative 2023-05-19 18:14:54 +02:00
Mamadou Babaei 37d557df0e set the default attachment scale rule to snap to target 2023-05-19 18:14:53 +02:00
Mamadou Babaei ce6c8bf525 do not affect collision when grab/release 2023-05-19 18:14:53 +02:00
Mamadou Babaei 32a747ad4b refactor and remove the need to cache the component in the grab/release workflow 2023-05-19 18:14:52 +02:00
Mamadou Babaei b381bbb1ec 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:14:52 +02:00
Mamadou Babaei 03aeb9e024 try an alternative approach for the grab/release functionality by disabling/enabling physics simulation 2023-05-19 18:14:51 +02:00
Mamadou Babaei 7d979e6d61 add grab sucess/fail checks with error messages 2023-05-19 18:14:51 +02:00
Mamadou Babaei 8013bf79cb add ensure checks on the grab socket name 2023-05-19 18:14:51 +02:00
Mamadou Babaei 99cf67bc55 move socket name to a temp var for easier debugging 2023-05-19 18:14:50 +02:00
Mamadou Babaei 2584000dcc move attachment rules to a temp var for easier debugging 2023-05-19 18:14:50 +02:00
Mamadou Babaei e313dfef13 fix a release-detection logic error 2023-05-19 18:14:49 +02:00
Mamadou Babaei 2e95046efa clean up and simplify the touch callback lambda 2023-05-19 18:14:49 +02:00
Mamadou Babaei 2d7aa23506 update the changelog 2023-05-19 18:14:48 +02:00
Mamadou Babaei 55d1b74a1a force off haptic commands when collision ends 2023-05-19 18:14:48 +02:00
Mamadou Babaei b68922c903 only send force-feedback and buzz commands when they are not zero 2023-05-19 18:14:48 +02:00
Mamadou Babaei 84ebf3f025 update the platform support matrix with the distribution channels and their remarks 2023-05-19 18:14:47 +02:00
Mamadou Babaei 5e63a6ab6f add a note about abi/api breaking changes 2023-05-19 18:14:47 +02:00
Mamadou Babaei 5f06c73925 bump senseglove binaries for windows to v2.7.1-965f90c 2023-05-19 18:14:46 +02:00
Mamadou Babaei b4d1e24bb4 removed the redundant SenseGloveCoreTypes module which causes all kinds of packaging issues with certain versions of the engine. 2023-05-19 18:14:45 +02:00
Mamadou Babaei dfdab92b13 try to fix various build issues with the senseglove core types module 2023-05-19 18:14:45 +02:00
Mamadou Babaei eaa61b01cd fix linux aarch64 build issues and for older unreal engine versions 2023-05-19 18:14:44 +02:00
Mamadou Babaei 127a06795c whitelist all modules for linuxarm64 target platform 2023-05-19 18:14:44 +02:00
Mamadou Babaei ac12fb98fc fix linux aarch64 build issues and for ue 4.27 up to 5.2 2023-05-19 18:14:43 +02:00
Mamadou Babaei 2e560e02f7 fix a build error where engine versions are < 5.2 2023-05-19 18:14:43 +02:00
Mamadou Babaei 58aef14b0d add linux aarch64 platform support for unreal 5.2+ and bump senseglove libraries to v2.7.1-965f90c 2023-05-19 18:14:43 +02:00
Mamadou Babaei 8b4a1c6161 fix a circular dependency build issue 2023-05-19 18:14:41 +02:00
Mamadou Babaei 51f45c74f8 add a missing dependency that causes packaging issues 2023-05-19 18:14:41 +02:00
Mamadou Babaei 4a01f80d45 capture by reference in the buzz timer callback lambda or otherwise crash 2023-05-19 18:14:40 +02:00
Mamadou Babaei 4a47007ff4 fix a crash due to uninitialized pimpl object 2023-05-19 18:14:40 +02:00
Mamadou Babaei da1ad71b8b fix lambda crashes and ensure logic bugs 2023-05-19 18:14:40 +02:00
Mamadou Babaei 4b8bae5bb7 complete the implementation for the touch functionality and its feedbacks 2023-05-19 18:14:39 +02:00
Mamadou Babaei 3aab60edcd add the initial implementation for the touch functionality and its feedbacks 2023-05-19 18:14:39 +02:00
Mamadou Babaei fbadae50af expose the connected glove in the virtual hand's api 2023-05-19 18:14:38 +02:00
Mamadou Babaei 326dabab5c add static get component methods for quickly accessing grab/touch components 2023-05-19 18:14:38 +02:00
Mamadou Babaei 776fe784b0 remove the variable names from the grab/touch signatures 2023-05-19 18:14:37 +02:00
Mamadou Babaei d9ed578c94 add the grab/touch state update events 2023-05-19 18:14:37 +02:00
Mamadou Babaei 616f5bdd40 update the changelog 2023-05-19 18:14:36 +02:00
Mamadou Babaei 4d8a8ce396 fix a crash by removing wrong delegate binds 2023-05-19 18:14:36 +02:00
Mamadou Babaei 7a5fbb30b8 add a buzz timeout uproperty 2023-05-19 18:14:36 +02:00
Mamadou Babaei d1b50964a9 merge all properties inside the grab component into one group 2023-05-19 18:14:35 +02:00
Mamadou Babaei 46911ef767 simplify and merge separate buzz/force-feedback levels into one value on the touch component 2023-05-19 18:14:35 +02:00
Mamadou Babaei 4c6465c4d2 Revert "move force-feedback properties from the touch component to the grab component"
This reverts commit 9faa9d2ca4.
2023-05-19 18:14:34 +02:00
Mamadou Babaei 8934da2dc7 move force-feedback properties from the touch component to the grab component 2023-05-19 18:14:34 +02:00
Mamadou Babaei 23ad1d9876 cache which finger can grab or touch objects 2023-05-19 18:14:33 +02:00
Mamadou Babaei d52c610fcd set up the overlap events for the grab/touch fingertip colliders 2023-05-19 18:14:33 +02:00
Mamadou Babaei 506c8ff004 add the api for getting/setting touch properties 2023-05-19 18:14:33 +02:00
Mamadou Babaei 7ba90d4820 add the api for getting/setting grab properties 2023-05-19 18:14:32 +02:00
Mamadou Babaei a55b4d6cbe add a grab socket uproperty, getters, and setters 2023-05-19 18:14:32 +02:00
Mamadou Babaei ad971b18ea whitespace fix 2023-05-19 18:14:31 +02:00
Mamadou Babaei 2c21243aa0 differentiate the default grab/touch socket names 2023-05-19 18:14:31 +02:00
Mamadou Babaei d2ee5c4e2a integrate the touch component and colliders and rename the grab ones 2023-05-19 18:14:30 +02:00
Mamadou Babaei bc3920253f add a touch component intended to be used for force-feedback 2023-05-19 18:14:30 +02:00
Mamadou Babaei 8a4a9ecc6d add the api and setup the required components and uproperties in order to implement the basic grab functionality 2023-05-19 18:14:30 +02:00
Mamadou Babaei 61dac15387 document the unreleased changes 2023-05-19 18:14:29 +02:00
Mamadou Babaei 7ee0a81524 fix blueprint signatures and make all bp exposed functions static 2023-05-19 18:14:29 +02:00
Mamadou Babaei ea3b8242f6 formatting fix 2023-05-19 18:14:28 +02:00
Mamadou Babaei 3bae76d902 document a missing changelog item 2023-05-19 18:14:28 +02:00
Mamadou Babaei ae3b781210 Revert "temporarily revert changes that are not part of the v1.3.1 release"
This reverts commit 116935f54b.
2023-05-19 18:14:28 +02:00
Mamadou Babaei 455588d161 bump the plugin version to v1.3.1 2023-04-28 02:12:55 +02:00
Mamadou Babaei a8792e2ac1 temporarily revert changes that are not part of the v1.3.1 release 2023-04-28 02:12:55 +02:00
Mamadou Babaei 66097956db fix runuat rocket build issues by adding the missing headers 2023-04-28 02:12:55 +02:00
Mamadou Babaei 299a84cde3 document the senseglove debug module 2023-04-28 02:12:54 +02:00
Mamadou Babaei 3b95e3d7ba document unreleased changes 2023-04-28 02:12:54 +02:00
Mamadou Babaei a2d0fcdd8a Revert "temporarily revert changes that are not part of the v1.3.0 release"
This reverts commit 6a0f2a00a1.
2023-04-28 02:12:53 +02:00
Mamadou Babaei 0f79308b1e bump the plugin version to v1.3.0 2023-04-28 01:21:05 +02:00
Mamadou Babaei 7b5ea3d217 temporarily revert changes that are not part of the v1.3.0 release 2023-04-28 01:21:05 +02:00
Mamadou Babaei 4540f7ac2b bump senseglove libraries for linux and android to v2.6.0-aac3d56 2023-04-28 01:21:05 +02:00
Mamadou Babaei ad6d391d0f bump the senseglove libraries for windows/msvc to v2.6.0-aac3d56 2023-04-28 01:21:04 +02:00
Mamadou Babaei abd9753020 document recent changes 2023-04-28 01:21:04 +02:00
Mamadou Babaei 094b89f9fc document the senseglove libraries bump in the changelog 2023-04-28 01:21:04 +02:00
Mamadou Babaei 71b16bc1e1 adjust senseglove/unreal coordinate system conversions according to changes in the recent sgcore release 2023-04-28 01:21:04 +02:00
Mamadou Babaei d6f8f8efac fix a gramatical error 2023-04-28 01:21:04 +02:00
Mamadou Babaei 2846783ffc add a debug virtual hand and some other fixes 2023-04-28 01:21:04 +02:00
Mamadou Babaei 5946528f14 fix the hand right hand offset 2023-04-28 01:21:04 +02:00
Mamadou Babaei bf8608da69 remove redundant headers 2023-04-28 01:21:04 +02:00
Mamadou Babaei d0ed0a55df fix debug gizmo default colors 2023-04-28 01:21:04 +02:00
Mamadou Babaei 2420edca45 refactor the debug gizmo draw method 2023-04-28 01:21:04 +02:00
Mamadou Babaei 26d533565c update the changelog with unreleased changes 2023-04-28 01:21:04 +02:00
Mamadou Babaei 00c2b786cb refactor the wrist tracker's debug gzmo settings into a ustruct in order to be re-used 2023-04-28 01:21:04 +02:00
Mamadou Babaei fb74df09be fix gizmo drawing issue happens due to a null world object 2023-04-28 01:21:04 +02:00
Mamadou Babaei e04d31b04d add a new generic senseglove debug module 2023-04-28 01:21:03 +02:00
Mamadou Babaei 44019df668 add the base implementation for the senseglove grab component 2023-04-28 01:21:03 +02:00
Mamadou Babaei 25da2730e1 increase the default DebugWristTrackerGizmoLength value in the plugin's settings 2023-04-28 01:21:03 +02:00
Mamadou Babaei 7f9b2c1d68 increase the default DebugWristTrackerGizmoLength value on the wrist tracker 2023-04-28 01:21:03 +02:00
Mamadou Babaei adaf97d630 document unreleased changes 2023-04-28 01:21:03 +02:00
Mamadou Babaei c90c9fbc21 fix the wrong hand offset calculations 2023-04-28 01:21:03 +02:00
Mamadou Babaei 7f3f0e399d fix the wrong tracker origin calculations 2023-04-28 01:21:03 +02:00
Mamadou Babaei d06f42cae7 fix the platform support matrix for unreal versions >= 5.0 2023-04-20 15:55:40 +02:00
Mamadou Babaei 9e120ffecf minor code improvements and clean up 2023-04-20 15:55:40 +02:00
Mamadou Babaei e925db6e68 fix the directory structure 2023-04-11 21:05:46 +02:00
Mamadou Babaei de12c23d6b remove the development virtual hand mesh from master and all the release branches 2023-04-11 20:58:43 +02:00
Mamadou Babaei 34caba4ddd bump the plugin version to v1.2.1 2023-03-30 06:43:33 +02:00
Mamadou Babaei 7b2eaabbfb 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:59 +02:00
Mamadou Babaei dae5f9f5e4 remove the engine settings module from the senseglove module's private dependencies list 2023-03-30 06:16:09 +02:00
Mamadou Babaei ae0120e9ec remove the launch and settings from the android module's private includes 2023-03-30 05:58:54 +02:00
Mamadou Babaei 56c7613cb4 bump the plugin version to v1.2.0 2023-03-28 21:39:55 +02:00
Mamadou Babaei de0da3010b add the new dev/test hand model (this hand mesh is not meant to be published) 2023-03-28 18:29:45 +02:00
Mamadou Babaei d93f3e4fb0 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:29:44 +02:00
Mamadou Babaei fd2a668301 remove the old virtual hand model mesh 2023-03-28 18:29:44 +02:00
Mamadou Babaei e41137cc0f fix the hand animation implementation and angle conversions to work with the standard ue5.1+ hand from epic 2023-03-28 18:29:43 +02:00
Mamadou Babaei deafac2293 add missing paths headers that causes uat build issues 2023-03-28 11:46:58 +02:00
Mamadou Babaei 2c2ef9e710 add missing vershon headers and clean up unused headers 2023-03-28 11:46:57 +02:00
Mamadou Babaei 1a75e62719 fix uat errors C4458 when building the virtual hand component 2023-03-28 11:22:55 +02:00
Mamadou Babaei 1976825a66 remove SGContentBrowserExtension_SKeleton and clean up the editor module 2023-03-28 10:40:00 +02:00
Mamadou Babaei bf02a6f80f remove SGAssetTypeActions_Skeleton, SGSkeletonEditor, and SGSkeletonEditorCommands classes 2023-03-28 10:40:00 +02:00
Mamadou Babaei 510c34657f add a content browser extension as an alternative to modify the ref pose 2023-03-28 10:40:00 +02:00
Mamadou Babaei ca05584f21 add log template specialization for ftransform 2023-03-28 10:39:59 +02:00
Mamadou Babaei e8d0c57d9a add new experiments with the SGAssetTypeActions_Skeleton 2023-03-28 10:39:59 +02:00
Mamadou Babaei 2924de965c add custom asset type actions for skeletons 2023-03-28 10:39:59 +02:00
Mamadou Babaei e6d98734b0 add a message dialog and instruct the user to use the context menu in order to save the skeleton asset 2023-03-28 10:39:59 +02:00
Mamadou Babaei 96bddeaee7 fix a deprecation warning on ue5 2023-03-28 10:39:59 +02:00
Mamadou Babaei 13def4ea4d minor changelog fix 2023-03-28 10:39:59 +02:00
Mamadou Babaei 211a4609a3 document the android calibration in the changelog 2023-03-28 10:39:59 +02:00
Mamadou Babaei 3b5e77b104 add virtual destructors 2023-03-28 10:39:59 +02:00
Mamadou Babaei 5904a9476a fix the skeleton editor crash with a working button from senseglove on the toolbar 2023-03-28 10:39:59 +02:00
Mamadou Babaei 6a22d27992 first attemp at extending the skeleton editor that also crashes the editor once opened 2023-03-28 10:39:59 +02:00
Mamadou Babaei 2e9b2d10f2 add missing header that causes build issues on ue 4.27 2023-03-28 10:39:59 +02:00
Mamadou Babaei 75741ebd65 update the changelog 2023-03-28 10:39:59 +02:00
Mamadou Babaei 9b1b449867 clean up editor code from the virtual hand actor in order to fix wrist tracking issues 2023-03-28 10:39:58 +02:00
Mamadou Babaei 1cceba282e force the wrist tracker to track the right hand on init/begin/construct 2023-03-28 10:39:58 +02:00
Mamadou Babaei 155e3624bf add event handler lambdas for wrist tracker component of the virtual ahnd actor 2023-03-28 10:39:58 +02:00
Mamadou Babaei 30034ba06f functional wrist tracker component 2023-03-28 10:39:58 +02:00
Mamadou Babaei 990a2f6afe add an almost complete wrist tracker component implementation 2023-03-28 10:39:58 +02:00
Mamadou Babaei b1f1014a5e fix multiple issues with the virtual hand component and the plugin settings 2023-03-28 10:39:58 +02:00
Mamadou Babaei bdbe836381 explicitly assign motion controllers to the proper hands 2023-03-28 10:39:58 +02:00
Mamadou Babaei d2aba5a688 bump senseglove libraries windows/msvc to v2.5.0-8069342 2023-03-28 10:39:58 +02:00
Mamadou Babaei 6d9d6cd2b9 bump senseglove libraries and headers for linux and android to v2.5.0-8069342 2023-03-28 10:39:56 +02:00
Mamadou Babaei a13caa8a84 add new settings accessors for c++ and blueprints 2023-03-28 10:39:56 +02:00
Mamadou Babaei 51ff24d059 add wrist tracking debug settings 2023-03-28 10:39:56 +02:00
Mamadou Babaei 0a99d577f4 allow setting custom hardware offset through the plugin settings 2023-03-28 10:39:56 +02:00
Mamadou Babaei 30ea40d0b3 add missing engine module that causes build issues on android 2023-03-28 10:39:55 +02:00
Mamadou Babaei 2410385d8d move the pimpl initialization to the constructor 2023-03-28 10:39:55 +02:00
Mamadou Babaei 54a76e59e3 move the defaults to the constructor 2023-03-28 10:39:55 +02:00
Mamadou Babaei ffc89daa3a make the senseglove settings a singleton with engine subsystem lifetime and fix the blueprint accessors 2023-03-28 10:39:55 +02:00
Mamadou Babaei 5a2584161b add the senseglove settings kismet module 2023-03-28 10:39:55 +02:00
Mamadou Babaei 60397ea261 some improvements for the settings module 2023-03-28 10:39:55 +02:00
Mamadou Babaei 5b3ed4ffe8 minor fixes in the settings module 2023-03-28 10:39:55 +02:00
Mamadou Babaei ea8b3e1fba add a senseglove settings manager module 2023-03-28 10:39:55 +02:00
Mamadou Babaei fa1a720c31 fix the changelog typos and errors 2023-03-28 10:39:55 +02:00
Mamadou Babaei ea5e55730a whitespace fix 2023-03-28 10:39:55 +02:00
Mamadou Babaei 5be2fa7b2d add special android directory methods and initialization args 2023-03-28 10:39:55 +02:00
Mamadou Babaei 4f0468b632 initial attempt at implementing android calibration 2023-03-28 10:39:54 +02:00
Mamadou Babaei 151faf8285 bump senseglove libraries and headers for linux and android to v2.4.3-2eceacb 2023-03-28 10:39:54 +02:00
Mamadou Babaei 3b53d5bc1b virtual hand fixes especially for android 2023-03-28 10:39:53 +02:00
Mamadou Babaei 76aa825240 fix virtual hand crashes and editor visibility issues 2023-03-28 10:39:53 +02:00
Mamadou Babaei 47ccb4a992 fix comments 2023-03-28 10:39:53 +02:00
Mamadou Babaei be349f7aab fix android architecture detection issues on ue 5.2 2023-03-28 10:39:53 +02:00
Mamadou Babaei 387a44aaeb add a temporary workaround for the android crashes and the hidden if glove not found functionality 2023-03-28 10:39:53 +02:00
Mamadou Babaei 0305ef5e51 fix native-toolchain v19 build issues 2023-03-28 10:39:53 +02:00
Mamadou Babaei d5e2246ef8 integrate the virtual hand into the sgpawn 2023-03-28 10:39:53 +02:00
Mamadou Babaei 6e721884d5 clarify android on 5.2 is not supported, yet 2023-03-28 10:39:53 +02:00
Mamadou Babaei 6aa953279b minor fixes 2023-03-28 10:39:53 +02:00
Mamadou Babaei 33c07a0108 update the changelog in order to reflect the latest status of unreleased changes 2023-03-28 10:39:53 +02:00
Mamadou Babaei d0f6be7943 dump some animation errors to the logs inside the editor instead of crashing 2023-03-28 10:39:53 +02:00
Mamadou Babaei d99655ec10 working in-editor hand animation 2023-03-28 10:39:53 +02:00
Mamadou Babaei 7c1f239fb1 distinguish between virtual hand actor and component and animate the component 2023-03-28 10:39:52 +02:00
Mamadou Babaei 3546135df7 add a new component-based class for the virtual hand 2023-03-28 10:39:52 +02:00
Mamadou Babaei 9dd32c9999 add an empty sgpawn kismet library class 2023-03-28 10:39:52 +02:00
Mamadou Babaei 9db485c89c document the new senseglove core types module 2023-03-28 10:39:52 +02:00
Mamadou Babaei 998ca741df add the virtual hand kismet library 2023-03-28 10:39:52 +02:00
Mamadou Babaei 924ce76730 minor commit fix 2023-03-28 10:39:52 +02:00
Mamadou Babaei eaf1d76af5 drop the redundant sgconnecttypes 2023-03-28 10:39:52 +02:00
Mamadou Babaei 45923aecbe move all sg array types into their corresponding *core modules 2023-03-28 10:39:52 +02:00
Mamadou Babaei 8eafb929de minor api validation fixes 2023-03-28 10:39:52 +02:00
Mamadou Babaei 572f89e295 minor fix 2023-03-28 10:39:52 +02:00
Mamadou Babaei 8f01fd61c8 bump senseglove libraries windows to v2.4.2-ba98cec 2023-03-28 10:39:52 +02:00
Mamadou Babaei 5b3e89008a bump senseglove libraries and headers for linux and android to v2.4.2-ba98cec 2023-03-28 10:39:50 +02:00
Mamadou Babaei 9223b2058e remove the redundant sgplatform from the sgconnectimpl module 2023-03-28 10:39:50 +02:00
Mamadou Babaei 63e2801b6b 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:39:50 +02:00
Mamadou Babaei 4c5d603b0c document 4.22 to 4.26 purge in the changelog 2023-03-28 10:39:49 +02:00
Mamadou Babaei e6a41fa9d1 initial attempt to cleanup dead code from the dropped engine versions: 4.22 to 4.26 2023-03-28 10:39:49 +02:00
Mamadou Babaei c6cde6b804 update the remarks section in readme file to reflect the latest platform support state 2023-03-28 10:39:49 +02:00
Mamadou Babaei 9836642025 update the changelog for unreleased changes 2023-03-28 10:39:49 +02:00
Mamadou Babaei aba7741160 update the platform support matrix 2023-03-28 10:39:49 +02:00
Mamadou Babaei 0aacf8b659 whitespace fix 2023-03-28 10:39:49 +02:00
Mamadou Babaei c6aa277919 update the changelog for unreleased changes 2023-03-28 10:39:49 +02:00
Mamadou Babaei f301bfa7f6 update unreal api to take care of radians/degrees conversions where possible 2023-03-28 10:39:49 +02:00
Mamadou Babaei 851675ac19 add more utility functions and templates for angles, specifically for handling floats 2023-03-28 10:39:49 +02:00
Mamadou Babaei 1706fbf51b almost working hand mondel animation adjusted to the api changes 2023-03-28 10:39:49 +02:00
Mamadou Babaei deae80f636 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:39:49 +02:00
Mamadou Babaei 8774369815 minor initialization fixes 2023-03-28 10:39:49 +02:00
Mamadou Babaei dfe350a669 minor fix: move temp a variable 2023-03-28 10:39:48 +02:00
Mamadou Babaei 6e810818bf mark a method as const 2023-03-28 10:39:48 +02:00
Mamadou Babaei b8cb528218 clean up redundant hand animation code 2023-03-28 10:39:48 +02:00
Mamadou Babaei aef3f5afb0 remove redundant reset to ref pose call 2023-03-28 10:39:48 +02:00
Mamadou Babaei 65ede5cdd1 use rotators instead of quats 2023-03-28 10:39:48 +02:00
Mamadou Babaei c9acdc614d improve the virtual hand model animation 2023-03-28 10:39:48 +02:00
Mamadou Babaei b8199b902c rely on the reference pose instead of caching poses 2023-03-28 10:39:48 +02:00
Mamadou Babaei a3af992468 improved virtual hand model animation 2023-03-28 10:39:48 +02:00
Mamadou Babaei f5ca49a7ff bump senseglove libraries for windows/msvc to v2.4.1-d551398 2023-03-28 10:39:47 +02:00
Mamadou Babaei 75c120e775 mention functional linux development support in the changelog 2023-03-28 10:39:47 +02:00
Mamadou Babaei 121c7baea8 bump senseglove libraries and headers for linux and android to v2.4.1-d551398 2023-03-28 10:39:47 +02:00
Mamadou Babaei 9c1152f35f bump senseglove libraries for windows/msvc to v2.4.0-dc6c34b 2023-03-28 10:39:45 +02:00
Mamadou Babaei ac1ae2875b bump senseglove libraries and headers for linux and android to v2.4.0-dc6c34b 2023-03-28 10:39:45 +02:00
Mamadou Babaei 73a122ef18 bump senseglove libraries for windows/msvc to v2.3.0-a9726bf 2023-03-28 10:39:44 +02:00
Mamadou Babaei 6061d38383 bump senseglove libraries for linux and android to the first fully linux-aware version: v2.3.0-a9726bf 2023-03-28 10:39:42 +02:00
Mamadou Babaei b6d0eb0127 apply the transform to the output pose 2023-03-28 10:39:42 +02:00
Mamadou Babaei 89e5851c2e try a component transform 2023-03-28 10:39:42 +02:00
Mamadou Babaei 515f5306e7 add quat template specialization to the sglog module 2023-03-28 10:39:42 +02:00
Mamadou Babaei 49494693f3 fix the EvaluateSkeletalControl_AnyThread crash 2023-03-28 10:39:42 +02:00
Mamadou Babaei e06ded2429 revert back the last commit and ignore the last joint 2023-03-28 10:39:42 +02:00
Mamadou Babaei 154cbbe947 try an alternate implementation for copying animation data in order to remedy the virtual hand crash 2023-03-28 10:39:41 +02:00
Mamadou Babaei 136ec0deb5 bump senseglove thrid-party libraries for windows to v2.2.4-1eda0d8 2023-03-28 10:39:41 +02:00
Mamadou Babaei 40f71e9fdb bump senseglove libraries for linux and android to v2.2.4-1eda0d8 2023-03-28 10:39:40 +02:00
Mamadou Babaei 1f515d6fcb bump senseglove headers and libraries for linux and android to v2.2.3-39b3c2b 2023-03-28 10:39:40 +02:00
Mamadou Babaei a7d8a4f0c1 bump senseglove thrid-party libraries for windows to v2.2.3-39b3c2b 2023-03-28 10:39:39 +02:00
Mamadou Babaei ce98cab771 bump senseglove headers and libraries for linux and android to v2.2.2-1725b91 2023-03-28 10:39:37 +02:00
Mamadou Babaei fa1eec0b88 bump senseglove thrid-party libraries for windows to v2.2.2-1725b91 2023-03-28 10:39:37 +02:00
Mamadou Babaei 188e0f2cc1 add the msvc141 third-party directory to the directory tree 2023-03-28 10:39:36 +02:00
Mamadou Babaei 0bd8cd5681 add the android module to the directory tree 2023-03-28 10:39:36 +02:00
Mamadou Babaei dc3980fbba document the directory structure changes 2023-03-28 10:39:36 +02:00
Mamadou Babaei c8f0475511 bump windows/msvc binaries to v2.2.1-ca2f23d 2023-03-28 10:39:36 +02:00
Mamadou Babaei cf28b3cd09 update senseglove libraries to v2.2.1-ca2f23d with per engine segregated android ndk support 2023-03-28 10:39:35 +02:00
Mamadou Babaei 6c4dd6d47a updated documentation for the directory structure 2023-03-28 10:39:34 +02:00
Mamadou Babaei e2bfbc6f05 remove redundant Source/ThirdParty/lib/oculus directories 2023-03-28 10:39:34 +02:00
Mamadou Babaei 076b9ab90d updated documentation for the directory structure 2023-03-28 10:39:34 +02:00
Mamadou Babaei 479c3d14f0 update the platform support matrix 2023-03-28 10:39:34 +02:00
Mamadou Babaei 5ae19d8357 bump senseglove headers and libraries for windows/msvc to v2.2.0-eed9611 2023-03-28 10:39:34 +02:00
Mamadou Babaei d6d91b1e47 log the unreleased changes 2023-03-28 10:39:33 +02:00
Mamadou Babaei e2ef25f73d bump senseglove headers and libraries for linux and android to v2.2.0-eed9611 2023-03-28 10:39:33 +02:00
Mamadou Babaei 2bc6f88ebd remove archaic pre-public-release dead code 2023-03-28 10:39:32 +02:00
Mamadou Babaei 38c3e99c83 virtual hand implementation with a crash from calling EvaluateSkeletalControl_AnyThread 2023-03-28 10:39:32 +02:00
Mamadou Babaei 2e5a8d6bc0 fix impl owners 2023-03-28 10:39:32 +02:00
Mamadou Babaei 187cd85580 add partion implementation of the virtual hand 2023-03-28 10:39:32 +02:00
Mamadou Babaei 969a4b4f94 fix vr hand asset issues 2023-03-28 10:39:32 +02:00
Mamadou Babaei edd89008b3 add senseglove module base classes 2023-03-28 10:39:32 +02:00
Mamadou Babaei ebbbaa262a add the virtual hand assets 2023-03-28 10:39:32 +02:00
Mamadou Babaei ea2a690792 punctuation fix 2023-03-28 10:39:32 +02:00
Mamadou Babaei 1d30beeb1a bump the plugin version to v1.1.1 2023-02-07 12:11:32 +01:00
Mamadou Babaei d76f7056a6 move launch and settings module to PrivateIncludePathModuleNames from PrivateDependencyModuleNames in order to pass runuat tests 2023-02-07 11:40:48 +01:00
Mamadou Babaei 8e41cc5493 Bump SenseGlove libraries for Windows/MSVC to v2.1.2-95ec6e7 2023-02-07 10:58:53 +01:00
Mamadou Babaei e5cc6d03c1 fix formatting 2023-02-07 10:58:53 +01:00
Mamadou Babaei bf26dac15d add support for android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a 2023-02-07 10:58:52 +01:00
Mamadou Babaei fc53b4b1c1 bump senseglove libraries for linux to v2.1.2-95ec6e7 2023-02-07 10:58:52 +01:00
Mamadou Babaei 92eaec6338 update the changelog with initiali support for ue5.2 2023-02-07 10:58:52 +01:00
Mamadou Babaei 44399fd1b6 add initial ue5.2 support to the build system along with linux third-party libraries 2023-02-07 10:58:52 +01:00
Mamadou Babaei 0b8dbad53a fix gitignore rules for the Source/ThirdParty directory 2023-02-07 10:58:51 +01:00
Mamadou Babaei c175246c83 bump senseglove libraries for windows/msvc to v2.1.1-0569c74 2023-02-07 10:58:51 +01:00
Mamadou Babaei 2db9564003 bump the plugin version to v1.1.0 2023-02-03 13:44:23 +01:00
Mamadou Babaei 9cc33a4c0b switch to sgconnect for android v1.1.0 extracted from the .arr file shipped with our unity plugin 2023-02-03 13:44:23 +01:00
Mamadou Babaei e4d5b17ec7 bump senseglove libraries to v2.1.1-0569c74 2023-02-03 13:44:23 +01:00
Mamadou Babaei ed2f7b19e1 use the correct writehaptics signature extracted from the .jar file 2023-02-03 13:44:23 +01:00
Mamadou Babaei 3f80104244 mention sgconnect for android as an added dependency in the changelog 2023-02-03 13:44:23 +01:00
Mamadou Babaei fd878098bf update the platform support matrix and the directory structure 2023-02-03 13:44:22 +01:00
Mamadou Babaei b5e0adff32 log the unreleased changes 2023-02-03 13:44:22 +01:00
Mamadou Babaei c8dce9f065 bump sgconnect and sgcore to v2.1.0-9080621 and add an almost functional android implementation 2023-02-03 13:44:22 +01:00
Mamadou Babaei d156eade7a 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:44:21 +01:00
Mamadou Babaei dbc131d7ed minor documentation fixes 2023-02-03 13:44:21 +01:00
Mamadou Babaei 630268e18e drop linux third-party libraries for earlier versions of the engine prior to 4.27 2023-02-03 13:44:21 +01:00
Mamadou Babaei 63abb1d66f fix a bug in the jni call write haptics 2023-02-03 13:44:21 +01:00
Mamadou Babaei 7cc670e982 replace more method calls on android with the equivalents from sgconnect for android 2023-02-03 13:44:21 +01:00
Mamadou Babaei e1c15426a3 bump copyright years 2023-02-03 13:44:21 +01:00
Mamadou Babaei 2bcd2e9e73 add an android module with working jni calls to Init(), Dispose(), and GetLibraryVersion() 2023-02-03 13:44:21 +01:00
Mamadou Babaei b5d9779384 log the unreleased changes 2023-02-03 13:44:21 +01:00
Mamadou Babaei 3b9aa0302c remove the enum utils class due to ANY_PACKAGE deprecation warnings in unreal engine 5.1 2023-02-03 13:44:21 +01:00
Mamadou Babaei 2c6d98c77d conform to the class naming standards 2023-02-03 13:44:21 +01:00
Mamadou Babaei 9b097cab18 apply const correctness 2023-02-03 13:44:21 +01:00
Mamadou Babaei aa83578228 whitelist android as a target platform 2023-02-03 13:44:21 +01:00
Mamadou Babaei 8163e4f4f2 fix android build issues caused by the log module 2023-02-03 13:44:21 +01:00
Mamadou Babaei c2146af138 bump the plugin version to v1.0.4 2022-12-02 12:38:01 +01:00
Mamadou Babaei d0215a8c0a simplify the move constructors / move assignment operators' noexcept ifdefs 2022-12-02 12:38:01 +01:00
Mamadou Babaei 133739fe9f fix ue 4.22 - 4.27 build issues on msvc 2017 2022-12-02 12:38:01 +01:00
Mamadou Babaei a22b5bce2a move sgplatform headers to the public folder 2022-12-02 12:38:01 +01:00
Mamadou Babaei b038085910 update the platform support matrix 2022-12-02 12:38:01 +01:00
Mamadou Babaei 97a8be5338 fix ue >= 5.0 ubt errors 2022-12-02 12:38:01 +01:00
Mamadou Babaei 8f664a968f upgrade senseglove third-party libraries for linux and android to to v2.0.4 2022-12-02 12:37:59 +01:00
Mamadou Babaei 24aa2ff3ae add macros for C++17 detection 2022-12-02 12:37:59 +01:00
Mamadou Babaei 92affb8264 apply const correctness to method parameters 2022-12-02 12:37:58 +01:00
Mamadou Babaei ea78d39361 upgrade sglibraries binaries for windows/msvc to to v2.0.4 and add msvc 2017 binaries 2022-12-02 12:37:58 +01:00
Mamadou Babaei 4d08b51707 upgrade sglibraries third-party headers to v2.0.4 2022-12-02 12:37:58 +01:00
Mamadou Babaei 5b9651b90f add support for msvc 2017 to the build.cs files 2022-12-02 12:37:57 +01:00
Mamadou Babaei 63d4c3ef9c bump the plugin version to v1.0.3 2022-11-30 14:32:58 +01:00
Mamadou Babaei 63c81ffbcd adjust Config/FilterPlugin.ini in order to conform to Epic's market place guidelines 2022-11-30 14:28:10 +01:00
Mamadou Babaei 5e34e88465 bump the plugin version to v1.0.2 2022-11-27 14:42:59 +01:00
Mamadou Babaei 829e4780fc fix the third-party license mark down file formatting 2022-11-27 14:42:59 +01:00
Mamadou Babaei 00227deb31 add the SenseGlove SDK license 2022-11-27 14:42:59 +01:00
Mamadou Babaei b760f83b89 fix readme typos and errors 2022-11-27 14:14:03 +01:00
Mamadou Babaei f5ff8ddcfb add missing the copyright notice and include directive 2022-11-27 14:14:03 +01:00
Mamadou Babaei 22003b4e12 list the dot files inside the FilterPlugin.ini file 2022-11-27 13:55:42 +01:00
Mamadou Babaei e21b11ac79 add the marketplace url to the .uplugin file 2022-11-27 13:55:42 +01:00
Mamadou Babaei 1674381425 bump the plugin version to v1.0.1 2022-11-25 15:21:32 +01:00
Mamadou Babaei 765caedaf0 * 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:06:26 +01:00
Mamadou Babaei 248c692925 update documentation, add changelog, and prepare for v1.0.0 release 2022-11-24 17:09:30 +01:00
Mamadou Babaei ac70cfc4a5 huge patch fixing 4.22 through 4.24 build issues on msvc and llvm/clang 2022-11-24 01:18:01 +01:00
Mamadou Babaei 3ecdb979d8 fix a mangled method name in layer 4 2022-11-23 21:20:21 +01:00
Mamadou Babaei dba82045d0 replace IMPLEMENT_GAME_MODULE with IMPLEMENT_MODULE 2022-11-19 13:07:40 +01:00
Mamadou Babaei 1b2f883aea fix module types and loading order 2022-11-19 06:22:02 +01:00
Mamadou Babaei 9a52ebda88 add the docs url 2022-11-18 15:07:59 +01:00
Mamadou Babaei ec137e4ee3 import sg libraries v2.0.3 binaries for msvc/windows 2022-11-18 15:03:20 +01:00
Mamadou Babaei e6c778fe1f import sg libraries headers v2.0.3 and linux binaries and adjust to the latest changes 2022-11-18 15:03:19 +01:00
Mamadou Babaei bad2046505 add more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei 2c43c87a74 add missing sense glove wrappers in layer 1/2/3/4 of the api and also more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei 23bbdf14d5 add missing nova glove info rotator conversions to layer 3/4 of the api and also more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei 7d8d31499e add missing nova glove hand profile wrappers in layer 3/4 of the api and also more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei c1dd1fa7b0 add more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei e79138acae add missing sg device wrappers in layer 4 of the api and also more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei 8b41440049 add more documentation 2022-11-18 15:03:19 +01:00
Mamadou Babaei c8981de7e3 document some parts of the layer 3 and 4 api 2022-11-18 15:03:19 +01:00
Mamadou Babaei 54ad9345b2 translate senseglove/unreal angles/directions 2022-11-18 15:03:19 +01:00
Mamadou Babaei fe37963ef7 implement proper mm/cm conversions 2022-11-17 02:30:52 +01:00
Mamadou Babaei 05fbb61251 introduce more utility templates for metric unit conversions 2022-11-17 02:30:52 +01:00
Mamadou Babaei 7da2982b6b remove unit conversions from the internal vect3d wrappers 2022-11-17 02:30:51 +01:00
Mamadou Babaei 4371c041fc bump sg libraries to v2.0.2 and adjust to the latest changes 2022-11-17 02:30:51 +01:00
Mamadou Babaei 72c57bf790 consider millimeters/centimeters conversion, introduce units, and minor array utils refactoring 2022-11-17 02:30:50 +01:00
Mamadou Babaei 512a5cd384 fix wrong readme header 2022-11-14 17:19:40 +01:00
Mamadou Babaei 85c4b43308 shorten mangled blueprint nodes in order to avoid doc generation issues 2022-11-14 17:16:18 +01:00
Mamadou Babaei 510bb45a28 separate the unreal c++/bp implementation of SGConnect wrappers 2022-11-12 00:35:38 +01:00
Mamadou Babaei 34886e61f4 add FRotator overloads for every method that accepts or returns FQuat and some other bug fixes 2022-11-11 11:43:15 +01:00
Mamadou Babaei 6cf44885e6 bump engine version to 5.1 2022-11-11 11:43:14 +01:00
Mamadou Babaei 71dcca02c8 fix unreal/senseglove coordinates translation calculations 2022-11-11 11:43:14 +01:00
645 changed files with 24006 additions and 28334 deletions
+121 -2
View File
@@ -5,11 +5,130 @@ 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.
@@ -25,7 +144,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,3 +85,16 @@ 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.
```
+21 -44
View File
@@ -8,16 +8,17 @@ 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** |
|----------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------------------:|:------------------------------------:|:-----------------:|:--------------------------:|:------------------------:|
| **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.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 |
| **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 |
| **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 |
* <code>✅</code> Supported
* <code>⚠️</code> Not supported by the latest release and might be lacking features
@@ -25,12 +26,10 @@ 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 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.
* 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.
* All third-party libraries on Windows built against Windows SDK 10.0.
* 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.
* 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.
* 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
@@ -55,12 +54,13 @@ Please note that modules postfixed with **Impl** are intended for interal use an
## Planned Features Completion Status
### Implemented as of v1.9.3
### Implemented as of v2.0.2
- [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,12 +80,11 @@ 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.0.0 release
### Upcoming features planned for the v2.1.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
@@ -114,6 +113,10 @@ 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++)
@@ -166,32 +169,6 @@ 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)
+25 -13
View File
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.9.3",
"VersionName": "2.0.2",
"FriendlyName": "SenseGlove",
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
"Category": "Virtual Reality",
@@ -10,6 +10,7 @@
"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,
@@ -42,17 +43,6 @@
"Win64"
]
},
{
"Name": "SenseGloveBuildHacks",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveBackend",
"Type": "Runtime",
@@ -75,6 +65,17 @@
"Win64"
]
},
{
"Name": "SenseGloveBuildHacks",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveConnect",
"Type": "Runtime",
@@ -239,5 +240,16 @@
"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))
{
BuzzLevel = 0;
BuzzDuration = 0.25f;
ForceFeedbackLevel = 1.0f;
ForceFeedbackLevel = 100;
VibrotactileDuration = 0.25f;
VibrotactileLevel = 0.0f;
}
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
@@ -36,11 +36,9 @@
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Animation/Skeleton.h"
#include "Components/SphereComponent.h"
#include "Components/SkeletalMeshComponent.h"
#include "Engine/SkeletalMesh.h"
#include "Kismet/GameplayStatics.h"
#include "Runtime/Launch/Resources/Version.h"
#include "Templates/UnrealTypeTraits.h"
#include "UObject/ConstructorHelpers.h"
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
@@ -59,29 +57,29 @@ struct USGVirtualHandComponent::FImpl
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")};
return Path;
}
@@ -213,7 +211,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
bAutoStopAllHapticsOnEndPlay = true;
GrabSocketName = FName{TEXT("GrabPoint")};
GrabSocketName = FName{TEXT("GenericGrabPoint")};
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
@@ -259,7 +257,7 @@ void USGVirtualHandComponent::SetRight(const bool bInRight)
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
{
ensureAlwaysMsgf(Cast<USGVirtualHandAnimInstance>(NewClass),
ensureAlwaysMsgf((TIsDerivedFrom<decltype(NewClass), USGVirtualHandAnimInstance>::IsDerived),
TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!"));
Super::SetAnimClass(NewClass);
@@ -389,13 +387,7 @@ 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;
@@ -431,8 +423,8 @@ const FTransform& USGVirtualHandComponent::GetFingerBoneRefTransform(const int32
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
{
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
return MoveTemp(BoneRotation);
const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
return BoneRotation;
}
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
@@ -441,16 +433,16 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
if (!IsGloveConnected())
{
return MoveTemp(Rotations);
return Rotations;
}
const USGHandPose* HandPose = GetHandPose();
if (!IsValid(HandPose))
{
return MoveTemp(Rotations);
return Rotations;
}
const TArray<TArray<FVector>> HandAngles{HandPose->GetHandAngles()};
const TArray<TArray<FVector>>& HandAngles{HandPose->GetHandAngles()};
for (int32 FingerIndex = 0; FingerIndex < HandAngles.Num(); ++FingerIndex)
{
@@ -459,7 +451,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
{
const FVector& JointAngle{FingerJointAngles[JointIndex]};
const FQuat JointRotation{FQuat::MakeFromEuler(JointAngle)};
const FQuat JointRotation{FQuat::MakeFromEuler(FVector{-JointAngle.Y, -JointAngle.X, -JointAngle.Z})};
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
@@ -471,7 +463,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
}
}
return MoveTemp(Rotations);
return Rotations;
}
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
@@ -505,7 +497,7 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
}
return MoveTemp(SkeletalMeshPath);
return SkeletalMeshPath;
}
bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() const
@@ -573,25 +565,12 @@ USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
{
// 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);
Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
}
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
{
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 */
;
return Owner->GetSkeletalMeshAsset();
}
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
@@ -619,13 +598,18 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
}
}
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
bool bGloveConnected;
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
{
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bGloveConnected)
{
Owner->Glove = nullptr;
}
}
else
{
bGloveConnected = true;
}
const bool bIsEditor = IsEditor();
@@ -634,7 +618,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
const bool bIsVisible = Owner->IsVisible();
if (Owner->bHiddenInGameIfNoGloveDetected)
{
if (bFoundGlove)
if (bGloveConnected)
{
if (!bIsVisible)
{
@@ -658,7 +642,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
}
}
return bFoundGlove;
return bGloveConnected;
}
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
@@ -250,21 +250,22 @@ bool USGWristTrackerComponent::FImpl::CheckGlove() const
}
}
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
bool bGloveConnected;
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
{
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bGloveConnected)
{
Owner->Glove = nullptr;
}
}
if (bFoundGlove)
else
{
bGloveConnected = true;
UpdateWristTrackingData();
}
return bFoundGlove;
return bGloveConnected;
}
void USGWristTrackerComponent::FImpl::UpdateMotionSource() const
@@ -39,7 +39,9 @@
#include "Components/PrimitiveComponent.h"
#include "Components/SphereComponent.h"
#include "Kismet/KismetMathLibrary.h"
#include "Runtime/Launch/Resources/Version.h"
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
#include "XRDeviceVisualizationComponent.h"
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
#include "UObject/UObjectGlobals.h"
#include "SenseGlove/Components/SGGrabComponent.h"
@@ -48,6 +50,8 @@
#include "SenseGlove/Components/SGWristTrackerComponent.h"
#include "SGLog/SGLog.h"
static constexpr float SG_HAND_MESH_YAW_CORRECTION_OFFSET = -90.0f;
struct ASGPawn::FImpl
{
/************************
@@ -173,6 +177,15 @@ 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);
@@ -190,7 +203,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
HandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
HandLeft->SetRight(false);
HandLeft->SetHiddenIfNoGloveDetected(true);
HandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
HandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
false, nullptr, ETeleportType::None);
HandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -214,7 +227,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
RealHandLeft->SetRight(false);
Pimpl->SetVisibility(RealHandLeft, false);
RealHandLeft->SetHiddenIfNoGloveDetected(true);
RealHandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
RealHandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
false, nullptr, ETeleportType::None);
RealHandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -391,6 +404,15 @@ 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);
@@ -407,9 +429,8 @@ 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, -90.0f, 0.0f},
HandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
false, nullptr, ETeleportType::None);
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -433,7 +454,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
RealHandRight->SetRight(true);
Pimpl->SetVisibility(RealHandRight, false);
RealHandRight->SetHiddenIfNoGloveDetected(true);
RealHandRight->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
RealHandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
false, nullptr, ETeleportType::None);
RealHandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
false, nullptr, ETeleportType::None);
@@ -1810,20 +1831,24 @@ 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(Rotation);
Owner->HandLeft->SetWorldRotation(NewRotation);
}
Owner->RealHandLeft->SetWorldRotation(Rotation);
Owner->RealHandLeft->SetWorldRotation(NewRotation);
}
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(Rotation);
Owner->HandRight->SetWorldRotation(NewRotation);
}
Owner->RealHandRight->SetWorldRotation(Rotation);
Owner->RealHandRight->SetWorldRotation(NewRotation);
}
void ASGPawn::FImpl::UpdateHandLocationAndRotation(
@@ -45,14 +45,12 @@
#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
@@ -61,18 +59,32 @@ struct ASGPlayerController::FImpl
* Static methods
************************/
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 GetForceFeedbackLevel(const AActor* Actor);
static int32 GetForceFeedbackLevel(const AActor* Actor);
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);
/************************
* Member variables
************************/
FTimerHandle TouchBuzzStopTimer;
FTimerHandle TouchVibrotactileStopTimer;
/************************
* Owner object
@@ -98,96 +110,137 @@ 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);
};
int32 ASGPlayerController::FImpl::GetBuzzLevel(const AActor* Actor)
float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (TouchComponent)
if (IsValid(TouchComponent))
{
return TouchComponent->GetBuzzLevel();
}
}
return 0;
}
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 (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorIndexTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorMiddleTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorRingTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorPinkyTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
return TouchComponent->GetForceFeedbackLevel();
}
}
return 0.0f;
}
int32 ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
float ASGPlayerController::FImpl::GetVibrotactileDuration(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))
{
return TouchComponent->GetVibrotactileDuration();
}
}
if (IsValid(ActorIndexTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
if (IsValid(TouchComponent))
{
return TouchComponent->GetVibrotactileDuration();
}
}
if (IsValid(ActorMiddleTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
if (IsValid(TouchComponent))
{
return TouchComponent->GetVibrotactileDuration();
}
}
if (IsValid(ActorRingTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
if (IsValid(TouchComponent))
{
return TouchComponent->GetVibrotactileDuration();
}
}
if (IsValid(ActorPinkyTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
if (IsValid(TouchComponent))
{
return TouchComponent->GetVibrotactileDuration();
}
}
return 0.0f;
}
float ASGPlayerController::FImpl::GetVibrotactileLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (TouchComponent)
if (IsValid(TouchComponent))
{
return TouchComponent->GetForceFeedbackLevel();
return TouchComponent->GetVibrotactileLevel();
}
}
return 0;
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;
}
ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer)
@@ -251,69 +304,10 @@ 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;
@@ -325,48 +319,44 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc
return;
}
const USGBuzzCommand* BuzzCommand{
GetBuzzCommand(
// Queue the Force-Feedback command...
TArray<float> ForceFeedbackLevels{
GetForceFeedbackLevels(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState.ActorRingTouching,TouchState.ActorPinkyTouching)
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
};
if (IsValid(BuzzCommand))
{
Glove->SendHaptics(BuzzCommand);
Glove->QueueForceFeedbackLevels(MoveTemp(ForceFeedbackLevels));
const float Duration = FImpl::GetBuzzDuration(
// Queue the Vibrotactile command...
TArray<float> VibrotactileLevels{
GetVibrotactileLevels(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching);
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
};
Glove->QueueVibroLevels(MoveTemp(VibrotactileLevels));
Owner->GetWorldTimerManager().ClearTimer(TouchBuzzStopTimer);
// Send the haptics commands!
Glove->SendHaptics();
FTimerDelegate TouchBuzzStopHandler;
TouchBuzzStopHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
// 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(Glove))
{
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
});
Glove->QueueVibroLevels(VibrotactileOffCommand);
Glove->SendHaptics();
}
});
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));
}
Owner->GetWorldTimerManager().SetTimer(
TouchVibrotactileStopTimer, TouchVibrotactileStopHandler, VibrotactileDuration, false, -1.0f);
}
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
@@ -40,12 +40,12 @@
void FSenseGloveModule::StartupModule()
{
SGLOG("Starting up SenseGlove module...");
SGLOG("Starting up the SenseGlove module...");
}
void FSenseGloveModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGlove module...");
SGLOG("Unloading the SenseGlove module...");
}
void FSenseGloveModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveModule::PostLoadCallback()
void FSenseGloveModule::ShutdownModule()
{
SGLOG("Shutting down SenseGlove module...");
SGLOG("Shutting down the SenseGlove module...");
}
#undef LOCTEXT_NAMESPACE
@@ -46,13 +46,19 @@ struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProx
{
GENERATED_USTRUCT_BODY()
public:
private:
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,16 +54,15 @@ public:
private:
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
int32 BuzzLevel;
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;
UPROPERTY(EditAnywhere, Category="SenseGlove",
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;
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
float VibrotactileLevel;
private:
struct FImpl;
@@ -77,33 +76,32 @@ private:
FImplDeleter PimplDeleter;
public:
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
FORCEINLINE float GetForceFeedbackLevel() const
{
return ForceFeedbackLevel;
}
FORCEINLINE void SetForceFeedbackLevel(const int32 Level)
FORCEINLINE void SetForceFeedbackLevel(const float 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 "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Runtime/Launch/Resources/Version.h"
#include "Templates/UniquePtr.h"
#include "SenseGlove/Haptics/SGGrabState.h"
@@ -244,6 +244,13 @@ 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;
@@ -299,6 +306,13 @@ 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;
+9 -8
View File
@@ -42,21 +42,22 @@ 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",
@@ -74,4 +75,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", "(ILjava/lang/String;)I");
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(IILjava/lang/String;)I");
FAndroidApplication::CheckJavaException();
if (!WriteHapticsMethodID)
{
@@ -43,7 +43,7 @@
void FSenseGloveAndroidModule::StartupModule()
{
SGLOG("Starting up SenseGloveAndroid module...");
SGLOG("Starting up the SenseGloveAndroid module...");
#if PLATFORM_ANDROID
const int32 R1 = FSGConnectJNI::Initialize();
@@ -59,17 +59,17 @@ void FSenseGloveAndroidModule::StartupModule()
void FSenseGloveAndroidModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveAndroid module...");
SGLOG("Unloading the SenseGloveAndroid module...");
}
void FSenseGloveAndroidModule::PostLoadCallback()
{
SGLOG("Loading SenseGloveAndroid module has succeeded!");
SGLOG("Loading the SenseGloveAndroid module has succeeded!");
}
void FSenseGloveAndroidModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveAndroid module...");
SGLOG("Shutting down the SenseGloveAndroid module...");
}
#undef LOCTEXT_NAMESPACE
@@ -43,25 +43,25 @@ public class SenseGloveAndroid : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveConnectImpl",
"SenseGloveCoreImpl",
"SenseGloveInterop",
"SenseGloveLog",
}
);
PrivateIncludePathModuleNames.AddRange(
new string[]
{
"SenseGloveInterop",
}
);
if (Target.Platform == UnrealTargetPlatform.Android)
{
AdditionalPropertiesForReceipt.Add("AndroidPlugin",
@@ -37,9 +37,12 @@
#include "Engine/Engine.h"
#if PLATFORM_ANDROID
#include "SGConnect/SGConnect.h"
#endif /* PLATFORM_ANDROID */
#include "SGCore/SGDeviceList.h"
#include "SGCore/SGHapticGloveHandProfiles.h"
#include "SGCore/SGHandLayer.h"
#include "SGLog/SGLog.h"
struct USGBackend::FImpl
@@ -115,9 +118,6 @@ bool USGBackend::InitializeBackend()
FSGDeviceList::Dispose();
FSGDeviceList::Reinitialize();
// Load the latest hand profiles.
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
bBackendInitialized = true;
return true;
@@ -42,16 +42,10 @@ public class SenseGloveBackend : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"InputCore",
@@ -41,12 +41,12 @@
void FSenseGloveBackendKismetModule::StartupModule()
{
SGLOG("Starting up SenseGloveBackendKismet module...");
SGLOG("Starting up the SenseGloveBackendKismet module...");
}
void FSenseGloveBackendKismetModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveBackendKismet module...");
SGLOG("Unloading the SenseGloveBackendKismet module...");
}
void FSenseGloveBackendKismetModule::PostLoadCallback()
@@ -56,7 +56,7 @@ void FSenseGloveBackendKismetModule::PostLoadCallback()
void FSenseGloveBackendKismetModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveBackendKismet module...");
SGLOG("Shutting down the SenseGloveBackendKismet module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,16 +42,10 @@ public class SenseGloveBackendKismet : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveBackend",
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_SensorRange.h"
#include "SGBuildHacks/SGInclude_Core_CustomWaveform.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_HandLayer.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_HapticChannelInfo.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_HapticGloveCalibrationCheck.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_HapticGloveCalibrationSequence.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_HapticGloveCommandBuffer.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_HapticGloveHandProfiles.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_HapticGloveQuickCalibration.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_NormalizationState.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_Nova2Glove.h"
@@ -33,4 +33,4 @@
*/
#include "SGBuildHacks/SGInclude_Core_CalibrationDataPoint.h"
#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.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_NovaGloveCalibration.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_NovaGloveHandProfile.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_SenseGloveHandProfile.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_SenseGloveSensorNormalizer.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_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_ThresholdCommand.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_ThumperCommand.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_TimedBuzzCommand.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_TimedThumpCommand.h"
@@ -40,12 +40,12 @@
void FSenseGloveBuildHacksModule::StartupModule()
{
SGLOG("Starting up SenseGloveBuildHacks module...");
SGLOG("Starting up the SenseGloveBuildHacks module...");
}
void FSenseGloveBuildHacksModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveBuildHacks module...");
SGLOG("Unloading the SenseGloveBuildHacks module...");
}
void FSenseGloveBuildHacksModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveBuildHacksModule::PostLoadCallback()
void FSenseGloveBuildHacksModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveBuildHacks module...");
SGLOG("Shutting down the SenseGloveBuildHacks module...");
}
#undef LOCTEXT_NAMESPACE
@@ -38,7 +38,7 @@
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/FingerCommand.hpp"
#include "SenseGlove/Core/CustomWaveform.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/BuzzCommand.hpp"
#include "SenseGlove/Core/HandLayer.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/HapticChannelInfo.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/HapticGloveCalibrationCheck.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/HapticGloveCalibrationSequence.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/HapticGloveCommandBuffer.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/HapticGloveHandProfiles.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/HapticGloveQuickCalibration.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/NormalizationState.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/HandProfile.hpp"
#include "SenseGlove/Core/Nova2Glove.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/CalibrationDataPoint.hpp"
#include "SenseGlove/Core/Nova2GloveSensorData.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/NovaGloveCalibration.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/NovaGloveHandProfile.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/SenseGloveHandProfile.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/ForceFeedbackCommand.hpp"
#include "SenseGlove/Core/SenseGloveSensorNormalizer.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/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/SensorRange.hpp"
#include "SenseGlove/Core/ThresholdCommand.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/ThumperCommand.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/TimedBuzzCommand.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/TimedThumpCommand.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -46,16 +46,12 @@ public class SenseGloveBuildHacks : ModuleRules
bEnableExceptions = true;
bUseRTTI = true;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveLog",
}
);
@@ -42,14 +42,14 @@
void FSenseGloveConnectModule::StartupModule()
{
SGLOG("Starting up SenseGloveConnect module...");
SGLOG("Starting up the SenseGloveConnect module...");
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"),
*FSGConnect::GetLibraryVersion()));
}
void FSenseGloveConnectModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveConnect module...");
SGLOG("Unloading the SenseGloveConnect module...");
}
void FSenseGloveConnectModule::PostLoadCallback()
@@ -59,7 +59,7 @@ void FSenseGloveConnectModule::PostLoadCallback()
void FSenseGloveConnectModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveConnect module...");
SGLOG("Shutting down the SenseGloveConnect module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,24 +42,25 @@ public class SenseGloveConnect : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveConnectImpl",
"SenseGloveInterop",
"SenseGloveLog",
"SenseGloveTypes",
}
);
PrivateIncludePathModuleNames.AddRange(
new string[]
{
"SenseGloveInterop",
}
);
if (Target.Platform == UnrealTargetPlatform.Android)
{
PrivateDependencyModuleNames.AddRange(
@@ -42,14 +42,14 @@
void FSenseGloveConnectImplModule::StartupModule()
{
SGLOG("Starting up SenseGloveConnectImpl module...");
SGLOG("Starting up the SenseGloveConnectImpl module...");
SGLOG(FString::Printf(TEXT("The low-level implementation of '%s' has been loaded successfully!"), *FSGConnectImpl::
GetLibraryVersion()));
}
void FSenseGloveConnectImplModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveConnectImpl module...");
SGLOG("Unloading the SenseGloveConnectImpl module...");
}
void FSenseGloveConnectImplModule::PostLoadCallback()
@@ -59,7 +59,7 @@ void FSenseGloveConnectImplModule::PostLoadCallback()
void FSenseGloveConnectImplModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveConnectImpl module...");
SGLOG("Shutting down the SenseGloveConnectImpl module...");
}
#undef LOCTEXT_NAMESPACE
@@ -36,11 +36,9 @@
#pragma once
/* Defines a C++ like static_assert. */
#if __cplusplus
#include <cassert>
#else
#if ! __cplusplus
#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. */
@@ -58,7 +56,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 C++'s name mangling of
/* If C++ is used, switch to C mode in order to prevent the C++ name mangling of
method names. */
#if __cplusplus
extern "C" {
@@ -48,21 +48,23 @@ public class SenseGloveConnectImpl : ModuleRules
bEnableExceptions = true;
bUseRTTI = true;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveBuildHacks",
"SenseGloveInterop",
"SenseGloveLog",
"SenseGloveTypes",
"SenseGloveUtils",
"SenseGloveTypes",
}
);
PrivateIncludePathModuleNames.AddRange(
new string[]
{
"SenseGloveInterop",
}
);
@@ -189,6 +191,8 @@ 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;
@@ -338,6 +342,8 @@ 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 SenseGloveConnectKismet module...");
SGLOG("Starting up the SenseGloveConnectKismet module...");
}
void FSenseGloveConnectKismetModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveConnectKismet module...");
SGLOG("Unloading the SenseGloveConnectKismet module...");
}
void FSenseGloveConnectKismetModule::PostLoadCallback()
@@ -55,7 +55,7 @@ void FSenseGloveConnectKismetModule::PostLoadCallback()
void FSenseGloveConnectKismetModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveConnectKismet module...");
SGLOG("Shutting down the SenseGloveConnectKismet module...");
}
#undef LOCTEXT_NAMESPACE
@@ -42,16 +42,10 @@ public class SenseGloveConnectKismet : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SenseGloveConnect",
@@ -68,6 +68,12 @@ 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);
@@ -82,26 +88,26 @@ TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(&OutAnglesContainer, bRightHanded);
return MoveTemp(OutAnglesContainer.Array);
return OutAnglesContainer.Array;
}
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
return MoveTemp(OutAnglesContainer.Array);
return OutAnglesContainer.Array;
}
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
return MoveTemp(OutAnglesContainer.Array);
return OutAnglesContainer.Array;
}
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(const bool bRightHanded)
{
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
return MoveTemp(OutAnglesContainer.Array);
return OutAnglesContainer.Array;
}
@@ -35,8 +35,6 @@
#include "SGCore/SGBasicHandModel.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_ESGFinger.h"
#include "SGInterop/SGIC_FQuat.h"
@@ -208,21 +206,21 @@ TArray<TArray<float>> USGBasicHandModel::GetBaseFingerLengths()
{
FSGIC_TArray_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths(&OutLengthsContainer);
return MoveTemp(OutLengthsContainer.Array);
return OutLengthsContainer.Array;
}
TArray<FVector> USGBasicHandModel::GetBaseJointPositions()
{
FSGIC_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(&OutPositionsContainer);
return MoveTemp(OutPositionsContainer.Array);
return OutPositionsContainer.Array;
}
TArray<FVector> USGBasicHandModel::GetBaseJointAngles()
{
FSGIC_TArray_FVector OutRotationsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer);
return MoveTemp(OutRotationsContainer.Array);
return OutRotationsContainer.Array;
}
USGBasicHandModel::USGBasicHandModel()
@@ -363,7 +361,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerLengths() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths(&InstanceContainer, &OutLengthsContainer);
return MoveTemp(OutLengthsContainer.Array);
return OutLengthsContainer.Array;
}
TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
@@ -373,7 +371,7 @@ TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger(&InstanceContainer, &OutLengthsContainer,
&FingerContainer);
return MoveTemp(OutLengthsContainer.Array);
return OutLengthsContainer.Array;
}
void USGBasicHandModel::SetFingerLengths(const ESGFinger Finger, const TArray<float>& Lengths)
@@ -397,7 +395,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerRatios() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_TArray_float OutRatiosContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios(&InstanceContainer, &OutRatiosContainer);
return MoveTemp(OutRatiosContainer.Array);
return OutRatiosContainer.Array;
}
TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
@@ -407,7 +405,7 @@ TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
FSGIC_TArray_float OutRatiosContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger(&InstanceContainer, &OutRatiosContainer,
&FingerContainer);
return MoveTemp(OutRatiosContainer.Array);
return OutRatiosContainer.Array;
}
TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
@@ -415,7 +413,7 @@ TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions(&InstanceContainer, &OutPositionsContainer);
return MoveTemp(OutPositionsContainer.Array);
return OutPositionsContainer.Array;
}
void USGBasicHandModel::SetStartJointPosition(const ESGFinger Finger, const FVector& Position)
@@ -439,7 +437,7 @@ TArray<FQuat> USGBasicHandModel::GetStartJointRotationsQ() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer);
return MoveTemp(OutRotationsContainer.Array);
return OutRotationsContainer.Array;
}
TArray<FRotator> USGBasicHandModel::GetStartJointRotations() const
@@ -456,7 +454,7 @@ FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
FSGIC_FVector OutPositionContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer);
return MoveTemp(OutPositionContainer.Vector);
return OutPositionContainer.Vector;
}
void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger)
@@ -473,7 +471,7 @@ FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const
FSGIC_FQuat OutRotationContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
return MoveTemp(OutRotationContainer.Quat);
return OutRotationContainer.Quat;
}
FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
@@ -506,7 +504,7 @@ TArray<float> USGBasicHandModel::GetTotalLengths() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_float OutLengthsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths(&InstanceContainer, &OutLengthsContainer);
return MoveTemp(OutLengthsContainer.Array);
return OutLengthsContainer.Array;
}
float USGBasicHandModel::GetTotalLength(const ESGFinger Finger) const
@@ -523,7 +521,7 @@ TArray<FVector> USGBasicHandModel::Get3DLengths(const ESGFinger Finger) const
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths(&InstanceContainer, &OutLengthsContainer,
&FingerContainer);
return MoveTemp(OutLengthsContainer.Array);
return OutLengthsContainer.Array;
}
bool USGBasicHandModel::Equals(const USGBasicHandModel* BasicHandModel) const
@@ -538,7 +536,7 @@ FString USGBasicHandModel::ToString() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_ToString(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
@@ -546,7 +544,7 @@ FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly(&InstanceContainer, &OutStringContainer, bLengthsOnly);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
FString USGBasicHandModel::SGSerialize() const
@@ -554,7 +552,7 @@ FString USGBasicHandModel::SGSerialize() const
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBasicHandModelImpl_Serialize(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
USGBasicHandModel::FImpl::FImpl(USGBasicHandModel* InOwner)
@@ -36,7 +36,6 @@
#include "SGCore/SGBetaDevice.h"
#include "Engine/World.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGDeviceImplCast.h"
#include "SGCoreImpl/SGBetaDeviceImpl.h"
@@ -146,7 +145,7 @@ FString USGBetaDevice::GetDeviceId() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return MoveTemp(OutIdContainer.String);
return OutIdContainer.String;
}
FString USGBetaDevice::GetHardwareVersion() const
@@ -174,7 +173,7 @@ FString USGBetaDevice::GetConstantsString() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
FString USGBetaDevice::GetSensorData() const
@@ -182,7 +181,7 @@ FString USGBetaDevice::GetSensorData() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutDataContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetSensorData(&InstanceContainer, &OutDataContainer);
return MoveTemp(OutDataContainer.String);
return OutDataContainer.String;
}
FString USGBetaDevice::GetLastCommand() const
@@ -190,7 +189,7 @@ FString USGBetaDevice::GetLastCommand() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutCommandContainer;
SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand(&InstanceContainer, &OutCommandContainer);
return MoveTemp(OutCommandContainer.String);
return OutCommandContainer.String;
}
bool USGBetaDevice::SendHaptics(const FString& Command) const
@@ -205,5 +204,5 @@ FString USGBetaDevice::ToString() const
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGBetaDeviceImpl_ToString(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
@@ -1,180 +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/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));
}
@@ -1,175 +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/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;
}
@@ -0,0 +1,340 @@
/**
* @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,26 +35,38 @@
#include "SGCore/SGDevice.h"
#include "SGDeviceImplCast.h"
#include "Engine/Engine.h"
#include "Engine/GameViewportClient.h"
#include "Engine/World.h"
#include "Kismet/GameplayStatics.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGBetaDeviceImpl.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 "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"
@@ -93,12 +105,30 @@ 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 MoveTemp(OutString.String);
return OutString.String;
}
USGDevice::USGDevice()
@@ -140,6 +170,16 @@ 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))
{
@@ -178,6 +218,12 @@ 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))
{
@@ -216,6 +262,14 @@ 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;
@@ -247,6 +301,11 @@ 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);
@@ -262,6 +321,91 @@ 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()};
@@ -281,7 +425,21 @@ FString USGDevice::GetFirmwareString() const
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGDeviceImpl_GetFirmwareString(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
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);
}
FString USGDevice::GetAddress() const
@@ -357,12 +515,32 @@ 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 MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
USGDevice::FImpl::FImpl(USGDevice* InOwner)
@@ -39,11 +39,13 @@
#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"
@@ -63,6 +65,14 @@ 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,6 +40,7 @@
class FSGBetaDeviceImpl;
class FSGDeviceImpl;
class FSGHapticGloveImpl;
class FSGNova2GloveImpl;
class FSGNovaGloveImpl;
class FSGSenseGloveImpl;
@@ -50,6 +51,8 @@ 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,6 +38,7 @@
#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"
@@ -92,6 +93,12 @@ 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)};
@@ -165,11 +172,12 @@ bool FSGDeviceList::GetSensorDataString(const int32 IpcIndex, const FString& Ipc
return bReturn;
}
bool FSGDeviceList::SendHaptics(const int32 IpcIndex, const FString& IpcAddress, const FString& Commands)
bool FSGDeviceList::SendHaptics(
const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands)
{
FSGIC_FString IpcAddressContainer{IpcAddress};
FSGIC_FString CommandsContainer{Commands};
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, &CommandsContainer);
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, ChannelIndex, &CommandsContainer);
}
FString FSGDeviceList::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, const int32 Index)
@@ -35,8 +35,6 @@
#include "SGCore/SGDeviceModel.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FSGDeviceModelImpl.h"
#include "SGInterop/SGIC_FString.h"
@@ -103,7 +101,7 @@ TArray<bool> USGDeviceModel::ParseFunctions(const int32 Value, const int32 Size)
{
FSGIC_TArray_bool OutParseFunctionsContainer;
SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(&OutParseFunctionsContainer, Value, Size);
return MoveTemp(OutParseFunctionsContainer.Array);
return OutParseFunctionsContainer.Array;
}
void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion)
@@ -165,7 +163,7 @@ FString USGDeviceModel::GetDeviceId() const
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGDeviceModelImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return MoveTemp(OutIdContainer.String);
return OutIdContainer.String;
}
FString USGDeviceModel::GetHardwareVersion() const
@@ -173,7 +171,7 @@ FString USGDeviceModel::GetHardwareVersion() const
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
FSGIC_FString OutVersionContainer;
SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
return MoveTemp(OutVersionContainer.String);
return OutVersionContainer.String;
}
int32 USGDeviceModel::GetFirmwareVersion() const
@@ -188,6 +186,22 @@ 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)
{
@@ -1,274 +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/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;
}
@@ -1,70 +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/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();
}
@@ -1,55 +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
*
*
*/
#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);
};
@@ -1,187 +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/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,8 +35,6 @@
#include "SGCore/SGHandInterpolator.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGInterpolationSet.h"
#include "SGCoreImpl/SGInterpolationSetImpl.h"
#include "SGCoreImpl/SGExportedFunctions.h"
@@ -50,6 +48,8 @@
#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,155 +99,26 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer)
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
&JointInterpolationsContainer);
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
bRightHanded);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
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)
USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer,
const FString& SerializedString, const bool bRightHanded)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_FString SerializedStringContainer{SerializedString};
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer, &SerializedStringContainer);
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer,
&SerializedStringContainer, bRightHanded);
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))
{
@@ -257,97 +128,12 @@ USGHandInterpolator::USGHandInterpolator()
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
USGHandInterpolator::USGHandInterpolator(const bool bRightHanded)
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
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);
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
bRightHanded);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
}
@@ -373,104 +159,36 @@ const FSGHandInterpolatorImpl& USGHandInterpolator::ToHandInterpolatorImpl() con
return Pimpl->HandInterpolatorImpl;
}
TArray<TArray<USGInterpolationSet*>> USGHandInterpolator::GetJointInterpolations(UObject* Outer) const
float USGHandInterpolator::CalculateAngle(
const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
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 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);
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits(
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
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)
float USGHandInterpolator::CalculateAngle(
const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_ESGThumbMovement MovementContainer{Movement};
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_Movement_InputAt0_InputAt1_AngleAt0_AngleAt1(
&InstanceContainer, &MovementContainer, InputAt0, InputAt1, AngleAt0, AngleAt1);
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits(
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
return Angle;
}
USGInterpolationSet* USGHandInterpolator::GetInterpolation(UObject* Outer,
const int32 Finger, const int32 Movement) const
TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(
const TArray<TArray<float>>& Flexions, const TArray<float>& Abductions, const float CmcTwist) const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FSGInterpolationSetImpl OutInterpolationContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetInterpolation(&InstanceContainer, &OutInterpolationContainer, Finger,
Movement);
return USGInterpolationSet::NewInterpolationSet(Outer, MoveTemp(OutInterpolationContainer.InterpolationSetImpl));
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;
}
bool USGHandInterpolator::Equals(const USGHandInterpolator* HandInterpolator) const
@@ -486,7 +204,7 @@ FString USGHandInterpolator::SGSerialize() const
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandInterpolatorImpl_Serialize(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
USGHandInterpolator::FImpl::FImpl(USGHandInterpolator* InOwner)
@@ -0,0 +1,222 @@
/**
* @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,8 +35,6 @@
#include "SGCore/SGHandPose.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGBasicHandModel.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGHandPoseImpl.h"
@@ -189,7 +187,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, &HandAnglesContainer);
&OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandDimensionsContainer);
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
@@ -394,7 +392,7 @@ TArray<TArray<FVector>> USGHandPose::GetJointPositions() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FVector OutPositionsContainer;
SGCoreImpl_FSGHandPoseImpl_GetJointPositions(&InstanceContainer, &OutPositionsContainer);
return MoveTemp(OutPositionsContainer.Array);
return OutPositionsContainer.Array;
}
TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
@@ -402,7 +400,7 @@ TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
return MoveTemp(OutRotationsContainer.Array);
return OutRotationsContainer.Array;
}
TArray<TArray<FRotator>> USGHandPose::GetJointRotations() const
@@ -418,12 +416,11 @@ TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FVector OutAnglesContainer;
SGCoreImpl_FSGHandPoseImpl_GetHandAngles(&InstanceContainer, &OutAnglesContainer);
return MoveTemp(OutAnglesContainer.Array);
return OutAnglesContainer.Array;
}
bool USGHandPose::Equals(const USGHandPose* HandPose) const
{
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FSGHandPoseImpl HandPoseContainer{HandPose->ToHandPoseImpl()};
return SGCoreImpl_FSGHandPoseImpl_Equals(&InstanceContainer, &HandPoseContainer);
@@ -442,7 +439,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 MoveTemp(OutFlexionContainer.Array);
return OutFlexionContainer.Array;
}
FString USGHandPose::ToString(const bool bShortFormat) const
@@ -450,7 +447,7 @@ FString USGHandPose::ToString(const bool bShortFormat) const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandPoseImpl_ToString(&InstanceContainer, &OutStringContainer, bShortFormat);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
FString USGHandPose::SGSerialize() const
@@ -458,7 +455,7 @@ FString USGHandPose::SGSerialize() const
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_FString OutStringContainer;
SGCoreImpl_FSGHandPoseImpl_Serialize(&InstanceContainer, &OutStringContainer);
return MoveTemp(OutStringContainer.String);
return OutStringContainer.String;
}
USGHandPose::FImpl::FImpl(USGHandPose* InOwner)
@@ -1,284 +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/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;
}
@@ -0,0 +1,236 @@
/**
* @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,27 +35,29 @@
#include "SGCore/SGHapticGlove.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGBuzzCommand.h"
#include "SGCore/SGForceFeedbackCommand.h"
#include "SGCore/SGBasicHandModel.h"
#include "SGCore/SGCustomWaveform.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_FSGBuzzCommandImpl.h"
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
#include "SGInterop/SGIC_FSGCustomWaveformImpl.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)
@@ -80,10 +82,10 @@ USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer)
return NewHapticGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
}
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer)
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer, const bool bConnectedOnly)
{
FSGIC_TArray_TSharedRef_FSGHapticGloveImpl OutGlovesContainer;
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer);
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer, bConnectedOnly);
TArray<USGHapticGlove*> HapticGloves;
for (TSharedRef<FSGHapticGloveImpl> HapticGloveImpl: OutGlovesContainer.Array)
{
@@ -109,7 +111,8 @@ 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());
@@ -118,6 +121,22 @@ 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()
{
@@ -137,6 +156,11 @@ USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
{
}
USGHapticGlove::USGHapticGlove(const FSGNova2GloveImpl& Nova2GloveImpl)
: USGDevice(Nova2GloveImpl)
{
}
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
: USGDevice(NovaGloveImpl)
{
@@ -157,6 +181,11 @@ USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
{
}
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
: USGDevice(MoveTemp(Nova2GloveImpl))
{
}
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
: USGDevice(MoveTemp(NovaGloveImpl))
{
@@ -187,7 +216,7 @@ FString USGHapticGlove::GetDeviceId() const
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutIdContainer;
SGCoreImpl_FSGHapticGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
return MoveTemp(OutIdContainer.String);
return OutIdContainer.String;
}
FString USGHapticGlove::GetHardwareVersion() const
@@ -195,7 +224,7 @@ FString USGHapticGlove::GetHardwareVersion() const
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FString OutVersionContainer;
SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
return MoveTemp(OutVersionContainer.String);
return OutVersionContainer.String;
}
int32 USGHapticGlove::GetFirmwareVersion() const
@@ -245,41 +274,7 @@ bool USGHapticGlove::GetImuRotation(FRotator& OutImu)
}
bool USGHapticGlove::GetHandPose(
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)
UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
@@ -310,22 +305,63 @@ bool USGHapticGlove::GetHandPose(UObject* Outer, USGHandPose*& OutHandPose)
return bResult;
}
#if PLATFORM_ANDROID
bool USGHapticGlove::GetHandPose(UObject* Outer, const float DeltaTime, USGHandPose*& OutHandPose)
bool USGHapticGlove::GetHandAngles(TArray<TArray<FVector>>& OutHandAngles) const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_DeltaTime_OutHandPose(
&InstanceContainer, DeltaTime, &OutHandPoseContainer);
FSGIC_TArray_TArray_FVector OutHandAnglesContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles(
&InstanceContainer, &OutHandAnglesContainer);
if (bResult)
{
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
OutHandAngles = MoveTemp(OutHandAnglesContainer.Array);
}
return bResult;
}
#endif /* PLATFORM_ANDROID */
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;
}
void USGHapticGlove::StopHaptics()
{
@@ -339,113 +375,53 @@ void USGHapticGlove::StopVibrations()
SGCoreImpl_FSGHapticGloveImpl_StopVibrations(&InstanceContainer);
}
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand)
bool USGHapticGlove::SendHaptics()
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
return SGCoreImpl_FSGHapticGloveImpl_SendHaptics(&InstanceContainer);
}
void USGHapticGlove::SendHaptics(const USGBuzzCommand* BuzzCommand)
bool USGHapticGlove::QueueForceFeedbackLevels(const TArray<float>& Levels01)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_BuzzCommand(&InstanceContainer, &BuzzCommandContainer);
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container);
}
void USGHapticGlove::SendHaptics(const USGThumperCommand* ThumperCommand)
bool USGHapticGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ThumperCommand(&InstanceContainer, &ThumperCommandContainer);
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01);
}
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
const USGBuzzCommand* BuzzCommand)
bool USGHapticGlove::QueueVibroLevels(const TArray<float>& Levels01)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand(
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer);
FSGIC_TArray_float Levels01Container{Levels01};
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels(&InstanceContainer, &Levels01Container);
}
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
const USGBuzzCommand* BuzzCommand,
const USGThumperCommand* ThumperCommand)
bool USGHapticGlove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
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);
FSGIC_ESGHapticLocation LocationContainer{Location};
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel(&InstanceContainer, &LocationContainer, Level01);
}
bool USGHapticGlove::GetCalibrationValues(TArray<FVector>& OutValues)
bool USGHapticGlove::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_TArray_FVector OutValuesContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetCalibrationValues(&InstanceContainer, &OutValuesContainer);
if (bResult)
{
OutValues = MoveTemp(OutValuesContainer.Array);
}
return bResult;
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
return SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform(&InstanceContainer, &AtLocationContainer);
}
void USGHapticGlove::ResetCalibrationRange()
bool USGHapticGlove::SendCustomWaveform(USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
{
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
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));
FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()};
FSGIC_ESGHapticLocation LocationContainer{Location};
return SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform(
&InstanceContainer, &OutWaveformContainer, &LocationContainer);
}
void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
@@ -528,4 +504,12 @@ 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;
}
@@ -1,259 +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/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;
}
@@ -1,421 +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/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