Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
+75
-2
@@ -5,9 +5,82 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.0.1] - 2024-04-15
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix a bug inside both SGVirtualHandComponent and SGWristTrackerComponent where the connected glove's UObject instance gets destroyed and re-instantiated every frame. With this fix now the glove instance will be created or destroyed only when a glove connects to or disconnects from the system.
|
||||
- Update the outdated Platform Support Matrix and its remarks section to reflect the latest status information.
|
||||
- Fix the wrong header file description sections for the header files inside <code>SenseGloveKismet/Public/SGKismet/</code>.
|
||||
|
||||
### Changed
|
||||
|
||||
- SenseGlove libraries have been updated to v2.102.0-35d4de3f.
|
||||
- Together, SenseGlove libraries v2.102.0-35d4de3f and SenseCom v1.6.1 remove the need to call ResetCalibration every time and are able to store and load calibration profiles from disk.
|
||||
- SesenGloveBackend module is no longer calling FSGHandLayer::ResetCalibration on every backend initialization.
|
||||
|
||||
## [2.0.0] - 2024-03-22
|
||||
|
||||
This is the second major release of the SenseGlove Unreal Engine Plugin adding support for Nova 2 with enormous breaking changes to the current C++ and Blueprint APIs.
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for the SenseGlove Nova 2 devices.
|
||||
- Added support for Quest 3 controllers.
|
||||
- Various classes have been added to the API in order to implement the new functionalities and features from the latest upstream SenseGlove libraries.
|
||||
- Added initial support for the upcoming Unreal Engine 5.4 release.
|
||||
- Added a pair of default production-ready virtual hand meshes for the left and right hands, courtesy of [Allbreaker LLC Columbia](https://www.allbreaker.co/). For usage and redistribution, please consult the [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) file.
|
||||
|
||||
### Fixed
|
||||
|
||||
- A few critical bug fixes that have already been backported to the v1.x.x series through v1.9.3 to v1.9.8 releases.
|
||||
- Revamped the way we do FVector <-> SGVect3D, FQuat <-> SGQuat, and SenseGlove <-> Unreal Engine angles conversions in order to properly translate between the SenseGlove and Unreal Engine coordinate systems.
|
||||
- Allow the C++ compiler the opportunity to perform RVO/NRVO if applicable.
|
||||
- Fix the modules' order inside the .uplugin file.
|
||||
- Fix a build issue inside FSGArrayUtils::FromStdVector introduced by newer MVSC updates due to stricter implicit uint64 to int32 conversions.
|
||||
- Fix a build issues inside FSGArrayUtils when performing non-Unity builds due to the missing <string> header.
|
||||
- Fix other build issues in USGDevice, USGNovaGloveSensorData, FSGDeviceImpl, and FSGSenseGloveVarsImpl when performing non-Unity builds due to the missing relevant headers.
|
||||
- Fix changelog formatting.
|
||||
- Some other improverment and fixes.
|
||||
|
||||
### Changed
|
||||
|
||||
- SenseGlove libraries have been updated to v2.101.12-62b1be11.
|
||||
- The SenseGlove Unreal Engine Plugin now declares the OpenXR plugin as a dependency, so that the OpenXR plugin will be enabled automatically as soon as the SenseGlove Unreal Engine Plugin gets enabled.
|
||||
- Various classes and parts of the API have been changed in order to reflect and adhere to upstream SenseGlove libraries.
|
||||
- Reverse the Platform Support Matrix order from newer Unreal Engine versions to the older ones.
|
||||
- Clarify the engine support policy in the main readme file by adding the corresponding references from the Epic Marketplace Guidelines and a URL to their guidelines page.
|
||||
- The SGTouchComponent uproperties BuzzDuration and BuzzLevel now utilize different different names in order to correspond to the underlying API changes. They have been renamed to VibrotactileDuration and VibrotacktileLevel.
|
||||
- The SGTouchComponent uproperties ForceFeedbackLevel and BuzzLevel (now VibrotacktileLevel) parameters type have changed from int32 to float with the value range varying between 0.0f to 1.0f instead of 1 to 100 in order to correspond to the underlying API changes.
|
||||
- The SGVirtualHandComponent now assumes the default grab point's name as GenericGrabPoint instead of GrabPoint as default if not specified in the Unreal Blueprint Editor.
|
||||
- The SGPawn on UE 5.2+ now utilizes UXRDeviceVisualizationComponent in order to properly display the controller meshes shipped with Unreal Engine's OpenXR plugin, or a user-provided mesh. On UE 5.1 this could still be set on the WristTrackerLeft and WristTrackerRight components. Please note that despite the fact that on UE 5.2+ it's still possible to utilize the WristTrackerLeft and WristTrackerRight for setting the controller meshes, this has been deprecated in UE 5.2+ and is no longer supported.
|
||||
|
||||
### Removed
|
||||
|
||||
- Various classes and parts of the API have been removed in order to reflect and adhere to upstream SenseGlove libraries.
|
||||
- Removed the redundant SGIC_int32_Ref interop type.
|
||||
|
||||
## [1.9.8] - 2024-03-12
|
||||
|
||||
This is a bugfix release that contains bugfixes backported from the next major release of the plugin as documented below.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix a bug where the right-hand mesh is always hidden inside the game no matter whether the right glove is connected or not.
|
||||
- Fix a crash inside the USGHandPose::FromHandAngles method.
|
||||
- Some performance optimizations by utilizing MoveTemp in return statements.
|
||||
- Some improvements applied to the source code.
|
||||
- Some other minor fixes.
|
||||
|
||||
### Changed
|
||||
|
||||
- The BonesRotations TMap is no longer a public field of FSGVirtualHandAnimInstanceProxy and instead could be retrieved by calling the GetBonesRotations() method.
|
||||
|
||||
## [1.9.7] - 2024-02-18
|
||||
|
||||
This is a bugfix release with containing bugfixes backported from the next major release of the plugin as documented below.
|
||||
This is a bugfix release that contains bugfixes backported from the next major release of the plugin as documented below.
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -412,4 +485,4 @@ This is a minor release focusing on adherence to the Unreal Engine Marketplace G
|
||||
|
||||
### 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
|
||||
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.
|
||||
```
|
||||
|
||||
@@ -8,16 +8,17 @@ This repository relies on Git LFS for storing binary blobs (e.g. third-party lib
|
||||
|
||||
| | **Windows (MSVC 2017)** | **Windows (MSVC 2019)** | **Windows (MSVC 2022)** | **Linux x86-64 (Native Toolchain)** | **Linux AArch64 (Native Toolchain)** | **Android (NDK)** | **UE Marketplace Version** | **Azure DevOps Version** |
|
||||
|----------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------------------:|:------------------------------------:|:-----------------:|:--------------------------:|:------------------------:|
|
||||
| **4.22** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.27** | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x (r21e) | ⚠️ v1.3.1 | ⚠️ v1.4.3 |
|
||||
| **5.4** | ❌ | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ❌ | ✅ v2.0.1 |
|
||||
| **5.3** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.1 | ✅ v2.0.1 |
|
||||
| **5.2** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.1 | ✅ v2.0.1 |
|
||||
| **5.1** | ❌ | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x | ✅ v2.0.x (r25b) | ✅ v2.0.1 | ✅ v2.0.1 |
|
||||
| **5.0** | ❌ | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x | ⚠️ v1.6.x (r21e) | ⚠️ v1.6.1 | ⚠️ v1.6.1 |
|
||||
| **5.1** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.7 | ✅ v1.9.7 |
|
||||
| **5.2** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.7 | ✅ v1.9.7 |
|
||||
| **5.3** | ❌ | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x | ✅ v1.9.x (r25b) | ✅ v1.9.7 | ✅ v1.9.7 |
|
||||
| **4.27** | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x | ⚠️ v1.4.x (r21e) | ⚠️ v1.3.1 | ⚠️ v1.4.3 |
|
||||
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
| **4.22** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
|
||||
|
||||
* <code>✅</code> Supported
|
||||
* <code>⚠️</code> Not supported by the latest release and might be lacking features
|
||||
@@ -25,12 +26,10 @@ This repository relies on Git LFS for storing binary blobs (e.g. third-party lib
|
||||
* <code>❓</code> Unknown or untested
|
||||
|
||||
Remarks:
|
||||
* Per Epic's Marketplace policy regarding Code Plugins, we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
|
||||
* Microsoft Visual Studio 2022 is not supported by Unreal Engine 4.22 through 4.26.
|
||||
* Per [Epic's Marketplace Guidelines](https://www.unrealengine.com/en-US/marketplace-guidelines) in regards to Code Plugins (sections 2.6.3.d and 3.1.b), we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
|
||||
* All third-party libraries on Windows built against Windows SDK 10.0.
|
||||
* Oculus support is only provided through the recommended Android NDK versions by Epic Games.
|
||||
* The Unreal Engine 4.27+ support is provided for Android/Oculus development.
|
||||
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully, thus some older NDKs such as r14b.
|
||||
* Oculus and VIVE support is only provided through the recommended Android NDK versions by Epic Games.
|
||||
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully.
|
||||
* All third-party libraries target Android NDK API Level 29, thus any project relying on the plug-in should be build with the same NDK API Level.
|
||||
|
||||
## Changelog
|
||||
@@ -55,12 +54,13 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
||||
|
||||
## Planned Features Completion Status
|
||||
|
||||
### Implemented as of v1.9.7
|
||||
### Implemented as of v2.0.1
|
||||
|
||||
- [X] Full SenseGlove low-level core API access through Unreal C++.
|
||||
- [X] Full SenseGlove low-level core API access through Blueprint.
|
||||
- [X] DK 1 Support.
|
||||
- [X] Nova 1 Support.
|
||||
- [X] Nova 2 Support.
|
||||
- [X] Support for Microsoft Windows as a development platform.
|
||||
- [X] Support for GNU/Linux as a development platform.
|
||||
- [X] Support for Microsoft Windows as a deployment platform.
|
||||
@@ -80,12 +80,11 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
||||
- [X] Easy wrist/hand tracking debugging using the SenseGlove Debug module.
|
||||
- [X] A generic Settings module with the ability to override settings.
|
||||
- [X] C++/Blueprint interaction events such as OnGrabStateUpdated, OnTouchStateUpdated, OnActorGrabbed, OnActorReleased, OnActorBeginTouch, and OnActorEndTouch.
|
||||
- [X] A default hand mesh rigged with the standard SenseGlove default hand pose.
|
||||
|
||||
### Upcoming features planned for the v2.0.0 release
|
||||
### Upcoming features planned for the v2.1.0 release
|
||||
|
||||
- [ ] A default hand mesh rigged with the standard SenseGlove default hand pose.
|
||||
- [ ] Hand tracking compatible with OpenXR (or other generic hand tracking format).
|
||||
- [ ] Nova 2 Support.
|
||||
|
||||
### Planned features long-term
|
||||
|
||||
@@ -114,6 +113,10 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
||||
│
|
||||
├── SenseGloveAndroid (the Android-specific module)
|
||||
│
|
||||
├── SenseGloveBackend (responsible for initialization and deinitialization of the backend libraries)
|
||||
│
|
||||
├── SenseGloveBackendKismet (exposes Blueprints-specific functionality from the SenseGloveBackend module)
|
||||
│
|
||||
├── SenseGloveBuildHacks (uses Exceptions and RTTI, internally used for compiler-specific build hacks)
|
||||
│
|
||||
├── SenseGloveConnect (exposes part of the SGConnect low-level API to C++)
|
||||
@@ -166,32 +169,6 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
||||
│
|
||||
├── android
|
||||
│ │
|
||||
│ ├── r21e (Android NDK r21e dependencies for UE 4.27 and 5.0)
|
||||
│ │ │
|
||||
│ │ ├── arm64 (64-bit ARM variant of Android)
|
||||
│ │ │ │
|
||||
│ │ │ ├── debug
|
||||
│ │ │ │
|
||||
│ │ │ └── release
|
||||
│ │ │
|
||||
│ │ ├── armv7 (32-bit ARM variant of Android)
|
||||
│ │ │ │
|
||||
│ │ │ ├── debug
|
||||
│ │ │ │
|
||||
│ │ │ └── release
|
||||
│ │ │
|
||||
│ │ ├── x64 (64-bit x86-64 variant of Android)
|
||||
│ │ │ │
|
||||
│ │ │ ├── debug
|
||||
│ │ │ │
|
||||
│ │ │ └── release
|
||||
│ │ │
|
||||
│ │ └── x86 (32-bit x86 variant of Android)
|
||||
│ │ │
|
||||
│ │ ├── debug
|
||||
│ │ │
|
||||
│ │ └── release
|
||||
│ │
|
||||
│ └── r25b (Android NDK r21b dependencies for UE 5.1)
|
||||
│ │
|
||||
│ ├── arm64 (64-bit ARM variant of Android)
|
||||
|
||||
+24
-13
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"Version": 1,
|
||||
"VersionName": "1.9.7",
|
||||
"VersionName": "2.0.1",
|
||||
"FriendlyName": "SenseGlove",
|
||||
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
||||
"Category": "Virtual Reality",
|
||||
@@ -42,17 +42,6 @@
|
||||
"Win64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "SenseGloveBuildHacks",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Android",
|
||||
"Linux",
|
||||
"LinuxArm64",
|
||||
"Win64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "SenseGloveBackend",
|
||||
"Type": "Runtime",
|
||||
@@ -75,6 +64,17 @@
|
||||
"Win64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "SenseGloveBuildHacks",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Android",
|
||||
"Linux",
|
||||
"LinuxArm64",
|
||||
"Win64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "SenseGloveConnect",
|
||||
"Type": "Runtime",
|
||||
@@ -239,5 +239,16 @@
|
||||
"Win64"
|
||||
]
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "OpenXR",
|
||||
"Enabled": true,
|
||||
"PlatformAllowList": [
|
||||
"Android",
|
||||
"Linux",
|
||||
"Win64"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -99,10 +99,10 @@ USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer
|
||||
: Super(ObjectInitializer),
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
BuzzLevel = 0;
|
||||
BuzzDuration = 0.25f;
|
||||
ForceFeedbackLevel = 1.0f;
|
||||
|
||||
ForceFeedbackLevel = 100;
|
||||
VibrotactileDuration = 0.25f;
|
||||
VibrotactileLevel = 0.0f;
|
||||
}
|
||||
|
||||
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
|
||||
|
||||
@@ -36,11 +36,9 @@
|
||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||
|
||||
#include "Animation/Skeleton.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "Components/SkeletalMeshComponent.h"
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#include "Templates/UnrealTypeTraits.h"
|
||||
#include "UObject/ConstructorHelpers.h"
|
||||
|
||||
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
|
||||
@@ -59,29 +57,29 @@ struct USGVirtualHandComponent::FImpl
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left'")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Left.SK_Allbreaker_VirtualHand_Left")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right'")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/Allbreaker/"
|
||||
"SK_Allbreaker_VirtualHand_Right.SK_Allbreaker_VirtualHand_Right")};
|
||||
return Path;
|
||||
}
|
||||
|
||||
@@ -213,7 +211,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
||||
|
||||
bAutoStopAllHapticsOnEndPlay = true;
|
||||
|
||||
GrabSocketName = FName{TEXT("GrabPoint")};
|
||||
GrabSocketName = FName{TEXT("GenericGrabPoint")};
|
||||
|
||||
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
|
||||
|
||||
@@ -259,7 +257,7 @@ void USGVirtualHandComponent::SetRight(const bool bInRight)
|
||||
|
||||
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
|
||||
{
|
||||
ensureAlwaysMsgf(Cast<USGVirtualHandAnimInstance>(NewClass),
|
||||
ensureAlwaysMsgf((TIsDerivedFrom<decltype(NewClass), USGVirtualHandAnimInstance>::IsDerived),
|
||||
TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!"));
|
||||
|
||||
Super::SetAnimClass(NewClass);
|
||||
@@ -389,13 +387,7 @@ USGHandPose* USGVirtualHandComponent::GetHandPose()
|
||||
|
||||
if (IsValid(Glove))
|
||||
{
|
||||
#if ! PLATFORM_ANDROID
|
||||
Glove->GetHandPose(this, HandPose);
|
||||
#else /* ! PLATFORM_ANDROID */
|
||||
const UWorld* World{GetWorld()};
|
||||
const float DeltaTime = UGameplayStatics::GetWorldDeltaSeconds(World);
|
||||
Glove->GetHandPose(this, DeltaTime, HandPose);
|
||||
#endif /* ! PLATFORM_ANDROID */
|
||||
}
|
||||
|
||||
return HandPose;
|
||||
@@ -431,8 +423,8 @@ const FTransform& USGVirtualHandComponent::GetFingerBoneRefTransform(const int32
|
||||
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
|
||||
{
|
||||
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
|
||||
FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
|
||||
return MoveTemp(BoneRotation);
|
||||
const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
|
||||
return BoneRotation;
|
||||
}
|
||||
|
||||
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||
@@ -441,16 +433,16 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||
|
||||
if (!IsGloveConnected())
|
||||
{
|
||||
return MoveTemp(Rotations);
|
||||
return Rotations;
|
||||
}
|
||||
|
||||
const USGHandPose* HandPose = GetHandPose();
|
||||
if (!IsValid(HandPose))
|
||||
{
|
||||
return MoveTemp(Rotations);
|
||||
return Rotations;
|
||||
}
|
||||
|
||||
const TArray<TArray<FVector>> HandAngles{HandPose->GetHandAngles()};
|
||||
const TArray<TArray<FVector>>& HandAngles{HandPose->GetHandAngles()};
|
||||
|
||||
for (int32 FingerIndex = 0; FingerIndex < HandAngles.Num(); ++FingerIndex)
|
||||
{
|
||||
@@ -459,7 +451,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
|
||||
{
|
||||
const FVector& JointAngle{FingerJointAngles[JointIndex]};
|
||||
const FQuat JointRotation{FQuat::MakeFromEuler(JointAngle)};
|
||||
const FQuat JointRotation{FQuat::MakeFromEuler(FVector{-JointAngle.Y, -JointAngle.X, -JointAngle.Z})};
|
||||
|
||||
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
|
||||
|
||||
@@ -471,7 +463,7 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||
}
|
||||
}
|
||||
|
||||
return MoveTemp(Rotations);
|
||||
return Rotations;
|
||||
}
|
||||
|
||||
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
|
||||
@@ -505,7 +497,7 @@ FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
|
||||
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
|
||||
}
|
||||
|
||||
return MoveTemp(SkeletalMeshPath);
|
||||
return SkeletalMeshPath;
|
||||
}
|
||||
|
||||
bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() const
|
||||
@@ -573,25 +565,12 @@ USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
|
||||
|
||||
void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
|
||||
{
|
||||
// FIXME
|
||||
// Since we dont ship a default virtual hand mesh at the moment, calling SetDefaultMesh causes the following failed
|
||||
// assertion due the fact that the engine won't be able to find the asset at the default location:
|
||||
// Assertion failed: IsInGameThread()
|
||||
// Unable to load /SenseGlove/Meshes/SK_SenseGlove_VirtualHand_*. Objects and Packages can only be loaded from the
|
||||
// One workaround would be disabling the async loading or as an alternative simply disabling this portion of the
|
||||
// code should be a good-enough fix until we address this issue in it's own time.
|
||||
//Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
|
||||
Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
|
||||
}
|
||||
|
||||
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
|
||||
{
|
||||
return Owner->
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
|
||||
GetSkeletalMeshAsset()
|
||||
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
||||
SkeletalMesh
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
|
||||
;
|
||||
return Owner->GetSkeletalMeshAsset();
|
||||
}
|
||||
|
||||
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
|
||||
@@ -619,13 +598,18 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
||||
}
|
||||
}
|
||||
|
||||
const bool bGloveWasPresent = IsValid(Owner->Glove);
|
||||
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||
|
||||
if (!bFoundGlove && bGloveWasPresent)
|
||||
bool bGloveConnected;
|
||||
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
|
||||
{
|
||||
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
|
||||
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
|
||||
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||
if (!bGloveConnected)
|
||||
{
|
||||
Owner->Glove = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bGloveConnected = true;
|
||||
}
|
||||
|
||||
const bool bIsEditor = IsEditor();
|
||||
@@ -634,7 +618,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
||||
const bool bIsVisible = Owner->IsVisible();
|
||||
if (Owner->bHiddenInGameIfNoGloveDetected)
|
||||
{
|
||||
if (bFoundGlove)
|
||||
if (bGloveConnected)
|
||||
{
|
||||
if (!bIsVisible)
|
||||
{
|
||||
@@ -658,7 +642,7 @@ bool USGVirtualHandComponent::FImpl::CheckGlove() const
|
||||
}
|
||||
}
|
||||
|
||||
return bFoundGlove;
|
||||
return bGloveConnected;
|
||||
}
|
||||
|
||||
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
|
||||
|
||||
@@ -250,21 +250,22 @@ bool USGWristTrackerComponent::FImpl::CheckGlove() const
|
||||
}
|
||||
}
|
||||
|
||||
const bool bGloveWasPresent = IsValid(Owner->Glove);
|
||||
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||
|
||||
if (!bFoundGlove && bGloveWasPresent)
|
||||
bool bGloveConnected;
|
||||
if (!IsValid(Owner->Glove) || !Owner->Glove->IsConnected())
|
||||
{
|
||||
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
|
||||
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
|
||||
bGloveConnected = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
|
||||
if (!bGloveConnected)
|
||||
{
|
||||
Owner->Glove = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (bFoundGlove)
|
||||
else
|
||||
{
|
||||
bGloveConnected = true;
|
||||
UpdateWristTrackingData();
|
||||
}
|
||||
|
||||
return bFoundGlove;
|
||||
return bGloveConnected;
|
||||
}
|
||||
|
||||
void USGWristTrackerComponent::FImpl::UpdateMotionSource() const
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
#include "Components/PrimitiveComponent.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
#include "XRDeviceVisualizationComponent.h"
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
#include "UObject/UObjectGlobals.h"
|
||||
|
||||
#include "SenseGlove/Components/SGGrabComponent.h"
|
||||
@@ -48,6 +50,8 @@
|
||||
#include "SenseGlove/Components/SGWristTrackerComponent.h"
|
||||
#include "SGLog/SGLog.h"
|
||||
|
||||
static constexpr float SG_HAND_MESH_YAW_CORRECTION_OFFSET = -90.0f;
|
||||
|
||||
struct ASGPawn::FImpl
|
||||
{
|
||||
/************************
|
||||
@@ -173,6 +177,15 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
WristTrackerLeft->SetupAttachment(GetRootComponent());
|
||||
WristTrackerLeft->SetRight(false);
|
||||
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
ControllerVisualizerLeft = ObjectInitializer.CreateDefaultSubobject<UXRDeviceVisualizationComponent>(
|
||||
this, TEXT("ControllerVisualizerLeft"));
|
||||
ControllerVisualizerLeft->SetupAttachment(WristTrackerLeft);
|
||||
ControllerVisualizerLeft->SetDisplayModelSource(FName("OpenXR"));
|
||||
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
WristTrackerLeft->SetDisplayModelSource(FName("OpenXR"));
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
|
||||
HandLeft = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandLeft"));
|
||||
HandLeft->SetupAttachment(GetRootComponent());
|
||||
HandLeft->SetCanEverAffectNavigation(false);
|
||||
@@ -190,7 +203,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
HandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
|
||||
HandLeft->SetRight(false);
|
||||
HandLeft->SetHiddenIfNoGloveDetected(true);
|
||||
HandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
||||
HandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
HandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -214,7 +227,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
RealHandLeft->SetRight(false);
|
||||
Pimpl->SetVisibility(RealHandLeft, false);
|
||||
RealHandLeft->SetHiddenIfNoGloveDetected(true);
|
||||
RealHandLeft->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
||||
RealHandLeft->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -391,6 +404,15 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
WristTrackerRight->SetupAttachment(GetRootComponent());
|
||||
WristTrackerRight->SetRight(true);
|
||||
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
ControllerVisualizerRight = ObjectInitializer.CreateDefaultSubobject<UXRDeviceVisualizationComponent>(
|
||||
this, TEXT("ControllerVisualizerRight"));
|
||||
ControllerVisualizerRight->SetupAttachment(WristTrackerRight);
|
||||
ControllerVisualizerRight->SetDisplayModelSource(FName("OpenXR"));
|
||||
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
WristTrackerRight->SetDisplayModelSource(FName("OpenXR"));
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
|
||||
HandRight = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandRight"));
|
||||
HandRight->SetupAttachment(GetRootComponent());
|
||||
HandRight->SetCanEverAffectNavigation(false);
|
||||
@@ -407,9 +429,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
HandRight->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block);
|
||||
HandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
|
||||
HandRight->SetRight(true);
|
||||
HandRight->SetHiddenInGame(true);
|
||||
HandRight->SetHiddenIfNoGloveDetected(true);
|
||||
HandRight->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
||||
HandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -433,7 +454,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
RealHandRight->SetRight(true);
|
||||
Pimpl->SetVisibility(RealHandRight, false);
|
||||
RealHandRight->SetHiddenIfNoGloveDetected(true);
|
||||
RealHandRight->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
|
||||
RealHandRight->SetRelativeRotation(FRotator{0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET, 0.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -1810,20 +1831,24 @@ void ASGPawn::FImpl::UpdateHandRotation(const bool bRight, const FRotator& Rotat
|
||||
|
||||
void ASGPawn::FImpl::UpdateLeftHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
|
||||
{
|
||||
static const FQuat Offset{FQuat::MakeFromEuler(FVector{0.0f, 0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET})};
|
||||
const FQuat NewRotation{Rotation.Quaternion() * Offset};
|
||||
if (bUpdateVirtualHand)
|
||||
{
|
||||
Owner->HandLeft->SetWorldRotation(Rotation);
|
||||
Owner->HandLeft->SetWorldRotation(NewRotation);
|
||||
}
|
||||
Owner->RealHandLeft->SetWorldRotation(Rotation);
|
||||
Owner->RealHandLeft->SetWorldRotation(NewRotation);
|
||||
}
|
||||
|
||||
void ASGPawn::FImpl::UpdateRightHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
|
||||
{
|
||||
static const FQuat Offset{FQuat::MakeFromEuler(FVector{0.0f, 0.0f, SG_HAND_MESH_YAW_CORRECTION_OFFSET})};
|
||||
const FQuat NewRotation{Rotation.Quaternion() * Offset};
|
||||
if (bUpdateVirtualHand)
|
||||
{
|
||||
Owner->HandRight->SetWorldRotation(Rotation);
|
||||
Owner->HandRight->SetWorldRotation(NewRotation);
|
||||
}
|
||||
Owner->RealHandRight->SetWorldRotation(Rotation);
|
||||
Owner->RealHandRight->SetWorldRotation(NewRotation);
|
||||
}
|
||||
|
||||
void ASGPawn::FImpl::UpdateHandLocationAndRotation(
|
||||
|
||||
@@ -45,14 +45,12 @@
|
||||
|
||||
#include "TimerManager.h"
|
||||
|
||||
#include "SenseGlove/Components/SGGrabComponent.h"
|
||||
#include "SenseGlove/Components/SGTouchComponent.h"
|
||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||
#include "SenseGlove/GameFramework/SGPawn.h"
|
||||
#include "SenseGlove/Haptics/SGGrabState.h"
|
||||
#include "SenseGlove/Haptics/SGTouchState.h"
|
||||
#include "SGBuildHacks/SGPlatform.h"
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
|
||||
struct ASGPlayerController::FImpl
|
||||
@@ -61,18 +59,32 @@ struct ASGPlayerController::FImpl
|
||||
* Static methods
|
||||
************************/
|
||||
|
||||
static int32 GetBuzzLevel(const AActor* Actor);
|
||||
static float GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching);
|
||||
static float GetForceFeedbackLevel(const AActor* Actor);
|
||||
|
||||
static int32 GetForceFeedbackLevel(const AActor* Actor);
|
||||
static float GetVibrotactileDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching);
|
||||
static float GetVibrotactileLevel(const AActor* Actor);
|
||||
|
||||
static TArray<float> GetForceFeedbackLevels(
|
||||
const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching);
|
||||
|
||||
static TArray<float> GetVibrotactileLevels(
|
||||
const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching);
|
||||
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FTimerHandle TouchBuzzStopTimer;
|
||||
FTimerHandle TouchVibrotactileStopTimer;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
@@ -98,96 +110,137 @@ struct ASGPlayerController::FImpl
|
||||
* Methods
|
||||
************************/
|
||||
|
||||
USGBuzzCommand* GetBuzzCommand(
|
||||
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching) const;
|
||||
USGForceFeedbackCommand* GetForceFeedbackCommand(
|
||||
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching) const;
|
||||
|
||||
void UpdateHapticsFeedback(const FSGTouchState& TouchState);
|
||||
};
|
||||
|
||||
int32 ASGPlayerController::FImpl::GetBuzzLevel(const AActor* Actor)
|
||||
float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
|
||||
{
|
||||
if (IsValid(Actor))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
||||
if (TouchComponent)
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetBuzzLevel();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
float ASGPlayerController::FImpl::GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching)
|
||||
{
|
||||
if (IsValid(ActorThumbTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorThumbTouching);
|
||||
if (TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorIndexTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
|
||||
if (TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorMiddleTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
|
||||
if (TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorRingTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
|
||||
if (TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorPinkyTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
|
||||
if (TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
return TouchComponent->GetForceFeedbackLevel();
|
||||
}
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int32 ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
|
||||
float ASGPlayerController::FImpl::GetVibrotactileDuration(const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching)
|
||||
{
|
||||
if (IsValid(ActorThumbTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorThumbTouching);
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetVibrotactileDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorIndexTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetVibrotactileDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorMiddleTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetVibrotactileDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorRingTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetVibrotactileDuration();
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValid(ActorPinkyTouching))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetVibrotactileDuration();
|
||||
}
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float ASGPlayerController::FImpl::GetVibrotactileLevel(const AActor* Actor)
|
||||
{
|
||||
if (IsValid(Actor))
|
||||
{
|
||||
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
|
||||
if (TouchComponent)
|
||||
if (IsValid(TouchComponent))
|
||||
{
|
||||
return TouchComponent->GetForceFeedbackLevel();
|
||||
return TouchComponent->GetVibrotactileLevel();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
TArray<float> ASGPlayerController::FImpl::GetForceFeedbackLevels(
|
||||
const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching)
|
||||
{
|
||||
const float ThumbForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
|
||||
const float IndexForceFeedbackLevel = GetForceFeedbackLevel(ActorIndexTouching);
|
||||
const float MiddleForceFeedbackLevel = GetForceFeedbackLevel(ActorMiddleTouching);
|
||||
const float RingForceFeedbackLevel = GetForceFeedbackLevel(ActorRingTouching);
|
||||
const float PinkyForceFeedbackLevel = GetForceFeedbackLevel(ActorPinkyTouching);
|
||||
|
||||
const TArray<float> ForceFeedbackLevels{
|
||||
ThumbForceFeedbackLevel,
|
||||
IndexForceFeedbackLevel,
|
||||
MiddleForceFeedbackLevel,
|
||||
RingForceFeedbackLevel,
|
||||
PinkyForceFeedbackLevel,
|
||||
};
|
||||
|
||||
return ForceFeedbackLevels;
|
||||
}
|
||||
|
||||
TArray<float> ASGPlayerController::FImpl::GetVibrotactileLevels(
|
||||
const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching)
|
||||
{
|
||||
const float ThumbVibrotactileLevel = GetVibrotactileLevel(ActorThumbTouching);
|
||||
const float IndexVibrotactileLevel = GetVibrotactileLevel(ActorIndexTouching);
|
||||
const float MiddleVibrotactileLevel = GetVibrotactileLevel(ActorMiddleTouching);
|
||||
const float RingVibrotactileLevel = GetVibrotactileLevel(ActorRingTouching);
|
||||
const float PinkyVibrotactileLevel = GetVibrotactileLevel(ActorPinkyTouching);
|
||||
|
||||
const TArray<float> ForceFeedbackLevels{
|
||||
ThumbVibrotactileLevel,
|
||||
IndexVibrotactileLevel,
|
||||
MiddleVibrotactileLevel,
|
||||
RingVibrotactileLevel,
|
||||
PinkyVibrotactileLevel,
|
||||
};
|
||||
|
||||
return ForceFeedbackLevels;
|
||||
}
|
||||
|
||||
ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer)
|
||||
@@ -251,69 +304,10 @@ ASGPlayerController::FImpl::FImpl(ASGPlayerController* InOwner)
|
||||
|
||||
ASGPlayerController::FImpl::~FImpl() = default;
|
||||
|
||||
USGBuzzCommand* ASGPlayerController::FImpl::GetBuzzCommand(
|
||||
const AActor* ActorThumbTouching,
|
||||
const AActor* ActorIndexTouching,
|
||||
const AActor* ActorMiddleTouching,
|
||||
const AActor* ActorRingTouching,
|
||||
const AActor* ActorPinkyTouching) const
|
||||
{
|
||||
const int32 ThumbBuzzLevel = GetBuzzLevel(ActorThumbTouching);
|
||||
const int32 IndexBuzzLevel = GetBuzzLevel(ActorIndexTouching);
|
||||
const int32 MiddleBuzzLevel = GetBuzzLevel(ActorMiddleTouching);
|
||||
const int32 RingBuzzLevel = GetBuzzLevel(ActorRingTouching);
|
||||
const int32 PinkyBuzzLevel = GetBuzzLevel(ActorPinkyTouching);
|
||||
|
||||
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(ActorPinkyTouching);
|
||||
|
||||
if (ThumbForceFeedbackLevel <= 0 && IndexForceFeedbackLevel <= 0 && MiddleForceFeedbackLevel <= 0
|
||||
&& RingForceFeedbackLevel <= 0 && PinkyForceFeedbackLevel <= 0)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* ForceFeedbackCommand = USGForceFeedbackCommand::NewForceFeedbackCommand(
|
||||
Owner,
|
||||
GetForceFeedbackLevel(ActorThumbTouching),
|
||||
GetForceFeedbackLevel(ActorIndexTouching),
|
||||
GetForceFeedbackLevel(ActorMiddleTouching),
|
||||
GetForceFeedbackLevel(ActorRingTouching),
|
||||
GetForceFeedbackLevel(ActorPinkyTouching)
|
||||
);
|
||||
|
||||
return ForceFeedbackCommand;
|
||||
}
|
||||
|
||||
void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& TouchState)
|
||||
{
|
||||
static const TArray<float> VibrotactileOffCommand{0.0f, 0.0f, 0.0, 0.0, 0.0f};
|
||||
|
||||
if (!IsValid(TouchState.Hand))
|
||||
{
|
||||
return;
|
||||
@@ -325,48 +319,44 @@ void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& Touc
|
||||
return;
|
||||
}
|
||||
|
||||
const USGBuzzCommand* BuzzCommand{
|
||||
GetBuzzCommand(
|
||||
// Queue the Force-Feedback command...
|
||||
TArray<float> ForceFeedbackLevels{
|
||||
GetForceFeedbackLevels(
|
||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
||||
TouchState.ActorRingTouching,TouchState.ActorPinkyTouching)
|
||||
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
|
||||
};
|
||||
if (IsValid(BuzzCommand))
|
||||
{
|
||||
Glove->SendHaptics(BuzzCommand);
|
||||
Glove->QueueForceFeedbackLevels(MoveTemp(ForceFeedbackLevels));
|
||||
|
||||
const float Duration = FImpl::GetBuzzDuration(
|
||||
// Queue the Vibrotactile command...
|
||||
TArray<float> VibrotactileLevels{
|
||||
GetVibrotactileLevels(
|
||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
||||
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching);
|
||||
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching)
|
||||
};
|
||||
Glove->QueueVibroLevels(MoveTemp(VibrotactileLevels));
|
||||
|
||||
Owner->GetWorldTimerManager().ClearTimer(TouchBuzzStopTimer);
|
||||
// Send the haptics commands!
|
||||
Glove->SendHaptics();
|
||||
|
||||
FTimerDelegate TouchBuzzStopHandler;
|
||||
TouchBuzzStopHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
|
||||
// Stop the Vibrotactile command after the timeout if a.
|
||||
const float VibrotactileDuration = FImpl::GetVibrotactileDuration(
|
||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
||||
TouchState.ActorRingTouching, TouchState.ActorPinkyTouching);
|
||||
|
||||
Owner->GetWorldTimerManager().ClearTimer(TouchVibrotactileStopTimer);
|
||||
|
||||
FTimerDelegate TouchVibrotactileStopHandler;
|
||||
TouchVibrotactileStopHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
|
||||
{
|
||||
if (IsValid(Glove))
|
||||
{
|
||||
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
|
||||
});
|
||||
Glove->QueueVibroLevels(VibrotactileOffCommand);
|
||||
Glove->SendHaptics();
|
||||
}
|
||||
});
|
||||
|
||||
Owner->GetWorldTimerManager().SetTimer(
|
||||
TouchBuzzStopTimer, TouchBuzzStopHandler, Duration, false, -1.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
|
||||
}
|
||||
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand{
|
||||
GetForceFeedbackCommand(
|
||||
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
|
||||
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching)
|
||||
};
|
||||
if (IsValid(ForceFeedbackCommand))
|
||||
{
|
||||
Glove->SendHaptics(ForceFeedbackCommand);
|
||||
}
|
||||
else
|
||||
{
|
||||
Glove->SendHaptics(USGForceFeedbackCommand::Off(Owner));
|
||||
}
|
||||
Owner->GetWorldTimerManager().SetTimer(
|
||||
TouchVibrotactileStopTimer, TouchVibrotactileStopHandler, VibrotactileDuration, false, -1.0f);
|
||||
}
|
||||
|
||||
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
|
||||
void FSenseGloveModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGlove module...");
|
||||
SGLOG("Starting up the SenseGlove module...");
|
||||
}
|
||||
|
||||
void FSenseGloveModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGlove module...");
|
||||
SGLOG("Unloading the SenseGlove module...");
|
||||
}
|
||||
|
||||
void FSenseGloveModule::PostLoadCallback()
|
||||
@@ -55,7 +55,7 @@ void FSenseGloveModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGlove module...");
|
||||
SGLOG("Shutting down the SenseGlove module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
@@ -46,13 +46,19 @@ struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProx
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
private:
|
||||
TMap<FName, FRotator> BonesRotations;
|
||||
|
||||
public:
|
||||
FSGVirtualHandAnimInstanceProxy();
|
||||
FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance);
|
||||
|
||||
public:
|
||||
FORCEINLINE const TMap<FName, FRotator>& GetBonesRotations() const
|
||||
{
|
||||
return BonesRotations;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override;
|
||||
|
||||
|
||||
@@ -54,15 +54,15 @@ public:
|
||||
|
||||
private:
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
||||
int32 BuzzLevel;
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
|
||||
float ForceFeedbackLevel;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false", ClampMin = "0.0", UIMin = "0.0"))
|
||||
float BuzzDuration;
|
||||
float VibrotactileDuration;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
||||
int32 ForceFeedbackLevel;
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
|
||||
float VibrotactileLevel;
|
||||
|
||||
private:
|
||||
struct FImpl;
|
||||
@@ -76,33 +76,32 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
FORCEINLINE int32 GetBuzzLevel() const
|
||||
{
|
||||
return BuzzLevel;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetBuzzLevel(const int32 Level)
|
||||
{
|
||||
BuzzLevel = Level;
|
||||
}
|
||||
|
||||
FORCEINLINE float GetBuzzDuration() const
|
||||
{
|
||||
return BuzzDuration;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetBuzzDuration(const float Duration)
|
||||
{
|
||||
BuzzDuration = Duration;
|
||||
}
|
||||
|
||||
FORCEINLINE int32 GetForceFeedbackLevel() const
|
||||
FORCEINLINE float GetForceFeedbackLevel() const
|
||||
{
|
||||
return ForceFeedbackLevel;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetForceFeedbackLevel(const int32 Level)
|
||||
FORCEINLINE void SetForceFeedbackLevel(const float Level)
|
||||
{
|
||||
ForceFeedbackLevel = Level;
|
||||
}
|
||||
|
||||
FORCEINLINE float GetVibrotactileDuration() const
|
||||
{
|
||||
return VibrotactileDuration;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetVibrotactileDuration(const float Duration)
|
||||
{
|
||||
VibrotactileDuration = Duration;
|
||||
}
|
||||
FORCEINLINE float GetVibrotactileLevel() const
|
||||
{
|
||||
return VibrotactileLevel;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetVibrotactileLevel(const float Level)
|
||||
{
|
||||
VibrotactileLevel = Level;
|
||||
}
|
||||
};
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "Containers/Array.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "SenseGlove/Components/SGVirtualHandComponent.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#include "Templates/UniquePtr.h"
|
||||
|
||||
#include "SenseGlove/Haptics/SGGrabState.h"
|
||||
@@ -48,6 +48,7 @@
|
||||
class UCameraComponent;
|
||||
class UPrimitiveComponent;
|
||||
class USphereComponent;
|
||||
class UXRDeviceVisualizationComponent;
|
||||
|
||||
class USGVirtualHandComponent;
|
||||
class USGWristTrackerComponent;
|
||||
@@ -129,6 +130,9 @@ private:
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
USGWristTrackerComponent* WristTrackerLeft;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
UXRDeviceVisualizationComponent* ControllerVisualizerLeft;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
USGVirtualHandComponent* HandLeft;
|
||||
|
||||
@@ -162,6 +166,9 @@ private:
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
USGWristTrackerComponent* WristTrackerRight;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
UXRDeviceVisualizationComponent* ControllerVisualizerRight;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
USGVirtualHandComponent* HandRight;
|
||||
|
||||
@@ -244,6 +251,13 @@ public:
|
||||
return WristTrackerLeft;
|
||||
}
|
||||
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
FORCEINLINE UXRDeviceVisualizationComponent* GetControllerVisualizerLeft() const
|
||||
{
|
||||
return ControllerVisualizerLeft;
|
||||
}
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
|
||||
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
|
||||
{
|
||||
return HandLeft;
|
||||
@@ -299,6 +313,13 @@ public:
|
||||
return WristTrackerRight;
|
||||
}
|
||||
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2
|
||||
FORCEINLINE UXRDeviceVisualizationComponent* GetControllerVisualizerRight() const
|
||||
{
|
||||
return ControllerVisualizerLeft;
|
||||
}
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 */
|
||||
|
||||
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
|
||||
{
|
||||
return HandRight;
|
||||
|
||||
@@ -42,21 +42,22 @@ public class SenseGlove : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"AnimGraphRuntime",
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"HeadMountedDisplay",
|
||||
"InputCore",
|
||||
// NOTE
|
||||
// UE 5.3+ provides UXRDeviceVisualizationComponent as part of the XRBase plugin.
|
||||
// UE 5.2 provides UXRDeviceVisualizationComponent as part of the HeadMountDisplay module.
|
||||
// UE 5.1 does not provide the UXRDeviceVisualizationComponent type.
|
||||
#if UE_5_3_OR_LATER
|
||||
"XRBase",
|
||||
#endif
|
||||
"SenseGloveBackend",
|
||||
"SenseGloveConnect",
|
||||
"SenseGloveCore",
|
||||
@@ -74,4 +75,4 @@ public class SenseGlove : ModuleRules
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ int32 FSGCoreJNI::Initialize()
|
||||
|
||||
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'WriteHaptics'...");
|
||||
|
||||
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(ILjava/lang/String;)I");
|
||||
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(IILjava/lang/String;)I");
|
||||
FAndroidApplication::CheckJavaException();
|
||||
if (!WriteHapticsMethodID)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
void FSenseGloveAndroidModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveAndroid module...");
|
||||
SGLOG("Starting up the SenseGloveAndroid module...");
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
const int32 R1 = FSGConnectJNI::Initialize();
|
||||
@@ -59,17 +59,17 @@ void FSenseGloveAndroidModule::StartupModule()
|
||||
|
||||
void FSenseGloveAndroidModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveAndroid module...");
|
||||
SGLOG("Unloading the SenseGloveAndroid module...");
|
||||
}
|
||||
|
||||
void FSenseGloveAndroidModule::PostLoadCallback()
|
||||
{
|
||||
SGLOG("Loading SenseGloveAndroid module has succeeded!");
|
||||
SGLOG("Loading the SenseGloveAndroid module has succeeded!");
|
||||
}
|
||||
|
||||
void FSenseGloveAndroidModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveAndroid module...");
|
||||
SGLOG("Shutting down the SenseGloveAndroid module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
@@ -43,25 +43,25 @@ public class SenseGloveAndroid : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveConnectImpl",
|
||||
"SenseGloveCoreImpl",
|
||||
"SenseGloveInterop",
|
||||
"SenseGloveLog",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateIncludePathModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"SenseGloveInterop",
|
||||
}
|
||||
);
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
AdditionalPropertiesForReceipt.Add("AndroidPlugin",
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
#include "Engine/Engine.h"
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include "SGConnect/SGConnect.h"
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
|
||||
#include "SGCore/SGDeviceList.h"
|
||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
||||
#include "SGCore/SGHandLayer.h"
|
||||
#include "SGLog/SGLog.h"
|
||||
|
||||
struct USGBackend::FImpl
|
||||
@@ -115,9 +118,6 @@ bool USGBackend::InitializeBackend()
|
||||
FSGDeviceList::Dispose();
|
||||
FSGDeviceList::Reinitialize();
|
||||
|
||||
// Load the latest hand profiles.
|
||||
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
|
||||
|
||||
bBackendInitialized = true;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -42,16 +42,10 @@ public class SenseGloveBackend : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"InputCore",
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
|
||||
void FSenseGloveBackendKismetModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveBackendKismet module...");
|
||||
SGLOG("Starting up the SenseGloveBackendKismet module...");
|
||||
}
|
||||
|
||||
void FSenseGloveBackendKismetModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveBackendKismet module...");
|
||||
SGLOG("Unloading the SenseGloveBackendKismet module...");
|
||||
}
|
||||
|
||||
void FSenseGloveBackendKismetModule::PostLoadCallback()
|
||||
@@ -56,7 +56,7 @@ void FSenseGloveBackendKismetModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveBackendKismetModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveBackendKismet module...");
|
||||
SGLOG("Shutting down the SenseGloveBackendKismet module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
@@ -42,16 +42,10 @@ public class SenseGloveBackendKismet : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveBackend",
|
||||
|
||||
+1
-1
@@ -33,4 +33,4 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_SensorRange.h"
|
||||
#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h"
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HandLayer.h"
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationSequence.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveCommandBuffer.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveHandProfiles.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveQuickCalibration.h"
|
||||
+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"
|
||||
+1
-1
@@ -33,4 +33,4 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_CalibrationDataPoint.h"
|
||||
#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_NovaGloveCalibration.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_NovaGloveHandProfile.h"
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
|
||||
+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_SenseGloveSensorNormalizer.h"
|
||||
+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_SensorNormalization.h"
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_ThresholdCommand.h"
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_ThumperCommand.h"
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_TimedBuzzCommand.h"
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_TimedThumpCommand.h"
|
||||
@@ -40,12 +40,12 @@
|
||||
|
||||
void FSenseGloveBuildHacksModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveBuildHacks module...");
|
||||
SGLOG("Starting up the SenseGloveBuildHacks module...");
|
||||
}
|
||||
|
||||
void FSenseGloveBuildHacksModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveBuildHacks module...");
|
||||
SGLOG("Unloading the SenseGloveBuildHacks module...");
|
||||
}
|
||||
|
||||
void FSenseGloveBuildHacksModule::PostLoadCallback()
|
||||
@@ -55,7 +55,7 @@ void FSenseGloveBuildHacksModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveBuildHacksModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveBuildHacks module...");
|
||||
SGLOG("Shutting down the SenseGloveBuildHacks module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/FingerCommand.hpp"
|
||||
#include "SenseGlove/Core/CustomWaveform.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/BuzzCommand.hpp"
|
||||
#include "SenseGlove/Core/HandLayer.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticChannelInfo.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticGloveCalibrationCheck.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticGloveCalibrationSequence.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticGloveCommandBuffer.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticGloveHandProfiles.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HapticGloveQuickCalibration.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/NormalizationState.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/HandProfile.hpp"
|
||||
#include "SenseGlove/Core/Nova2Glove.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/CalibrationDataPoint.hpp"
|
||||
#include "SenseGlove/Core/Nova2GloveSensorData.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/NovaGloveCalibration.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/NovaGloveHandProfile.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/SenseGloveHandProfile.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/ForceFeedbackCommand.hpp"
|
||||
#include "SenseGlove/Core/SenseGloveSensorNormalizer.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/SensorNormalization.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/SensorRange.hpp"
|
||||
#include "SenseGlove/Core/ThresholdCommand.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/ThumperCommand.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/TimedBuzzCommand.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGBuildHacks/SGUndef_TEXT.h"
|
||||
|
||||
THIRD_PARTY_INCLUDES_START
|
||||
#include "SenseGlove/Core/TimedThumpCommand.hpp"
|
||||
THIRD_PARTY_INCLUDES_END
|
||||
|
||||
#include "SGBuildHacks/SGRestore_TEXT.h"
|
||||
@@ -46,16 +46,12 @@ public class SenseGloveBuildHacks : ModuleRules
|
||||
bEnableExceptions = true;
|
||||
bUseRTTI = true;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveLog",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
|
||||
void FSenseGloveConnectModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveConnect module...");
|
||||
SGLOG("Starting up the SenseGloveConnect module...");
|
||||
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"),
|
||||
*FSGConnect::GetLibraryVersion()));
|
||||
}
|
||||
|
||||
void FSenseGloveConnectModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveConnect module...");
|
||||
SGLOG("Unloading the SenseGloveConnect module...");
|
||||
}
|
||||
|
||||
void FSenseGloveConnectModule::PostLoadCallback()
|
||||
@@ -59,7 +59,7 @@ void FSenseGloveConnectModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveConnectModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveConnect module...");
|
||||
SGLOG("Shutting down the SenseGloveConnect module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
@@ -42,24 +42,25 @@ public class SenseGloveConnect : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveConnectImpl",
|
||||
"SenseGloveInterop",
|
||||
"SenseGloveLog",
|
||||
"SenseGloveTypes",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateIncludePathModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"SenseGloveInterop",
|
||||
}
|
||||
);
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
|
||||
void FSenseGloveConnectImplModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveConnectImpl module...");
|
||||
SGLOG("Starting up the SenseGloveConnectImpl module...");
|
||||
SGLOG(FString::Printf(TEXT("The low-level implementation of '%s' has been loaded successfully!"), *FSGConnectImpl::
|
||||
GetLibraryVersion()));
|
||||
}
|
||||
|
||||
void FSenseGloveConnectImplModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveConnectImpl module...");
|
||||
SGLOG("Unloading the SenseGloveConnectImpl module...");
|
||||
}
|
||||
|
||||
void FSenseGloveConnectImplModule::PostLoadCallback()
|
||||
@@ -59,7 +59,7 @@ void FSenseGloveConnectImplModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveConnectImplModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveConnectImpl module...");
|
||||
SGLOG("Shutting down the SenseGloveConnectImpl module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
@@ -36,11 +36,9 @@
|
||||
#pragma once
|
||||
|
||||
/* Defines a C++ like static_assert. */
|
||||
#if __cplusplus
|
||||
#include <cassert>
|
||||
#else
|
||||
#if ! __cplusplus
|
||||
#include <assert.h>
|
||||
#endif /* __cplusplus */
|
||||
#endif /* ! __cplusplus */
|
||||
|
||||
/* Contains __bool_true_false_are_defined macro that can be used in order to
|
||||
check whether boolean type is supported by the compiler or not. */
|
||||
@@ -58,7 +56,7 @@ static_assert(__bool_true_false_are_defined, "Error: bool, true, and false are n
|
||||
#define SENSEGLOVECONNECTIMPL_PUBLIC_API DLLIMPORT
|
||||
#endif /* defined ( SENSEGLOVE_BUILDING_CONNECT_IMPL_MODULE ) */
|
||||
|
||||
/* If C++ is used, switch to C mode in order to prevent C++'s name mangling of
|
||||
/* If C++ is used, switch to C mode in order to prevent the C++ name mangling of
|
||||
method names. */
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -48,21 +48,23 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
bEnableExceptions = true;
|
||||
bUseRTTI = true;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveBuildHacks",
|
||||
"SenseGloveInterop",
|
||||
"SenseGloveLog",
|
||||
"SenseGloveTypes",
|
||||
"SenseGloveUtils",
|
||||
"SenseGloveTypes",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateIncludePathModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"SenseGloveInterop",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -189,6 +191,8 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
case WindowsCompiler.VisualStudio2022:
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
|
||||
break;
|
||||
#endif
|
||||
#if ! UE_5_4_OR_LATER && UE_5_0_OR_LATER
|
||||
case WindowsCompiler.VisualStudio2019:
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc142"));
|
||||
break;
|
||||
@@ -338,6 +342,8 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
case WindowsCompiler.VisualStudio2022:
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
|
||||
break;
|
||||
#endif
|
||||
#if ! UE_5_4_OR_LATER && UE_5_0_OR_LATER
|
||||
case WindowsCompiler.VisualStudio2019:
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc142"));
|
||||
break;
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
|
||||
void FSenseGloveConnectKismetModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveConnectKismet module...");
|
||||
SGLOG("Starting up the SenseGloveConnectKismet module...");
|
||||
}
|
||||
|
||||
void FSenseGloveConnectKismetModule::PreUnloadCallback()
|
||||
{
|
||||
SGLOG("Unloading SenseGloveConnectKismet module...");
|
||||
SGLOG("Unloading the SenseGloveConnectKismet module...");
|
||||
}
|
||||
|
||||
void FSenseGloveConnectKismetModule::PostLoadCallback()
|
||||
@@ -55,7 +55,7 @@ void FSenseGloveConnectKismetModule::PostLoadCallback()
|
||||
|
||||
void FSenseGloveConnectKismetModule::ShutdownModule()
|
||||
{
|
||||
SGLOG("Shutting down SenseGloveConnectKismet module...");
|
||||
SGLOG("Shutting down the SenseGloveConnectKismet module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
@@ -42,16 +42,10 @@ public class SenseGloveConnectKismet : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveConnect",
|
||||
|
||||
@@ -68,6 +68,12 @@ float FSGAnatomy::GetThumbJointLimit(const bool bRightHanded, const int32 Joint,
|
||||
return SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
}
|
||||
|
||||
float FSGAnatomy::ClampJointAngle(
|
||||
const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement)
|
||||
{
|
||||
return SGCoreImpl_FSGAnatomyImpl_ClampJointAngle(Value, Finger, bRightHand, Joint, Movement);
|
||||
}
|
||||
|
||||
float FSGAnatomy::NormalizeFingerFlexion(const float FlexionInDegrees)
|
||||
{
|
||||
return SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(FlexionInDegrees);
|
||||
@@ -82,26 +88,26 @@ TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
@@ -208,21 +206,21 @@ TArray<TArray<float>> USGBasicHandModel::GetBaseFingerLengths()
|
||||
{
|
||||
FSGIC_TArray_TArray_float OutLengthsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths(&OutLengthsContainer);
|
||||
return MoveTemp(OutLengthsContainer.Array);
|
||||
return OutLengthsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<FVector> USGBasicHandModel::GetBaseJointPositions()
|
||||
{
|
||||
FSGIC_TArray_FVector OutPositionsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(&OutPositionsContainer);
|
||||
return MoveTemp(OutPositionsContainer.Array);
|
||||
return OutPositionsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<FVector> USGBasicHandModel::GetBaseJointAngles()
|
||||
{
|
||||
FSGIC_TArray_FVector OutRotationsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer);
|
||||
return MoveTemp(OutRotationsContainer.Array);
|
||||
return OutRotationsContainer.Array;
|
||||
}
|
||||
|
||||
USGBasicHandModel::USGBasicHandModel()
|
||||
@@ -363,7 +361,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerLengths() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_TArray_TArray_float OutLengthsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths(&InstanceContainer, &OutLengthsContainer);
|
||||
return MoveTemp(OutLengthsContainer.Array);
|
||||
return OutLengthsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
|
||||
@@ -373,7 +371,7 @@ TArray<float> USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger(&InstanceContainer, &OutLengthsContainer,
|
||||
&FingerContainer);
|
||||
return MoveTemp(OutLengthsContainer.Array);
|
||||
return OutLengthsContainer.Array;
|
||||
}
|
||||
|
||||
void USGBasicHandModel::SetFingerLengths(const ESGFinger Finger, const TArray<float>& Lengths)
|
||||
@@ -397,7 +395,7 @@ TArray<TArray<float>> USGBasicHandModel::GetFingerRatios() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_TArray_TArray_float OutRatiosContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios(&InstanceContainer, &OutRatiosContainer);
|
||||
return MoveTemp(OutRatiosContainer.Array);
|
||||
return OutRatiosContainer.Array;
|
||||
}
|
||||
|
||||
TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
|
||||
@@ -407,7 +405,7 @@ TArray<float> USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const
|
||||
FSGIC_TArray_float OutRatiosContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger(&InstanceContainer, &OutRatiosContainer,
|
||||
&FingerContainer);
|
||||
return MoveTemp(OutRatiosContainer.Array);
|
||||
return OutRatiosContainer.Array;
|
||||
}
|
||||
|
||||
TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
|
||||
@@ -415,7 +413,7 @@ TArray<FVector> USGBasicHandModel::GetStartJointPositions() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_TArray_FVector OutPositionsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions(&InstanceContainer, &OutPositionsContainer);
|
||||
return MoveTemp(OutPositionsContainer.Array);
|
||||
return OutPositionsContainer.Array;
|
||||
}
|
||||
|
||||
void USGBasicHandModel::SetStartJointPosition(const ESGFinger Finger, const FVector& Position)
|
||||
@@ -439,7 +437,7 @@ TArray<FQuat> USGBasicHandModel::GetStartJointRotationsQ() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer);
|
||||
return MoveTemp(OutRotationsContainer.Array);
|
||||
return OutRotationsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<FRotator> USGBasicHandModel::GetStartJointRotations() const
|
||||
@@ -456,7 +454,7 @@ FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
|
||||
FSGIC_FVector OutPositionContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer);
|
||||
return MoveTemp(OutPositionContainer.Vector);
|
||||
return OutPositionContainer.Vector;
|
||||
}
|
||||
|
||||
void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger)
|
||||
@@ -473,7 +471,7 @@ FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const
|
||||
FSGIC_FQuat OutRotationContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
|
||||
return MoveTemp(OutRotationContainer.Quat);
|
||||
return OutRotationContainer.Quat;
|
||||
}
|
||||
|
||||
FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
|
||||
@@ -506,7 +504,7 @@ TArray<float> USGBasicHandModel::GetTotalLengths() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_TArray_float OutLengthsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths(&InstanceContainer, &OutLengthsContainer);
|
||||
return MoveTemp(OutLengthsContainer.Array);
|
||||
return OutLengthsContainer.Array;
|
||||
}
|
||||
|
||||
float USGBasicHandModel::GetTotalLength(const ESGFinger Finger) const
|
||||
@@ -523,7 +521,7 @@ TArray<FVector> USGBasicHandModel::Get3DLengths(const ESGFinger Finger) const
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths(&InstanceContainer, &OutLengthsContainer,
|
||||
&FingerContainer);
|
||||
return MoveTemp(OutLengthsContainer.Array);
|
||||
return OutLengthsContainer.Array;
|
||||
}
|
||||
|
||||
bool USGBasicHandModel::Equals(const USGBasicHandModel* BasicHandModel) const
|
||||
@@ -538,7 +536,7 @@ FString USGBasicHandModel::ToString() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
|
||||
@@ -546,7 +544,7 @@ FString USGBasicHandModel::ToString(const bool bLengthsOnly) const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly(&InstanceContainer, &OutStringContainer, bLengthsOnly);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
FString USGBasicHandModel::SGSerialize() const
|
||||
@@ -554,7 +552,7 @@ FString USGBasicHandModel::SGSerialize() const
|
||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_Serialize(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGBasicHandModel::FImpl::FImpl(USGBasicHandModel* InOwner)
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "SGCore/SGBetaDevice.h"
|
||||
|
||||
#include "Engine/World.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGDeviceImplCast.h"
|
||||
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
||||
@@ -146,7 +145,7 @@ FString USGBetaDevice::GetDeviceId() const
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
|
||||
FSGIC_FString OutIdContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
|
||||
return MoveTemp(OutIdContainer.String);
|
||||
return OutIdContainer.String;
|
||||
}
|
||||
|
||||
FString USGBetaDevice::GetHardwareVersion() const
|
||||
@@ -174,7 +173,7 @@ FString USGBetaDevice::GetConstantsString() const
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
FString USGBetaDevice::GetSensorData() const
|
||||
@@ -182,7 +181,7 @@ FString USGBetaDevice::GetSensorData() const
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
|
||||
FSGIC_FString OutDataContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_GetSensorData(&InstanceContainer, &OutDataContainer);
|
||||
return MoveTemp(OutDataContainer.String);
|
||||
return OutDataContainer.String;
|
||||
}
|
||||
|
||||
FString USGBetaDevice::GetLastCommand() const
|
||||
@@ -190,7 +189,7 @@ FString USGBetaDevice::GetLastCommand() const
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
|
||||
FSGIC_FString OutCommandContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand(&InstanceContainer, &OutCommandContainer);
|
||||
return MoveTemp(OutCommandContainer.String);
|
||||
return OutCommandContainer.String;
|
||||
}
|
||||
|
||||
bool USGBetaDevice::SendHaptics(const FString& Command) const
|
||||
@@ -205,5 +204,5 @@ FString USGBetaDevice::ToString() const
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
|
||||
#include "SGFingerCommandImplCast.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGFingerCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_int32.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
{
|
||||
USGBuzzCommand* Instance = NewObject<USGBuzzCommand>(Outer);
|
||||
Instance->SetFingerCommandImpl(BuzzCommandImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
{
|
||||
USGBuzzCommand* Instance = NewObject<USGBuzzCommand>(Outer);
|
||||
Instance->SetFingerCommandImpl(MoveTemp(BuzzCommandImpl));
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const TArray<int32>& BuzzLevels)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_BuzzLevels_MakeShared(
|
||||
&OutSharedPtrContainer, &BuzzLevelsContainer);
|
||||
|
||||
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const int32 Thumb, const int32 Index, const int32 Middle,
|
||||
const int32 Ring, const int32 Pinky)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
|
||||
|
||||
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::NewBuzzCommand(UObject* Outer, const ESGFinger Finger, const int32 BuzzLevel)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
|
||||
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
|
||||
|
||||
return NewBuzzCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::Off(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGBuzzCommandImpl OutContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_Off(&OutContainer);
|
||||
return NewBuzzCommand(Outer, OutContainer.BuzzCommandImpl);
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand()
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
||||
: USGFingerCommand(BuzzLevels)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_BuzzLevels_MakeShared(
|
||||
&OutSharedPtrContainer, &BuzzLevelsContainer);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
|
||||
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
: USGFingerCommand(BuzzCommandImpl)
|
||||
{
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
: USGFingerCommand(MoveTemp(BuzzCommandImpl))
|
||||
{
|
||||
}
|
||||
|
||||
USGBuzzCommand::~USGBuzzCommand() = default;
|
||||
|
||||
TSharedRef<FSGBuzzCommandImpl> USGBuzzCommand::ToBuzzCommandImpl() const
|
||||
{
|
||||
return FSGFingerCommandImplCast::ToBuzzCommandImpl(ToFingerCommandImpl());
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::Copy(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl InstanceContainer{ToBuzzCommandImpl()};
|
||||
FSGIC_FSGBuzzCommandImpl OutBuzzCommandImplContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_Copy(&InstanceContainer, &OutBuzzCommandImplContainer);
|
||||
return NewBuzzCommand(Outer, MoveTemp(OutBuzzCommandImplContainer.BuzzCommandImpl));
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommand::Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl InstanceContainer{ToBuzzCommandImpl()};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandImplContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||
FSGIC_FSGBuzzCommandImpl OutBuzzCommandImplContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_Merge(&InstanceContainer, &OutBuzzCommandImplContainer, &BuzzCommandImplContainer);
|
||||
return NewBuzzCommand(Outer, MoveTemp(OutBuzzCommandImplContainer.BuzzCommandImpl));
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGCalibrationDataPoint.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FSGCalibrationDataPointImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
|
||||
struct USGCalibrationDataPoint::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FSGCalibrationDataPointImpl CalibrationDataPointImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGCalibrationDataPoint* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGCalibrationDataPoint* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
|
||||
UObject* Outer, const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
|
||||
{
|
||||
USGCalibrationDataPoint* Instance = NewObject<USGCalibrationDataPoint>(Outer);
|
||||
Instance->SetCalibrationDataPointImpl(CalibrationDataPointImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
|
||||
|
||||
return NewCalibrationDataPoint(Outer, MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl));
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
|
||||
UObject* Outer, const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_CurrentStage_CalibrationValues(
|
||||
&OutCalibrationDataPointImplContainer, CurrentStage, &CalibrationValuesContainer);
|
||||
|
||||
return NewCalibrationDataPoint(Outer, MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl));
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
|
||||
|
||||
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl);
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_CurrentStage_CalibrationValues(
|
||||
&OutCalibrationDataPointImplContainer, CurrentStage, &CalibrationValuesContainer);
|
||||
|
||||
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointImplContainer.CalibrationDataPointImpl);
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
SetCalibrationDataPointImpl(CalibrationDataPointImpl);
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::~USGCalibrationDataPoint() = default;
|
||||
|
||||
void USGCalibrationDataPoint::SetCalibrationDataPointImpl(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointContainer;
|
||||
FSGIC_FSGCalibrationDataPointImpl RhsContainer{CalibrationDataPointImpl};
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor_copy(&OutCalibrationDataPointContainer, &RhsContainer);
|
||||
Pimpl->CalibrationDataPointImpl = MoveTemp(OutCalibrationDataPointContainer.CalibrationDataPointImpl);
|
||||
}
|
||||
|
||||
const FSGCalibrationDataPointImpl& USGCalibrationDataPoint::ToCalibrationDataPointImpl() const
|
||||
{
|
||||
return Pimpl->CalibrationDataPointImpl;
|
||||
}
|
||||
|
||||
TArray<FVector> USGCalibrationDataPoint::GetCalibrationValues() const
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{ToCalibrationDataPointImpl()};
|
||||
FSGIC_TArray_FVector OutValuesContainer;
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_GetCalibrationValues(&InstanceContainer, &OutValuesContainer);
|
||||
return MoveTemp(OutValuesContainer.Array);
|
||||
}
|
||||
|
||||
int32 USGCalibrationDataPoint::GetStage() const
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{ToCalibrationDataPointImpl()};
|
||||
return SGCoreImpl_FSGCalibrationDataPointImpl_GetStage(&InstanceContainer);
|
||||
}
|
||||
|
||||
FString USGCalibrationDataPoint::ToLogData(const FString& Delimiter) const
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl InstanceContainer{Pimpl->CalibrationDataPointImpl};
|
||||
FSGIC_FString DelimiterContainer{Delimiter};
|
||||
FSGIC_FString OutDataContainer;
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ToLogData(&InstanceContainer, &OutDataContainer, &DelimiterContainer);
|
||||
return MoveTemp(OutDataContainer.String);
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::FImpl::FImpl(USGCalibrationDataPoint* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint::FImpl::~FImpl() = default;
|
||||
|
||||
void USGCalibrationDataPoint::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGCustomWaveform.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGWaveformType.h"
|
||||
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
|
||||
struct USGCustomWaveform::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FSGCustomWaveformImpl CustomWaveformImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGCustomWaveform* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGCustomWaveform* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const FSGCustomWaveformImpl& CustomWaveformImpl)
|
||||
{
|
||||
USGCustomWaveform* Instance = NewObject<USGCustomWaveform>(Outer);
|
||||
Instance->SetCustomWaveformImpl(CustomWaveformImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer);
|
||||
|
||||
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
|
||||
}
|
||||
|
||||
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const float Amplitude, const float Duration)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration(
|
||||
&OutCustomWaveformImplContainer, Amplitude, Duration);
|
||||
|
||||
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
|
||||
}
|
||||
|
||||
USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(
|
||||
UObject* Outer, const float Amplitude, const float Duration, const float Frequency)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency(
|
||||
&OutCustomWaveformImplContainer, Amplitude, Duration, Frequency);
|
||||
|
||||
return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl));
|
||||
}
|
||||
|
||||
FString USGCustomWaveform::ToString(const ESGWaveformType Type)
|
||||
{
|
||||
FSGIC_ESGWaveformType TypeContainer{Type};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ToString_Type(&OutStringContainer, &TypeContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGCustomWaveform::USGCustomWaveform()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer);
|
||||
|
||||
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
|
||||
}
|
||||
|
||||
USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration(
|
||||
&OutCustomWaveformImplContainer, Amplitude, Duration);
|
||||
|
||||
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
|
||||
}
|
||||
|
||||
USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration, const float Frequency)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency(
|
||||
&OutCustomWaveformImplContainer, Amplitude, Duration, Frequency);
|
||||
|
||||
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl);
|
||||
}
|
||||
|
||||
USGCustomWaveform::USGCustomWaveform(const FSGCustomWaveformImpl& CustomWaveformImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
SetCustomWaveformImpl(CustomWaveformImpl);
|
||||
}
|
||||
|
||||
USGCustomWaveform::~USGCustomWaveform() = default;
|
||||
|
||||
void USGCustomWaveform::SetCustomWaveformImpl(const FSGCustomWaveformImpl& CustomWaveformImpl)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutCustomWaveformContainer;
|
||||
FSGIC_FSGCustomWaveformImpl RhsContainer{CustomWaveformImpl};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ctor_copy(&OutCustomWaveformContainer, &RhsContainer);
|
||||
Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformContainer.CustomWaveformImpl);
|
||||
}
|
||||
|
||||
const FSGCustomWaveformImpl& USGCustomWaveform::ToCustomWaveformImpl() const
|
||||
{
|
||||
return Pimpl->CustomWaveformImpl;
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetAmplitude() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetAmplitude(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetAmplitude(const float Amplitude)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetAmplitude(&InstanceContainer, Amplitude);
|
||||
}
|
||||
|
||||
ESGWaveformType USGCustomWaveform::GetWaveType() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
FSGIC_ESGWaveformType OutTypeContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_GetWaveType(&InstanceContainer, &OutTypeContainer);
|
||||
return OutTypeContainer.Type;
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetWaveType(const ESGWaveformType Type)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
FSGIC_ESGWaveformType TypeContainer{Type};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetWaveType(&InstanceContainer, &TypeContainer);
|
||||
}
|
||||
|
||||
bool USGCustomWaveform::IsInfinite() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_IsInfinite(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetInfinite(const bool bInfinite)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetInfinite(&InstanceContainer, bInfinite);
|
||||
}
|
||||
|
||||
int32 USGCustomWaveform::GetRepeatAmount() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetRepeatAmount(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetRepeatAmount(const int32 Amount)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetRepeatAmount(&InstanceContainer, Amount);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetAttackTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetAttackTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetAttackTime(const float Time)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetAttackTime(&InstanceContainer, Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetSustainTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetSustainTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetSustainTime(const float Time)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetSustainTime(&InstanceContainer, Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetDecayTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetDecayTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetDecayTime(const float Time)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetDecayTime(&InstanceContainer, Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetFrequencyStart() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyStart(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetFrequencyStart(const float Frequency)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyStart(&InstanceContainer, Frequency);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetFrequencyEnd() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyEnd(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetFrequencyEnd(const float Frequency)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyEnd(&InstanceContainer, Frequency);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetFrequencySwitchTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetFrequencySwitchTime(const float Time)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchTime(&InstanceContainer, Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetFrequencySwitchFactor() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchFactor(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGCustomWaveform::SetFrequencySwitchFactor(const float Time)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchFactor(&InstanceContainer, Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetEffectTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetEffectTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
float USGCustomWaveform::GetTotalEffectTime() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_GetTotalEffectTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGCustomWaveform::FrequencyJumps() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_FrequencyJumps(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGCustomWaveform::Equals(const USGCustomWaveform* CustomWaveform) const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
FSGIC_FSGCustomWaveformImpl CustomWaveformContainer{CustomWaveform->ToCustomWaveformImpl()};
|
||||
return SGCoreImpl_FSGCustomWaveformImpl_Equals(&InstanceContainer, &CustomWaveformContainer);
|
||||
}
|
||||
|
||||
FString USGCustomWaveform::ToString() const
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGCustomWaveformImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGCustomWaveform::FImpl::FImpl(USGCustomWaveform* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGCustomWaveform::FImpl::~FImpl() = default;
|
||||
|
||||
void USGCustomWaveform::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -35,26 +35,38 @@
|
||||
|
||||
#include "SGCore/SGDevice.h"
|
||||
|
||||
#include "SGDeviceImplCast.h"
|
||||
#include "Engine/Engine.h"
|
||||
#include "Engine/GameViewportClient.h"
|
||||
#include "Engine/World.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
||||
|
||||
#include "SGCore/SGBetaDevice.h"
|
||||
#include "SGCore/SGHapticChannelInfo.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGNova2Glove.h"
|
||||
#include "SGCore/SGNovaGlove.h"
|
||||
#include "SGCore/SGSenseGlove.h"
|
||||
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||
#include "SGCoreImpl/SGHapticChannelInfoImpl.h"
|
||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||
#include "SGCoreImpl/SGNova2GloveImpl.h"
|
||||
#include "SGCoreImpl/SGNovaGloveImpl.h"
|
||||
#include "SGCoreImpl/SGSenseGloveImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGConnectionType.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_ESGHapticChannelType.h"
|
||||
#include "SGInterop/SGIC_FSGBetaDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_FSGDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHapticGloveImpl.h"
|
||||
#include "SGInterop/SGIC_FSGNova2GloveImpl.h"
|
||||
#include "SGInterop/SGIC_FSGNovaGloveImpl.h"
|
||||
#include "SGInterop/SGIC_FSGSenseGloveImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h"
|
||||
|
||||
@@ -93,12 +105,30 @@ void USGDevice::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion,
|
||||
SGCoreImpl_FSGDeviceImpl_ParseFirmware(&RawFirmwareContainer, &OutMainVersion, &OutSubVersion);
|
||||
}
|
||||
|
||||
bool USGDevice::FirmwareNewerThan(
|
||||
const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return
|
||||
SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive(
|
||||
MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDevice::FirmwareOlderThan(
|
||||
const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return
|
||||
SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive(
|
||||
MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
|
||||
}
|
||||
|
||||
FString USGDevice::ToString(const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
FSGIC_FString OutString;
|
||||
SGCoreImpl_FSGDeviceImpl_ToString(&DeviceTypeContainer, &OutString);
|
||||
return MoveTemp(OutString.String);
|
||||
return OutString.String;
|
||||
}
|
||||
|
||||
USGDevice::USGDevice()
|
||||
@@ -140,6 +170,16 @@ USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGDevice::USGDevice(const FSGNova2GloveImpl& Nova2GloveImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl};
|
||||
SGCoreImpl_FSGNova2GloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
@@ -178,6 +218,12 @@ USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl);
|
||||
}
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl);
|
||||
}
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
@@ -216,6 +262,14 @@ void USGDevice::SetSGDeviceImpl(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGDevice::SetSGDeviceImpl(const FSGNova2GloveImpl& Nova2GloveImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl};
|
||||
SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGDevice::SetSGDeviceImpl(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||
@@ -247,6 +301,11 @@ void USGDevice::SetSGDeviceImpl(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl);
|
||||
}
|
||||
|
||||
void USGDevice::SetSGDeviceImpl(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl);
|
||||
}
|
||||
|
||||
void USGDevice::SetSGDeviceImpl(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(NovaGloveImpl);
|
||||
@@ -262,6 +321,91 @@ TSharedRef<FSGDeviceImpl> USGDevice::ToSGDeviceImpl() const
|
||||
return Pimpl->SGDeviceImpl.ToSharedRef();
|
||||
}
|
||||
|
||||
bool USGDevice::IsABetaDevice() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_IsABetaDevice(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGDevice::IsAHapticGlove() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_IsAHapticGlove(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGDevice::IsANova2Glove() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_IsANova2Glove(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGDevice::IsANovaGlove() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_IsANovaGlove(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGDevice::IsASenseGlove() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_IsASenseGlove(&InstanceContainer);
|
||||
}
|
||||
|
||||
USGBetaDevice* USGDevice::AsBetaDevice(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtr;
|
||||
SGCoreImpl_FSGDeviceImpl_AsBetaDevice(&InstanceContainer, &OutSharedPtr);
|
||||
|
||||
USGBetaDevice* BetaDevice = NewObject<USGBetaDevice>(Outer);
|
||||
BetaDevice->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
|
||||
return BetaDevice;
|
||||
}
|
||||
|
||||
USGHapticGlove* USGDevice::AsHapticGlove(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtr;
|
||||
SGCoreImpl_FSGDeviceImpl_AsHapticGlove(&InstanceContainer, &OutSharedPtr);
|
||||
|
||||
USGHapticGlove* HapticGlove = NewObject<USGHapticGlove>(Outer);
|
||||
HapticGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
|
||||
return HapticGlove;
|
||||
}
|
||||
|
||||
USGNova2Glove* USGDevice::AsNova2Glove(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtr;
|
||||
SGCoreImpl_FSGDeviceImpl_AsNova2Glove(&InstanceContainer, &OutSharedPtr);
|
||||
|
||||
USGNova2Glove* Nova2Glove = NewObject<USGNova2Glove>(Outer);
|
||||
Nova2Glove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
|
||||
return Nova2Glove;
|
||||
}
|
||||
|
||||
USGNovaGlove* USGDevice::AsNovaGlove(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtr;
|
||||
SGCoreImpl_FSGDeviceImpl_AsNovaGlove(&InstanceContainer, &OutSharedPtr);
|
||||
|
||||
USGNovaGlove* NovaGlove = NewObject<USGNovaGlove>(Outer);
|
||||
NovaGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
|
||||
return NovaGlove;
|
||||
}
|
||||
|
||||
USGSenseGlove* USGDevice::AsSenseGlove(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtr;
|
||||
SGCoreImpl_FSGDeviceImpl_AsSenseGlove(&InstanceContainer, &OutSharedPtr);
|
||||
|
||||
USGSenseGlove* SenseGlove = NewObject<USGSenseGlove>(Outer);
|
||||
SenseGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef());
|
||||
return SenseGlove;
|
||||
}
|
||||
|
||||
ESGDeviceType USGDevice::GetDeviceType() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
@@ -281,7 +425,21 @@ FString USGDevice::GetFirmwareString() const
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGDeviceImpl_GetFirmwareString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
bool USGDevice::FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_bInclusive(
|
||||
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDevice::FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_bInclusive(
|
||||
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
FString USGDevice::GetAddress() const
|
||||
@@ -357,12 +515,32 @@ bool USGDevice::GetBatteryLevel(float& OutLevel)
|
||||
return bResult;
|
||||
}
|
||||
|
||||
void USGDevice::SetHapticChannels(const USGHapticChannelInfo* Channels)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_FSGHapticChannelInfoImpl ChannelsContainer{Channels->ToHapticChannelInfoImpl()};
|
||||
SGCoreImpl_FSGDeviceImpl_SetHapticChannels(&InstanceContainer, &ChannelsContainer);
|
||||
}
|
||||
|
||||
int32 USGDevice::GetHapticChannelCount() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount(&InstanceContainer);
|
||||
}
|
||||
|
||||
int32 USGDevice::GetHapticChannelCount(ESGHapticChannelType ChannelType) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_ESGHapticChannelType ChannelTypeContainer{ChannelType};
|
||||
return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount_ChannelType(&InstanceContainer, &ChannelTypeContainer);
|
||||
}
|
||||
|
||||
FString USGDevice::ToString() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGDeviceImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGDevice::FImpl::FImpl(USGDevice* InOwner)
|
||||
|
||||
@@ -39,11 +39,13 @@
|
||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||
#include "SGCoreImpl/SGNova2GloveImpl.h"
|
||||
#include "SGCoreImpl/SGNovaGloveImpl.h"
|
||||
#include "SGCoreImpl/SGSenseGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h"
|
||||
|
||||
@@ -63,6 +65,14 @@ TSharedRef<FSGHapticGloveImpl> FSGDeviceImplCast::ToHapticGloveImpl(TSharedRef<F
|
||||
return OutSharedPtrContainer.Ptr.ToSharedRef();
|
||||
}
|
||||
|
||||
TSharedRef<FSGNova2GloveImpl> FSGDeviceImplCast::ToNova2GloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)};
|
||||
FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGDeviceImpl_ToNova2GloveImplRef(&InstanceContainer, &OutSharedPtrContainer);
|
||||
return OutSharedPtrContainer.Ptr.ToSharedRef();
|
||||
}
|
||||
|
||||
TSharedRef<FSGNovaGloveImpl> FSGDeviceImplCast::ToNovaGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)};
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
class FSGBetaDeviceImpl;
|
||||
class FSGDeviceImpl;
|
||||
class FSGHapticGloveImpl;
|
||||
class FSGNova2GloveImpl;
|
||||
class FSGNovaGloveImpl;
|
||||
class FSGSenseGloveImpl;
|
||||
|
||||
@@ -50,6 +51,8 @@ public:
|
||||
|
||||
static TSharedRef<FSGHapticGloveImpl> ToHapticGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
|
||||
|
||||
static TSharedRef<FSGNova2GloveImpl> ToNova2GloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
|
||||
|
||||
static TSharedRef<FSGNovaGloveImpl> ToNovaGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
|
||||
|
||||
static TSharedRef<FSGSenseGloveImpl> ToSenseGloveImpl(TSharedRef<FSGDeviceImpl> SGDeviceImpl);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "SGCore/SGBetaDevice.h"
|
||||
#include "SGCore/SGDevice.h"
|
||||
#include "SGCore/SGDeviceImplCast.h"
|
||||
#include "SGCore/SGNova2Glove.h"
|
||||
#include "SGCore/SGNovaGlove.h"
|
||||
#include "SGCore/SGSenseGlove.h"
|
||||
#include "SGCoreImpl/SGBetaDeviceImpl.h"
|
||||
@@ -92,6 +93,12 @@ TArray<USGDevice*> FSGDeviceList::GetDevices(UObject* Outer)
|
||||
Devices.Push(BetaDevice);
|
||||
}
|
||||
break;
|
||||
case ESGDeviceType::Nova2:
|
||||
{
|
||||
TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{FSGDeviceImplCast::ToNova2GloveImpl(DeviceImpl)};
|
||||
USGNova2Glove* Nova2Glove = USGNova2Glove::NewNova2Glove(Outer, MoveTemp(Nova2GloveImpl));
|
||||
Devices.Push(Nova2Glove);
|
||||
}
|
||||
case ESGDeviceType::Nova:
|
||||
{
|
||||
TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{FSGDeviceImplCast::ToNovaGloveImpl(DeviceImpl)};
|
||||
@@ -165,11 +172,12 @@ bool FSGDeviceList::GetSensorDataString(const int32 IpcIndex, const FString& Ipc
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
bool FSGDeviceList::SendHaptics(const int32 IpcIndex, const FString& IpcAddress, const FString& Commands)
|
||||
bool FSGDeviceList::SendHaptics(
|
||||
const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands)
|
||||
{
|
||||
FSGIC_FString IpcAddressContainer{IpcAddress};
|
||||
FSGIC_FString CommandsContainer{Commands};
|
||||
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, &CommandsContainer);
|
||||
return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, ChannelIndex, &CommandsContainer);
|
||||
}
|
||||
|
||||
FString FSGDeviceList::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, const int32 Index)
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "SGCore/SGDeviceModel.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FSGDeviceModelImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
@@ -103,7 +101,7 @@ TArray<bool> USGDeviceModel::ParseFunctions(const int32 Value, const int32 Size)
|
||||
{
|
||||
FSGIC_TArray_bool OutParseFunctionsContainer;
|
||||
SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(&OutParseFunctionsContainer, Value, Size);
|
||||
return MoveTemp(OutParseFunctionsContainer.Array);
|
||||
return OutParseFunctionsContainer.Array;
|
||||
}
|
||||
|
||||
void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion)
|
||||
@@ -165,7 +163,7 @@ FString USGDeviceModel::GetDeviceId() const
|
||||
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
|
||||
FSGIC_FString OutIdContainer;
|
||||
SGCoreImpl_FSGDeviceModelImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
|
||||
return MoveTemp(OutIdContainer.String);
|
||||
return OutIdContainer.String;
|
||||
}
|
||||
|
||||
FString USGDeviceModel::GetHardwareVersion() const
|
||||
@@ -173,7 +171,7 @@ FString USGDeviceModel::GetHardwareVersion() const
|
||||
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
|
||||
FSGIC_FString OutVersionContainer;
|
||||
SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
|
||||
return MoveTemp(OutVersionContainer.String);
|
||||
return OutVersionContainer.String;
|
||||
}
|
||||
|
||||
int32 USGDeviceModel::GetFirmwareVersion() const
|
||||
@@ -188,6 +186,22 @@ int32 USGDeviceModel::GetSubFirmwareVersion() const
|
||||
return SGCoreImpl_FSGDeviceModelImpl_GetSubFirmwareVersion(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGDeviceModel::FirmwareNewerThan(const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive) const
|
||||
{
|
||||
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
|
||||
return SGCoreImpl_FSGDeviceModelImpl_FirmwareNewerThan(
|
||||
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDeviceModel::FirmwareOlderThan(const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive) const
|
||||
{
|
||||
FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()};
|
||||
return SGCoreImpl_FSGDeviceModelImpl_FirmwareOlderThan(
|
||||
&InstanceContainer, FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
USGDeviceModel::FImpl::FImpl(USGDeviceModel* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGFingerCommand.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGFingerCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGTimedBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_int32.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGFingerCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGTimedBuzzCommandImpl.h"
|
||||
|
||||
struct USGFingerCommand::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
TSharedPtr<FSGFingerCommandImpl> FingerCommandImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGFingerCommand* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGFingerCommand* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGFingerCommand::USGFingerCommand()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 LevelsContainer{InLevels};
|
||||
SGCoreImpl_FSGFingerCommandImpl_ctor_Levels_MakeShared(&OutSharedPtrContainer, &LevelsContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
|
||||
SGCoreImpl_FSGFingerCommandImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
|
||||
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(FingerCommandImpl);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
|
||||
}
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
|
||||
}
|
||||
|
||||
USGFingerCommand::~USGFingerCommand() = default;
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(const FSGFingerCommandImpl& FingerCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
|
||||
SGCoreImpl_FSGFingerCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
|
||||
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->FingerCommandImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(FingerCommandImpl);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetFingerCommandImpl(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
|
||||
}
|
||||
|
||||
TSharedRef<FSGFingerCommandImpl> USGFingerCommand::ToFingerCommandImpl() const
|
||||
{
|
||||
return Pimpl->FingerCommandImpl.ToSharedRef();
|
||||
}
|
||||
|
||||
TArray<int32> USGFingerCommand::GetLevels() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
|
||||
FSGIC_TArray_int32 OutLevelsContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_GetLevels(&InstanceContainer, &OutLevelsContainer);
|
||||
return MoveTemp(OutLevelsContainer.Array);
|
||||
}
|
||||
|
||||
int32 USGFingerCommand::GetLevel(const int32 Finger) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
|
||||
const int32 Level = SGCoreImpl_FSGFingerCommandImpl_GetLevel(&InstanceContainer, Finger);
|
||||
return Level;
|
||||
}
|
||||
|
||||
void USGFingerCommand::SetLevel(const int32 Finger, const int32 Value)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
|
||||
SGCoreImpl_FSGFingerCommandImpl_SetLevel(&InstanceContainer, Finger, Value);
|
||||
}
|
||||
|
||||
bool USGFingerCommand::Equals(const USGFingerCommand* FingerCommand) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
|
||||
FSGIC_FSGFingerCommandImpl FingerCommandImplContainer{FingerCommand->ToFingerCommandImpl().Get()};
|
||||
const bool bEquals = SGCoreImpl_FSGFingerCommandImpl_Equals(&InstanceContainer, &FingerCommandImplContainer);
|
||||
return bEquals;
|
||||
}
|
||||
|
||||
FString USGFingerCommand::ToString() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{ToFingerCommandImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
}
|
||||
|
||||
USGFingerCommand::FImpl::FImpl(USGFingerCommand* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGFingerCommand::FImpl::~FImpl() = default;
|
||||
|
||||
void USGFingerCommand::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGFingerCommandImplCast.h"
|
||||
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGFingerCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGFingerCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGTimedBuzzCommandImpl.h"
|
||||
|
||||
TSharedRef<FSGBuzzCommandImpl> FSGFingerCommandImplCast::ToBuzzCommandImpl(
|
||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ToBuzzCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
|
||||
return OutSharedPtrContainer.Ptr.ToSharedRef();
|
||||
}
|
||||
|
||||
TSharedRef<FSGForceFeedbackCommandImpl> FSGFingerCommandImplCast::ToForceFeedbackCommandImpl(
|
||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ToForceFeedbackCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
|
||||
return OutSharedPtrContainer.Ptr.ToSharedRef();
|
||||
}
|
||||
|
||||
TSharedRef<FSGTimedBuzzCommandImpl> FSGFingerCommandImplCast::ToTimedBuzzCommandImpl(
|
||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl InstanceContainer{MoveTemp(FingerCommandImpl)};
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ToTimedBuzzCommandImplRef(&InstanceContainer, &OutSharedPtrContainer);
|
||||
return OutSharedPtrContainer.Ptr.ToSharedRef();
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Templates/SharedPointer.h"
|
||||
|
||||
class FSGFingerCommandImpl;
|
||||
class FSGBuzzCommandImpl;
|
||||
class FSGForceFeedbackCommandImpl;
|
||||
class FSGTimedBuzzCommandImpl;
|
||||
|
||||
class SENSEGLOVECORE_API FSGFingerCommandImplCast
|
||||
{
|
||||
public:
|
||||
static TSharedRef<FSGBuzzCommandImpl> ToBuzzCommandImpl(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
||||
|
||||
static TSharedRef<FSGForceFeedbackCommandImpl> ToForceFeedbackCommandImpl(
|
||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
||||
|
||||
static TSharedRef<FSGTimedBuzzCommandImpl> ToTimedBuzzCommandImpl(
|
||||
TSharedRef<FSGFingerCommandImpl> FingerCommandImpl);
|
||||
};
|
||||
@@ -1,187 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
|
||||
#include "SGFingerCommandImplCast.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TArray_int32.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGForceFeedbackCommandImpl.h"
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer,
|
||||
const FSGForceFeedbackCommandImpl&
|
||||
ForceFeedbackCommandImpl)
|
||||
{
|
||||
USGForceFeedbackCommand* Instance = NewObject<USGForceFeedbackCommand>(Outer);
|
||||
Instance->SetFingerCommandImpl(ForceFeedbackCommandImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer,
|
||||
TSharedRef<FSGForceFeedbackCommandImpl>
|
||||
ForceFeedbackCommandImpl)
|
||||
{
|
||||
USGForceFeedbackCommand* Instance = NewObject<USGForceFeedbackCommand>(Outer);
|
||||
Instance->SetFingerCommandImpl(MoveTemp(ForceFeedbackCommandImpl));
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(UObject* Outer)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
|
||||
UObject* Outer, const TArray<int32>& ForceFeedbackLevels)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_ForceFeedbackLevels_MakeShared(
|
||||
&OutSharedPtrContainer, &ForceFeedbackLevelsContainer);
|
||||
|
||||
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
|
||||
UObject* Outer, const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
|
||||
|
||||
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::NewForceFeedbackCommand(
|
||||
UObject* Outer, ESGFinger Finger, const int32 BuzzLevel)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
|
||||
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
|
||||
|
||||
return NewForceFeedbackCommand(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::Off(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGForceFeedbackCommandImpl OutContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_Off(&OutContainer);
|
||||
return NewForceFeedbackCommand(Outer, OutContainer.ForceFeedbackCommandImpl);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand()
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels)
|
||||
: USGFingerCommand(ForceFeedbackLevels)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_ForceFeedbackLevels_MakeShared(
|
||||
&OutSharedPtrContainer, &ForceFeedbackLevelsContainer);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
&OutSharedPtrContainer, Thumb, Index, Middle, Ring, Pinky);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: USGFingerCommand()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Finger_BuzzLevel_MakeShared(
|
||||
&OutSharedPtrContainer, &FingerContainer, BuzzLevel);
|
||||
|
||||
SetFingerCommandImpl(OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||
: USGFingerCommand(ForceFeedbackCommandImpl)
|
||||
{
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||
: USGFingerCommand(MoveTemp(ForceFeedbackCommandImpl))
|
||||
{
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::~USGForceFeedbackCommand() = default;
|
||||
|
||||
TSharedRef<FSGForceFeedbackCommandImpl> USGForceFeedbackCommand::ToForceFeedbackCommandImpl() const
|
||||
{
|
||||
return FSGFingerCommandImplCast::ToForceFeedbackCommandImpl(ToFingerCommandImpl());
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::Copy(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl InstanceContainer{ToForceFeedbackCommandImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl OutForceFeedbackCommandImplContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_Copy(&InstanceContainer, &OutForceFeedbackCommandImplContainer);
|
||||
return NewForceFeedbackCommand(Outer, MoveTemp(OutForceFeedbackCommandImplContainer.ForceFeedbackCommandImpl));
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommand::Merge(UObject* Outer,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl InstanceContainer{ToForceFeedbackCommandImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandImplContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl OutForceFeedbackCommandImplContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_Merge(&InstanceContainer, &OutForceFeedbackCommandImplContainer,
|
||||
&ForceFeedbackCommandImplContainer);
|
||||
return NewForceFeedbackCommand(Outer, MoveTemp(OutForceFeedbackCommandImplContainer.ForceFeedbackCommandImpl));
|
||||
}
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGInterpolationSet.h"
|
||||
#include "SGCoreImpl/SGInterpolationSetImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
@@ -50,6 +48,8 @@
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_float.h"
|
||||
#include "SGInterop/SGIC_TArray_TArray_float.h"
|
||||
#include "SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h"
|
||||
#include "SGInterop/SGIC_TArray_TArray_FVector.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
@@ -99,155 +99,26 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer)
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer, const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
|
||||
&JointInterpolationsContainer);
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
|
||||
bRightHanded);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
|
||||
&JointInterpolationsContainer);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FQuat& CmcStartRotation)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::Default(UObject* Outer, const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_Default(&OutHandInterpolatorImplContainer, bRightHanded);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer, const FString& SerializedString)
|
||||
USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer,
|
||||
const FString& SerializedString, const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_FString SerializedStringContainer{SerializedString};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer, &SerializedStringContainer);
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer,
|
||||
&SerializedStringContainer, bRightHanded);
|
||||
|
||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||
}
|
||||
|
||||
TArray<FVector> USGHandInterpolator::InterpolateFingerAngles(const ESGFinger Finger,
|
||||
const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles)
|
||||
{
|
||||
FSGIC_TArray_FVector OutAnglesContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||
FSGIC_FVector TotalGloveAnglesContainer{TotalGloveAngles};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateFingerAngles(&OutAnglesContainer, &FingerContainer,
|
||||
&InterpolatorContainer, &TotalGloveAnglesContainer);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
TArray<FVector> USGHandInterpolator::InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles)
|
||||
{
|
||||
FSGIC_TArray_FVector OutAnglesContainer;
|
||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||
FSGIC_FVector TotalGloveAnglesContainer{TotalGloveAngles};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateThumbAngles(&OutAnglesContainer, &InterpolatorContainer,
|
||||
&TotalGloveAnglesContainer);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(const USGHandInterpolator* Interpolator,
|
||||
const TArray<FVector>& TotalAngles)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||
FSGIC_TArray_FVector TotalAnglesContainer{TotalAngles};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles(&OutAnglesContainer, &InterpolatorContainer,
|
||||
&TotalAnglesContainer);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
@@ -257,97 +128,12 @@ USGHandInterpolator::USGHandInterpolator()
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
|
||||
USGHandInterpolator::USGHandInterpolator(const bool bRightHanded)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
|
||||
&JointInterpolationsContainer);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations(&OutHandInterpolatorImplContainer,
|
||||
&JointInterpolationsContainer);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
FSGArrayUtils::ToImplType<
|
||||
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||
JointInterpolations)};
|
||||
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer,
|
||||
bRightHanded);
|
||||
|
||||
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||
}
|
||||
@@ -373,104 +159,36 @@ const FSGHandInterpolatorImpl& USGHandInterpolator::ToHandInterpolatorImpl() con
|
||||
return Pimpl->HandInterpolatorImpl;
|
||||
}
|
||||
|
||||
TArray<TArray<USGInterpolationSet*>> USGHandInterpolator::GetJointInterpolations(UObject* Outer) const
|
||||
float USGHandInterpolator::CalculateAngle(
|
||||
const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl OutInterpolationsContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_GetJointInterpolations(&InstanceContainer, &OutInterpolationsContainer);
|
||||
|
||||
TArray<TArray<USGInterpolationSet*>> JointInterpolations{
|
||||
FSGArrayUtils::FromImplType<FSGInterpolationSetImpl, USGInterpolationSet,
|
||||
&USGInterpolationSet::NewInterpolationSet>(
|
||||
Outer, MoveTemp(OutInterpolationsContainer.Array))
|
||||
};
|
||||
|
||||
return JointInterpolations;
|
||||
}
|
||||
|
||||
FQuat USGHandInterpolator::GetCmcStartRotationQ() const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_FQuat OutRotationContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
|
||||
return MoveTemp(OutRotationContainer.Quat);
|
||||
}
|
||||
|
||||
FRotator USGHandInterpolator::GetCmcStartRotation() const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_FQuat OutRotationContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
|
||||
return OutRotationContainer.Quat.Rotator();
|
||||
}
|
||||
|
||||
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_int32Movement_Value(
|
||||
&InstanceContainer, &FingerContainer, Movement, Value);
|
||||
return Angle;
|
||||
}
|
||||
|
||||
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const ESGFingerMovement Movement,
|
||||
const float Value) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
FSGIC_ESGFingerMovement MovementContainer{Movement};
|
||||
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_ESGFingerMovement_Value(
|
||||
&InstanceContainer, &FingerContainer, &MovementContainer, Value);
|
||||
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits(
|
||||
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
|
||||
return Angle;
|
||||
}
|
||||
|
||||
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const ESGThumbMovement Movement,
|
||||
const float Value) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
FSGIC_ESGThumbMovement MovementContainer{Movement};
|
||||
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_Finger_ESGThumbMovement_Value(
|
||||
&InstanceContainer, &FingerContainer, &MovementContainer, Value);
|
||||
return Angle;
|
||||
}
|
||||
|
||||
void USGHandInterpolator::SetInterpolation(const int32 Finger, const int32 Movement, const float InputAt0,
|
||||
const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_int32Finger_int32Movement_InputAt0_InputAt1_AngleAt0_AngleAt1(
|
||||
&InstanceContainer, Finger, Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
}
|
||||
|
||||
void USGHandInterpolator::SetInterpolation(const ESGFinger Finger, const ESGFingerMovement Movement,
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0,
|
||||
const float AngleAt1)
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
FSGIC_ESGFingerMovement MovementContainer{Movement};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_ESGFinger_ESGFingerMovement_InputAt0_InputAt1_AngleAt0_AngleAt1(
|
||||
&InstanceContainer, &FingerContainer, &MovementContainer, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
}
|
||||
|
||||
void USGHandInterpolator::SetInterpolation(const ESGThumbMovement Movement, const float InputAt0, const float InputAt1,
|
||||
const float AngleAt0, const float AngleAt1)
|
||||
float USGHandInterpolator::CalculateAngle(
|
||||
const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_ESGThumbMovement MovementContainer{Movement};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_SetInterpolation_Movement_InputAt0_InputAt1_AngleAt0_AngleAt1(
|
||||
&InstanceContainer, &MovementContainer, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits(
|
||||
&InstanceContainer, &MovementContainer, Value, bApplyLimits);
|
||||
return Angle;
|
||||
}
|
||||
|
||||
USGInterpolationSet* USGHandInterpolator::GetInterpolation(UObject* Outer,
|
||||
const int32 Finger, const int32 Movement) const
|
||||
TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(
|
||||
const TArray<TArray<float>>& Flexions, const TArray<float>& Abductions, const float CmcTwist) const
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_FSGInterpolationSetImpl OutInterpolationContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_GetInterpolation(&InstanceContainer, &OutInterpolationContainer, Finger,
|
||||
Movement);
|
||||
return USGInterpolationSet::NewInterpolationSet(Outer, MoveTemp(OutInterpolationContainer.InterpolationSetImpl));
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
FSGIC_TArray_TArray_float FlexionsContainer{Flexions};
|
||||
FSGIC_TArray_float AbductionsContainer{Abductions};
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles(
|
||||
&InstanceContainer, &OutAnglesContainer, &FlexionsContainer, &AbductionsContainer, CmcTwist);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
|
||||
bool USGHandInterpolator::Equals(const USGHandInterpolator* HandInterpolator) const
|
||||
@@ -486,7 +204,7 @@ FString USGHandInterpolator::SGSerialize() const
|
||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_Serialize(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGHandInterpolator::FImpl::FImpl(USGHandInterpolator* InOwner)
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGHandLayer.h"
|
||||
|
||||
#include "SGCore/SGCustomWaveform.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h"
|
||||
#include "SGInterop/SGIC_ESGHapticLocation.h"
|
||||
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_float.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
|
||||
|
||||
bool FSGHandLayer::DeviceConnected(const bool bRightHanded)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_DeviceConnected(bRightHanded);
|
||||
}
|
||||
|
||||
ESGDeviceType FSGHandLayer::GetDeviceType(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer;
|
||||
SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&DeviceTypeContainer, bRightHanded);
|
||||
return DeviceTypeContainer.Type;
|
||||
}
|
||||
|
||||
bool FSGHandLayer::GetFirstGloveHandedness()
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_GetFirstGloveHandedness();
|
||||
}
|
||||
|
||||
int32 FSGHandLayer::GlovesConnected()
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_GlovesConnected();
|
||||
}
|
||||
|
||||
bool FSGHandLayer::GetGloveInstance(UObject* Outer, const bool bRightHanded, USGHapticGlove*& OutGlove)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetGloveInstance(bRightHanded, &OutGloveContainer);
|
||||
OutGlove = USGHapticGlove::NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
|
||||
return bResult;
|
||||
}
|
||||
|
||||
ESGHapticGloveCalibrationState FSGHandLayer::GetCalibrationState(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_ESGHapticGloveCalibrationState HapticGloveCalibrationStateContainer;
|
||||
SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&HapticGloveCalibrationStateContainer, bRightHanded);
|
||||
return HapticGloveCalibrationStateContainer.State;
|
||||
}
|
||||
|
||||
FString FSGHandLayer::GetCalibrationInstructions(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FString CalibrationInstructionsContainer;
|
||||
SGCoreImpl_FSGHandLayerImpl_GetCalibrationInstructions(&CalibrationInstructionsContainer, bRightHanded);
|
||||
return CalibrationInstructionsContainer.String;
|
||||
}
|
||||
|
||||
void FSGHandLayer::ResetCalibration(const bool bRightHanded)
|
||||
{
|
||||
SGCoreImpl_FSGHandLayerImpl_ResetCalibration(bRightHanded);
|
||||
}
|
||||
|
||||
void FSGHandLayer::EndCalibration(const bool bRightHanded)
|
||||
{
|
||||
SGCoreImpl_FSGHandLayerImpl_EndCalibration(bRightHanded);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::GetHandPose(UObject* Outer, const bool bRightHanded, USGHandPose*& OutHandPose)
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetHandPose(bRightHanded, &OutHandPoseContainer);
|
||||
OutHandPose = USGHandPose::NewHandPose(Outer, OutHandPose->ToHandPoseImpl());
|
||||
return bResult;
|
||||
}
|
||||
|
||||
void FSGHandLayer::GetWristLocation(
|
||||
const bool bRightHanded, const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation};
|
||||
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||
FSGIC_FVector OutWristPositionContainer;
|
||||
FSGIC_FQuat OutWristRotationContainer;
|
||||
|
||||
SGCoreImpl_FSGHandLayerImpl_GetWristLocation(
|
||||
bRightHanded, &ReferencePositionContainer, &ReferenceRotationContainer,
|
||||
&TrackingHardwareContainer,
|
||||
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||
|
||||
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||
}
|
||||
|
||||
void FSGHandLayer::StopAllHaptics(const bool bRightHanded)
|
||||
{
|
||||
SGCoreImpl_FSGHandLayerImpl_StopAllHaptics(bRightHanded);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::SendHaptics(const bool bRightHanded)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_SendHaptics(bRightHanded);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::SupportsCustomWaveform(
|
||||
const bool bRightHanded, const ESGHapticLocation AtLocation)
|
||||
{
|
||||
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
|
||||
return SGCoreImpl_FSGHandLayerImpl_SupportsCustomWaveform(bRightHanded, &AtLocationContainer);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::SendCustomWaveform(
|
||||
const bool bRightHanded, USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
|
||||
{
|
||||
FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()};
|
||||
FSGIC_ESGHapticLocation LocationContainer{Location};
|
||||
return SGCoreImpl_FSGHandLayerImpl_SendCustomWaveform(bRightHanded, &OutWaveformContainer, &LocationContainer);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_ForceFeedbackLevel(
|
||||
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_ForceFeedbackLevels(
|
||||
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
|
||||
{
|
||||
FSGIC_TArray_float Levels01Container{Levels01};
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevels(
|
||||
bRightHanded, &Levels01Container, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_VibroLevels(
|
||||
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
|
||||
{
|
||||
FSGIC_TArray_float Levels01Container{Levels01};
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevels(bRightHanded, &Levels01Container, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_VibroLevel(
|
||||
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_Finger_Level0_bSendImmediate(
|
||||
bRightHanded, Finger, Level01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_VibroLevel(
|
||||
const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate)
|
||||
{
|
||||
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_AtLocation_Level01_bSendImmediate(
|
||||
bRightHanded, &AtLocationContainer, Level01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::SupportsWristSqueeze(const bool bRightHanded)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_SupportsWristSqueeze(bRightHanded);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_WristSqueeze(
|
||||
const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::SupportsFlexionLocks(const bool bRightHanded)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_SupportsFlexionLocks(bRightHanded);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_FlexionLock(
|
||||
const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool FSGHandLayer::QueueCommand_ClearFlexionLock(
|
||||
const bool bRightHanded, const int32 Finger, const bool bSendImmediate)
|
||||
{
|
||||
return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate);
|
||||
}
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "SGCore/SGHandPose.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGHandPoseImpl.h"
|
||||
@@ -189,7 +187,7 @@ USGHandPose* USGHandPose::FromHandAngles(UObject* Outer,
|
||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
|
||||
FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()};
|
||||
SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded_HandDimensions(
|
||||
&OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandAnglesContainer);
|
||||
&OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandDimensionsContainer);
|
||||
|
||||
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
|
||||
}
|
||||
@@ -394,7 +392,7 @@ TArray<TArray<FVector>> USGHandPose::GetJointPositions() const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_TArray_TArray_FVector OutPositionsContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_GetJointPositions(&InstanceContainer, &OutPositionsContainer);
|
||||
return MoveTemp(OutPositionsContainer.Array);
|
||||
return OutPositionsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
|
||||
@@ -402,7 +400,7 @@ TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
|
||||
return MoveTemp(OutRotationsContainer.Array);
|
||||
return OutRotationsContainer.Array;
|
||||
}
|
||||
|
||||
TArray<TArray<FRotator>> USGHandPose::GetJointRotations() const
|
||||
@@ -418,12 +416,11 @@ TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_GetHandAngles(&InstanceContainer, &OutAnglesContainer);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
return OutAnglesContainer.Array;
|
||||
}
|
||||
|
||||
bool USGHandPose::Equals(const USGHandPose* HandPose) const
|
||||
{
|
||||
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_FSGHandPoseImpl HandPoseContainer{HandPose->ToHandPoseImpl()};
|
||||
return SGCoreImpl_FSGHandPoseImpl_Equals(&InstanceContainer, &HandPoseContainer);
|
||||
@@ -442,7 +439,7 @@ TArray<float> USGHandPose::GetNormalizedFlexion(const bool bClamp01) const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_TArray_float OutFlexionContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_bClamp01(&InstanceContainer, &OutFlexionContainer, bClamp01);
|
||||
return MoveTemp(OutFlexionContainer.Array);
|
||||
return OutFlexionContainer.Array;
|
||||
}
|
||||
|
||||
FString USGHandPose::ToString(const bool bShortFormat) const
|
||||
@@ -450,7 +447,7 @@ FString USGHandPose::ToString(const bool bShortFormat) const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_ToString(&InstanceContainer, &OutStringContainer, bShortFormat);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
FString USGHandPose::SGSerialize() const
|
||||
@@ -458,7 +455,7 @@ FString USGHandPose::SGSerialize() const
|
||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_Serialize(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGHandPose::FImpl::FImpl(USGHandPose* InOwner)
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGNovaGloveHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGSenseGloveHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
|
||||
struct USGHandProfile::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FSGHandProfileImpl HandProfileImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGHandProfile* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGHandProfile* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer, const FSGHandProfileImpl& HandProfileImpl)
|
||||
{
|
||||
USGHandProfile* Instance = NewObject<USGHandProfile>(Outer);
|
||||
Instance->SetHandProfileImpl(HandProfileImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
|
||||
|
||||
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfile::NewHandProfile(UObject* Outer, const bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
|
||||
{SenseGloveHandProfile->ToSenseGloveHandProfileImpl()};
|
||||
FSGIC_FSGNovaGloveHandProfileImpl NovaGloveHandProfileContainer
|
||||
{NovaGloveHandProfile->ToNovaGloveHandProfileImpl()};
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor_bRightHanded_SenseGloveHandProfile_NovaGloveHandProfile(
|
||||
&OutHandProfileImplContainer, bRightHanded, &SenseGloveHandProfileContainer, &NovaGloveHandProfileContainer);
|
||||
|
||||
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfile::Default(UObject* Outer, const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_Default(&OutHandProfileImplContainer, bRightHanded);
|
||||
|
||||
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfile::Deserialize(UObject* Outer, const FString& SerializedString)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
FSGIC_FString SerializedStringContainer{SerializedString};
|
||||
SGCoreImpl_FSGHandProfileImpl_Deserialize(&OutHandProfileImplContainer,
|
||||
&SerializedStringContainer);
|
||||
|
||||
return NewHandProfile(Outer, MoveTemp(OutHandProfileImplContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
FString USGHandProfile::GetProfileDirectory()
|
||||
{
|
||||
FSGIC_FString OutDirectoryContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetProfileDirectory(&OutDirectoryContainer);
|
||||
return MoveTemp(OutDirectoryContainer.String);
|
||||
}
|
||||
|
||||
FString USGHandProfile::GetLeftHandFileName()
|
||||
{
|
||||
FSGIC_FString OutFileName;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetLeftHandFileName(&OutFileName);
|
||||
return MoveTemp(OutFileName.String);
|
||||
}
|
||||
|
||||
FString USGHandProfile::GetRightHandFileName()
|
||||
{
|
||||
FSGIC_FString OutFileName;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetRightHandFileName(&OutFileName);
|
||||
return MoveTemp(OutFileName.String);
|
||||
}
|
||||
|
||||
FString USGHandProfile::GetProfileFileName(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FString OutFileName;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetProfileFileName(&OutFileName, bRightHanded);
|
||||
return MoveTemp(OutFileName.String);
|
||||
}
|
||||
|
||||
bool USGHandProfile::GetLatestProfile(UObject* Outer, const bool bRightHanded, USGHandProfile*& OutLatestProfile)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutLatestProfileContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHandProfileImpl_GetLatestProfile(bRightHanded, &OutLatestProfileContainer);
|
||||
if (bResult)
|
||||
{
|
||||
OutLatestProfile = NewHandProfile(Outer, MoveTemp(OutLatestProfileContainer.HandProfileImpl));
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHandProfile::StoreProfile(const USGHandProfile* ProfileToStore)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl ProfileToStoreContainer{ProfileToStore->ToHandProfileImpl()};
|
||||
return SGCoreImpl_FSGHandProfileImpl_StoreProfile(&ProfileToStoreContainer);
|
||||
}
|
||||
|
||||
bool USGHandProfile::ResetCalibration(const bool bRightHanded, const bool bOnDisk)
|
||||
{
|
||||
return SGCoreImpl_FSGHandProfileImpl_ResetCalibration_bRightHanded_bOnDisk(bRightHanded, bOnDisk);
|
||||
}
|
||||
|
||||
void USGHandProfile::ResetCalibration(const bool bOnDisk)
|
||||
{
|
||||
return SGCoreImpl_FSGHandProfileImpl_ResetCalibration_bOnDisk(bOnDisk);
|
||||
}
|
||||
|
||||
USGHandProfile::USGHandProfile()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
|
||||
|
||||
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileImplContainer.HandProfileImpl);
|
||||
}
|
||||
|
||||
USGHandProfile::USGHandProfile(const bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
|
||||
{SenseGloveHandProfile->ToSenseGloveHandProfileImpl()};
|
||||
FSGIC_FSGNovaGloveHandProfileImpl NovaGloveHandProfileContainer
|
||||
{NovaGloveHandProfile->ToNovaGloveHandProfileImpl()};
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor_bRightHanded_SenseGloveHandProfile_NovaGloveHandProfile(
|
||||
&OutHandProfileImplContainer, bRightHanded, &SenseGloveHandProfileContainer, &NovaGloveHandProfileContainer);
|
||||
|
||||
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileImplContainer.HandProfileImpl);
|
||||
}
|
||||
|
||||
USGHandProfile::USGHandProfile(const FSGHandProfileImpl& HandProfileImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
SetHandProfileImpl(HandProfileImpl);
|
||||
}
|
||||
|
||||
USGHandProfile::~USGHandProfile() = default;
|
||||
|
||||
void USGHandProfile::SetHandProfileImpl(const FSGHandProfileImpl& HandProfileImpl)
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileContainer;
|
||||
FSGIC_FSGHandProfileImpl RhsContainer{HandProfileImpl};
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor_copy(&OutHandProfileContainer, &RhsContainer);
|
||||
Pimpl->HandProfileImpl = MoveTemp(OutHandProfileContainer.HandProfileImpl);
|
||||
}
|
||||
|
||||
const FSGHandProfileImpl& USGHandProfile::ToHandProfileImpl() const
|
||||
{
|
||||
return Pimpl->HandProfileImpl;
|
||||
}
|
||||
|
||||
bool USGHandProfile::IsRight() const
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
return SGCoreImpl_FSGHandProfileImpl_IsRight(&InstanceContainer);
|
||||
}
|
||||
|
||||
USGSenseGloveHandProfile* USGHandProfile::GetSenseGloveHandProfile(UObject* Outer) const
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
FSGIC_FSGSenseGloveHandProfileImpl OutProfileContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetSenseGloveHandProfile(&InstanceContainer, &OutProfileContainer);
|
||||
|
||||
return USGSenseGloveHandProfile::NewSenseGloveHandProfile(
|
||||
Outer, MoveTemp(OutProfileContainer.SenseGloveHandProfileImpl));
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGHandProfile::GetNovaGloveHandProfile(UObject* Outer) const
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
FSGIC_FSGNovaGloveHandProfileImpl OutProfileContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_GetNovaGloveHandProfile(&InstanceContainer, &OutProfileContainer);
|
||||
|
||||
return USGNovaGloveHandProfile::NewNovaGloveHandProfile(
|
||||
Outer, MoveTemp(OutProfileContainer.NovaGloveHandProfileImpl));
|
||||
}
|
||||
|
||||
bool USGHandProfile::Equals(const USGHandProfile* HandProfile) const
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
|
||||
return SGCoreImpl_FSGHandProfileImpl_Equals(&InstanceContainer, &HandProfileContainer);
|
||||
}
|
||||
|
||||
void USGHandProfile::Reset()
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
SGCoreImpl_FSGHandProfileImpl_Reset(&InstanceContainer);
|
||||
}
|
||||
|
||||
FString USGHandProfile::SGSerialize() const
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl InstanceContainer{ToHandProfileImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_Serialize(&InstanceContainer, &OutStringContainer);
|
||||
return MoveTemp(OutStringContainer.String);
|
||||
}
|
||||
|
||||
USGHandProfile::FImpl::FImpl(USGHandProfile* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGHandProfile::FImpl::~FImpl() = default;
|
||||
|
||||
void USGHandProfile::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGHapticChannelInfo.h"
|
||||
|
||||
#include "SGCoreImpl/SGHapticChannelInfoImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGHapticChannelType.h"
|
||||
#include "SGInterop/SGIC_ESGWaveformType.h"
|
||||
#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_int32.h"
|
||||
|
||||
struct USGHapticChannelInfo::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FSGHapticChannelInfoImpl HapticChannelInfoImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGHapticChannelInfo* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGHapticChannelInfo* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer,
|
||||
const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
|
||||
{
|
||||
USGHapticChannelInfo* Instance = NewObject<USGHapticChannelInfo>(Outer);
|
||||
Instance->SetHapticChannelInfoImpl(HapticChannelInfoImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer);
|
||||
|
||||
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
|
||||
}
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(
|
||||
UObject* Outer,
|
||||
const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
|
||||
FSGIC_TArray_int32 StreamIndexContainer{StreamIndex};
|
||||
FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex(
|
||||
&OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer);
|
||||
|
||||
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
|
||||
}
|
||||
|
||||
FString USGHapticChannelInfo::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex)
|
||||
{
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_GenerateAddress(&OutStringContainer, DeviceIndex, ChannelIndex);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfo::Parse(UObject* Outer, const FString& IpcString)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
|
||||
FSGIC_FString IpcStringContainer{IpcString};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_Parse(&OutHapticChannelInfoImplContainer, &IpcStringContainer);
|
||||
|
||||
return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl));
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfo::GetStreamingType()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamingType();
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfo::GetFireAndForgetType()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetType();
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::USGHapticChannelInfo()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer);
|
||||
|
||||
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl);
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::USGHapticChannelInfo(const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer;
|
||||
FSGIC_TArray_int32 StreamIndexContainer{StreamIndex};
|
||||
FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex(
|
||||
&OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer);
|
||||
|
||||
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl);
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::USGHapticChannelInfo(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
SetHapticChannelInfoImpl(HapticChannelInfoImpl);
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::~USGHapticChannelInfo() = default;
|
||||
|
||||
void USGHapticChannelInfo::SetHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoContainer;
|
||||
FSGIC_FSGHapticChannelInfoImpl RhsContainer{HapticChannelInfoImpl};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy(&OutHapticChannelInfoContainer, &RhsContainer);
|
||||
Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoContainer.HapticChannelInfoImpl);
|
||||
}
|
||||
|
||||
const FSGHapticChannelInfoImpl& USGHapticChannelInfo::ToHapticChannelInfoImpl() const
|
||||
{
|
||||
return Pimpl->HapticChannelInfoImpl;
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfo::GetStreamChannelCount() const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamChannelCount(&InstanceContainer);
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfo::GetFireAndForgetChannelCount() const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetChannelCount(&InstanceContainer);
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfo::GetTotalChannelCount() const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
return SGCoreImpl_FSGHapticChannelInfoImpl_GetTotalChannelCount(&InstanceContainer);
|
||||
}
|
||||
|
||||
FString USGHapticChannelInfo::GetAddress_Unguarded(const ESGHapticChannelType Type, const int32 TypeIndex) const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
FSGIC_ESGHapticChannelType TypeContainer{Type};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_GetAddress_Unguarded(
|
||||
&InstanceContainer, &OutStringContainer, &TypeContainer, TypeIndex);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
void USGHapticChannelInfo::GetIpcParams_Unguarded(
|
||||
const ESGHapticChannelType Type, const int32 TypeIndex, int32& OutIndex, FString& OutAddressString) const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
FSGIC_ESGHapticChannelType TypeContainer{Type};
|
||||
FSGIC_FString OutAddressStringContainer;
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_GetIpcParams_Unguarded(
|
||||
&InstanceContainer, &TypeContainer, TypeIndex, &OutIndex, &OutAddressString);
|
||||
|
||||
OutAddressString = MoveTemp(OutAddressStringContainer.String);
|
||||
}
|
||||
|
||||
void USGHapticChannelInfo::RegenerateAddresses(const int32 ForDeviceIndex)
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_RegenerateAddresses(&InstanceContainer, ForDeviceIndex);
|
||||
}
|
||||
|
||||
TArray<FString> USGHapticChannelInfo::GetAllAddresses() const
|
||||
{
|
||||
FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()};
|
||||
FSGIC_TArray_FString* OutArrayContainer;
|
||||
SGCoreImpl_FSGHapticChannelInfoImpl_GetAllAddresses(&InstanceContainer, &OutArrayContainer);
|
||||
return OutArrayContainer->Array;
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::FImpl::FImpl(USGHapticChannelInfo* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticChannelInfo::FImpl::~FImpl() = default;
|
||||
|
||||
void USGHapticChannelInfo::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -35,27 +35,29 @@
|
||||
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGCustomWaveform.h"
|
||||
#include "SGCore/SGDeviceImplCast.h"
|
||||
#include "SGCore/SGSenseGlove.h"
|
||||
#include "SGCoreImpl/SGBasicHandModelImpl.h"
|
||||
#include "SGCoreImpl/SGCustomWaveformImpl.h"
|
||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h"
|
||||
#include "SGInterop/SGIC_ESGHapticLocation.h"
|
||||
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
#include "SGInterop/SGIC_FSGBasicHandModelImpl.h"
|
||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGForceFeedbackCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGCustomWaveformImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_TArray_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TArray_float.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
|
||||
|
||||
USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer, const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
@@ -80,10 +82,10 @@ USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer)
|
||||
return NewHapticGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer)
|
||||
TArray<USGHapticGlove*> USGHapticGlove::GetHapticGloves(UObject* Outer, const bool bConnectedOnly)
|
||||
{
|
||||
FSGIC_TArray_TSharedRef_FSGHapticGloveImpl OutGlovesContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer);
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer, bConnectedOnly);
|
||||
TArray<USGHapticGlove*> HapticGloves;
|
||||
for (TSharedRef<FSGHapticGloveImpl> HapticGloveImpl: OutGlovesContainer.Array)
|
||||
{
|
||||
@@ -109,7 +111,8 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
|
||||
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove(bRightHanded, &OutGloveContainer);
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove(
|
||||
bRightHanded, &OutGloveContainer);
|
||||
if (bResult)
|
||||
{
|
||||
OutGlove = NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
|
||||
@@ -118,6 +121,22 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
|
||||
return bResult;
|
||||
}
|
||||
|
||||
FString USGHapticGlove::ToString(const ESGHapticGloveCalibrationState State)
|
||||
{
|
||||
FSGIC_ESGHapticGloveCalibrationState StateContainer{State};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_ToString_State(&StateContainer, &OutStringContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
FString USGHapticGlove::ToString(const ESGHapticLocation Location)
|
||||
{
|
||||
FSGIC_ESGHapticLocation LocationContainer{Location};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_ToString_Location(&LocationContainer, &OutStringContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove()
|
||||
: USGDevice()
|
||||
{
|
||||
@@ -137,6 +156,11 @@ USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGNova2GloveImpl& Nova2GloveImpl)
|
||||
: USGDevice(Nova2GloveImpl)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
: USGDevice(NovaGloveImpl)
|
||||
{
|
||||
@@ -157,6 +181,11 @@ USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl)
|
||||
: USGDevice(MoveTemp(Nova2GloveImpl))
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
: USGDevice(MoveTemp(NovaGloveImpl))
|
||||
{
|
||||
@@ -187,7 +216,7 @@ FString USGHapticGlove::GetDeviceId() const
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FString OutIdContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer);
|
||||
return MoveTemp(OutIdContainer.String);
|
||||
return OutIdContainer.String;
|
||||
}
|
||||
|
||||
FString USGHapticGlove::GetHardwareVersion() const
|
||||
@@ -195,7 +224,7 @@ FString USGHapticGlove::GetHardwareVersion() const
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FString OutVersionContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer);
|
||||
return MoveTemp(OutVersionContainer.String);
|
||||
return OutVersionContainer.String;
|
||||
}
|
||||
|
||||
int32 USGHapticGlove::GetFirmwareVersion() const
|
||||
@@ -245,41 +274,7 @@ bool USGHapticGlove::GetImuRotation(FRotator& OutImu)
|
||||
}
|
||||
|
||||
bool USGHapticGlove::GetHandPose(
|
||||
UObject* Outer,
|
||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
|
||||
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandGeometry_HandProfile_OutHandPose(
|
||||
&InstanceContainer, &HandGeometryContainer, &HandProfileContainer, &OutHandPoseContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHapticGlove::GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGHandProfileImpl HandProfileContainer{HandProfile->ToHandProfileImpl()};
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandProfile_OutHandPose(
|
||||
&InstanceContainer, &HandProfileContainer, &OutHandPoseContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHapticGlove::GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose)
|
||||
UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
|
||||
@@ -310,22 +305,63 @@ bool USGHapticGlove::GetHandPose(UObject* Outer, USGHandPose*& OutHandPose)
|
||||
return bResult;
|
||||
}
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
bool USGHapticGlove::GetHandPose(UObject* Outer, const float DeltaTime, USGHandPose*& OutHandPose)
|
||||
bool USGHapticGlove::GetHandAngles(TArray<TArray<FVector>>& OutHandAngles) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_DeltaTime_OutHandPose(
|
||||
&InstanceContainer, DeltaTime, &OutHandPoseContainer);
|
||||
FSGIC_TArray_TArray_FVector OutHandAnglesContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles(
|
||||
&InstanceContainer, &OutHandAnglesContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl));
|
||||
OutHandAngles = MoveTemp(OutHandAnglesContainer.Array);
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
|
||||
USGBasicHandModel* USGHapticGlove::GetHandGeometry(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetHandGeometry(&InstanceContainer, &OutBasicHandModelContainer);
|
||||
return USGBasicHandModel::NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelContainer.BasicHandModelImpl));
|
||||
}
|
||||
|
||||
void USGHapticGlove::SetHandGeometry(const USGBasicHandModel* HandGeometry)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SetHandGeometry(&InstanceContainer, &HandGeometryContainer);
|
||||
}
|
||||
|
||||
ESGHapticGloveCalibrationState USGHapticGlove::GetCalibrationState() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer);
|
||||
return OutHapticGloveCalibrationStateContainer.State;
|
||||
}
|
||||
|
||||
void USGHapticGlove::EndCalibration()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_EndCalibration(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::ResetCalibration()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_ResetCalibration(&InstanceContainer);
|
||||
}
|
||||
|
||||
FString USGHapticGlove::GetCalibrationInstruction() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationInstruction(&InstanceContainer, &OutStringContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
|
||||
void USGHapticGlove::StopHaptics()
|
||||
{
|
||||
@@ -339,113 +375,53 @@ void USGHapticGlove::StopVibrations()
|
||||
SGCoreImpl_FSGHapticGloveImpl_StopVibrations(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
bool USGHapticGlove::SendHaptics()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
|
||||
return SGCoreImpl_FSGHapticGloveImpl_SendHaptics(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::SendHaptics(const USGBuzzCommand* BuzzCommand)
|
||||
bool USGHapticGlove::QueueForceFeedbackLevels(const TArray<float>& Levels01)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_BuzzCommand(&InstanceContainer, &BuzzCommandContainer);
|
||||
FSGIC_TArray_float Levels01Container{Levels01};
|
||||
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container);
|
||||
}
|
||||
|
||||
void USGHapticGlove::SendHaptics(const USGThumperCommand* ThumperCommand)
|
||||
bool USGHapticGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ThumperCommand(&InstanceContainer, &ThumperCommandContainer);
|
||||
return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01);
|
||||
}
|
||||
|
||||
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand)
|
||||
bool USGHapticGlove::QueueVibroLevels(const TArray<float>& Levels01)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand(
|
||||
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer);
|
||||
FSGIC_TArray_float Levels01Container{Levels01};
|
||||
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels(&InstanceContainer, &Levels01Container);
|
||||
}
|
||||
|
||||
void USGHapticGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand)
|
||||
bool USGHapticGlove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand(
|
||||
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer, &ThumperCommandContainer);
|
||||
FSGIC_ESGHapticLocation LocationContainer{Location};
|
||||
return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel(&InstanceContainer, &LocationContainer, Level01);
|
||||
}
|
||||
|
||||
bool USGHapticGlove::GetCalibrationValues(TArray<FVector>& OutValues)
|
||||
bool USGHapticGlove::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_TArray_FVector OutValuesContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetCalibrationValues(&InstanceContainer, &OutValuesContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutValues = MoveTemp(OutValuesContainer.Array);
|
||||
}
|
||||
|
||||
return bResult;
|
||||
FSGIC_ESGHapticLocation AtLocationContainer{AtLocation};
|
||||
return SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform(&InstanceContainer, &AtLocationContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::ResetCalibrationRange()
|
||||
bool USGHapticGlove::SendCustomWaveform(USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_ResetCalibrationRange(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::UpdateCalibrationRange()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibrationRange(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::UpdateCalibrationRange(const TArray<FVector>& CalibrationValues)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
||||
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibrationRange_CalibrationValues(
|
||||
&InstanceContainer, &CalibrationValuesContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::GetCalibrationRange(TArray<FVector>& OutMinValues, TArray<FVector>& OutMaxValues)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_TArray_FVector OutMinValuesContainer;
|
||||
FSGIC_TArray_FVector OutMaxValuesContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_GetCalibrationRange(&InstanceContainer, &OutMinValues, &OutMaxValues);
|
||||
|
||||
OutMinValues = MoveTemp(OutMinValuesContainer.Array);
|
||||
OutMaxValues = MoveTemp(OutMaxValuesContainer.Array);
|
||||
}
|
||||
|
||||
void USGHapticGlove::UpdateCalibration(UObject* Outer, USGHandProfile*& OutProfile)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGHandProfileImpl OutProfileContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_UpdateCalibration(&InstanceContainer, &OutProfileContainer);
|
||||
|
||||
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
void USGHapticGlove::ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FSGHandProfileImpl OutProfileContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_ApplyCalibration(&InstanceContainer, &OutProfileContainer);
|
||||
|
||||
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
|
||||
FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()};
|
||||
FSGIC_ESGHapticLocation LocationContainer{Location};
|
||||
return SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform(
|
||||
&InstanceContainer, &OutWaveformContainer, &LocationContainer);
|
||||
}
|
||||
|
||||
void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
@@ -528,4 +504,12 @@ void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FR
|
||||
|
||||
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||
}
|
||||
|
||||
FString USGHapticGlove::ToString() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||
FSGIC_FString OutStringContainer;
|
||||
SGCoreImpl_FSGHapticGloveImpl_ToString(&InstanceContainer, &OutStringContainer);
|
||||
return OutStringContainer.String;
|
||||
}
|
||||
@@ -1,259 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGHapticGloveCalibrationCheck.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGCalibrationStage.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_FSGHapticGloveCalibrationCheckImpl.h"
|
||||
#include "SGInterop/SGIC_FSGSensorRangeImpl.h"
|
||||
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
struct USGHapticGloveCalibrationCheck::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
FSGHapticGloveCalibrationCheckImpl HapticGloveCalibrationCheckImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGHapticGloveCalibrationCheck* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGHapticGloveCalibrationCheck* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(
|
||||
UObject* Outer, const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
|
||||
{
|
||||
USGHapticGloveCalibrationCheck* Instance = NewObject<USGHapticGloveCalibrationCheck>(Outer);
|
||||
Instance->SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(UObject* Outer)
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
|
||||
|
||||
return NewHapticGloveCalibrationCheck(
|
||||
Outer, MoveTemp(OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl));
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(
|
||||
UObject* Outer, const USGSensorRange* LastCalibrationRange)
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_LastCalibrationRange(
|
||||
&OutHapticGloveCalibrationCheckImplContainer, &LastCalibrationRangeContainer);
|
||||
|
||||
return NewHapticGloveCalibrationCheck(
|
||||
Outer, MoveTemp(OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl));
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetSenseGloveThreshold()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveThreshold();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetNovaGloveThreshold()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveThreshold();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetSenseGloveMinFlexion()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveMinFlexion();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetNovaGloveMinFlexion()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveMinFlexion();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetSenseGloveMinAbduction()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetSenseGloveMinAbduction();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheck::GetNovaGloveMinAbduction()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetNovaGloveMinAbduction();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheck::NeedsCheck(const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_NeedsCheck(&DeviceTypeContainer);
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationCheck::OutOfBounds(
|
||||
const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues, const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_FSGSensorRangeImpl PreviousRangeContainer{PreviousRange->ToSensorRangeImpl()};
|
||||
FSGIC_TArray_FVector CurrentValuesContainer{CurrentValues};
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_OutOfBounds(
|
||||
&PreviousRangeContainer, &CurrentValuesContainer, &DeviceTypeContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheck::MovedMinimum(const TArray<FVector>& CurrentRange, const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_TArray_FVector CurrentRangeContainer{CurrentRange};
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_MovedMinimum(&CurrentRangeContainer, &DeviceTypeContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheck::MatchesLast(const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange,
|
||||
const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_TArray_FVector CurrentRangeContainer{CurrentRange};
|
||||
FSGIC_TArray_FVector LastRangeContainer{LastRange};
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_MatchesLast(
|
||||
&CurrentRangeContainer, &LastRangeContainer, &DeviceTypeContainer);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
|
||||
OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_LastCalibrationRange(
|
||||
&OutHapticGloveCalibrationCheckImplContainer, &LastCalibrationRangeContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
|
||||
OutHapticGloveCalibrationCheckImplContainer.HapticGloveCalibrationCheckImpl);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(
|
||||
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::~USGHapticGloveCalibrationCheck() = default;
|
||||
|
||||
void USGHapticGloveCalibrationCheck::SetHapticGloveCalibrationCheckImpl(
|
||||
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckContainer;
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl RhsContainer{HapticGloveCalibrationCheckImpl};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor_copy(&OutHapticGloveCalibrationCheckContainer, &RhsContainer);
|
||||
Pimpl->HapticGloveCalibrationCheckImpl = MoveTemp(
|
||||
OutHapticGloveCalibrationCheckContainer.HapticGloveCalibrationCheckImpl);
|
||||
}
|
||||
|
||||
const FSGHapticGloveCalibrationCheckImpl& USGHapticGloveCalibrationCheck::ToHapticGloveCalibrationCheckImpl() const
|
||||
{
|
||||
return Pimpl->HapticGloveCalibrationCheckImpl;
|
||||
}
|
||||
|
||||
ESGCalibrationStage USGHapticGloveCalibrationCheck::GetCalibrationStage() const
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
|
||||
FSGIC_ESGCalibrationStage OutStageContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_GetCalibrationStage(&InstanceContainer, &OutStageContainer);
|
||||
|
||||
return MoveTemp(OutStageContainer.Stage);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheck::ReachedConclusion() const
|
||||
{
|
||||
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ReachedConclusion(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationCheck::Reset()
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_Reset(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationCheck::CheckRange(
|
||||
const TArray<FVector>& CurrentValues, const float DeltaSeconds, const ESGDeviceType DeviceType)
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl InstanceContainer{ToHapticGloveCalibrationCheckImpl()};
|
||||
FSGIC_TArray_FVector CurrentValuesContainer{CurrentValues};
|
||||
FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_CheckRange(&InstanceContainer, &CurrentValuesContainer,
|
||||
DeltaSeconds, &DeviceTypeContainer);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::FImpl::FImpl(USGHapticGloveCalibrationCheck* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck::FImpl::~FImpl() = default;
|
||||
|
||||
void USGHapticGloveCalibrationCheck::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
@@ -1,421 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 SenseGlove
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCore/SGHapticGloveCalibrationSequence.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGCalibrationDataPoint.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHapticGloveCalibrationSequenceImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHapticGloveQuickCalibrationImpl.h"
|
||||
#include "SGInterop/SGIC_FSGSensorRangeImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_TArray_FSGCalibrationDataPointImpl.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl.h"
|
||||
#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
struct USGHapticGloveCalibrationSequence::FImpl
|
||||
{
|
||||
/************************
|
||||
* Member variables
|
||||
************************/
|
||||
|
||||
TSharedPtr<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl;
|
||||
|
||||
/************************
|
||||
* Owner object
|
||||
************************/
|
||||
|
||||
USGHapticGloveCalibrationSequence* Owner;
|
||||
|
||||
/************************
|
||||
* Constructor / Destructor
|
||||
************************/
|
||||
|
||||
explicit FImpl(USGHapticGloveCalibrationSequence* InOwner);
|
||||
~FImpl();
|
||||
|
||||
/************************
|
||||
* Default copy constructor & copy assignment operator
|
||||
************************/
|
||||
|
||||
FImpl(const FImpl& Rhs) = default;
|
||||
FImpl& operator=(const FImpl& Rhs) = default;
|
||||
};
|
||||
|
||||
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
|
||||
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequence)
|
||||
{
|
||||
USGHapticGloveCalibrationSequence* Instance = NewObject<USGHapticGloveCalibrationSequence>(Outer);
|
||||
Instance->SetHapticGloveCalibrationSequenceImpl(HapticGloveCalibrationSequence);
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
|
||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequence)
|
||||
{
|
||||
USGHapticGloveCalibrationSequence* Instance = NewObject<USGHapticGloveCalibrationSequence>(Outer);
|
||||
Instance->SetHapticGloveCalibrationSequenceImpl(MoveTemp(HapticGloveCalibrationSequence));
|
||||
return Instance;
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
return NewHapticGloveCalibrationSequence(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence* USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(UObject* Outer,
|
||||
const USGHapticGlove* LinkedGlove)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_LinkedGlove_MakeShared(
|
||||
&OutSharedPtrContainer, &LinkedGloveContainer);
|
||||
|
||||
return NewHapticGloveCalibrationSequence(Outer, OutSharedPtrContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationSequence::GetMaxDataPoints()
|
||||
{
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetMaxDataPoints();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
|
||||
const USGSensorRange* SensorRange, const ESGDeviceType ForDevice,
|
||||
const bool bRightHanded, USGHandProfile*& OutProfile)
|
||||
{
|
||||
FSGIC_FSGSensorRangeImpl SensorRangeContainer{SensorRange->ToSensorRangeImpl()};
|
||||
FSGIC_ESGDeviceType ForDeviceContainer{ForDevice};
|
||||
FSGIC_FSGHandProfileImpl OutProfileContainer;
|
||||
const bool bResult =
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileProfile_SensorRange_ForDevice_bRightHanded_OutProfile(
|
||||
&SensorRangeContainer, &ForDeviceContainer, bRightHanded, &OutProfileContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_LinkedGlove_MakeShared(
|
||||
&OutSharedPtrContainer, &LinkedGloveContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
|
||||
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_copy_MakeShared(
|
||||
&OutSharedPtrContainer, &RhsContainer);
|
||||
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
||||
: Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::~USGHapticGloveCalibrationSequence() = default;
|
||||
|
||||
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
|
||||
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
|
||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
|
||||
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer);
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(OutSharedPtrContainer.Ptr);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
|
||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::SetHapticGloveCalibrationSequenceImpl(
|
||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
|
||||
}
|
||||
|
||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl>
|
||||
USGHapticGloveCalibrationSequence::ToHapticGloveCalibrationSequenceImpl() const
|
||||
{
|
||||
return Pimpl->HapticGloveCalibrationSequenceImpl.ToSharedRef();
|
||||
}
|
||||
|
||||
USGHapticGlove* USGHapticGloveCalibrationSequence::GetLinkedGlove(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetLinkedGlove(&InstanceContainer, &OutGloveContainer);
|
||||
return USGHapticGlove::NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef());
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::SetLinkedGlove(const USGHapticGlove* LinkedGlove)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_SetLinkedGlove(&InstanceContainer, &LinkedGloveContainer);
|
||||
}
|
||||
|
||||
TArray<USGCalibrationDataPoint*> USGHapticGloveCalibrationSequence::GetCalibrationPoints(UObject* Outer) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_TArray_FSGCalibrationDataPointImpl OutPoints;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCalibrationPoints(&InstanceContainer, &OutPoints);
|
||||
|
||||
TArray<USGCalibrationDataPoint*> Points{
|
||||
FSGArrayUtils::FromImplType<FSGCalibrationDataPointImpl, USGCalibrationDataPoint,
|
||||
&USGCalibrationDataPoint::NewCalibrationDataPoint>(
|
||||
Outer, MoveTemp(OutPoints.Array))
|
||||
};
|
||||
|
||||
return MoveTemp(Points);
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationSequence::GetElapsedTime() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetElapsedTime(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::IsManuallyCompleted() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_IsManuallyCompleted(&InstanceContainer);
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationSequence::GetCurrentStage() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCurrentStage(&InstanceContainer);
|
||||
}
|
||||
|
||||
SIZE_T USGHapticGloveCalibrationSequence::GetCalibrationPointsCount() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCalibrationPointsCount(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::AutoCompleted() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_AutoCompleted(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::Completed() const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
return SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Completed(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::Reset()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Reset(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::AddDataPoint(const TArray<FVector>& CalibrationPoints)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_TArray_FVector CalibrationPointsContainer{CalibrationPoints};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_AddDataPoint(&InstanceContainer, &CalibrationPointsContainer);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::Update(const float DeltaSeconds)
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_Update(&InstanceContainer, DeltaSeconds);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequence::ConfirmCurrentStep()
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ConfirmCurrentStep(&InstanceContainer);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::CompileRange(UObject* Outer, USGSensorRange*& OutSensorRange) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_FSGSensorRangeImpl OutSensorRangeContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileRange(
|
||||
&InstanceContainer, &OutSensorRangeContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutSensorRange = USGSensorRange::NewSensorRange(Outer, MoveTemp(OutSensorRangeContainer.SensorRangeImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
|
||||
const ESGDeviceType ForDevice, const bool bRightHanded,
|
||||
USGHandProfile*& OutProfile) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_ESGDeviceType ForDeviceContainer{ForDevice};
|
||||
FSGIC_FSGHandProfileImpl OutProfileContainer;
|
||||
const bool bResult =
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_CompileProfile_ForDevice_bRightHanded_OutProfile(
|
||||
&InstanceContainer, &ForDeviceContainer, bRightHanded, &OutProfileContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutProfile = USGHandProfile::NewHandProfile(Outer, MoveTemp(OutProfileContainer.HandProfileImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::GetHandPose(UObject* Outer, USGHandPose*& OutCurrentHandPose) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_FSGHandPoseImpl OutCurrentHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetHandPose_OutCurrentHandPose(
|
||||
&InstanceContainer, &OutCurrentHandPoseContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutCurrentHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutCurrentHandPoseContainer.HandPoseImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequence::GetHandPose(UObject* Outer,
|
||||
const bool bRightHanded, USGHandPose*& OutCurrentHandPose) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_FSGHandPoseImpl OutCurrentHandPoseContainer;
|
||||
const bool bResult = SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetHandPose_bRightHanded_OutCurrentHandPose(
|
||||
&InstanceContainer, bRightHanded, &OutCurrentHandPoseContainer);
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
OutCurrentHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutCurrentHandPoseContainer.HandPoseImpl));
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
FString USGHapticGloveCalibrationSequence::GetCurrentInstruction(const FString& NextStepKey) const
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl InstanceContainer{ToHapticGloveCalibrationSequenceImpl()};
|
||||
FSGIC_FString OutInstructionContainer;
|
||||
FSGIC_FString NextStepKeyContainer{NextStepKey};
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_GetCurrentInstruction(
|
||||
&InstanceContainer, &OutInstructionContainer, &NextStepKeyContainer);
|
||||
|
||||
return MoveTemp(OutInstructionContainer.String);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::FImpl::FImpl(USGHapticGloveCalibrationSequence* InOwner)
|
||||
: Owner(InOwner)
|
||||
{
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationSequence::FImpl::~FImpl() = default;
|
||||
|
||||
void USGHapticGloveCalibrationSequence::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user