Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9afbd8e54f
|
||
|
|
4e0d01c3de
|
||
|
|
8681f78c22
|
||
|
|
84e8f46d35
|
||
|
|
3f0dd4a5b9
|
||
|
|
d0970504ce
|
||
|
|
0c73eccc16
|
||
|
|
f3b9155955
|
||
|
|
45da7baa95
|
||
|
|
4550fda587
|
||
|
|
560b9e65d3
|
||
|
|
8c8236c33c
|
||
|
|
034d10355a
|
||
|
|
8127051da7
|
||
|
|
802a6b6d0b
|
||
|
|
494f87f4cb
|
||
|
|
def46777fa
|
||
|
|
d0c24aeda5
|
||
|
|
c0c5722f07
|
||
|
|
8159c03526
|
||
|
|
49eb2f2788
|
||
|
|
e0ea29ca18
|
||
|
|
17f5db48c6
|
||
|
|
d9647fc1c6
|
||
|
|
3995d6e0d9
|
||
|
|
fe3bd91807
|
||
|
|
3150bb6a8a
|
||
|
|
b2c62b34a5
|
||
|
|
69bf6161f8
|
||
|
|
560cb73db7
|
||
|
|
b1ed6fa325
|
||
|
|
4bc0b6e6d3
|
||
|
|
d7fc6dd211
|
||
|
|
8580c4a235
|
||
|
|
b11c329974
|
||
|
|
c098cade8c
|
||
|
|
cbc3bcd1bd
|
||
|
|
cb1c473136
|
||
|
|
8f7148dd61
|
||
|
|
242eb35d16
|
||
|
|
5b7e2d5d1e
|
||
|
|
4fc721fa55
|
||
|
|
f138ab2ceb
|
||
|
|
68cc271461
|
||
|
|
0a5553987f
|
||
|
|
4a8812943b
|
||
|
|
a10b1ff034
|
||
|
|
b34c06eb00
|
||
|
|
73a4c79741
|
||
|
|
0c8d4ef350
|
||
|
|
88b337f066
|
||
|
|
310a4b148e
|
||
|
|
0061ea9cb6
|
||
|
|
e2da098132
|
||
|
|
c243525c0c
|
||
|
|
86e283e700
|
||
|
|
a26f1d9e42
|
||
|
|
beadba4544
|
||
|
|
40f27c227f
|
||
|
|
5bc20edc25
|
||
|
|
4af682b617
|
||
|
|
5dbeef8627
|
||
|
|
da7e51e208
|
||
|
|
d83251a57c
|
||
|
|
695d4f01ba
|
||
|
|
54e4db3ef6
|
||
|
|
2e653c2a81
|
||
|
|
189c0e50df
|
||
|
|
6eaac124ce
|
||
|
|
6a5f200ee8
|
||
|
|
5254a94441
|
||
|
|
b087debc41
|
||
|
|
3bae035ed3
|
||
|
|
5ea2f1c5be
|
||
|
|
5742f7f315
|
||
|
|
e29c037198
|
||
|
|
4a96590460
|
||
|
|
01f74dd141
|
||
|
|
e8ae0d9267
|
||
|
|
e6ae1da100
|
||
|
|
539855368f
|
||
|
|
b6acf03c95
|
||
|
|
a0c4e96349
|
||
|
|
6251cb0d37
|
||
|
|
dfda4f28fb
|
||
|
|
5054063a8a
|
||
|
|
c6294a1f16
|
||
|
|
1cbe39fd5e
|
||
|
|
f0db0b0846
|
||
|
|
5e1cb6a637
|
||
|
|
eca69677b1
|
||
|
|
fbe415c7ae
|
||
|
|
0b052356ee
|
||
|
|
42316edb95
|
||
|
|
932bdb26d4
|
||
|
|
4fe5281cd8
|
||
|
|
dcbe1015f8
|
||
|
|
6ebee2aa2f
|
||
|
|
7c8f26e978
|
||
|
|
bf234d720b
|
||
|
|
702fdf19fa
|
||
|
|
0364f67ae2
|
||
|
|
0efd382edb
|
||
|
|
28b88a5a72
|
||
|
|
eab9892a5d
|
||
|
|
da3449b7df
|
||
|
|
25e0d49eea
|
||
|
|
01fe621704
|
||
|
|
ce325f1219
|
||
|
|
8ce4caadc9
|
||
|
|
2588eade1f
|
||
|
|
98921356cd
|
||
|
|
7a35364713
|
||
|
|
1cac3a70e3
|
||
|
|
083a1690e8
|
||
|
|
c2244c8ff8
|
||
|
|
8b7bcdd8b8
|
||
|
|
f0d67ce035
|
||
|
|
49bcfbc2d4
|
||
|
|
9ed0015db0
|
||
|
|
5951ac9c33
|
||
|
|
be3647e310
|
||
|
|
3e35246b39
|
||
|
|
8087719bbb
|
||
|
|
5ca1da7730
|
||
|
|
41196d69c1
|
||
|
|
ead76bb4f5
|
||
|
|
529e751e07
|
||
|
|
1b2300d18c
|
||
|
|
dbabec4583
|
||
|
|
e1fea5d60b
|
||
|
|
43bdec8601
|
||
|
|
a5a8e7149f
|
||
|
|
bb63748644
|
||
|
|
d4e92546e3
|
||
|
|
daa4031e6b
|
||
|
|
bc39905bc6
|
||
|
|
1fdb94d5c9
|
||
|
|
7c9e1b2462
|
||
|
|
ef6d5b6295
|
||
|
|
6794a36b0f
|
||
|
|
6c77fb0ca9
|
||
|
|
f5d9a02dab
|
||
|
|
75eaea13a4
|
||
|
|
b2f89c4694
|
||
|
|
b4e547f755
|
||
|
|
8125ad2fc6
|
||
|
|
f7f997019d
|
||
|
|
914f0c34ac
|
||
|
|
8e9b45ddc0
|
||
|
|
bf4e1f53f6
|
||
|
|
5c40592070
|
||
|
|
3fb66fa469
|
||
|
|
c0c6d6b262
|
||
|
|
03e698de32
|
||
|
|
4c0d886518
|
||
|
|
c63c182ab0
|
||
|
|
51af76bf55
|
||
|
|
a95e067e85
|
||
|
|
e05347f2a4
|
||
|
|
d85428a30f
|
||
|
|
0f5e0e1c7f
|
||
|
|
a7efdb75c7
|
||
|
|
f849252dc8
|
||
|
|
be76335a46
|
||
|
|
d6f1e21804
|
||
|
|
08657ceda2
|
||
|
|
1f57ae7a8f
|
||
|
|
fcf9bdb0a5
|
||
|
|
5cec1ac563
|
||
|
|
b6bd971bc8
|
||
|
|
3088a60d5a
|
||
|
|
e22625ae34
|
||
|
|
30720e5bd5
|
||
|
|
a2b8e186b5
|
||
|
|
882665e386
|
||
|
|
265759e080
|
||
|
|
cac1c475dc
|
||
|
|
8478b7caf8
|
||
|
|
6b2e5dbcf7
|
||
|
|
ae81b15c91
|
||
|
|
5a8feb24ac
|
||
|
|
418133432f
|
||
|
|
0d5c2ee04e
|
||
|
|
edad54bd36
|
||
|
|
bed8269eba
|
||
|
|
598b0942e4
|
+312
-18
@@ -5,20 +5,314 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [v1.4.1] - 2023-05-29
|
## [2.0.2] - 2024-04-25
|
||||||
|
|
||||||
This is a bugfix release with focus Android build issues.
|
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
|
### Fixed
|
||||||
|
|
||||||
- Fix an android gradle build issue which happens when the games package name won't start with com.senseglove.*.
|
- 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.
|
||||||
- Supress a grade warning for non-arm64 archs when the build target is android.
|
- 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
|
### Removed
|
||||||
|
|
||||||
- Remove dead gradle code from the android module.
|
- 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.
|
||||||
|
|
||||||
## [v1.4.0] - 2023-05-19
|
## [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
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
- Fix a potential memory corruption where inside the SGHapticGloveCalibrationSequence::GetCurrentInstruction method, the return statement of the function is getting assigned to the const parameter NextStepKey, thus the return statement of the function will always be empty as well.
|
||||||
|
- Fix a potential memory corruption where inside one of the overloads of the SGSenseGloveImpl::GetGlovePose method, the out parameter of the method is getting passed as the SensorData parameter to the lower levels of the API.
|
||||||
|
- Fix multiple Equals methods for a few classes such as SGInterpolationSet, SGNovaGloveHandProfile, SGNovaGloveInfo, SGSenseGloveHandProfile, SenseGloveInfo, SenseGlovePose, where the Equal method compares the current instance against itself instead of the other instance passed to as the parameter to the method.
|
||||||
|
- Removed a redundant code statement inside the SGNovaGloveImpl::GetSubFirmwareVersion method.
|
||||||
|
- Some minor const correctness fixes.
|
||||||
|
- Some other minor code fixes and improvements.
|
||||||
|
- Fix the wrong version numbers inside the paltform support matrix and the main .uplugin file.
|
||||||
|
- Minor changelog fixes.
|
||||||
|
- Bumped the copyright years.
|
||||||
|
|
||||||
|
## [1.9.2] - 2023-11-03
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added a list of planned features and their completion status to the main README file.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where the released actor is going to be NULL whenever the OnActorReleased event fires.
|
||||||
|
|
||||||
|
## [1.9.1] - 2023-10-11
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Add the missing Unreal Engine C++ header to files that rely on the ENGINE\_\*\_VERSION macros in order to fix the Epic Store build failures on UE 5.3.
|
||||||
|
|
||||||
|
## [1.9.0] - 2023-10-10
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The BlueprintImplementableEvent UFUNCTION specifier for the OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch events have been changed to BlueprintNativeEvent in order to allow them to be implemented from the child C++ classes as well. This won't break any existing Blueprint code that relies on the previous BlueprintImplementableEvent signature.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Add a missing release note entry for the v1.8.0 release to the changelog file.
|
||||||
|
|
||||||
|
## [1.8.0] - 2023-10-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Introduced new SGPawn events: OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch.
|
||||||
|
- Exposed OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch events to Blueprint as BlueprintImplementableEvent.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
- Fix the DECLARE_EVENT macro signature for OnGrabStateUpdated and OnTouchStateUpdated events.
|
||||||
|
|
||||||
|
## [1.7.0] - 2023-09-14
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Introduce SGGameInstance, a customized SenseGlove game instance for future use.
|
||||||
|
- Added the new SenseGloveBackend and SenseGloveBackendKismet modules.
|
||||||
|
- Added SG_CPP20 C++ macro for C++20 detection, which is now default from UE 5.3 onwards.
|
||||||
|
- Added SG_CAPTURE_THIS C++ macro as a workaround for error C4855: implicit capture of 'this' via '[=]' is deprecated in /std:c++20 in order to build the same lambda captures without extra #ifdefs on all supported engine versions.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- SenseGlove libraries have been updated to v2.12.0-19c9854.
|
||||||
|
- SGCoreImpl/SGPlatform has been moved to SGBuildHacks/SGPlatform.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Proper initialization of the SenseGlove backend in order to fix a bug in certain situations where SGConnect::Init() gets called every frame.
|
||||||
|
- Some other minor fixes and improvements.
|
||||||
|
|
||||||
|
## [1.6.1] - 2023-08-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix Unreal Engine 5.0 build issues.
|
||||||
|
- Minor documentation fixes.
|
||||||
|
|
||||||
|
## [1.6.0] - 2023-08-14
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added support for the upcoming Unreal Engine 5.3.
|
||||||
|
- Now, the hand's velocity is applied to grabbed actors after being released from the hand.
|
||||||
|
- Introduce the real hands to the SenseGlove module (SGPawn) API.
|
||||||
|
- Added separation of the virtual and real hand rendering.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix the wrong default debug virtual hand gizmo colors when initialized using the default constructor.
|
||||||
|
- Some minor performance fixes and improvements.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- SenseGlove libraries have been updated to v2.11.0-b775a05.
|
||||||
|
|
||||||
|
## [1.5.3] - 2023-07-19
|
||||||
|
|
||||||
|
This is a hotfix release mostly addressing Android Bluetooth performance issues.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Minor changelog fixes.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- SenseGlove libraries have been updated to v2.10.1-3b0e7c9.
|
||||||
|
|
||||||
|
## [1.5.2] - 2023-07-19
|
||||||
|
|
||||||
|
This is a hotfix release mostly addressing Android-related issues.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix a build issue with Android shipping builds due to sgconnect.jar not getting copied automatically in the AFSProject which is compiled for shipping builds when AndroidFileServer (AFS) is enabled.
|
||||||
|
- Minor changelog fixes and some source code formatting fixes.
|
||||||
|
|
||||||
|
## [1.5.1] - 2023-07-13
|
||||||
|
|
||||||
|
This is a hotfix release addressing a few critical issues introduced by the recent changes.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix a wrist tracker bug where left and right hands' wrist trackers are mistakenly tracking the opposite hand's motion source.
|
||||||
|
- Fix a bug where the right hand is not able to do grab or release.
|
||||||
|
|
||||||
|
## [1.5.0] - 2023-06-16
|
||||||
|
|
||||||
|
This release breaks ABI/API compatibility with the previous versions in some areas as documented below.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added HTC VIVE Focus 3 positional tracking hardware enum.
|
||||||
|
- Added support for the Meta Quest Pro, HTC VIVE, and HTC VIVE Focus 3 positional tracking hardware.
|
||||||
|
- Added two options to the wrist tracker settings (to the global plugin settings and the overrides in the wrist tracker component) in order to be able to specify a custom motion source for the left and right hands, so that it allows SteamVR-based trackers such as HTC VIVE or HTC VIVE Focus 3 to operate with the SGPawn.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix a bug where SteamVR trackers such as HTC VIVE and HTC VIVE Focus 3's wrist orientation and location were not being tracked.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Fully refactored the top-level configurations in the settings system into USTRUCTs.
|
||||||
|
- SenseGlove libraries have been updated to v2.10.0-12133ac.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Dropped support for the Epic Native Toolchain v19, MSVC v141 (Visual Studio 2017), and thus Unreal Engine 4.27 as it has been marked as deprecated since v1.4.x.
|
||||||
|
- Removed any kind of support for Oculus Touch (Oculus Rift S and Oculus Quest 1) positional tracking hardware, thus the enum as well.
|
||||||
|
- Removed any kind of support for Pico Neo 2 positional tracking hardware, thus the enum as well.
|
||||||
|
- Removed any kind of support for Pico Neo 3 positional tracking hardware, thus the enum as well.
|
||||||
|
|
||||||
|
## [1.4.3] - 2023-06-01
|
||||||
|
|
||||||
|
This is a hotfix release addressing a critical Android crash.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix a critical Android crash that happens where the default development hand meshes are not found, which means almost always since we don't ship any default virtual hand mesh at the moment.
|
||||||
|
- Minor changelog release formatting fix in order to stay consistent.
|
||||||
|
|
||||||
|
## [1.4.2] - 2023-06-01
|
||||||
|
|
||||||
|
This is a hotfix release addressing a few critical issues.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix build issues with certain compilers when the Unreal Engine version is older than 5.2.
|
||||||
|
- Reintroduced the Virtual Hand and the Wrist Tracker debug gizmos which have temporarily been disabled due to a bug in the settings system.
|
||||||
|
- Some minor changelog fixes.
|
||||||
|
|
||||||
|
## [1.4.1] - 2023-05-29
|
||||||
|
|
||||||
|
This is a bugfix release with a focus on Android build issues.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix an Android Gradle build issue that happens when the game's package name won't start with com.senseglove.*.
|
||||||
|
- Suppress a grade warning for non-arm64 architectures when the build target is Android.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Remove dead Gradle code from the Android module.
|
||||||
|
|
||||||
|
## [1.4.0] - 2023-05-19
|
||||||
|
|
||||||
This release breaks ABI/API compatibility with the previous versions.
|
This release breaks ABI/API compatibility with the previous versions.
|
||||||
|
|
||||||
@@ -27,7 +321,7 @@ This release breaks ABI/API compatibility with the previous versions.
|
|||||||
- Added support for the stable release of Unreal Engine 5.2 (the preview release has been supported since v1.2.0).
|
- Added support for the stable release of Unreal Engine 5.2 (the preview release has been supported since v1.2.0).
|
||||||
- Added Linux AArch64 platform support.
|
- Added Linux AArch64 platform support.
|
||||||
- Added a new Grab component that can turn any actor into a grabbable object.
|
- Added a new Grab component that can turn any actor into a grabbable object.
|
||||||
- Added a new Touch component that enables haptic feedbacks such as Buzz and Force-Feedback commands.
|
- Added a new Touch component that enables haptic feedback such as Buzz and Force-Feedback commands.
|
||||||
- Added an optional feature in order to automatically stop all haptics on the EndPlay event, wherever the virtual hand component is used. By default, it's enabled.
|
- Added an optional feature in order to automatically stop all haptics on the EndPlay event, wherever the virtual hand component is used. By default, it's enabled.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -37,7 +331,7 @@ This release breaks ABI/API compatibility with the previous versions.
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- SenseGlove libraries have been updated to v2.7.1-965f90c with support for Linux AArch64.
|
- SenseGlove libraries have been updated to v2.7.1-965f90c with support for Linux AArch64.
|
||||||
- The Virtual Hand and the Wrist Tracker debug Gizmos (the intended use is only for SenseGlove developers for really low-level stuff; thus won't affect the users of the plugin at all) have been disabled and will be ignored due to an esoteric bug in the settings systems which has been scheduled to be fixed in the future releases.
|
- The Virtual Hand and the Wrist Tracker debug gizmos (the intended use is only for SenseGlove developers for really low-level stuff; thus won't affect the users of the plugin at all) have been disabled and will be ignored due to an esoteric bug in the settings systems which has been scheduled to be fixed in the future releases.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
@@ -45,16 +339,16 @@ This release breaks ABI/API compatibility with the previous versions.
|
|||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
- This is the last release to support Unreal Engine 4.27 and please keep in mind that the current release is not obtainable through the Unreal Engine Markplace. The latest published version on the Marketplace for 4.27 is v1.3.1. 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.
|
- This is the last release to support Unreal Engine 4.27 and please keep in mind that the current release is not obtainable through the Unreal Engine Marketplace. The latest published version on the Marketplace for 4.27 is v1.3.1. 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.
|
||||||
|
|
||||||
## [v1.3.1] - 2023-04-28
|
## [1.3.1] - 2023-04-28
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix RunUAT build issues caused by missing headers.
|
- Fix RunUAT build issues caused by missing headers.
|
||||||
- Minor documentation fixes.
|
- Minor documentation fixes.
|
||||||
|
|
||||||
## [v1.3.0] - 2023-04-28
|
## [1.3.0] - 2023-04-28
|
||||||
|
|
||||||
This release breaks ABI/API compatibility with the previous versions in addition to breaking coordinates systems conversions between Unreal Engine and the SenseGlove libraries.
|
This release breaks ABI/API compatibility with the previous versions in addition to breaking coordinates systems conversions between Unreal Engine and the SenseGlove libraries.
|
||||||
|
|
||||||
@@ -65,7 +359,7 @@ This release breaks ABI/API compatibility with the previous versions in addition
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix the wrist tracker miscalculations for the Quest 2 controllers (other headsets might needs fixing as well, in that case future releases will address that).
|
- Fix the wrist tracker miscalculations for the Quest 2 controllers (other headsets might need fixing as well, in that case, future releases will address that).
|
||||||
- Minor code improvement and fixes.
|
- Minor code improvement and fixes.
|
||||||
- Minor documentation fixes.
|
- Minor documentation fixes.
|
||||||
|
|
||||||
@@ -75,13 +369,13 @@ This release breaks ABI/API compatibility with the previous versions in addition
|
|||||||
- Breaking changes in the SenseGlove/Unreal coordinates systems conversions due to underlying changes in the SenseGlove Core Libraries.
|
- Breaking changes in the SenseGlove/Unreal coordinates systems conversions due to underlying changes in the SenseGlove Core Libraries.
|
||||||
- SenseGlove libraries have been updated to v2.6.0-aac3d56.
|
- SenseGlove libraries have been updated to v2.6.0-aac3d56.
|
||||||
|
|
||||||
## [v1.2.1] - 2023-03-30
|
## [1.2.1] - 2023-03-30
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix RunUAT build issues with Android.
|
- Fix RunUAT build issues with Android.
|
||||||
|
|
||||||
## [v1.2.0] - 2023-03-28
|
## [1.2.0] - 2023-03-28
|
||||||
|
|
||||||
This release breaks ABI/API compatibility with the previous versions.
|
This release breaks ABI/API compatibility with the previous versions.
|
||||||
|
|
||||||
@@ -105,7 +399,7 @@ This release breaks ABI/API compatibility with the previous versions.
|
|||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- Removed a few thousands lines of archaic pre-public-release dead code.
|
- Removed a few thousand lines of archaic pre-public-release dead code.
|
||||||
- Dropped Android NDK r21b binaries used by the older engine versions.
|
- Dropped Android NDK r21b binaries used by the older engine versions.
|
||||||
- Purged the dead code for dropped engine versions by v1.1.1 (4.22, 4.23, 4.24, 4.25, and 4.26) that carried over to the current version.
|
- Purged the dead code for dropped engine versions by v1.1.1 (4.22, 4.23, 4.24, 4.25, and 4.26) that carried over to the current version.
|
||||||
- Removed redundant SGConnectImpl/SGPlatform.
|
- Removed redundant SGConnectImpl/SGPlatform.
|
||||||
@@ -137,7 +431,7 @@ This release breaks ABI/API compatibility with the previous versions.
|
|||||||
|
|
||||||
- Whitelist Android as a target platform.
|
- Whitelist Android as a target platform.
|
||||||
- Introduce Android support.
|
- Introduce Android support.
|
||||||
- Add third-pary library SGConnect for Android v1.1.0.
|
- Add third-party library SGConnect for Android v1.1.0.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@@ -179,7 +473,7 @@ This is a minor release focusing on adherence to the Unreal Engine Marketplace G
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Added the newly acquired Unreal Engine Market Place Offer ID to the .uplugin file.
|
- Added the newly acquired Unreal Engine Market Place Offer ID to the .uplugin file.
|
||||||
- List the dot files inside FilterPlugin.ini file as well.
|
- List the dotfiles inside the FilterPlugin.ini file as well.
|
||||||
- Add the copyright notice to the source files missing it.
|
- Add the copyright notice to the source files missing it.
|
||||||
- Add the SenseGlove SDK license to the third-party license file.
|
- Add the SenseGlove SDK license to the third-party license file.
|
||||||
|
|
||||||
@@ -203,4 +497,4 @@ This is a minor release focusing on adherence to the Unreal Engine Marketplace G
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
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.
|
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.
|
||||||
|
```
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ The SenseGlove plug-in for Unreal Engine is licensed under the terms of the MIT
|
|||||||
```
|
```
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 - 2023 SenseGlove
|
Copyright (c) 2020 - 2024 SenseGlove
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -8,15 +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** |
|
| | **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 |
|
| **5.4** | ❌ | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
|
||||||
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
| **5.3** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
|
||||||
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
| **5.2** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.2 | ✅ v2.0.2 |
|
||||||
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
| **5.1** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ⚠️ v2.0.1 | ✅ v2.0.2 |
|
||||||
|
| **5.0** | ❌ | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x (r21e) | ⚠️ v1.6.1 | ⚠️ v1.6.1 |
|
||||||
|
| **4.27** | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x (r21e) | ⚠️ v1.3.1 | ⚠️ v1.4.3 |
|
||||||
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
| **4.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.1 |
|
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||||
| **5.0** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r21e) | ✅ v1.4.1 | ✅ v1.4.1 |
|
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||||
| **5.1** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r25b) | ✅ v1.4.1 | ✅ v1.4.1 |
|
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||||
| **5.2** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r25b) | ✅ v1.4.1 | ✅ v1.4.1 |
|
| **4.22** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||||
|
|
||||||
* <code>✅</code> Supported
|
* <code>✅</code> Supported
|
||||||
* <code>⚠️</code> Not supported by the latest release and might be lacking features
|
* <code>⚠️</code> Not supported by the latest release and might be lacking features
|
||||||
@@ -24,12 +26,10 @@ This repository relies on Git LFS for storing binary blobs (e.g. third-party lib
|
|||||||
* <code>❓</code> Unknown or untested
|
* <code>❓</code> Unknown or untested
|
||||||
|
|
||||||
Remarks:
|
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.
|
* 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.
|
||||||
* Microsoft Visual Studio 2022 is not supported by Unreal Engine 4.22 through 4.26.
|
|
||||||
* All third-party libraries on Windows built against Windows SDK 10.0.
|
* 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.
|
* Oculus and VIVE 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.
|
||||||
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully, thus some older NDKs such as r14b.
|
|
||||||
* All third-party libraries target Android NDK API Level 29, thus any project relying on the plug-in should be build with the same NDK API Level.
|
* 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
|
## Changelog
|
||||||
@@ -52,6 +52,52 @@ The following modules are intended to be used by the C++ users of this plugin:
|
|||||||
|
|
||||||
Please note that modules postfixed with **Impl** are intended for interal use and are discouraged to be used by the users of the API. The modules postfixed with **Kismet** are exposing the functionality of the equivalent modules to Blueprints. For other modules descriptions, please see [the Directory Structure section](#directory-structure).
|
Please note that modules postfixed with **Impl** are intended for interal use and are discouraged to be used by the users of the API. The modules postfixed with **Kismet** are exposing the functionality of the equivalent modules to Blueprints. For other modules descriptions, please see [the Directory Structure section](#directory-structure).
|
||||||
|
|
||||||
|
## Planned Features Completion Status
|
||||||
|
|
||||||
|
### 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.
|
||||||
|
- [X] Support for GNU/Linux x64 as a deployment platform.
|
||||||
|
- [X] Support for GNU/Linux AArch64 as a deployment platform.
|
||||||
|
- [X] Support for Android as a deployment platform.
|
||||||
|
- [X] Support for Oculus Quest 2 and Oculus Quest Pro.
|
||||||
|
- [X] Support for HTC VIVE Pro and HTC VIVE Focus 3.
|
||||||
|
- [X] Support for HTC VIVE Trackers and HTC VIVE Wrist Trackers.
|
||||||
|
- [X] On-device calibration for Android without the need for SenseCom.
|
||||||
|
- [X] Haptic feedback including force feedback, buzz, and thumper commands.
|
||||||
|
- [X] A customizable Grab component that could be added to any actor.
|
||||||
|
- [X] A customizable Touch component that could be added to any actor.
|
||||||
|
- [X] Ability to grab, release, and throw objects around.
|
||||||
|
- [X] Separation of the real and virtual hand rendering.
|
||||||
|
- [X] An out-of-the-box customizable SGPawn with the ability to be extended in C++ and Blueprint.
|
||||||
|
- [X] Easy wrist/hand tracking debugging using the SenseGlove Debug module.
|
||||||
|
- [X] A generic Settings module with the ability to override settings.
|
||||||
|
- [X] C++/Blueprint interaction events such as OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch.
|
||||||
|
- [X] A default hand mesh rigged with the standard SenseGlove default hand pose.
|
||||||
|
|
||||||
|
### Upcoming features planned for the v2.1.0 release
|
||||||
|
|
||||||
|
- [ ] Hand tracking compatible with OpenXR (or other generic hand tracking format).
|
||||||
|
|
||||||
|
### Planned features long-term
|
||||||
|
|
||||||
|
- [ ] Get tracking input from sources other than a SenseGlove device.
|
||||||
|
- [ ] Be able to assign behaviors to different objects (meshes) in the scene (e.g. Slider, Hinge, basic Grabables, etc).
|
||||||
|
- [ ] Make it so developers can define or extend their own behavior(s) to an object through Code / Blueprints (e.g. I want a car door that is like a slider, but follows a path rather than a straight line).
|
||||||
|
- [ ] Make the hand(s) able to push around physics-driven objects (for as much as their behaviors allow) (in backlog).
|
||||||
|
- [ ] Be able to grab objects with up to 2 hands (and move them around with both hands at the same time in a way that seems realistic).
|
||||||
|
- [ ] Ensure that our virtual hands (and the objects they hold) do not phase through other physics objects (e.g. walls and tables).
|
||||||
|
- [ ] Allow other scripts to force a grab and/or release to occur (for example, when you place it apart at the designated location, it gets removed from your hand and snaps into place).
|
||||||
|
- [ ] Have some form of weight simulation by making certain objects harder to push, lowering manipulation speed, or making objects only moveable with two hands.
|
||||||
|
- [ ] (Optional) Make it so the fingers of your virtual hands do not clip inside the meshes you are holding (certain people see this as an indicator of how fast the Force-Feedback activates - but it's basically just rendering).
|
||||||
|
|
||||||
## Directory Structure
|
## Directory Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -67,6 +113,10 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
|||||||
│
|
│
|
||||||
├── SenseGloveAndroid (the Android-specific module)
|
├── 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)
|
├── SenseGloveBuildHacks (uses Exceptions and RTTI, internally used for compiler-specific build hacks)
|
||||||
│
|
│
|
||||||
├── SenseGloveConnect (exposes part of the SGConnect low-level API to C++)
|
├── SenseGloveConnect (exposes part of the SGConnect low-level API to C++)
|
||||||
@@ -119,32 +169,6 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
|||||||
│
|
│
|
||||||
├── android
|
├── 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)
|
│ └── r25b (Android NDK r21b dependencies for UE 5.1)
|
||||||
│ │
|
│ │
|
||||||
│ ├── arm64 (64-bit ARM variant of Android)
|
│ ├── arm64 (64-bit ARM variant of Android)
|
||||||
@@ -173,20 +197,6 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
|||||||
│
|
│
|
||||||
├── linux
|
├── linux
|
||||||
│ │
|
│ │
|
||||||
│ ├── v19 (UE 4.27 Linux dependencies)
|
|
||||||
│ │ │
|
|
||||||
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
|
||||||
│ │ │ │
|
|
||||||
│ │ │ ├── debug
|
|
||||||
│ │ │ │
|
|
||||||
│ │ │ └── release
|
|
||||||
│ │ │
|
|
||||||
│ │ └── x86-64 (dependencies targeting x86-64 Linux architecture)
|
|
||||||
│ │ │
|
|
||||||
│ │ ├── debug
|
|
||||||
│ │ │
|
|
||||||
│ │ └── release
|
|
||||||
│ │
|
|
||||||
│ ├── v20 (UE 5.0 and 5.1 Linux dependencies)
|
│ ├── v20 (UE 5.0 and 5.1 Linux dependencies)
|
||||||
│ │ │
|
│ │ │
|
||||||
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
||||||
@@ -201,7 +211,21 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
|||||||
│ │ │
|
│ │ │
|
||||||
│ │ └── release
|
│ │ └── release
|
||||||
│ │
|
│ │
|
||||||
│ └── v21 (UE 5.2 Linux dependencies)
|
│ ├── v21 (UE 5.2 Linux dependencies)
|
||||||
|
│ │ │
|
||||||
|
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ ├── debug
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ └── release
|
||||||
|
│ │ │
|
||||||
|
│ │ └── x86-64 (dependencies targeting x86-64 Linux architecture)
|
||||||
|
│ │ │
|
||||||
|
│ │ ├── debug
|
||||||
|
│ │ │
|
||||||
|
│ │ └── release
|
||||||
|
│ │
|
||||||
|
│ └── v22 (UE 5.3 Linux dependencies)
|
||||||
│ │
|
│ │
|
||||||
│ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
│ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
|
||||||
│ │ │
|
│ │ │
|
||||||
@@ -216,12 +240,6 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
|||||||
│ └── release
|
│ └── release
|
||||||
│
|
│
|
||||||
└── win64
|
└── win64
|
||||||
│
|
|
||||||
├── msvc141 (Microsoft Visual Studio 2017 dependencies)
|
|
||||||
│ │
|
|
||||||
│ ├── debug
|
|
||||||
│ │
|
|
||||||
│ └── release
|
|
||||||
│
|
│
|
||||||
├── msvc142 (Microsoft Visual Studio 2019 dependencies)
|
├── msvc142 (Microsoft Visual Studio 2019 dependencies)
|
||||||
│ │
|
│ │
|
||||||
|
|||||||
+35
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"FileVersion": 3,
|
"FileVersion": 3,
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"VersionName": "1.4.1",
|
"VersionName": "2.0.2",
|
||||||
"FriendlyName": "SenseGlove",
|
"FriendlyName": "SenseGlove",
|
||||||
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
||||||
"Category": "Virtual Reality",
|
"Category": "Virtual Reality",
|
||||||
@@ -42,6 +42,28 @@
|
|||||||
"Win64"
|
"Win64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Name": "SenseGloveBackend",
|
||||||
|
"Type": "Runtime",
|
||||||
|
"LoadingPhase": "PreDefault",
|
||||||
|
"WhitelistPlatforms": [
|
||||||
|
"Android",
|
||||||
|
"Linux",
|
||||||
|
"LinuxArm64",
|
||||||
|
"Win64"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "SenseGloveBackendKismet",
|
||||||
|
"Type": "Runtime",
|
||||||
|
"LoadingPhase": "PreDefault",
|
||||||
|
"WhitelistPlatforms": [
|
||||||
|
"Android",
|
||||||
|
"Linux",
|
||||||
|
"LinuxArm64",
|
||||||
|
"Win64"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "SenseGloveBuildHacks",
|
"Name": "SenseGloveBuildHacks",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
@@ -217,5 +239,16 @@
|
|||||||
"Win64"
|
"Win64"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"Plugins": [
|
||||||
|
{
|
||||||
|
"Name": "OpenXR",
|
||||||
|
"Enabled": true,
|
||||||
|
"PlatformAllowList": [
|
||||||
|
"Android",
|
||||||
|
"Linux",
|
||||||
|
"Win64"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
#include "Engine/SkeletalMesh.h"
|
#include "Engine/SkeletalMesh.h"
|
||||||
#include "Math/Rotator.h"
|
#include "Math/Rotator.h"
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
#include "SGLog/SGLog.h"
|
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
|
#include "SGLog/SGLog.h"
|
||||||
|
|
||||||
FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy()
|
FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy()
|
||||||
: FAnimInstanceProxy()
|
: FAnimInstanceProxy()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -99,10 +99,10 @@ USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer
|
|||||||
: Super(ObjectInitializer),
|
: Super(ObjectInitializer),
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
{
|
{
|
||||||
BuzzLevel = 0;
|
ForceFeedbackLevel = 1.0f;
|
||||||
BuzzDuration = 0.25f;
|
|
||||||
|
|
||||||
ForceFeedbackLevel = 100;
|
VibrotactileDuration = 0.25f;
|
||||||
|
VibrotactileLevel = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
|
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -36,20 +36,16 @@
|
|||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
|
|
||||||
#include "Animation/Skeleton.h"
|
#include "Animation/Skeleton.h"
|
||||||
#include "Components/SphereComponent.h"
|
|
||||||
#include "Components/SkeletalMeshComponent.h"
|
#include "Components/SkeletalMeshComponent.h"
|
||||||
#include "Engine/SkeletalMesh.h"
|
#include "Engine/SkeletalMesh.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Templates/UnrealTypeTraits.h"
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
|
||||||
#include "UObject/ConstructorHelpers.h"
|
#include "UObject/ConstructorHelpers.h"
|
||||||
|
|
||||||
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
|
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
|
||||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||||
#include "SGConnect/SGConnect.h"
|
#include "SGBackend/SGBackend.h"
|
||||||
#include "SGCore/SGDeviceList.h"
|
|
||||||
#include "SGCore/SGHandPose.h"
|
#include "SGCore/SGHandPose.h"
|
||||||
#include "SGCore/SGHapticGlove.h"
|
#include "SGCore/SGHapticGlove.h"
|
||||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
|
||||||
#include "SGDebug/SGDebugVirtualHand.h"
|
#include "SGDebug/SGDebugVirtualHand.h"
|
||||||
#include "SGLog/SGLog.h"
|
#include "SGLog/SGLog.h"
|
||||||
|
|
||||||
@@ -61,29 +57,29 @@ struct USGVirtualHandComponent::FImpl
|
|||||||
|
|
||||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
|
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
|
||||||
{
|
{
|
||||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
|
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")};
|
||||||
return Path;
|
return Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
|
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
|
||||||
{
|
{
|
||||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
|
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")};
|
||||||
return Path;
|
return Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
|
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
|
||||||
{
|
{
|
||||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
|
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")};
|
||||||
return Path;
|
return Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
|
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
|
||||||
{
|
{
|
||||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
|
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")};
|
||||||
return Path;
|
return Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,6 +110,7 @@ struct USGVirtualHandComponent::FImpl
|
|||||||
bool IsEditor() const;
|
bool IsEditor() const;
|
||||||
|
|
||||||
FString GetDefaultMeshPath() const;
|
FString GetDefaultMeshPath() const;
|
||||||
|
bool IsUsingDefaultMesh() const;
|
||||||
bool IsUsingUserMesh() const;
|
bool IsUsingUserMesh() const;
|
||||||
USkeletalMesh* LoadDefaultMesh() const;
|
USkeletalMesh* LoadDefaultMesh() const;
|
||||||
void SetDefaultMesh() const;
|
void SetDefaultMesh() const;
|
||||||
@@ -122,11 +119,12 @@ struct USGVirtualHandComponent::FImpl
|
|||||||
USkeleton* GetSkeleton() const;
|
USkeleton* GetSkeleton() const;
|
||||||
const FReferenceSkeleton& GetRefSkeleton() const;
|
const FReferenceSkeleton& GetRefSkeleton() const;
|
||||||
|
|
||||||
bool InitializeBackend() const;
|
|
||||||
bool UninitializeBackend() const;
|
|
||||||
bool CheckGlove() const;
|
bool CheckGlove() const;
|
||||||
|
|
||||||
void SetVisibility(bool bInVisible) const;
|
FORCEINLINE void SetVisibility(const bool bInVisible) const
|
||||||
|
{
|
||||||
|
Owner->SetVisibility(bInVisible, true);
|
||||||
|
}
|
||||||
|
|
||||||
void DrawDebugVirtualHand() const;
|
void DrawDebugVirtualHand() const;
|
||||||
};
|
};
|
||||||
@@ -209,10 +207,11 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
|||||||
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
|
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
|
||||||
|
|
||||||
bRight = true;
|
bRight = true;
|
||||||
|
bHiddenInGameIfNoGloveDetected = false;
|
||||||
|
|
||||||
bAutoStopAllHapticsOnEndPlay = true;
|
bAutoStopAllHapticsOnEndPlay = true;
|
||||||
|
|
||||||
GrabSocketName = FName{TEXT("GrabPoint")};
|
GrabSocketName = FName{TEXT("GenericGrabPoint")};
|
||||||
|
|
||||||
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
|
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
|
||||||
|
|
||||||
@@ -228,9 +227,8 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
|||||||
RingFingertipTouchSocketName = FName{TEXT("TouchRingFingertip")};
|
RingFingertipTouchSocketName = FName{TEXT("TouchRingFingertip")};
|
||||||
PinkyFingertipTouchSocketName = FName{TEXT("TouchPinkyFingertip")};
|
PinkyFingertipTouchSocketName = FName{TEXT("TouchPinkyFingertip")};
|
||||||
|
|
||||||
bHiddenInGameIfNoGloveDetected = false;
|
|
||||||
|
|
||||||
DebugVirtualHandSettings = FSGDebugVirtualHandSettings{
|
DebugVirtualHandSettings = FSGDebugVirtualHandSettings{
|
||||||
|
false,
|
||||||
ESGDebugVirtualHandDrawingMode::None,
|
ESGDebugVirtualHandDrawingMode::None,
|
||||||
FVector(0.5f, 0.5f, 0.5f),
|
FVector(0.5f, 0.5f, 0.5f),
|
||||||
FColor(255, 0, 0, 255),
|
FColor(255, 0, 0, 255),
|
||||||
@@ -243,7 +241,6 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
|||||||
|
|
||||||
Super::SetSkeletalMesh(nullptr, true);
|
Super::SetSkeletalMesh(nullptr, true);
|
||||||
|
|
||||||
bBackendInitialized = false;
|
|
||||||
Glove = nullptr;
|
Glove = nullptr;
|
||||||
WristTracker = nullptr;
|
WristTracker = nullptr;
|
||||||
}
|
}
|
||||||
@@ -260,7 +257,7 @@ void USGVirtualHandComponent::SetRight(const bool bInRight)
|
|||||||
|
|
||||||
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
|
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!"));
|
TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!"));
|
||||||
|
|
||||||
Super::SetAnimClass(NewClass);
|
Super::SetAnimClass(NewClass);
|
||||||
@@ -305,27 +302,24 @@ void USGVirtualHandComponent::InitializeComponent()
|
|||||||
Pimpl->SetDefaultMesh();
|
Pimpl->SetDefaultMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pimpl->InitializeBackend())
|
(void) Pimpl->CheckGlove();
|
||||||
{
|
|
||||||
(void) Pimpl->CheckGlove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::UninitializeComponent()
|
void USGVirtualHandComponent::UninitializeComponent()
|
||||||
{
|
{
|
||||||
Super::UninitializeComponent();
|
Super::UninitializeComponent();
|
||||||
|
|
||||||
(void) Pimpl->UninitializeBackend();
|
if (IsValid(Glove) && AutoStopsAllHapticsOnEndPlay())
|
||||||
|
{
|
||||||
|
Glove->StopHaptics();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::BeginPlay()
|
void USGVirtualHandComponent::BeginPlay()
|
||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
if (Pimpl->InitializeBackend())
|
(void) Pimpl->CheckGlove();
|
||||||
{
|
|
||||||
(void) Pimpl->CheckGlove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||||
@@ -336,8 +330,6 @@ void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
|||||||
{
|
{
|
||||||
Glove->StopHaptics();
|
Glove->StopHaptics();
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) Pimpl->UninitializeBackend();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::TickComponent(
|
void USGVirtualHandComponent::TickComponent(
|
||||||
@@ -395,13 +387,7 @@ USGHandPose* USGVirtualHandComponent::GetHandPose()
|
|||||||
|
|
||||||
if (IsValid(Glove))
|
if (IsValid(Glove))
|
||||||
{
|
{
|
||||||
#if ! PLATFORM_ANDROID
|
|
||||||
Glove->GetHandPose(this, HandPose);
|
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;
|
return HandPose;
|
||||||
@@ -437,8 +423,8 @@ const FTransform& USGVirtualHandComponent::GetFingerBoneRefTransform(const int32
|
|||||||
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
|
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
|
||||||
{
|
{
|
||||||
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
|
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
|
||||||
FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
|
const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
|
||||||
return MoveTemp(BoneRotation);
|
return BoneRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||||
@@ -447,16 +433,16 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
|||||||
|
|
||||||
if (!IsGloveConnected())
|
if (!IsGloveConnected())
|
||||||
{
|
{
|
||||||
return MoveTemp(Rotations);
|
return Rotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
const USGHandPose* HandPose = GetHandPose();
|
const USGHandPose* HandPose = GetHandPose();
|
||||||
if (!IsValid(HandPose))
|
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)
|
for (int32 FingerIndex = 0; FingerIndex < HandAngles.Num(); ++FingerIndex)
|
||||||
{
|
{
|
||||||
@@ -465,7 +451,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
|||||||
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
|
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
|
||||||
{
|
{
|
||||||
const FVector& JointAngle{FingerJointAngles[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)};
|
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
|
||||||
|
|
||||||
@@ -477,7 +463,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MoveTemp(Rotations);
|
return Rotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
|
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
|
||||||
@@ -511,7 +497,31 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
|
|||||||
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
|
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
return MoveTemp(SkeletalMeshPath);
|
return SkeletalMeshPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() const
|
||||||
|
{
|
||||||
|
const USkeletalMesh* CurrentMesh{GetMesh()};
|
||||||
|
if (!IsValid(CurrentMesh))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const FString CurrentMeshPath(CurrentMesh->GetPathName());
|
||||||
|
const FString LeftHandDefaultMeshPath(GetDefaultLeftHandMeshPath());
|
||||||
|
const FString LeftHandDefaultMeshPathOnly(GetDefaultLeftHandMeshPathOnly());
|
||||||
|
const FString RightHandDefaultMeshPath(GetDefaultRightHandMeshPath());
|
||||||
|
const FString RightHandDefaultMeshPathOnly(GetDefaultRightHandMeshPathOnly());
|
||||||
|
if (CurrentMeshPath == LeftHandDefaultMeshPath
|
||||||
|
|| CurrentMeshPath == LeftHandDefaultMeshPathOnly
|
||||||
|
|| CurrentMeshPath == RightHandDefaultMeshPath
|
||||||
|
|| CurrentMeshPath == RightHandDefaultMeshPathOnly)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const
|
bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const
|
||||||
@@ -560,13 +570,7 @@ void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
|
|||||||
|
|
||||||
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
|
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
|
||||||
{
|
{
|
||||||
return Owner->
|
return Owner->GetSkeletalMeshAsset();
|
||||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
|
|
||||||
GetSkeletalMeshAsset()
|
|
||||||
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
|
||||||
SkeletalMesh
|
|
||||||
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
|
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
|
||||||
@@ -583,114 +587,29 @@ const FReferenceSkeleton& USGVirtualHandComponent::FImpl::GetRefSkeleton() const
|
|||||||
return Mesh->GetRefSkeleton();
|
return Mesh->GetRefSkeleton();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USGVirtualHandComponent::FImpl::InitializeBackend() const
|
|
||||||
{
|
|
||||||
if (!Owner->bBackendInitialized)
|
|
||||||
{
|
|
||||||
#if PLATFORM_ANDROID
|
|
||||||
const int32_t Result = FSGConnect::Init();
|
|
||||||
switch (Result)
|
|
||||||
{
|
|
||||||
case -3:
|
|
||||||
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
|
||||||
return false;
|
|
||||||
case -2:
|
|
||||||
SGLOG_ERROR("Device Scanning is already running within a different program.");
|
|
||||||
return false;
|
|
||||||
case -1:
|
|
||||||
SGLOG_ERROR("Device Scanning already being initialized (function called twice in short succession).");
|
|
||||||
return false;
|
|
||||||
case 0:
|
|
||||||
// Do not pollute the logs!
|
|
||||||
//SGLOG_ERROR("Device Scanning is already running within this program.");
|
|
||||||
// We must return here in case there are two virtual hand components are present in the scene.
|
|
||||||
return true;
|
|
||||||
case 1:
|
|
||||||
SGLOG("Successfully started up DeviceScanning from the current program.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ensureAlwaysMsgf(false, TEXT("Unhandled Init return status code!"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* PLATFORM_ANDROID */
|
|
||||||
|
|
||||||
// Ensure that the device list is empty before doing anything.
|
|
||||||
FSGDeviceList::Dispose();
|
|
||||||
FSGDeviceList::Reinitialize();
|
|
||||||
|
|
||||||
// Load the latest hand profiles.
|
|
||||||
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
|
|
||||||
|
|
||||||
Owner->bBackendInitialized = true;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool USGVirtualHandComponent::FImpl::UninitializeBackend() const
|
|
||||||
{
|
|
||||||
// NOTE
|
|
||||||
// In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand
|
|
||||||
// to disappear in the editor as the plugin won't be able to retrieve the glove status anymore.
|
|
||||||
#if ! WITH_EDITOR
|
|
||||||
if (Owner->bBackendInitialized)
|
|
||||||
{
|
|
||||||
FSGDeviceList::Dispose();
|
|
||||||
|
|
||||||
#if PLATFORM_ANDROID
|
|
||||||
const int32_t Result = FSGConnect::Dispose();
|
|
||||||
switch (Result)
|
|
||||||
{
|
|
||||||
case -3:
|
|
||||||
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
|
||||||
return false;
|
|
||||||
case -2:
|
|
||||||
SGLOG_ERROR("Not allowed to dispose of Device Scanning because this is not the program which started it.");
|
|
||||||
return false;
|
|
||||||
case -1:
|
|
||||||
SGLOG_ERROR("Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).");
|
|
||||||
return false;
|
|
||||||
case 0:
|
|
||||||
SGLOG_ERROR("There is no deviceScanner running from any program, so disposing is skipped.");
|
|
||||||
return false;
|
|
||||||
case 1:
|
|
||||||
SGLOG("Successfully disposed of DeviceScanner resources.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ensureAlwaysMsgf(false, TEXT("Unhandled Dispose return status code!"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* PLATFORM_ANDROID */
|
|
||||||
|
|
||||||
Owner->bBackendInitialized = false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif /* ! WITH_EDITOR */
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
||||||
{
|
{
|
||||||
if (!Owner->bBackendInitialized)
|
if (!USGBackend::GetInstance()->IsBackendInitialized())
|
||||||
{
|
{
|
||||||
const bool bSucceeded = InitializeBackend();
|
const bool bSucceeded = USGBackend::GetInstance()->InitializeBackend();
|
||||||
if (!bSucceeded)
|
if (!bSucceeded)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool bGloveWasPresent = IsValid(Owner->Glove);
|
bool bGloveConnected;
|
||||||
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
|
||||||
|
|
||||||
if (!bFoundGlove && bGloveWasPresent)
|
|
||||||
{
|
{
|
||||||
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
|
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||||
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
|
if (!bGloveConnected)
|
||||||
|
{
|
||||||
|
Owner->Glove = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bGloveConnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool bIsEditor = IsEditor();
|
const bool bIsEditor = IsEditor();
|
||||||
@@ -699,7 +618,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
|||||||
const bool bIsVisible = Owner->IsVisible();
|
const bool bIsVisible = Owner->IsVisible();
|
||||||
if (Owner->bHiddenInGameIfNoGloveDetected)
|
if (Owner->bHiddenInGameIfNoGloveDetected)
|
||||||
{
|
{
|
||||||
if (bFoundGlove)
|
if (bGloveConnected)
|
||||||
{
|
{
|
||||||
if (!bIsVisible)
|
if (!bIsVisible)
|
||||||
{
|
{
|
||||||
@@ -723,12 +642,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bFoundGlove;
|
return bGloveConnected;
|
||||||
}
|
|
||||||
|
|
||||||
void USGVirtualHandComponent::FImpl::SetVisibility(const bool bInVisible) const
|
|
||||||
{
|
|
||||||
Owner->SetVisibility(bInVisible, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
|
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
|
||||||
@@ -752,11 +666,8 @@ void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
|
|||||||
const TArray<TArray<FVector>>& JointPositions{HandPose->GetJointPositions()};
|
const TArray<TArray<FVector>>& JointPositions{HandPose->GetJointPositions()};
|
||||||
const TArray<TArray<FRotator>>& JointRotations{HandPose->GetJointRotations()};
|
const TArray<TArray<FRotator>>& JointRotations{HandPose->GetJointRotations()};
|
||||||
|
|
||||||
/// FIXME
|
FSGDebugVirtualHand::Draw(World, WristLocation, WristRotation, JointPositions, JointRotations,
|
||||||
/// We temporarily ignore the debug settings, as for an esoteric reason it always produces conditions,
|
Owner->DebugVirtualHandSettings);
|
||||||
/// in which the debug gizmo will be drawn!
|
|
||||||
//FSGDebugVirtualHand::Draw(World, WristLocation, WristRotation, JointPositions, JointRotations,
|
|
||||||
// Owner->DebugVirtualHandSettings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGVirtualHandComponent::FImplDeleter::operator()(const FImpl* P) const
|
void USGVirtualHandComponent::FImplDeleter::operator()(const FImpl* P) const
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -40,10 +40,8 @@
|
|||||||
#include "Engine/SkeletalMesh.h"
|
#include "Engine/SkeletalMesh.h"
|
||||||
#include "UObject/ConstructorHelpers.h"
|
#include "UObject/ConstructorHelpers.h"
|
||||||
|
|
||||||
#include "SGConnect/SGConnect.h"
|
#include "SGBackend/SGBackend.h"
|
||||||
#include "SGCore/SGDeviceList.h"
|
|
||||||
#include "SGCore/SGHapticGlove.h"
|
#include "SGCore/SGHapticGlove.h"
|
||||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
|
||||||
#include "SGDebug/SGDebugGizmo.h"
|
#include "SGDebug/SGDebugGizmo.h"
|
||||||
#include "SGLog/SGLog.h"
|
#include "SGLog/SGLog.h"
|
||||||
#include "SGSettings/SGSettings.h"
|
#include "SGSettings/SGSettings.h"
|
||||||
@@ -80,10 +78,9 @@ struct USGWristTrackerComponent::FImpl
|
|||||||
|
|
||||||
bool IsEditor() const;
|
bool IsEditor() const;
|
||||||
|
|
||||||
bool InitializeBackend() const;
|
|
||||||
bool UninitializeBackend() const;
|
|
||||||
bool CheckGlove() const;
|
bool CheckGlove() const;
|
||||||
|
|
||||||
|
void UpdateMotionSource() const;
|
||||||
void UpdateWristTrackingData() const;
|
void UpdateWristTrackingData() const;
|
||||||
void DrawDebugGizmo();
|
void DrawDebugGizmo();
|
||||||
};
|
};
|
||||||
@@ -106,165 +103,61 @@ USGWristTrackerComponent::USGWristTrackerComponent(const FObjectInitializer& Obj
|
|||||||
SetReceivesDecals(false);
|
SetReceivesDecals(false);
|
||||||
SetCanEverAffectNavigation(false);
|
SetCanEverAffectNavigation(false);
|
||||||
|
|
||||||
SetRight(true);
|
|
||||||
|
|
||||||
bOverridePluginWristTrackingSettings = false;
|
bOverridePluginWristTrackingSettings = false;
|
||||||
bDrawWristTrackerDebugGizmo = false;
|
WristTrackingSettings = FSGWristTrackingSettings(
|
||||||
TrackingHardware = ESGPositionalTrackingHardware::None;
|
ESGPositionalTrackingHardware::None,
|
||||||
TrackingHardwareLocationOffset = FVector::ZeroVector;
|
FVector::ZeroVector,
|
||||||
TrackingHardwareLocationOffset = FVector::ZeroVector;
|
FVector::ZeroVector,
|
||||||
|
FRotator::ZeroRotator,
|
||||||
bOverridePluginWristTrackingDebugSettings = false;
|
FRotator::ZeroRotator,
|
||||||
bDrawWristTrackerDebugGizmo = false;
|
EControllerHand::Left,
|
||||||
WristTrackerDebugGizmoSettings = FSGDebugGizmoSettings(
|
EControllerHand::Right,
|
||||||
4.0f, 1.0f,
|
false,
|
||||||
FColor(255, 0, 0, 255),
|
FSGDebugGizmoSettings(
|
||||||
FColor(0, 255, 0, 255),
|
4.0f, 1.0f,
|
||||||
FColor(0, 0, 255, 255),
|
FColor(255, 0, 0, 255),
|
||||||
false, 1.1f, 0
|
FColor(0, 255, 0, 255),
|
||||||
|
FColor(0, 0, 255, 255),
|
||||||
|
false, 1.1f, 0
|
||||||
|
)
|
||||||
);
|
);
|
||||||
bDrawWristTrackerDebugGizmo = false;
|
|
||||||
|
|
||||||
bBackendInitialized = false;
|
bRight = true;
|
||||||
|
|
||||||
Glove = nullptr;
|
Glove = nullptr;
|
||||||
WristLocation = FVector::ZeroVector;
|
WristLocation = FVector::ZeroVector;
|
||||||
WristRotation = FRotator::ZeroRotator;
|
WristRotation = FRotator::ZeroRotator;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetRight(const bool bRight)
|
void USGWristTrackerComponent::SetRight(const bool bInRight)
|
||||||
{
|
{
|
||||||
SetTrackingSource(bRight ? EControllerHand::Right : EControllerHand::Left);
|
bRight = bInRight;
|
||||||
|
Pimpl->UpdateMotionSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
ESGPositionalTrackingHardware USGWristTrackerComponent::GetTrackingHardware() const
|
const FSGWristTrackingSettings& USGWristTrackerComponent::GetWristTrackingSettings() const
|
||||||
{
|
{
|
||||||
if (OverridesPluginWristTrackingSettings())
|
if (OverridesPluginWristTrackingSettings())
|
||||||
{
|
{
|
||||||
return TrackingHardware;
|
return WristTrackingSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
return USGSettings::GetInstance()->GetTrackingHardware();
|
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||||
|
if (!ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")))
|
||||||
|
{
|
||||||
|
return WristTrackingSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Settings->GetWristTrackingSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetTrackingHardware(const ESGPositionalTrackingHardware InTrackingHardware)
|
void USGWristTrackerComponent::SetWristTrackingSettings(const FSGWristTrackingSettings& InWristTrackingSettings)
|
||||||
{
|
{
|
||||||
ensureAlwaysMsgf(
|
ensureAlwaysMsgf(
|
||||||
OverridesPluginWristTrackingSettings(),
|
OverridesPluginWristTrackingSettings(),
|
||||||
TEXT( "Setting TrackingHardware is only permitted when bOverridePluginWristTrackingSettings is enabled!"));
|
TEXT( "Setting WristTrackingSettings is only permitted when bOverridePluginWristTrackingSettings is enabled!"));
|
||||||
|
|
||||||
TrackingHardware = InTrackingHardware;
|
WristTrackingSettings = InWristTrackingSettings;
|
||||||
}
|
|
||||||
|
|
||||||
const FVector& USGWristTrackerComponent::GetTrackingHardwareLocationOffset() const
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
|
|
||||||
TEXT( "Getting TrackingHardwareLocationOffset is only permitted when TrackingHardware is set to Custom!"));
|
|
||||||
|
|
||||||
if (OverridesPluginWristTrackingSettings())
|
|
||||||
{
|
|
||||||
return TrackingHardwareLocationOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
return IsRight()
|
|
||||||
? USGSettings::GetInstance()->GetTrackingHardwareLocationOffsetRightHand()
|
|
||||||
: USGSettings::GetInstance()->GetTrackingHardwareLocationOffsetLeftHand();
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetTrackingHardwareLocationOffset(const FVector& InTrackingHardwareLocationOffset)
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
OverridesPluginWristTrackingSettings(),
|
|
||||||
TEXT(
|
|
||||||
"Setting TrackingHardwareLocationOffset is only permitted when bOverridePluginWristTrackingSettings is enabled!"
|
|
||||||
));
|
|
||||||
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
|
|
||||||
TEXT( "Setting TrackingHardwareLocationOffset is only permitted when TrackingHardware is set to Custom!"));
|
|
||||||
|
|
||||||
TrackingHardwareLocationOffset = InTrackingHardwareLocationOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FRotator& USGWristTrackerComponent::GetTrackingHardwareRotationOffset() const
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
|
|
||||||
TEXT( "Getting TrackingHardwareRotationOffset is only permitted when TrackingHardware is set to Custom!"));
|
|
||||||
|
|
||||||
if (OverridesPluginWristTrackingSettings())
|
|
||||||
{
|
|
||||||
return TrackingHardwareRotationOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
return IsRight()
|
|
||||||
? USGSettings::GetInstance()->GetTrackingHardwareRotationOffsetRightHand()
|
|
||||||
: USGSettings::GetInstance()->GetTrackingHardwareRotationOffsetLeftHand();
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetTrackingHardwareRotationOffset(const FRotator& InTrackingHardwareRotationOffset)
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
OverridesPluginWristTrackingSettings(),
|
|
||||||
TEXT(
|
|
||||||
"Setting TrackingHardwareRotationOffset is only permitted when bOverridePluginWristTrackingSettings is enabled!"
|
|
||||||
));
|
|
||||||
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
|
|
||||||
TEXT("Setting TrackingHardwareRotationOffsetRightHand is only permitted when TrackingHardware is set to Custom!"
|
|
||||||
));
|
|
||||||
|
|
||||||
TrackingHardwareRotationOffset = InTrackingHardwareRotationOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool USGWristTrackerComponent::GetDrawWristTrackerDebugGizmo() const
|
|
||||||
{
|
|
||||||
if (OverridesPluginWristTrackingDebugSettings())
|
|
||||||
{
|
|
||||||
return !!bDrawWristTrackerDebugGizmo;
|
|
||||||
}
|
|
||||||
|
|
||||||
return USGSettings::GetInstance()->GetDrawWristTrackerDebugGizmo();
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetDrawWristTrackerDebugGizmo(const bool bInDrawWristTrackerDebugGizmo)
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
OverridesPluginWristTrackingDebugSettings(),
|
|
||||||
TEXT( "Setting bDrawWristTrackerDebugGizmo is only permitted when bOverridePluginWristTrackingDebugSettings is"
|
|
||||||
" enabled!"));
|
|
||||||
|
|
||||||
bDrawWristTrackerDebugGizmo = bInDrawWristTrackerDebugGizmo;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FSGDebugGizmoSettings& USGWristTrackerComponent::GetWristTrackerDebugGizmoSettings() const
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetDrawWristTrackerDebugGizmo(),
|
|
||||||
TEXT("Getting WristTrackerDebugGizmoLength is only permitted when bDrawWristTrackerDebugGizmo is enabled!"));
|
|
||||||
|
|
||||||
if (OverridesPluginWristTrackingDebugSettings())
|
|
||||||
{
|
|
||||||
return WristTrackerDebugGizmoSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
return USGSettings::GetInstance()->GetWristTrackerDebugGizmoSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::SetWristTrackerDebugGizmoSettings(
|
|
||||||
const FSGDebugGizmoSettings& InWristTrackerDebugGizmoSettings)
|
|
||||||
{
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
OverridesPluginWristTrackingDebugSettings(),
|
|
||||||
TEXT("Setting WristTrackerDebugGizmoLength is only permitted when bOverridePluginWristTrackingDebugSettings is"
|
|
||||||
" enabled!"));
|
|
||||||
|
|
||||||
ensureAlwaysMsgf(
|
|
||||||
GetDrawWristTrackerDebugGizmo(),
|
|
||||||
TEXT("Setting WristTrackerDebugGizmoLength is only permitted when bDrawWristTrackerDebugGizmo is enabled!"));
|
|
||||||
|
|
||||||
WristTrackerDebugGizmoSettings = InWristTrackerDebugGizmoSettings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
@@ -286,34 +179,18 @@ void USGWristTrackerComponent::InitializeComponent()
|
|||||||
{
|
{
|
||||||
Super::InitializeComponent();
|
Super::InitializeComponent();
|
||||||
|
|
||||||
if (Pimpl->InitializeBackend())
|
(void) Pimpl->CheckGlove();
|
||||||
{
|
|
||||||
(void) Pimpl->CheckGlove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::UninitializeComponent()
|
Pimpl->UpdateMotionSource();
|
||||||
{
|
|
||||||
Super::UninitializeComponent();
|
|
||||||
|
|
||||||
(void) Pimpl->UninitializeBackend();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::BeginPlay()
|
void USGWristTrackerComponent::BeginPlay()
|
||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
if (Pimpl->InitializeBackend())
|
(void) Pimpl->CheckGlove();
|
||||||
{
|
|
||||||
(void) Pimpl->CheckGlove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void USGWristTrackerComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
Pimpl->UpdateMotionSource();
|
||||||
{
|
|
||||||
Super::EndPlay(EndPlayReason);
|
|
||||||
|
|
||||||
(void) Pimpl->UninitializeBackend();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::TickComponent(
|
void USGWristTrackerComponent::TickComponent(
|
||||||
@@ -329,7 +206,7 @@ void USGWristTrackerComponent::TickComponent(
|
|||||||
|
|
||||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||||
|
|
||||||
if (GetDrawWristTrackerDebugGizmo())
|
if (!!WristTrackingSettings.bDrawWristTrackerDebugGizmo)
|
||||||
{
|
{
|
||||||
Pimpl->DrawDebugGizmo();
|
Pimpl->DrawDebugGizmo();
|
||||||
}
|
}
|
||||||
@@ -362,122 +239,43 @@ bool USGWristTrackerComponent::FImpl::IsEditor() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USGWristTrackerComponent::FImpl::InitializeBackend() const
|
|
||||||
{
|
|
||||||
if (!Owner->bBackendInitialized)
|
|
||||||
{
|
|
||||||
#if PLATFORM_ANDROID
|
|
||||||
const int32_t Result = FSGConnect::Init();
|
|
||||||
switch (Result)
|
|
||||||
{
|
|
||||||
case -3:
|
|
||||||
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
|
||||||
return false;
|
|
||||||
case -2:
|
|
||||||
SGLOG_ERROR("Device Scanning is already running within a different program.");
|
|
||||||
return false;
|
|
||||||
case -1:
|
|
||||||
SGLOG_ERROR("Device Scanning already being initialized (function called twice in short succession).");
|
|
||||||
return false;
|
|
||||||
case 0:
|
|
||||||
// Do not pollute the logs!
|
|
||||||
//SGLOG_ERROR("Device Scanning is already running within this program.");
|
|
||||||
// We must return here in case two virtual hand components are present in the scene.
|
|
||||||
return true;
|
|
||||||
case 1:
|
|
||||||
SGLOG("Successfully started up DeviceScanning from the current program.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ensureAlwaysMsgf(false, TEXT("Unhandled Init return status code!"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* PLATFORM_ANDROID */
|
|
||||||
|
|
||||||
// Ensure that the device list is empty before doing anything.
|
|
||||||
FSGDeviceList::Dispose();
|
|
||||||
FSGDeviceList::Reinitialize();
|
|
||||||
|
|
||||||
// Load the latest hand profiles.
|
|
||||||
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
|
|
||||||
|
|
||||||
Owner->bBackendInitialized = true;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool USGWristTrackerComponent::FImpl::UninitializeBackend() const
|
|
||||||
{
|
|
||||||
// NOTE
|
|
||||||
// In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand
|
|
||||||
// to disappear in the editor as the plugin won't be able to retrieve the glove status anymore.
|
|
||||||
#if ! WITH_EDITOR
|
|
||||||
if (Owner->bBackendInitialized)
|
|
||||||
{
|
|
||||||
FSGDeviceList::Dispose();
|
|
||||||
|
|
||||||
#if PLATFORM_ANDROID
|
|
||||||
const int32_t Result = FSGConnect::Dispose();
|
|
||||||
switch (Result)
|
|
||||||
{
|
|
||||||
case -3:
|
|
||||||
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
|
||||||
return false;
|
|
||||||
case -2:
|
|
||||||
SGLOG_ERROR("Not allowed to dispose of Device Scanning because this is not the program which started it.");
|
|
||||||
return false;
|
|
||||||
case -1:
|
|
||||||
SGLOG_ERROR("Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).");
|
|
||||||
return false;
|
|
||||||
case 0:
|
|
||||||
SGLOG_ERROR("There is no deviceScanner running from any program, so disposing is skipped.");
|
|
||||||
return false;
|
|
||||||
case 1:
|
|
||||||
SGLOG("Successfully disposed of DeviceScanner resources.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ensureAlwaysMsgf(false, TEXT("Unhandled Dispose return status code!"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* PLATFORM_ANDROID */
|
|
||||||
|
|
||||||
Owner->bBackendInitialized = false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif /* ! WITH_EDITOR */
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool USGWristTrackerComponent::FImpl::CheckGlove() const
|
bool USGWristTrackerComponent::FImpl::CheckGlove() const
|
||||||
{
|
{
|
||||||
if (!Owner->bBackendInitialized)
|
if (!USGBackend::GetInstance()->IsBackendInitialized())
|
||||||
{
|
{
|
||||||
const bool bSucceeded = InitializeBackend();
|
const bool bSucceeded = USGBackend::GetInstance()->InitializeBackend();
|
||||||
if (!bSucceeded)
|
if (!bSucceeded)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool bGloveWasPresent = IsValid(Owner->Glove);
|
bool bGloveConnected;
|
||||||
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
|
||||||
|
|
||||||
if (!bFoundGlove && bGloveWasPresent)
|
|
||||||
{
|
{
|
||||||
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
|
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||||
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
|
if (!bGloveConnected)
|
||||||
|
{
|
||||||
|
Owner->Glove = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (bFoundGlove)
|
|
||||||
{
|
{
|
||||||
|
bGloveConnected = true;
|
||||||
UpdateWristTrackingData();
|
UpdateWristTrackingData();
|
||||||
}
|
}
|
||||||
|
|
||||||
return bFoundGlove;
|
return bGloveConnected;
|
||||||
|
}
|
||||||
|
|
||||||
|
void USGWristTrackerComponent::FImpl::UpdateMotionSource() const
|
||||||
|
{
|
||||||
|
if (GEngine)
|
||||||
|
{
|
||||||
|
Owner->SetTrackingSource(Owner->IsRight()
|
||||||
|
? Owner->GetWristTrackingSettings().RightHandMotionSource
|
||||||
|
: Owner->GetWristTrackingSettings().LeftHandMotionSource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
|
void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
|
||||||
@@ -487,15 +285,23 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
|
|||||||
FVector TrackerLocation{Owner->GetComponentLocation()};
|
FVector TrackerLocation{Owner->GetComponentLocation()};
|
||||||
FRotator TrackerRotation{Owner->GetComponentRotation()};
|
FRotator TrackerRotation{Owner->GetComponentRotation()};
|
||||||
|
|
||||||
ESGPositionalTrackingHardware TrackerHardware = Owner->GetTrackingHardware();
|
ESGPositionalTrackingHardware TrackerHardware = Owner->GetWristTrackingSettings().TrackingHardware;
|
||||||
if (TrackerHardware == ESGPositionalTrackingHardware::None)
|
if (TrackerHardware == ESGPositionalTrackingHardware::None)
|
||||||
{
|
{
|
||||||
TrackerHardware = ESGPositionalTrackingHardware::Custom;
|
TrackerHardware = ESGPositionalTrackingHardware::Custom;
|
||||||
}
|
}
|
||||||
else if (TrackerHardware == ESGPositionalTrackingHardware::Custom)
|
else if (TrackerHardware == ESGPositionalTrackingHardware::Custom)
|
||||||
{
|
{
|
||||||
TrackerLocation += Owner->GetTrackingHardwareLocationOffset();
|
if (Owner->IsRight())
|
||||||
TrackerRotation += Owner->GetTrackingHardwareRotationOffset();
|
{
|
||||||
|
TrackerLocation += Owner->GetWristTrackingSettings().TrackingHardwareLocationOffsetRightHand;
|
||||||
|
TrackerRotation += Owner->GetWristTrackingSettings().TrackingHardwareRotationOffsetRightHand;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TrackerLocation += Owner->GetWristTrackingSettings().TrackingHardwareLocationOffsetLeftHand;
|
||||||
|
TrackerRotation += Owner->GetWristTrackingSettings().TrackingHardwareRotationOffsetLeftHand;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FVector NewWristLocation;
|
FVector NewWristLocation;
|
||||||
@@ -537,12 +343,9 @@ void USGWristTrackerComponent::FImpl::DrawDebugGizmo()
|
|||||||
const UWorld* World{Owner->GetWorld()};
|
const UWorld* World{Owner->GetWorld()};
|
||||||
const FVector& Location{Owner->GetComponentLocation()};
|
const FVector& Location{Owner->GetComponentLocation()};
|
||||||
const FRotator& Rotation{Owner->GetComponentRotation()};
|
const FRotator& Rotation{Owner->GetComponentRotation()};
|
||||||
const FSGDebugGizmoSettings& DebugGizmoSettings{Owner->GetWristTrackerDebugGizmoSettings()};
|
const FSGDebugGizmoSettings& DebugGizmoSettings{Owner->GetWristTrackingSettings().WristTrackerDebugGizmoSettings};
|
||||||
|
|
||||||
/// FIXME
|
FSGDebugGizmo::Draw(World, Location, Rotation, DebugGizmoSettings);
|
||||||
/// We temporarily ignore the debug settings, as for an esoteric reason it always produces conditions,
|
|
||||||
/// in which the debug gizmo will be drawn!
|
|
||||||
//FSGDebugGizmo::Draw(World, Location, Rotation, DebugGizmoSettings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGWristTrackerComponent::FImplDeleter::operator()(const FImpl* P) const
|
void USGWristTrackerComponent::FImplDeleter::operator()(const FImpl* P) const
|
||||||
|
|||||||
+20
-11
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,16 +33,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#include "SenseGlove/Engine/SGGameInstance.h"
|
||||||
|
|
||||||
#include "Templates/SharedPointer.h"
|
#include "SGLog/SGLog.h"
|
||||||
|
|
||||||
class FSGHapticGloveCalibrationSequenceImpl;
|
USGGameInstance::USGGameInstance(const FObjectInitializer& ObjectInitializer)
|
||||||
class FSGHapticGloveQuickCalibrationImpl;
|
: Super(ObjectInitializer)
|
||||||
|
|
||||||
class SENSEGLOVECORE_API FSGHapticGloveCalibrationSequenceImplCast
|
|
||||||
{
|
{
|
||||||
public:
|
}
|
||||||
static TSharedRef<FSGHapticGloveQuickCalibrationImpl> ToHapticGloveQuickCalibrationImpl(
|
|
||||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl);
|
void USGGameInstance::Init()
|
||||||
};
|
{
|
||||||
|
Super::Init();
|
||||||
|
|
||||||
|
SGLOG("Initializing the SenseGlove GameInstance...")
|
||||||
|
}
|
||||||
|
|
||||||
|
void USGGameInstance::Shutdown()
|
||||||
|
{
|
||||||
|
Super::Shutdown();
|
||||||
|
|
||||||
|
SGLOG("Shutting down the SenseGlove GameInstance...")
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SenseGlove/GameFramework//SGGameModeBase.h"
|
#include "SenseGlove/GameFramework/SGGameModeBase.h"
|
||||||
|
|
||||||
#include "SenseGlove/GameFramework/SGPawn.h"
|
#include "SenseGlove/GameFramework/SGPawn.h"
|
||||||
#include "SenseGlove/GameFramework/SGPlayerController.h"
|
#include "SenseGlove/GameFramework/SGPlayerController.h"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include "SenseGlove/GameFramework/SGPlayerController.h"
|
#include "SenseGlove/GameFramework/SGPlayerController.h"
|
||||||
|
|
||||||
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
#if ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 )
|
#if ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 )
|
||||||
#include "Engine/TimerHandle.h"
|
#include "Engine/TimerHandle.h"
|
||||||
#else /* ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 ) */
|
#else /* ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 ) */
|
||||||
@@ -43,13 +45,12 @@
|
|||||||
|
|
||||||
#include "TimerManager.h"
|
#include "TimerManager.h"
|
||||||
|
|
||||||
#include "SenseGlove/Components/SGGrabComponent.h"
|
|
||||||
#include "SenseGlove/Components/SGTouchComponent.h"
|
#include "SenseGlove/Components/SGTouchComponent.h"
|
||||||
|
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||||
#include "SenseGlove/GameFramework/SGPawn.h"
|
#include "SenseGlove/GameFramework/SGPawn.h"
|
||||||
#include "SenseGlove/Haptics/SGGrabState.h"
|
#include "SenseGlove/Haptics/SGGrabState.h"
|
||||||
#include "SenseGlove/Haptics/SGTouchState.h"
|
#include "SenseGlove/Haptics/SGTouchState.h"
|
||||||
#include "SGCore/SGBuzzCommand.h"
|
#include "SGBuildHacks/SGPlatform.h"
|
||||||
#include "SGCore/SGForceFeedbackCommand.h"
|
|
||||||
#include "SGCore/SGHapticGlove.h"
|
#include "SGCore/SGHapticGlove.h"
|
||||||
|
|
||||||
struct ASGPlayerController::FImpl
|
struct ASGPlayerController::FImpl
|
||||||
@@ -58,18 +59,32 @@ struct ASGPlayerController::FImpl
|
|||||||
* Static methods
|
* Static methods
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
static int32 GetBuzzLevel(const AActor* Actor);
|
static float GetForceFeedbackLevel(const AActor* Actor);
|
||||||
static float GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
|
||||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
|
||||||
const AActor* ActorPinkyTouching);
|
|
||||||
|
|
||||||
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
|
* Member variables
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
FTimerHandle TouchBuzzStopTimer;
|
FTimerHandle TouchVibrotactileStopTimer;
|
||||||
|
|
||||||
/************************
|
/************************
|
||||||
* Owner object
|
* Owner object
|
||||||
@@ -95,96 +110,137 @@ struct ASGPlayerController::FImpl
|
|||||||
* Methods
|
* 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);
|
void UpdateHapticsFeedback(const FSGTouchState& TouchState);
|
||||||
};
|
};
|
||||||
|
|
||||||
int32 ASGPlayerController::FImpl::GetBuzzLevel(const AActor* Actor)
|
float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
|
||||||
{
|
{
|
||||||
if (IsValid(Actor))
|
if (IsValid(Actor))
|
||||||
{
|
{
|
||||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
||||||
if (TouchComponent)
|
if (IsValid(TouchComponent))
|
||||||
{
|
{
|
||||||
return TouchComponent->GetBuzzLevel();
|
return TouchComponent->GetForceFeedbackLevel();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 0.0f;
|
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))
|
if (IsValid(Actor))
|
||||||
{
|
{
|
||||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(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)
|
ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer)
|
||||||
@@ -204,7 +260,7 @@ void ASGPlayerController::BeginPlay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SGPawn->OnGrabStateUpdated().AddWeakLambda(
|
SGPawn->OnGrabStateUpdated().AddWeakLambda(
|
||||||
this, [=](const FSGGrabState& GrabState) -> void
|
this, [= SG_CAPTURE_THIS](const FSGGrabState& GrabState) -> void
|
||||||
{
|
{
|
||||||
if (!IsValid(SGPawn))
|
if (!IsValid(SGPawn))
|
||||||
{
|
{
|
||||||
@@ -235,7 +291,7 @@ void ASGPlayerController::BeginPlay()
|
|||||||
});
|
});
|
||||||
|
|
||||||
SGPawn->OnTouchStateUpdated().AddWeakLambda(
|
SGPawn->OnTouchStateUpdated().AddWeakLambda(
|
||||||
this, [=](const FSGTouchState& TouchState) -> void
|
this, [= SG_CAPTURE_THIS](const FSGTouchState& TouchState) -> void
|
||||||
{
|
{
|
||||||
Pimpl->UpdateHapticsFeedback(TouchState);
|
Pimpl->UpdateHapticsFeedback(TouchState);
|
||||||
});
|
});
|
||||||
@@ -248,69 +304,10 @@ ASGPlayerController::FImpl::FImpl(ASGPlayerController* InOwner)
|
|||||||
|
|
||||||
ASGPlayerController::FImpl::~FImpl() = default;
|
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)
|
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))
|
if (!IsValid(TouchState.Hand))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -322,48 +319,44 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const USGBuzzCommand* BuzzCommand{
|
// Queue the Force-Feedback command...
|
||||||
GetBuzzCommand(
|
TArray<float> ForceFeedbackLevels{
|
||||||
|
GetForceFeedbackLevels(
|
||||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
||||||
TouchState.ActorRingTouching,TouchState.ActorPinkyTouching)
|
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
|
||||||
};
|
};
|
||||||
if (IsValid(BuzzCommand))
|
Glove->QueueForceFeedbackLevels(MoveTemp(ForceFeedbackLevels));
|
||||||
{
|
|
||||||
Glove->SendHaptics(BuzzCommand);
|
|
||||||
|
|
||||||
const float Duration = FImpl::GetBuzzDuration(
|
// Queue the Vibrotactile command...
|
||||||
|
TArray<float> VibrotactileLevels{
|
||||||
|
GetVibrotactileLevels(
|
||||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
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;
|
// Stop the Vibrotactile command after the timeout if a.
|
||||||
TouchBuzzStopHandler.BindLambda([=]()-> void
|
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(
|
Owner->GetWorldTimerManager().SetTimer(
|
||||||
TouchBuzzStopTimer, TouchBuzzStopHandler, Duration, false, -1.0f);
|
TouchVibrotactileStopTimer, TouchVibrotactileStopHandler, VibrotactileDuration, false, -1.0f);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
|
|
||||||
}
|
|
||||||
|
|
||||||
const USGForceFeedbackCommand* ForceFeedbackCommand{
|
|
||||||
GetForceFeedbackCommand(
|
|
||||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
|
||||||
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching)
|
|
||||||
};
|
|
||||||
if (IsValid(ForceFeedbackCommand))
|
|
||||||
{
|
|
||||||
Glove->SendHaptics(ForceFeedbackCommand);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Glove->SendHaptics(USGForceFeedbackCommand::Off(Owner));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
|
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -249,7 +249,7 @@ ASGVirtualHandActor::ASGVirtualHandActor(const FObjectInitializer& ObjectInitial
|
|||||||
|
|
||||||
WristTracker->SetRight(VirtualHand->IsRight());
|
WristTracker->SetRight(VirtualHand->IsRight());
|
||||||
|
|
||||||
GrabState = FSGGrabState(VirtualHand, nullptr, nullptr, nullptr, nullptr);
|
GrabState = FSGGrabState(VirtualHand, FVector::Zero(), {}, nullptr, nullptr, nullptr, nullptr);
|
||||||
TouchState = FSGTouchState(VirtualHand, nullptr, nullptr, nullptr, nullptr, nullptr);
|
TouchState = FSGTouchState(VirtualHand, nullptr, nullptr, nullptr, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
FSGGrabState::FSGGrabState()
|
FSGGrabState::FSGGrabState()
|
||||||
: Hand(nullptr),
|
: Hand(nullptr),
|
||||||
|
PreviousHandLocation(FVector::Zero()),
|
||||||
|
HandVelocityHistory{},
|
||||||
ActorThumbCanGrab(nullptr),
|
ActorThumbCanGrab(nullptr),
|
||||||
ActorIndexCanGrab(nullptr),
|
ActorIndexCanGrab(nullptr),
|
||||||
ActorMiddleCanGrab(nullptr),
|
ActorMiddleCanGrab(nullptr),
|
||||||
@@ -49,11 +51,15 @@ FSGGrabState::FSGGrabState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FSGGrabState::FSGGrabState(USGVirtualHandComponent* InHand,
|
FSGGrabState::FSGGrabState(USGVirtualHandComponent* InHand,
|
||||||
|
const FVector& InPreviousHandLocation,
|
||||||
|
const TArray<FVector>& InHandVelocityHistory,
|
||||||
AActor* InActorThumbCanGrab,
|
AActor* InActorThumbCanGrab,
|
||||||
AActor* InActorIndexCanGrab,
|
AActor* InActorIndexCanGrab,
|
||||||
AActor* InActorMiddleCanGrab,
|
AActor* InActorMiddleCanGrab,
|
||||||
AActor* InGrabbedActor)
|
AActor* InGrabbedActor)
|
||||||
: Hand(InHand),
|
: Hand(InHand),
|
||||||
|
PreviousHandLocation(InPreviousHandLocation),
|
||||||
|
HandVelocityHistory(InHandVelocityHistory),
|
||||||
ActorThumbCanGrab(InActorThumbCanGrab),
|
ActorThumbCanGrab(InActorThumbCanGrab),
|
||||||
ActorIndexCanGrab(InActorIndexCanGrab),
|
ActorIndexCanGrab(InActorIndexCanGrab),
|
||||||
ActorMiddleCanGrab(InActorMiddleCanGrab),
|
ActorMiddleCanGrab(InActorMiddleCanGrab),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -40,12 +40,12 @@
|
|||||||
|
|
||||||
void FSenseGloveModule::StartupModule()
|
void FSenseGloveModule::StartupModule()
|
||||||
{
|
{
|
||||||
SGLOG("Starting up SenseGlove module...");
|
SGLOG("Starting up the SenseGlove module...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSenseGloveModule::PreUnloadCallback()
|
void FSenseGloveModule::PreUnloadCallback()
|
||||||
{
|
{
|
||||||
SGLOG("Unloading SenseGlove module...");
|
SGLOG("Unloading the SenseGlove module...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSenseGloveModule::PostLoadCallback()
|
void FSenseGloveModule::PostLoadCallback()
|
||||||
@@ -55,7 +55,7 @@ void FSenseGloveModule::PostLoadCallback()
|
|||||||
|
|
||||||
void FSenseGloveModule::ShutdownModule()
|
void FSenseGloveModule::ShutdownModule()
|
||||||
{
|
{
|
||||||
SGLOG("Shutting down SenseGlove module...");
|
SGLOG("Shutting down the SenseGlove module...");
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef LOCTEXT_NAMESPACE
|
#undef LOCTEXT_NAMESPACE
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -46,13 +46,19 @@ struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProx
|
|||||||
{
|
{
|
||||||
GENERATED_USTRUCT_BODY()
|
GENERATED_USTRUCT_BODY()
|
||||||
|
|
||||||
public:
|
private:
|
||||||
TMap<FName, FRotator> BonesRotations;
|
TMap<FName, FRotator> BonesRotations;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGVirtualHandAnimInstanceProxy();
|
FSGVirtualHandAnimInstanceProxy();
|
||||||
FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance);
|
FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance);
|
||||||
|
|
||||||
|
public:
|
||||||
|
FORCEINLINE const TMap<FName, FRotator>& GetBonesRotations() const
|
||||||
|
{
|
||||||
|
return BonesRotations;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override;
|
virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -54,16 +54,15 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
|
||||||
int32 BuzzLevel;
|
float ForceFeedbackLevel;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false", ClampMin = "0.0", UIMin = "0.0"))
|
||||||
|
float VibrotactileDuration;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
|
||||||
float BuzzDuration;
|
float VibrotactileLevel;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
|
||||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
|
||||||
int32 ForceFeedbackLevel;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
@@ -77,33 +76,32 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FORCEINLINE int32 GetBuzzLevel() const
|
FORCEINLINE float GetForceFeedbackLevel() const
|
||||||
{
|
|
||||||
return BuzzLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE void SetBuzzLevel(const int32 Level)
|
|
||||||
{
|
|
||||||
BuzzLevel = Level;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE float GetBuzzDuration() const
|
|
||||||
{
|
|
||||||
return BuzzDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE void SetBuzzDuration(const float Duration)
|
|
||||||
{
|
|
||||||
BuzzDuration = Duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE int32 GetForceFeedbackLevel() const
|
|
||||||
{
|
{
|
||||||
return ForceFeedbackLevel;
|
return ForceFeedbackLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE void SetForceFeedbackLevel(const int32 Level)
|
FORCEINLINE void SetForceFeedbackLevel(const float Level)
|
||||||
{
|
{
|
||||||
ForceFeedbackLevel = 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;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -84,6 +84,9 @@ private:
|
|||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bRight : 1;
|
uint8 bRight : 1;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
uint8 bHiddenInGameIfNoGloveDetected : 1;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove | Haptics", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove | Haptics", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bAutoStopAllHapticsOnEndPlay : 1;
|
uint8 bAutoStopAllHapticsOnEndPlay : 1;
|
||||||
|
|
||||||
@@ -121,16 +124,9 @@ private:
|
|||||||
FName PinkyFingertipTouchSocketName;
|
FName PinkyFingertipTouchSocketName;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bHiddenInGameIfNoGloveDetected : 1;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
|
||||||
meta=(AllowPrivateAccess="false", EditCondition="bDrawDebugVirtualHand", EditConditionHides))
|
|
||||||
FSGDebugVirtualHandSettings DebugVirtualHandSettings;
|
FSGDebugVirtualHandSettings DebugVirtualHandSettings;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Transient)
|
|
||||||
uint8 bBackendInitialized : 1;
|
|
||||||
|
|
||||||
UPROPERTY(Transient)
|
UPROPERTY(Transient)
|
||||||
USGHapticGlove* Glove;
|
USGHapticGlove* Glove;
|
||||||
|
|
||||||
@@ -150,6 +146,16 @@ public:
|
|||||||
|
|
||||||
void SetRight(const bool bInRight);
|
void SetRight(const bool bInRight);
|
||||||
|
|
||||||
|
FORCEINLINE const FName& GetMiddleFingertipTouchSocketName() const
|
||||||
|
{
|
||||||
|
return MiddleFingertipTouchSocketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetMiddleFingertipTouchSocketName(const FName& SocketName)
|
||||||
|
{
|
||||||
|
MiddleFingertipTouchSocketName = SocketName;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE bool AutoStopsAllHapticsOnEndPlay() const
|
FORCEINLINE bool AutoStopsAllHapticsOnEndPlay() const
|
||||||
{
|
{
|
||||||
return !!bAutoStopAllHapticsOnEndPlay;
|
return !!bAutoStopAllHapticsOnEndPlay;
|
||||||
@@ -157,7 +163,7 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE void SetAutoStopAllHapticsOnEndPlay(const bool bInAutoStopAllHapticsOnEndPlay)
|
FORCEINLINE void SetAutoStopAllHapticsOnEndPlay(const bool bInAutoStopAllHapticsOnEndPlay)
|
||||||
{
|
{
|
||||||
bAutoStopAllHapticsOnEndPlay = bInAutoStopAllHapticsOnEndPlay;
|
bAutoStopAllHapticsOnEndPlay = bInAutoStopAllHapticsOnEndPlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE const FName& GetGrabSocketName() const
|
FORCEINLINE const FName& GetGrabSocketName() const
|
||||||
@@ -225,16 +231,6 @@ public:
|
|||||||
IndexFingertipTouchSocketName = SocketName;
|
IndexFingertipTouchSocketName = SocketName;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE const FName& GetMiddleFingertipTouchSocketName() const
|
|
||||||
{
|
|
||||||
return MiddleFingertipTouchSocketName;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE void SetMiddleFingertipTouchSocketName(const FName& SocketName)
|
|
||||||
{
|
|
||||||
MiddleFingertipTouchSocketName = SocketName;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE const FName& GetRingFingertipTouchSocketName() const
|
FORCEINLINE const FName& GetRingFingertipTouchSocketName() const
|
||||||
{
|
{
|
||||||
return RingFingertipTouchSocketName;
|
return RingFingertipTouchSocketName;
|
||||||
@@ -255,6 +251,21 @@ public:
|
|||||||
PinkyFingertipTouchSocketName = SocketName;
|
PinkyFingertipTouchSocketName = SocketName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE const FSGDebugVirtualHandSettings& GetDebugVirtualHandSettings() const
|
||||||
|
{
|
||||||
|
return DebugVirtualHandSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE FSGDebugVirtualHandSettings& GetDebugVirtualHandSettings()
|
||||||
|
{
|
||||||
|
return DebugVirtualHandSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetDebugVirtualHandSettings(const FSGDebugVirtualHandSettings& InDebugVirtualHandSettings)
|
||||||
|
{
|
||||||
|
DebugVirtualHandSettings = InDebugVirtualHandSettings;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
|
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
|
||||||
{
|
{
|
||||||
return !!bHiddenInGameIfNoGloveDetected;
|
return !!bHiddenInGameIfNoGloveDetected;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
#include "MotionControllerComponent.h"
|
#include "MotionControllerComponent.h"
|
||||||
#include "Templates/UniquePtr.h"
|
#include "Templates/UniquePtr.h"
|
||||||
|
|
||||||
#include "SGSettings/SGDebugGizmoSettings.h"
|
#include "SGSettings/SGWristTrackingSettings.h"
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGWristTrackerComponent.generated.h"
|
#include "SGWristTrackerComponent.generated.h"
|
||||||
@@ -94,56 +94,23 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings")
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
uint8 bRight : 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether to override the plugin's wrist tracking settings or not.
|
||||||
|
*/
|
||||||
|
UPROPERTY(EditAnywhere, Category = "SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bOverridePluginWristTrackingSettings : 1;
|
uint8 bOverridePluginWristTrackingSettings : 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to Custom, any desired location and rotation can be specified.
|
* Overrides the plugin's wrist tracking settings.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
|
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||||
meta=(EditCondition="bOverridePluginWristTrackingSettings", EditConditionHides))
|
meta=(AllowPrivateAccess="false", EditCondition="bOverridePluginWristTrackingSettings", EditConditionHides))
|
||||||
ESGPositionalTrackingHardware TrackingHardware;
|
FSGWristTrackingSettings WristTrackingSettings;
|
||||||
|
|
||||||
/**
|
|
||||||
* Valid only if TrackingHardware is set to Custom.
|
|
||||||
*/
|
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
|
|
||||||
meta=(EditCondition=
|
|
||||||
"bOverridePluginWristTrackingSettings && TrackingHardware == ESGPositionalTrackingHardware::Custom",
|
|
||||||
EditConditionHides))
|
|
||||||
FVector TrackingHardwareLocationOffset;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Valid only if TrackingHardware is set to Custom.
|
|
||||||
*/
|
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
|
|
||||||
meta=(EditCondition=
|
|
||||||
"bOverridePluginWristTrackingSettings && TrackingHardware == ESGPositionalTrackingHardware::Custom",
|
|
||||||
EditConditionHides))
|
|
||||||
FRotator TrackingHardwareRotationOffset;
|
|
||||||
|
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings")
|
|
||||||
uint8 bOverridePluginWristTrackingDebugSettings : 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If enabled, draws debug Wrist trackers where possible.
|
|
||||||
*/
|
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
|
|
||||||
meta=(EditCondition="bOverridePluginWristTrackingDebugSettings", EditConditionHides))
|
|
||||||
uint8 bDrawWristTrackerDebugGizmo : 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Valid only if bDrawWristTrackerDebugGizmo is enabled.
|
|
||||||
*/
|
|
||||||
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
|
|
||||||
meta=(EditCondition="bOverridePluginWristTrackingDebugSettings && bDrawWristTrackerDebugGizmo",
|
|
||||||
EditConditionHides))
|
|
||||||
FSGDebugGizmoSettings WristTrackerDebugGizmoSettings;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Transient)
|
|
||||||
uint8 bBackendInitialized : 1;
|
|
||||||
|
|
||||||
UPROPERTY(Transient)
|
UPROPERTY(Transient)
|
||||||
USGHapticGlove* Glove;
|
USGHapticGlove* Glove;
|
||||||
|
|
||||||
@@ -154,6 +121,18 @@ private:
|
|||||||
FRotator WristRotation;
|
FRotator WristRotation;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
FORCEINLINE bool IsLeft() const
|
||||||
|
{
|
||||||
|
return !IsRight();
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE bool IsRight() const
|
||||||
|
{
|
||||||
|
return !!bRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetRight(const bool bInRight);
|
||||||
|
|
||||||
FORCEINLINE bool OverridesPluginWristTrackingSettings() const
|
FORCEINLINE bool OverridesPluginWristTrackingSettings() const
|
||||||
{
|
{
|
||||||
return !!bOverridePluginWristTrackingSettings;
|
return !!bOverridePluginWristTrackingSettings;
|
||||||
@@ -164,42 +143,8 @@ public:
|
|||||||
bOverridePluginWristTrackingSettings = bInOverridePluginWristTrackingSettings;
|
bOverridePluginWristTrackingSettings = bInOverridePluginWristTrackingSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
ESGPositionalTrackingHardware GetTrackingHardware() const;
|
const FSGWristTrackingSettings& GetWristTrackingSettings() const;
|
||||||
void SetTrackingHardware(ESGPositionalTrackingHardware InTrackingHardware);
|
void SetWristTrackingSettings(const FSGWristTrackingSettings& InWristTrackingSettings);
|
||||||
|
|
||||||
const FVector& GetTrackingHardwareLocationOffset() const;
|
|
||||||
void SetTrackingHardwareLocationOffset(const FVector& InTrackingHardwareLocationOffset);
|
|
||||||
|
|
||||||
const FRotator& GetTrackingHardwareRotationOffset() const;
|
|
||||||
void SetTrackingHardwareRotationOffset(const FRotator& InTrackingHardwareRotationOffset);
|
|
||||||
|
|
||||||
FORCEINLINE bool OverridesPluginWristTrackingDebugSettings() const
|
|
||||||
{
|
|
||||||
return !!bOverridePluginWristTrackingDebugSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE void OverridePluginWristTrackingDebugSettings(const bool bInOverridePluginWristTrackingDebugSettings)
|
|
||||||
{
|
|
||||||
bOverridePluginWristTrackingDebugSettings = bInOverridePluginWristTrackingDebugSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetDrawWristTrackerDebugGizmo() const;
|
|
||||||
void SetDrawWristTrackerDebugGizmo(bool bInDrawWristTrackerDebugGizmo);
|
|
||||||
|
|
||||||
const FSGDebugGizmoSettings& GetWristTrackerDebugGizmoSettings() const;
|
|
||||||
void SetWristTrackerDebugGizmoSettings(const FSGDebugGizmoSettings& InWristTrackerDebugGizmoSettings);
|
|
||||||
|
|
||||||
FORCEINLINE bool IsLeft() const
|
|
||||||
{
|
|
||||||
return GetTrackingSource() == EControllerHand::Left;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCEINLINE bool IsRight() const
|
|
||||||
{
|
|
||||||
return GetTrackingSource() == EControllerHand::Right;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetRight(const bool bRight);
|
|
||||||
|
|
||||||
FORCEINLINE const FVector& GetWristLocation() const
|
FORCEINLINE const FVector& GetWristLocation() const
|
||||||
{
|
{
|
||||||
@@ -218,12 +163,8 @@ public:
|
|||||||
|
|
||||||
virtual void InitializeComponent() override;
|
virtual void InitializeComponent() override;
|
||||||
|
|
||||||
virtual void UninitializeComponent() override;
|
|
||||||
|
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
|
||||||
|
|
||||||
virtual void TickComponent(float DeltaTime,
|
virtual void TickComponent(float DeltaTime,
|
||||||
enum ELevelTick TickType,
|
enum ELevelTick TickType,
|
||||||
FActorComponentTickFunction* ThisTickFunction) override;
|
FActorComponentTickFunction* ThisTickFunction) override;
|
||||||
|
|||||||
+10
-5
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,11 +35,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Containers/Array.h"
|
#include "Engine/GameInstance.h"
|
||||||
|
|
||||||
#include "SGCoreImpl/SGCalibrationDataPointImpl.h"
|
#include "SGGameInstance.generated.h"
|
||||||
|
|
||||||
struct FSGIC_TArray_FSGCalibrationDataPointImpl
|
UCLASS(config=Game, Transient, BlueprintType, Blueprintable)
|
||||||
|
class SENSEGLOVE_API USGGameInstance : public UGameInstance
|
||||||
{
|
{
|
||||||
TArray<FSGCalibrationDataPointImpl> Array;
|
GENERATED_UCLASS_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Init() override;
|
||||||
|
virtual void Shutdown() override;
|
||||||
};
|
};
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,8 +35,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Containers/Array.h"
|
||||||
#include "GameFramework/Pawn.h"
|
#include "GameFramework/Pawn.h"
|
||||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
#include "Templates/UniquePtr.h"
|
#include "Templates/UniquePtr.h"
|
||||||
|
|
||||||
#include "SenseGlove/Haptics/SGGrabState.h"
|
#include "SenseGlove/Haptics/SGGrabState.h"
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
class UCameraComponent;
|
class UCameraComponent;
|
||||||
class UPrimitiveComponent;
|
class UPrimitiveComponent;
|
||||||
class USphereComponent;
|
class USphereComponent;
|
||||||
|
class UXRDeviceVisualizationComponent;
|
||||||
|
|
||||||
class USGVirtualHandComponent;
|
class USGVirtualHandComponent;
|
||||||
class USGWristTrackerComponent;
|
class USGWristTrackerComponent;
|
||||||
@@ -57,23 +59,55 @@ class SENSEGLOVE_API ASGPawn : public APawn
|
|||||||
GENERATED_UCLASS_BODY()
|
GENERATED_UCLASS_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FGrabStateUpdatedEvent, const FSGGrabState& GrabState);
|
DECLARE_EVENT_OneParam(ASGPawn, FGrabStateUpdatedEvent, const FSGGrabState& GrabState);
|
||||||
|
|
||||||
FGrabStateUpdatedEvent& OnGrabStateUpdated()
|
FGrabStateUpdatedEvent& OnGrabStateUpdated()
|
||||||
{
|
{
|
||||||
return GrabStateUpdatedEvent;
|
return GrabStateUpdatedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FTouchStateUpdatedEvent, const FSGTouchState& TouchState)
|
DECLARE_EVENT_OneParam(ASGPawn, FTouchStateUpdatedEvent, const FSGTouchState& TouchState)
|
||||||
|
|
||||||
FTouchStateUpdatedEvent& OnTouchStateUpdated()
|
FTouchStateUpdatedEvent& OnTouchStateUpdated()
|
||||||
{
|
{
|
||||||
return TouchStateUpdatedEvent;
|
return TouchStateUpdatedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DECLARE_EVENT_TwoParams(ASGPawn, FActorGrabbedEvent, const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
FActorGrabbedEvent& OnGrabbed()
|
||||||
|
{
|
||||||
|
return ActorGrabbedEvent;
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_EVENT_TwoParams(ASGPawn, FActorReleasedEvent, const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
FActorReleasedEvent& OnReleased()
|
||||||
|
{
|
||||||
|
return ActorReleasedEvent;
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_EVENT_TwoParams(ASGPawn, FActorBeginTouchEvent, const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
FActorBeginTouchEvent& OnActorBeginTouch()
|
||||||
|
{
|
||||||
|
return ActorBeginTouchEvent;
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_EVENT_TwoParams(ASGPawn, FActorEndTouchEvent, const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
FActorEndTouchEvent& OnActorEndTouch()
|
||||||
|
{
|
||||||
|
return ActorEndTouchEvent;
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FGrabStateUpdatedEvent GrabStateUpdatedEvent;
|
FGrabStateUpdatedEvent GrabStateUpdatedEvent;
|
||||||
FTouchStateUpdatedEvent TouchStateUpdatedEvent;
|
FTouchStateUpdatedEvent TouchStateUpdatedEvent;
|
||||||
|
FActorGrabbedEvent ActorGrabbedEvent;
|
||||||
|
FActorReleasedEvent ActorReleasedEvent;
|
||||||
|
FActorBeginTouchEvent ActorBeginTouchEvent;
|
||||||
|
FActorEndTouchEvent ActorEndTouchEvent;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
@@ -96,9 +130,15 @@ private:
|
|||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGWristTrackerComponent* WristTrackerLeft;
|
USGWristTrackerComponent* WristTrackerLeft;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
UXRDeviceVisualizationComponent* ControllerVisualizerLeft;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGVirtualHandComponent* HandLeft;
|
USGVirtualHandComponent* HandLeft;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USGVirtualHandComponent* RealHandLeft;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USphereComponent* LeftThumbFingertipGrabCollider;
|
USphereComponent* LeftThumbFingertipGrabCollider;
|
||||||
|
|
||||||
@@ -126,9 +166,15 @@ private:
|
|||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGWristTrackerComponent* WristTrackerRight;
|
USGWristTrackerComponent* WristTrackerRight;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
UXRDeviceVisualizationComponent* ControllerVisualizerRight;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USGVirtualHandComponent* HandRight;
|
USGVirtualHandComponent* HandRight;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
USGVirtualHandComponent* RealHandRight;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USphereComponent* RightThumbFingertipGrabCollider;
|
USphereComponent* RightThumbFingertipGrabCollider;
|
||||||
|
|
||||||
@@ -153,6 +199,9 @@ private:
|
|||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
USphereComponent* RightPinkyFingertipTouchCollider;
|
USphereComponent* RightPinkyFingertipTouchCollider;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
|
int32 MaxNumberOfHandVelocitySamples;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Transient)
|
UPROPERTY(Transient)
|
||||||
FSGGrabState LeftHandGrabState;
|
FSGGrabState LeftHandGrabState;
|
||||||
@@ -166,6 +215,31 @@ private:
|
|||||||
UPROPERTY(Transient)
|
UPROPERTY(Transient)
|
||||||
FSGTouchState RightHandTouchState;
|
FSGTouchState RightHandTouchState;
|
||||||
|
|
||||||
|
UPROPERTY(Transient)
|
||||||
|
TArray<const AActor*> LeftHandOverlappedActors;
|
||||||
|
|
||||||
|
UPROPERTY(Transient)
|
||||||
|
TArray<const AActor*> RightHandOverlappedActors;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnGrabStateUpdated(const FSGGrabState& GrabState);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnTouchStateUpdated(const FSGTouchState& TouchState);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnActorGrabbed(const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnActorReleased(const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnActorBeginTouch(const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
|
||||||
|
void OnActorEndTouch(const USGVirtualHandComponent* Hand, const AActor* Actor);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FORCEINLINE UCameraComponent* GetCamera() const
|
FORCEINLINE UCameraComponent* GetCamera() const
|
||||||
{
|
{
|
||||||
@@ -177,11 +251,23 @@ public:
|
|||||||
return WristTrackerLeft;
|
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
|
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
|
||||||
{
|
{
|
||||||
return HandLeft;
|
return HandLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USGVirtualHandComponent* GetRealHandLeft() const
|
||||||
|
{
|
||||||
|
return RealHandLeft;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE USphereComponent* GetLeftThumbFingertipGrabCollider() const
|
FORCEINLINE USphereComponent* GetLeftThumbFingertipGrabCollider() const
|
||||||
{
|
{
|
||||||
return LeftThumbFingertipGrabCollider;
|
return LeftThumbFingertipGrabCollider;
|
||||||
@@ -227,11 +313,23 @@ public:
|
|||||||
return WristTrackerRight;
|
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
|
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
|
||||||
{
|
{
|
||||||
return HandRight;
|
return HandRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE USGVirtualHandComponent* GetRealHandRight() const
|
||||||
|
{
|
||||||
|
return RealHandRight;
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE USphereComponent* GetRightThumbFingertipGrabCollider() const
|
FORCEINLINE USphereComponent* GetRightThumbFingertipGrabCollider() const
|
||||||
{
|
{
|
||||||
return RightThumbFingertipGrabCollider;
|
return RightThumbFingertipGrabCollider;
|
||||||
@@ -272,12 +370,56 @@ public:
|
|||||||
return RightPinkyFingertipTouchCollider;
|
return RightPinkyFingertipTouchCollider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE int32 GetMaxNumberOfHandVelocitySamples() const
|
||||||
|
{
|
||||||
|
return MaxNumberOfHandVelocitySamples;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void SetMaxNumberOfHandVelocitySamples(const int32 InMaxNumberOfHandVelocitySamples)
|
||||||
|
{
|
||||||
|
MaxNumberOfHandVelocitySamples = InMaxNumberOfHandVelocitySamples;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
||||||
|
virtual void Tick(float DeltaSeconds) override;
|
||||||
virtual void PreInitializeComponents() override;
|
virtual void PreInitializeComponents() override;
|
||||||
|
virtual void PostInitializeComponents() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
UFUNCTION()
|
||||||
|
virtual void OnRealLeftHandOverlapBegins(
|
||||||
|
UPrimitiveComponent* OverlappedComponent,
|
||||||
|
AActor* OtherActor,
|
||||||
|
UPrimitiveComponent* OtherComp,
|
||||||
|
int32 OtherBodyIndex,
|
||||||
|
bool bFromSweep,
|
||||||
|
const FHitResult& SweepResult);
|
||||||
|
|
||||||
|
UFUNCTION()
|
||||||
|
virtual void OnRealLeftHandOverlapEnds(
|
||||||
|
UPrimitiveComponent* OverlappedComponent,
|
||||||
|
AActor* OtherActor,
|
||||||
|
UPrimitiveComponent* OtherComp,
|
||||||
|
int32 OtherBodyIndex);
|
||||||
|
|
||||||
|
UFUNCTION()
|
||||||
|
virtual void OnRealRightHandOverlapBegins(
|
||||||
|
UPrimitiveComponent* OverlappedComponent,
|
||||||
|
AActor* OtherActor,
|
||||||
|
UPrimitiveComponent* OtherComp,
|
||||||
|
int32 OtherBodyIndex,
|
||||||
|
bool bFromSweep,
|
||||||
|
const FHitResult& SweepResult);
|
||||||
|
|
||||||
|
UFUNCTION()
|
||||||
|
virtual void OnRealRightHandOverlapEnds(
|
||||||
|
UPrimitiveComponent* OverlappedComponent,
|
||||||
|
AActor* OtherActor,
|
||||||
|
UPrimitiveComponent* OtherComp,
|
||||||
|
int32 OtherBodyIndex);
|
||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
virtual void OnLeftThumbFingertipGrabColliderOverlapBegins(
|
virtual void OnLeftThumbFingertipGrabColliderOverlapBegins(
|
||||||
UPrimitiveComponent* OverlappedComponent,
|
UPrimitiveComponent* OverlappedComponent,
|
||||||
@@ -573,19 +715,19 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool CanGrab(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
FORCEINLINE bool CanGrab(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? CanLeftHandGrab(Actor) : CanRightHandGrab(Actor);
|
return Hand == HandRight ? CanRightHandGrab(Actor) : CanLeftHandGrab(Actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? IsLeftHandGrabbing(Actor) : IsRightHandGrabbing(Actor);
|
return Hand == HandRight ? IsRightHandGrabbing(Actor) : IsLeftHandGrabbing(Actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const;
|
bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const;
|
||||||
|
|
||||||
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const
|
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? IsLeftHandGrabbing() : IsRightHandGrabbing();
|
return Hand == HandRight ? IsRightHandGrabbing() : IsLeftHandGrabbing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -607,6 +749,6 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE void Release(const USGVirtualHandComponent* Hand)
|
FORCEINLINE void Release(const USGVirtualHandComponent* Hand)
|
||||||
{
|
{
|
||||||
return Hand == HandLeft ? ReleaseLeft() : ReleaseRight();
|
return Hand == HandRight ? ReleaseRight() : ReleaseLeft();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Containers/Array.h"
|
||||||
|
#include "Math/Vector.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGGrabState.generated.h"
|
#include "SGGrabState.generated.h"
|
||||||
@@ -53,6 +55,12 @@ public:
|
|||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
||||||
USGVirtualHandComponent* Hand;
|
USGVirtualHandComponent* Hand;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
||||||
|
FVector PreviousHandLocation;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
||||||
|
TArray<FVector> HandVelocityHistory;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
|
||||||
AActor* ActorThumbCanGrab;
|
AActor* ActorThumbCanGrab;
|
||||||
|
|
||||||
@@ -69,6 +77,8 @@ public:
|
|||||||
FSGGrabState();
|
FSGGrabState();
|
||||||
|
|
||||||
explicit FSGGrabState(USGVirtualHandComponent* InHand,
|
explicit FSGGrabState(USGVirtualHandComponent* InHand,
|
||||||
|
const FVector& InPreviousHandLocation,
|
||||||
|
const TArray<FVector>& InHandVelocityHistory,
|
||||||
AActor* InActorThumbCanGrab,
|
AActor* InActorThumbCanGrab,
|
||||||
AActor* InActorIndexCanGrab,
|
AActor* InActorIndexCanGrab,
|
||||||
AActor* InActorMiddleCanGrab,
|
AActor* InActorMiddleCanGrab,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -42,20 +42,23 @@ public class SenseGlove : ModuleRules
|
|||||||
{
|
{
|
||||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
PublicDependencyModuleNames.AddRange(
|
|
||||||
new string[]
|
|
||||||
{
|
|
||||||
"Core",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(
|
PrivateDependencyModuleNames.AddRange(
|
||||||
new string[]
|
new string[]
|
||||||
{
|
{
|
||||||
"AnimGraphRuntime",
|
"AnimGraphRuntime",
|
||||||
|
"Core",
|
||||||
"CoreUObject",
|
"CoreUObject",
|
||||||
"Engine",
|
"Engine",
|
||||||
"HeadMountedDisplay",
|
"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",
|
"SenseGloveConnect",
|
||||||
"SenseGloveCore",
|
"SenseGloveCore",
|
||||||
"SenseGloveDebug",
|
"SenseGloveDebug",
|
||||||
@@ -64,5 +67,12 @@ public class SenseGlove : ModuleRules
|
|||||||
"SenseGloveTypes",
|
"SenseGloveTypes",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
PrivateIncludePathModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"SenseGloveBuildHacks",
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -117,7 +117,7 @@ int32 FSGCoreJNI::Initialize()
|
|||||||
|
|
||||||
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'WriteHaptics'...");
|
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();
|
FAndroidApplication::CheckJavaException();
|
||||||
if (!WriteHapticsMethodID)
|
if (!WriteHapticsMethodID)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
void FSenseGloveAndroidModule::StartupModule()
|
void FSenseGloveAndroidModule::StartupModule()
|
||||||
{
|
{
|
||||||
SGLOG("Starting up SenseGloveAndroid module...");
|
SGLOG("Starting up the SenseGloveAndroid module...");
|
||||||
|
|
||||||
#if PLATFORM_ANDROID
|
#if PLATFORM_ANDROID
|
||||||
const int32 R1 = FSGConnectJNI::Initialize();
|
const int32 R1 = FSGConnectJNI::Initialize();
|
||||||
@@ -59,17 +59,17 @@ void FSenseGloveAndroidModule::StartupModule()
|
|||||||
|
|
||||||
void FSenseGloveAndroidModule::PreUnloadCallback()
|
void FSenseGloveAndroidModule::PreUnloadCallback()
|
||||||
{
|
{
|
||||||
SGLOG("Unloading SenseGloveAndroid module...");
|
SGLOG("Unloading the SenseGloveAndroid module...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSenseGloveAndroidModule::PostLoadCallback()
|
void FSenseGloveAndroidModule::PostLoadCallback()
|
||||||
{
|
{
|
||||||
SGLOG("Loading SenseGloveAndroid module has succeeded!");
|
SGLOG("Loading the SenseGloveAndroid module has succeeded!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSenseGloveAndroidModule::ShutdownModule()
|
void FSenseGloveAndroidModule::ShutdownModule()
|
||||||
{
|
{
|
||||||
SGLOG("Shutting down SenseGloveAndroid module...");
|
SGLOG("Shutting down the SenseGloveAndroid module...");
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef LOCTEXT_NAMESPACE
|
#undef LOCTEXT_NAMESPACE
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -43,25 +43,25 @@ public class SenseGloveAndroid : ModuleRules
|
|||||||
{
|
{
|
||||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
PublicDependencyModuleNames.AddRange(
|
|
||||||
new string[]
|
|
||||||
{
|
|
||||||
"Core",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(
|
PrivateDependencyModuleNames.AddRange(
|
||||||
new string[]
|
new string[]
|
||||||
{
|
{
|
||||||
|
"Core",
|
||||||
"CoreUObject",
|
"CoreUObject",
|
||||||
"Engine",
|
"Engine",
|
||||||
"SenseGloveConnectImpl",
|
"SenseGloveConnectImpl",
|
||||||
"SenseGloveCoreImpl",
|
"SenseGloveCoreImpl",
|
||||||
"SenseGloveInterop",
|
|
||||||
"SenseGloveLog",
|
"SenseGloveLog",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
PrivateIncludePathModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"SenseGloveInterop",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||||
{
|
{
|
||||||
AdditionalPropertiesForReceipt.Add("AndroidPlugin",
|
AdditionalPropertiesForReceipt.Add("AndroidPlugin",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (c) 2020 - 2023 SenseGlove
|
Copyright (c) 2020 - 2024 SenseGlove
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -59,12 +59,30 @@
|
|||||||
<log text="SenseGloveAndroid [WARN]: this architecture is not supported!"/>
|
<log text="SenseGloveAndroid [WARN]: this architecture is not supported!"/>
|
||||||
</false>
|
</false>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<setBoolFromProperty result="bCreateAFSProject" ini="Engine" section="/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings" property="bEnablePlugin" default="true"/>
|
||||||
</init>
|
</init>
|
||||||
|
|
||||||
<resourceCopies>
|
<resourceCopies>
|
||||||
<copyFile src="$S(PluginDir)/../ThirdParty/android/sgconnect.jar" dst="$S(BuildDir)/gradle/app/libs/sgconnect.jar" />
|
<copyFile src="$S(PluginDir)/../ThirdParty/android/sgconnect.jar" dst="$S(BuildDir)/gradle/app/libs/sgconnect.jar" />
|
||||||
</resourceCopies>
|
</resourceCopies>
|
||||||
|
|
||||||
|
<gradleCopies>
|
||||||
|
<if condition="bCreateAFSProject">
|
||||||
|
<true>
|
||||||
|
<!-- Also copy into AFSProject -->
|
||||||
|
<!--
|
||||||
|
We have a dependency in the buildGradleAdditions which
|
||||||
|
isn't in the AFSProject which is compiled for shipping
|
||||||
|
builds when AndroidFileServer (AFS) is enabled. To keep
|
||||||
|
the size of the AFS APK small it doesn't automatically
|
||||||
|
copy all the libs over.
|
||||||
|
-->
|
||||||
|
<copyFile src="$S(PluginDir)/../ThirdParty/android/sgconnect.jar" dst="$S(BuildDir)/gradle/AFSProject/app/libs/sgconnect.jar" />
|
||||||
|
</true>
|
||||||
|
</if>
|
||||||
|
</gradleCopies>
|
||||||
|
|
||||||
<gradleProperties>
|
<gradleProperties>
|
||||||
<insert>
|
<insert>
|
||||||
kapt.incremental.apt=true
|
kapt.incremental.apt=true
|
||||||
@@ -73,18 +91,15 @@
|
|||||||
|
|
||||||
<proguardAdditions>
|
<proguardAdditions>
|
||||||
<insert>
|
<insert>
|
||||||
|
|
||||||
<!-- Disable obfuscation for SenseGlove classes -->
|
<!-- Disable obfuscation for SenseGlove classes -->
|
||||||
-dontwarn com.senseglove.**
|
-dontwarn com.senseglove.**
|
||||||
-keep class com.senseglove.** { *; }
|
-keep class com.senseglove.** { *; }
|
||||||
-keep interface com.senseglove.** { *; }
|
-keep interface com.senseglove.** { *; }
|
||||||
-keep public class com.senseglove.sgconnect.** { public protected *; }
|
-keep public class com.senseglove.sgconnect.** { public protected *; }
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
</proguardAdditions>
|
</proguardAdditions>
|
||||||
|
|
||||||
<androidManifestUpdates>
|
<androidManifestUpdates>
|
||||||
|
|
||||||
<!-- For target SDK 31 update the SplashActivity activity -->
|
<!-- For target SDK 31 update the SplashActivity activity -->
|
||||||
<loopElements tag="activity">
|
<loopElements tag="activity">
|
||||||
<setStringFromAttribute result="activityName" tag="$" name="android:name"/>
|
<setStringFromAttribute result="activityName" tag="$" name="android:name"/>
|
||||||
@@ -100,7 +115,6 @@
|
|||||||
<addPermission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
<addPermission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||||
<addPermission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
<addPermission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||||
<addPermission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
<addPermission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||||
|
|
||||||
</androidManifestUpdates>
|
</androidManifestUpdates>
|
||||||
|
|
||||||
<buildGradleAdditions>
|
<buildGradleAdditions>
|
||||||
@@ -123,7 +137,6 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation files('libs/sgconnect.jar')
|
implementation files('libs/sgconnect.jar')
|
||||||
}
|
}
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
</buildGradleAdditions>
|
</buildGradleAdditions>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,223 @@
|
|||||||
|
/**
|
||||||
|
* @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 "SGBackend/SGBackend.h"
|
||||||
|
|
||||||
|
#include "Engine/Engine.h"
|
||||||
|
|
||||||
|
#if PLATFORM_ANDROID
|
||||||
|
#include "SGConnect/SGConnect.h"
|
||||||
|
#endif /* PLATFORM_ANDROID */
|
||||||
|
|
||||||
|
#include "SGCore/SGDeviceList.h"
|
||||||
|
#include "SGCore/SGHandLayer.h"
|
||||||
|
#include "SGLog/SGLog.h"
|
||||||
|
|
||||||
|
struct USGBackend::FImpl
|
||||||
|
{
|
||||||
|
/************************
|
||||||
|
* Owner object
|
||||||
|
************************/
|
||||||
|
|
||||||
|
USGBackend* Owner;
|
||||||
|
|
||||||
|
/************************
|
||||||
|
* Constructor / Destructor
|
||||||
|
************************/
|
||||||
|
|
||||||
|
explicit FImpl(USGBackend* InOwner);
|
||||||
|
~FImpl();
|
||||||
|
|
||||||
|
/************************
|
||||||
|
* Default copy constructor & copy assignment operator
|
||||||
|
************************/
|
||||||
|
|
||||||
|
FImpl(const FImpl& Rhs) = default;
|
||||||
|
FImpl& operator=(const FImpl& Rhs) = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
USGBackend* USGBackend::GetInstance()
|
||||||
|
{
|
||||||
|
if (!ensureAlwaysMsgf(GEngine, TEXT("The engine has not been initialized!")))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
USGBackend* Instance{GEngine->GetEngineSubsystem<USGBackend>()};
|
||||||
|
return Instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
USGBackend::USGBackend()
|
||||||
|
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
|
{
|
||||||
|
bBackendInitialized = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGBackend::InitializeBackend()
|
||||||
|
{
|
||||||
|
if (!IsBackendInitialized())
|
||||||
|
{
|
||||||
|
#if PLATFORM_ANDROID
|
||||||
|
const int32_t Result = FSGConnect::Init();
|
||||||
|
switch (Result)
|
||||||
|
{
|
||||||
|
case -3:
|
||||||
|
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
||||||
|
return false;
|
||||||
|
case -2:
|
||||||
|
SGLOG_ERROR("Device Scanning is already running within a different program.");
|
||||||
|
return false;
|
||||||
|
case -1:
|
||||||
|
SGLOG_ERROR("Device Scanning already being initialized (function called twice in short succession).");
|
||||||
|
return false;
|
||||||
|
case 0:
|
||||||
|
SGLOG_ERROR("Device Scanning is already running within this program.");
|
||||||
|
return false;
|
||||||
|
case 1:
|
||||||
|
SGLOG("Successfully started up DeviceScanning from the current program.");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ensureAlwaysMsgf(false, TEXT("Unhandled Init return status code!"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_ANDROID */
|
||||||
|
|
||||||
|
// Ensure that the device list is empty before doing anything.
|
||||||
|
FSGDeviceList::Dispose();
|
||||||
|
FSGDeviceList::Reinitialize();
|
||||||
|
|
||||||
|
bBackendInitialized = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGBackend::UninitializeBackend()
|
||||||
|
{
|
||||||
|
if (IsBackendInitialized())
|
||||||
|
{
|
||||||
|
FSGDeviceList::Dispose();
|
||||||
|
|
||||||
|
#if PLATFORM_ANDROID
|
||||||
|
const int32_t Result = FSGConnect::Dispose();
|
||||||
|
switch (Result)
|
||||||
|
{
|
||||||
|
case -3:
|
||||||
|
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
|
||||||
|
return false;
|
||||||
|
case -2:
|
||||||
|
SGLOG_ERROR("Not allowed to dispose of Device Scanning because this is not the program which started it.");
|
||||||
|
return false;
|
||||||
|
case -1:
|
||||||
|
SGLOG_ERROR("Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).");
|
||||||
|
return false;
|
||||||
|
case 0:
|
||||||
|
SGLOG_ERROR("There is no deviceScanner running from any program, so disposing is skipped.");
|
||||||
|
return false;
|
||||||
|
case 1:
|
||||||
|
SGLOG("Successfully disposed of DeviceScanner resources.");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ensureAlwaysMsgf(false, TEXT("Unhandled Dispose return status code!"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_ANDROID */
|
||||||
|
|
||||||
|
bBackendInitialized = false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGBackend::ShouldCreateSubsystem(UObject* Outer) const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void USGBackend::Initialize(FSubsystemCollectionBase& Collection)
|
||||||
|
{
|
||||||
|
SGLOG("Initializing the SenseGlove Backend singleton with the engine lifetime...");
|
||||||
|
|
||||||
|
Super::Initialize(Collection);
|
||||||
|
|
||||||
|
SGLOG("Initializing the SenseGlove Backend singleton with the engine lifetime...");
|
||||||
|
|
||||||
|
if (InitializeBackend())
|
||||||
|
{
|
||||||
|
SGLOG("The bridge to the SenseGlove Backend has been initialized successfully!")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SGLOG_ERROR("Failed to initialize the bridge to the SenseGlove Backend!")
|
||||||
|
}
|
||||||
|
|
||||||
|
SGLOG("The SenseGlove Backend singleton has been successfully initialized with the engine lifetime!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void USGBackend::Deinitialize()
|
||||||
|
{
|
||||||
|
SGLOG("De-initializing the SenseGlove Backend singleton due to the engine lifetime expiration...");
|
||||||
|
|
||||||
|
Super::Deinitialize();
|
||||||
|
|
||||||
|
if (UninitializeBackend())
|
||||||
|
{
|
||||||
|
SGLOG("The bridge to the SenseGlove Backend has been uninitialized successfully!")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SGLOG_ERROR("Failed to uninitialize the bridge to the SenseGlove Backend!")
|
||||||
|
}
|
||||||
|
|
||||||
|
(void)Pimpl.Release();
|
||||||
|
|
||||||
|
SGLOG("The SenseGlove Backend singleton has been successfully de-initialized!");
|
||||||
|
}
|
||||||
|
|
||||||
|
USGBackend::FImpl::FImpl(USGBackend* InOwner)
|
||||||
|
: Owner(InOwner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
USGBackend::FImpl::~FImpl() = default;
|
||||||
|
|
||||||
|
void USGBackend::FImplDeleter::operator()(const FImpl* P) const
|
||||||
|
{
|
||||||
|
delete P;
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @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 "SenseGloveBackend.h"
|
||||||
|
#include "Modules/ModuleManager.h"
|
||||||
|
#include "SenseGloveBackendModule.h"
|
||||||
|
|
||||||
|
IMPLEMENT_MODULE(FSenseGloveBackendModule, SenseGloveBackend)
|
||||||
+4
-2
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,4 +33,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SGInterop/SGIC_int32_Ref.h"
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
+25
-7
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,13 +33,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#include "SenseGloveBackendModule.h"
|
||||||
|
|
||||||
#include "Containers/Array.h"
|
#include "SGLog/SGLog.h"
|
||||||
|
#include "SGBackend/SGBackend.h"
|
||||||
|
|
||||||
#include "SGCoreImpl/SGTimedBuzzCommandImpl.h"
|
#define LOCTEXT_NAMESPACE "FSenseGloveBackendModule"
|
||||||
|
|
||||||
struct FSGIC_TArray_FSGTimedBuzzCommandImpl
|
void FSenseGloveBackendModule::StartupModule()
|
||||||
{
|
{
|
||||||
TArray<FSGTimedBuzzCommandImpl> Array;
|
SGLOG("Starting up SenseGloveBackend module...");
|
||||||
};
|
}
|
||||||
|
|
||||||
|
void FSenseGloveBackendModule::PreUnloadCallback()
|
||||||
|
{
|
||||||
|
SGLOG("Unloading SenseGloveBackend module...");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FSenseGloveBackendModule::PostLoadCallback()
|
||||||
|
{
|
||||||
|
SGLOG("Loading of SenseGloveBackend module has succeeded!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FSenseGloveBackendModule::ShutdownModule()
|
||||||
|
{
|
||||||
|
SGLOG("Shutting down SenseGloveBackend module...");
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
+12
-4
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,9 +35,17 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "SGCoreImpl/SGNovaGloveHandProfileImpl.h"
|
#include "Modules/ModuleInterface.h"
|
||||||
|
|
||||||
struct FSGIC_FSGNovaGloveHandProfileImpl
|
#define LOCTEXT_NAMESPACE "SenseGloveBackend"
|
||||||
|
|
||||||
|
class FSenseGloveBackendModule : public IModuleInterface
|
||||||
{
|
{
|
||||||
FSGNovaGloveHandProfileImpl NovaGloveHandProfileImpl;
|
public:
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void PreUnloadCallback() override;
|
||||||
|
virtual void PostLoadCallback() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
+40
-25
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -35,38 +35,53 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Containers/Array.h"
|
#include "Math/Color.h"
|
||||||
|
#include "Math/Rotator.h"
|
||||||
#include "Math/Vector.h"
|
#include "Math/Vector.h"
|
||||||
|
#include "Subsystems/EngineSubsystem.h"
|
||||||
|
#include "Templates/UniquePtr.h"
|
||||||
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
class FSGNovaGloveHandProfileImpl;
|
#include "SGBackend.generated.h"
|
||||||
|
|
||||||
namespace SGCore
|
UCLASS(config = SenseGloveBackend)
|
||||||
|
class SENSEGLOVEBACKEND_API USGBackend : public UEngineSubsystem
|
||||||
{
|
{
|
||||||
namespace Calibration
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
private:
|
||||||
|
UPROPERTY(Transient)
|
||||||
|
uint8 bBackendInitialized : 1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static USGBackend* GetInstance();
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct FImpl;
|
||||||
|
|
||||||
|
struct FImplDeleter
|
||||||
{
|
{
|
||||||
class NovaGloveCalibration;
|
void operator()(const FImpl* P) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
TUniquePtr<FImpl, FImplDeleter> Pimpl;
|
||||||
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
|
public:
|
||||||
|
USGBackend();
|
||||||
|
|
||||||
|
public:
|
||||||
|
FORCEINLINE bool IsBackendInitialized() const
|
||||||
|
{
|
||||||
|
return !!bBackendInitialized;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
class SENSEGLOVECOREIMPL_API FSGNovaGloveCalibrationImpl final
|
bool InitializeBackend();
|
||||||
{
|
bool UninitializeBackend();
|
||||||
public:
|
|
||||||
typedef SGCore::Calibration::NovaGloveCalibration FNovaGloveCalibrationType;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void ApplyDefaultCalibrationInterpolationValues(
|
virtual bool ShouldCreateSubsystem(UObject* Outer) const override;
|
||||||
const TArray<FVector>& RetractedValues,
|
|
||||||
const TArray<FVector>& ExtendedValues,
|
|
||||||
const FSGNovaGloveHandProfileImpl& Profile);
|
|
||||||
|
|
||||||
static void ApplyInterpolationValues(
|
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
||||||
const TArray<FVector>& RetractedValues,
|
virtual void Deinitialize() override;
|
||||||
const TArray<FVector>& ExtendedValues,
|
|
||||||
const TArray<TArray<FVector>>& RetractedAngles,
|
|
||||||
const TArray<TArray<FVector>>& ExtendedAngles,
|
|
||||||
const FSGNovaGloveHandProfileImpl& Profile);
|
|
||||||
|
|
||||||
public:
|
|
||||||
FSGNovaGloveCalibrationImpl() = delete;
|
|
||||||
virtual ~FSGNovaGloveCalibrationImpl() = delete;
|
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* @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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SenseGloveBackend : ModuleRules
|
||||||
|
{
|
||||||
|
public SenseGloveBackend(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
|
PrivateDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"Core",
|
||||||
|
"CoreUObject",
|
||||||
|
"Engine",
|
||||||
|
"InputCore",
|
||||||
|
"SenseGloveConnect",
|
||||||
|
"SenseGloveCore",
|
||||||
|
"SenseGloveLog",
|
||||||
|
"SenseGloveTypes",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
-8
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,13 +33,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#include "SGBackendKismet/SGBackendKismetLibrary.h"
|
||||||
|
|
||||||
#include "Containers/Array.h"
|
#include "SGBackend/SGBackend.h"
|
||||||
|
|
||||||
#include "SGCoreImpl/SGForceFeedbackCommandImpl.h"
|
USGBackend* USGBackendKismetLibrary::GetInstance()
|
||||||
|
|
||||||
struct FSGIC_TArray_FSGForceFeedbackCommandImpl
|
|
||||||
{
|
{
|
||||||
TArray<FSGForceFeedbackCommandImpl> Array;
|
return USGBackend::GetInstance();
|
||||||
};
|
}
|
||||||
|
|
||||||
|
bool USGBackendKismetLibrary::IsBackendInitialized(const USGBackend* Backend)
|
||||||
|
{
|
||||||
|
return Backend->IsBackendInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGBackendKismetLibrary::InitializeBackend(USGBackend* Backend)
|
||||||
|
{
|
||||||
|
return Backend->InitializeBackend();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool USGBackendKismetLibrary::UninitializeBackend(USGBackend* Backend)
|
||||||
|
{
|
||||||
|
return Backend->UninitializeBackend();
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @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 "SenseGloveBackendKismet.h"
|
||||||
|
#include "Modules/ModuleManager.h"
|
||||||
|
#include "SenseGloveBackendKismetModule.h"
|
||||||
|
|
||||||
|
IMPLEMENT_MODULE(FSenseGloveBackendKismetModule, SenseGloveBackendKismet)
|
||||||
+4
-2
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,4 +33,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SGInterop/SGIC_ESGCVar.h"
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
+22
-15
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,23 +33,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#include "SenseGloveBackendKismetModule.h"
|
||||||
|
|
||||||
#include "Templates/SharedPointer.h"
|
#include "SGLog/SGLog.h"
|
||||||
|
|
||||||
class FSGFingerCommandImpl;
|
#define LOCTEXT_NAMESPACE "FSenseGloveBackendKismetModule"
|
||||||
class FSGBuzzCommandImpl;
|
|
||||||
class FSGForceFeedbackCommandImpl;
|
|
||||||
class FSGTimedBuzzCommandImpl;
|
|
||||||
|
|
||||||
class SENSEGLOVECORE_API FSGFingerCommandImplCast
|
void FSenseGloveBackendKismetModule::StartupModule()
|
||||||
{
|
{
|
||||||
public:
|
SGLOG("Starting up the SenseGloveBackendKismet module...");
|
||||||
static TSharedRef<FSGBuzzCommandImpl> ToBuzzCommandImpl(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
}
|
||||||
|
|
||||||
static TSharedRef<FSGForceFeedbackCommandImpl> ToForceFeedbackCommandImpl(
|
void FSenseGloveBackendKismetModule::PreUnloadCallback()
|
||||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
{
|
||||||
|
SGLOG("Unloading the SenseGloveBackendKismet module...");
|
||||||
|
}
|
||||||
|
|
||||||
static TSharedRef<FSGTimedBuzzCommandImpl> ToTimedBuzzCommandImpl(
|
void FSenseGloveBackendKismetModule::PostLoadCallback()
|
||||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
{
|
||||||
};
|
SGLOG("Loading of SenseGloveBackendKismet module has succeeded!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FSenseGloveBackendKismetModule::ShutdownModule()
|
||||||
|
{
|
||||||
|
SGLOG("Shutting down the SenseGloveBackendKismet module...");
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* @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 "Modules/ModuleInterface.h"
|
||||||
|
|
||||||
|
#define LOCTEXT_NAMESPACE "SenseGloveBackendKismet"
|
||||||
|
|
||||||
|
class FSenseGloveBackendKismetModule : public IModuleInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void PreUnloadCallback() override;
|
||||||
|
virtual void PostLoadCallback() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/**
|
||||||
|
* @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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||||
|
|
||||||
|
#include "SGBackendKismetLibrary.generated.h"
|
||||||
|
|
||||||
|
class USGBackend;
|
||||||
|
|
||||||
|
UCLASS(meta=(ScriptName = "SesneGloveBackendKismetLibrary"))
|
||||||
|
class SENSEGLOVEBACKENDKISMET_API USGBackendKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend")
|
||||||
|
static USGBackend* GetInstance();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Backend")
|
||||||
|
static bool IsBackendInitialized(const USGBackend* Backend);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend")
|
||||||
|
bool InitializeBackend(UPARAM(ref) USGBackend* Backend);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend")
|
||||||
|
bool UninitializeBackend(UPARAM(ref) USGBackend* Backend);
|
||||||
|
};
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/**
|
||||||
|
* @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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class SenseGloveBackendKismet : ModuleRules
|
||||||
|
{
|
||||||
|
public SenseGloveBackendKismet(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
|
PrivateDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"Core",
|
||||||
|
"CoreUObject",
|
||||||
|
"Engine",
|
||||||
|
"SenseGloveBackend",
|
||||||
|
"SenseGloveLog",
|
||||||
|
"SenseGloveKismet",
|
||||||
|
"SenseGloveTypes",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,4 +33,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SGBuildHacks/SGInclude_Core_SensorRange.h"
|
#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h"
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* @section DESCRIPTION
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveQuickCalibration.h"
|
|
||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+36
@@ -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"
|
||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -33,4 +33,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SGBuildHacks/SGInclude_Core_CalibrationDataPoint.h"
|
#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h"
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* (The MIT License)
|
* (The MIT License)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 - 2023 SenseGlove
|
* Copyright (c) 2020 - 2024 SenseGlove
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
||||||
*
|
|
||||||
* @section LICENSE
|
|
||||||
*
|
|
||||||
* (The MIT License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2020 - 2023 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"
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user