Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88832fd6bd
|
||
|
|
f25259c556
|
||
|
|
ce1a342b28
|
||
|
|
18b0ea9eea
|
||
|
|
49bd844c1c
|
||
|
|
8c15c54077
|
||
|
|
2312b75c85
|
||
|
|
696d77f629
|
||
|
|
3ffbd72def
|
||
|
|
29e3458cd1
|
||
|
|
344027b781
|
||
|
|
8e86d9f656
|
||
|
|
37b30cd099
|
||
|
|
45b1c36cf7
|
||
|
|
340503b61d
|
||
|
|
6b076bb5fb
|
||
|
|
f5050ac081
|
||
|
|
1ab4410c21
|
||
|
|
b683aa22af
|
||
|
|
aac0bb8a05
|
||
|
|
4903e11dee
|
||
|
|
b3b0639e72
|
||
|
|
ae43aead8c
|
||
|
|
4f08fe0286
|
||
|
|
4b28a863f0
|
||
|
|
ed0cfe18c3
|
||
|
|
85e4ddaac5
|
+16
-1
@@ -4,4 +4,19 @@ 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).
|
||||
|
||||
## [Unreleased]
|
||||
## [1.0.1] - 2022-11-25
|
||||
|
||||
### Changed
|
||||
|
||||
- Exposed SenseGloveTypes as a public dependency in SenseGloveConnect and SenseGloveCore modules, so that the C++ users of the API don't need to explicitly add it as a dependency
|
||||
- Cleaned up the redundant headers/modules dependencies from SGCore headers
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix RunUAT build issues prior to Epic Store submission
|
||||
|
||||
## [1.0.0] - 2022-11-24
|
||||
|
||||
### Added
|
||||
|
||||
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
||||
@@ -1,9 +1,5 @@
|
||||
# The SenseGlove Unreal Engine Plugin
|
||||
|
||||
## ⚠️ DISCLAIMER: Experimental Release
|
||||
|
||||
This is an initial experimental release for public evaluation and may not be considered *production ready*, yet. This repository is under active development and there might be known or unknown bugs lurking around. Use it at your own risk.
|
||||
|
||||
## How to Download
|
||||
|
||||
This repository relies on Git LFS for storing binary blobs (e.g. third-party libraries). Sadly, there is a known issue with Microsoft Azure public LFS repositories that requires credential for LFS checkouts on https (LFS ssh checkouts are not supported at all). Unless, you are part of SenseGlove organization on Microsoft Azure there is no easy way to fully clone this repository using Git. Thus, the best way to download this repository is to use the 'kebab' (three vertical dots) menu next to the clone button, in order to download the whole repository including LFS objects as a unified zip file.
|
||||
@@ -32,13 +28,13 @@ Remarks:
|
||||
* Supporting Unreal Engine 4.22 through 4.24 for Oculus development is a huge challenge due to limited Android NDK support (r14b to r18b); firstly, because of uncomplete C++11 standard library support, and second, as a result of a known bug in Unreal Engine, which falsely detects NDK r18b as unsupported r18c. Thus, only Unreal Engine 4.25+ support is provided for Android/Oculus development. Third, [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, which is the recommended NDK by Epic Games for 4.22 to 4.24 cannot build the serial library.
|
||||
* 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.
|
||||
|
||||
## Documentation
|
||||
## Changelog
|
||||
|
||||
We maintain [a detailed changelog for this project](CHANGELOG.md) as well. Please consult the changelog before upgrading to any newer release.
|
||||
|
||||
## Documentation
|
||||
|
||||
The Blueprints documentation will be coming soon.
|
||||
[The Blueprints documentation is hosted on SenseGlove Docs](https://senseglove.gitlab.io/unreal-blueprint-docs/).
|
||||
|
||||
For the C++ documentation, since this plugin builds on top of [SGConnect](https://senseglove.gitlab.io/SenseGloveDocs/native/core-api-intro.html#sgconnect) and [SGCoreCpp](https://senseglove.gitlab.io/SenseGloveDocs/native/core-api-intro.html#sgcorecpp) third-party C++ libraries, please refer to [the upstream documentation](https://senseglove.gitlab.io/SenseGloveDocs/native/cpp-reference.html).
|
||||
|
||||
@@ -139,7 +135,7 @@ Source
|
||||
│ │ │
|
||||
│ │ └── release
|
||||
│ │
|
||||
│ └── v20 (UE 5.0 Linux dependencies)
|
||||
│ └── v20 (UE 5.0 and 5.1 Linux dependencies)
|
||||
│ │
|
||||
│ ├── debug
|
||||
│ │
|
||||
@@ -174,4 +170,4 @@ The SenseGlove plug-in for Unreal Engine is licensed under the terms of the [MIT
|
||||
|
||||
### Third-Party Licenses
|
||||
|
||||
Please note that while the SenseGlove plug-in for Unreal Engine is made available under the [MIT License](LICENSE.md), it utilizes a few third-party libraries with permissive free licenses as well, in order to power various components. For a list of these libraries and their own respective open-source licenses take a look at [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md), please.
|
||||
Please note that while the SenseGlove plug-in for Unreal Engine is made available under the [MIT License](LICENSE.md), it utilizes a few third-party libraries with permissive free licenses as well, in order to power various components. For a list of these libraries and their own respective open-source licenses take a look at [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md), please.
|
||||
+16
-16
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"Version": 1,
|
||||
"VersionName": "1.0.0",
|
||||
"VersionName": "1.0.1",
|
||||
"FriendlyName": "SenseGlove",
|
||||
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
||||
"Category": "Virtual Reality",
|
||||
"CreatedBy": "SenseGlove",
|
||||
"CreatedByURL": "https://www.senseglove.com/",
|
||||
"DocsURL": "",
|
||||
"DocsURL": "https://senseglove.gitlab.io/unreal-blueprint-docs/",
|
||||
"MarketplaceURL": "",
|
||||
"SupportURL": "https://www.senseglove.com/support/",
|
||||
"CanContainContent": true,
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
"Name": "SenseGloveBuildHacks",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -40,7 +40,7 @@
|
||||
{
|
||||
"Name": "SenseGloveConnect",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -49,7 +49,7 @@
|
||||
{
|
||||
"Name": "SenseGloveConnectImpl",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -58,7 +58,7 @@
|
||||
{
|
||||
"Name": "SenseGloveConnectKismet",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -67,7 +67,7 @@
|
||||
{
|
||||
"Name": "SenseGloveCore",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -76,7 +76,7 @@
|
||||
{
|
||||
"Name": "SenseGloveCoreImpl",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -85,7 +85,7 @@
|
||||
{
|
||||
"Name": "SenseGloveCoreKismet",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -93,8 +93,8 @@
|
||||
},
|
||||
{
|
||||
"Name": "SenseGloveEditor",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"Type": "Editor",
|
||||
"LoadingPhase": "PostEngineInit",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -103,7 +103,7 @@
|
||||
{
|
||||
"Name": "SenseGloveInterop",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -112,7 +112,7 @@
|
||||
{
|
||||
"Name": "SenseGloveKismet",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -121,7 +121,7 @@
|
||||
{
|
||||
"Name": "SenseGloveLog",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -130,7 +130,7 @@
|
||||
{
|
||||
"Name": "SenseGloveTypes",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
@@ -139,7 +139,7 @@
|
||||
{
|
||||
"Name": "SenseGloveUtils",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"WhitelistPlatforms": [
|
||||
"Linux",
|
||||
"Win64"
|
||||
|
||||
@@ -34,20 +34,21 @@
|
||||
|
||||
|
||||
#include "SGConnect/SGConnect.h"
|
||||
|
||||
#include "SGConnectImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
|
||||
int32 USGConnect::Init()
|
||||
int32 FSGConnect::Init()
|
||||
{
|
||||
return SGConnect_Init();
|
||||
}
|
||||
|
||||
int32 USGConnect::Dispose()
|
||||
int32 FSGConnect::Dispose()
|
||||
{
|
||||
return SGConnect_Dispose();
|
||||
}
|
||||
|
||||
FString USGConnect::GetLibraryVersion()
|
||||
FString FSGConnect::GetLibraryVersion()
|
||||
{
|
||||
FSGIC_FString Container;
|
||||
SGConnect_GetLibraryVersion(&Container);
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
#include "Modules/ModuleManager.h"
|
||||
#include "SenseGloveConnectModule.h"
|
||||
|
||||
IMPLEMENT_MODULE(FSenseGloveConnectModule, SenseGloveConnect)
|
||||
IMPLEMENT_MODULE(FSenseGloveConnectModule, SenseGloveConnect)
|
||||
@@ -35,4 +35,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CoreMinimal.h"
|
||||
@@ -43,8 +43,8 @@
|
||||
void FSenseGloveConnectModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveConnect module...");
|
||||
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"), *USGConnect::
|
||||
GetLibraryVersion()));
|
||||
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"),
|
||||
*FSGConnect::GetLibraryVersion()));
|
||||
}
|
||||
|
||||
void FSenseGloveConnectModule::PreUnloadCallback()
|
||||
|
||||
@@ -48,4 +48,4 @@ public:
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
@@ -35,46 +35,43 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGConnect.generated.h"
|
||||
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECONNECT_API USGConnect: public UObject
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECONNECT_API FSGConnect
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Begin Scanning for Sense Glove Devices and set up communications with them.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Device Scanning is already running within a different program.
|
||||
* -1 : Device Scanning already being initialized (function called twice in short succession).
|
||||
* 0 : Device Scanning is already running in within this program.
|
||||
* 1 : Successfully started up DeviceScanning from the current program.
|
||||
* Begin Scanning for Sense Glove Devices and set up communications with them.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Device Scanning is already running within a different program.
|
||||
* -1 : Device Scanning already being initialized (function called twice in short succession).
|
||||
* 0 : Device Scanning is already running in within this program.
|
||||
* 1 : Successfully started up DeviceScanning from the current program.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static int32 Init();
|
||||
|
||||
/**
|
||||
* Dispose of unmanaged resources and finalize Sense Glove devices.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Not allowed to dispose of Device Scanning because this is not the program which started it.
|
||||
* -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).
|
||||
* 0 : There is no deviceScanner running from any program, so disposing is skipped.
|
||||
* 1 : Successfully disposed of DeviceScanner resources.
|
||||
* @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern.
|
||||
* Dispose of unmanaged resources and finalize Sense Glove devices.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Not allowed to dispose of Device Scanning because this is not the program which started it.
|
||||
* -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).
|
||||
* 0 : There is no deviceScanner running from any program, so disposing is skipped.
|
||||
* 1 : Successfully disposed of DeviceScanner resources.
|
||||
* @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static int32 Dispose();
|
||||
|
||||
/**
|
||||
* Check which version of SGConnect you are using.
|
||||
* Check which version of SGConnect you are using.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static FString GetLibraryVersion();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2022 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 "SGConnectKismet/SGConnectKismetLibrary.h"
|
||||
|
||||
#include "SGConnect/SGConnect.h"
|
||||
|
||||
int32 USGConnectKismetLibrary::Init()
|
||||
{
|
||||
return FSGConnect::Init();
|
||||
}
|
||||
|
||||
int32 USGConnectKismetLibrary::Dispose()
|
||||
{
|
||||
return FSGConnect::Dispose();
|
||||
}
|
||||
|
||||
FString USGConnectKismetLibrary::GetLibraryVersion()
|
||||
{
|
||||
return FSGConnect::GetLibraryVersion();
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2022 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 "Containers/Array.h"
|
||||
#include "HAL/Platform.h"
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGConnectKismetLibrary.generated.h"
|
||||
|
||||
UCLASS(meta=(ScriptName = "SesneGloveConnectKismetLibrary"))
|
||||
class SENSEGLOVECONNECTKISMET_API USGConnectKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
public:
|
||||
/**
|
||||
* Begin Scanning for Sense Glove Devices and set up communications with them.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Device Scanning is already running within a different program.
|
||||
* -1 : Device Scanning already being initialized (function called twice in short succession).
|
||||
* 0 : Device Scanning is already running in within this program.
|
||||
* 1 : Successfully started up DeviceScanning from the current program.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static int32 Init();
|
||||
|
||||
/**
|
||||
* Dispose of unmanaged resources and finalize Sense Glove devices.
|
||||
*
|
||||
* @return
|
||||
* -3 : An Unexpected error occured. Please try again.
|
||||
* -2 : Not allowed to dispose of Device Scanning because this is not the program which started it.
|
||||
* -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).
|
||||
* 0 : There is no deviceScanner running from any program, so disposing is skipped.
|
||||
* 1 : Successfully disposed of DeviceScanner resources.
|
||||
* @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static int32 Dispose();
|
||||
|
||||
/**
|
||||
* Check which version of SGConnect you are using.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
||||
static FString GetLibraryVersion();
|
||||
};
|
||||
@@ -55,16 +55,10 @@ public class SenseGloveConnectKismet : ModuleRules
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"SenseGloveConnect",
|
||||
"SenseGloveKismet",
|
||||
"SenseGloveLog",
|
||||
"SenseGloveTypes",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateIncludePathModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"SenseGloveKismet",
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,14 +68,14 @@ float FSGAnatomy::GetThumbJointLimit(const bool bRightHanded, const int32 Joint,
|
||||
return SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
}
|
||||
|
||||
float FSGAnatomy::NormalizeFingerFlex(const float FlexionInRadians)
|
||||
float FSGAnatomy::NormalizeFingerFlexion(const float FlexionInRadians)
|
||||
{
|
||||
return SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlex(FlexionInRadians);
|
||||
return SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
float FSGAnatomy::NormalizeThumbFlex(float FlexionInRadians)
|
||||
float FSGAnatomy::NormalizeThumbFlexion(const float FlexionInRadians)
|
||||
{
|
||||
return SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlex(FlexionInRadians);
|
||||
return SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded)
|
||||
@@ -85,21 +85,21 @@ TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(bool bRightHanded)
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(bool bRightHanded)
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
return MoveTemp(OutAnglesContainer.Array);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(bool bRightHanded)
|
||||
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(const bool bRightHanded)
|
||||
{
|
||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "SGInterop/SGIC_TArray_FQuat.h"
|
||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||
#include "SGInterop/SGIC_TArray_TArray_float.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
struct USGBasicHandModel::FImpl
|
||||
{
|
||||
@@ -118,7 +119,7 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
||||
@@ -166,7 +167,7 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||
@@ -184,7 +185,7 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||
@@ -224,20 +225,20 @@ TArray<FVector> USGBasicHandModel::GetBaseJointPositions()
|
||||
return MoveTemp(OutPositionsContainer.Array);
|
||||
}
|
||||
|
||||
TArray<FVector> USGBasicHandModel::GetBaseJointRotations()
|
||||
TArray<FVector> USGBasicHandModel::GetBaseJointAngles()
|
||||
{
|
||||
FSGIC_TArray_FVector OutRotationsContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointRotations(&OutRotationsContainer);
|
||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer);
|
||||
return MoveTemp(OutRotationsContainer.Array);
|
||||
}
|
||||
|
||||
USGBasicHandModel::USGBasicHandModel()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
SGCoreImpl_FSGBasicHandModelImpl_ctor(&OutBasicHandModelImplContainer);
|
||||
@@ -249,11 +250,11 @@ USGBasicHandModel::USGBasicHandModel()
|
||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||
@@ -268,15 +269,15 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
|
||||
USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
||||
@@ -289,11 +290,11 @@ USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArr
|
||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||
@@ -310,11 +311,11 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
|
||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||
@@ -331,15 +332,15 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
|
||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||
@@ -354,15 +355,15 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFl
|
||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||
FSGIC_TArray_TArray_float LengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||
};
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||
@@ -376,11 +377,11 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFl
|
||||
|
||||
USGBasicHandModel::USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetBasicHandModelImpl(BasicHandModelImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -129,11 +129,11 @@ USGBetaDevice* USGBetaDevice::Parse(UObject* Outer, const FString& String)
|
||||
|
||||
USGBetaDevice::USGBetaDevice()
|
||||
: USGDevice(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -146,11 +146,11 @@ USGBetaDevice::USGBetaDevice(const FString& ConstantsString, const FString& Devi
|
||||
const FString& HardwareVersion,
|
||||
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||
: USGDevice(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||
FSGIC_FString ConstantsStringContainer{ConstantsString};
|
||||
@@ -166,22 +166,22 @@ USGBetaDevice::USGBetaDevice(const FString& ConstantsString, const FString& Devi
|
||||
|
||||
USGBetaDevice::USGBetaDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
||||
: USGDevice(BetaDeviceImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGBetaDevice::USGBetaDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
||||
: USGDevice(MoveTemp(BetaDeviceImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -141,11 +141,11 @@ USGBuzzCommand* USGBuzzCommand::Off(UObject* Outer)
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand()
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -156,11 +156,11 @@ USGBuzzCommand::USGBuzzCommand()
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
||||
: USGFingerCommand(BuzzLevels),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
|
||||
@@ -174,11 +174,11 @@ USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
||||
USGBuzzCommand::USGBuzzCommand(
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
@@ -190,11 +190,11 @@ USGBuzzCommand::USGBuzzCommand(
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
@@ -207,22 +207,22 @@ USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
: USGFingerCommand(BuzzCommandImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGBuzzCommand::USGBuzzCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
: USGFingerCommand(MoveTemp(BuzzCommandImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -108,11 +108,11 @@ USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
|
||||
@@ -123,11 +123,11 @@ USGCalibrationDataPoint::USGCalibrationDataPoint()
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
||||
@@ -140,11 +140,11 @@ USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const
|
||||
|
||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetCalibrationDataPointImpl(CalibrationDataPointImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -111,11 +111,11 @@ FString USGDevice::ToString(const ESGDeviceType DeviceType)
|
||||
|
||||
USGDevice::USGDevice()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -126,11 +126,11 @@ USGDevice::USGDevice()
|
||||
|
||||
USGDevice::USGDevice(const FSGDeviceImpl& SGDeviceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGDeviceImpl RhsContainer{SGDeviceImpl};
|
||||
@@ -142,11 +142,11 @@ USGDevice::USGDevice(const FSGDeviceImpl& SGDeviceImpl)
|
||||
|
||||
USGDevice::USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGBetaDeviceImpl RhsContainer{BetaDeviceImpl};
|
||||
@@ -157,11 +157,11 @@ USGDevice::USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
||||
|
||||
USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveImpl RhsContainer{HapticGloveImpl};
|
||||
@@ -173,11 +173,11 @@ USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
|
||||
USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGNovaGloveImpl RhsContainer{NovaGloveImpl};
|
||||
@@ -189,11 +189,11 @@ USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
|
||||
USGDevice::USGDevice(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGSenseGloveImpl RhsContainer{SenseGloveImpl};
|
||||
@@ -205,11 +205,11 @@ USGDevice::USGDevice(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(SGDeviceImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -217,11 +217,11 @@ USGDevice::USGDevice(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(BetaDeviceImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -229,11 +229,11 @@ USGDevice::USGDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -241,11 +241,11 @@ USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(NovaGloveImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -253,11 +253,11 @@ USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
|
||||
USGDevice::USGDevice(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SGDeviceImpl = MoveTemp(SenseGloveImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -426,12 +426,12 @@ int32 USGDevice::GetDeviceIndex() const
|
||||
return SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(&InstanceContainer);
|
||||
}
|
||||
|
||||
void USGDevice::SetDeviceIndex(const int32 Index)
|
||||
void USGDevice::SetDeviceIndex(const int32 NewIndex)
|
||||
{
|
||||
SyncImplObject();
|
||||
|
||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||
SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(&InstanceContainer, Index);
|
||||
SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(&InstanceContainer, NewIndex);
|
||||
|
||||
SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVer
|
||||
|
||||
USGDeviceModel::USGDeviceModel()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer;
|
||||
SGCoreImpl_FSGDeviceModelImpl_ctor(&OutDeviceModelImplContainer);
|
||||
@@ -137,11 +137,11 @@ USGDeviceModel::USGDeviceModel()
|
||||
USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion,
|
||||
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer;
|
||||
FSGIC_FString IdContainer{Id};
|
||||
@@ -155,11 +155,11 @@ USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion
|
||||
|
||||
USGDeviceModel::USGDeviceModel(const FSGDeviceModelImpl& DeviceModelImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetDeviceModelImpl(DeviceModelImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -88,11 +88,11 @@ struct USGFingerCommand::FImpl
|
||||
|
||||
USGFingerCommand::USGFingerCommand()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGFingerCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -103,11 +103,11 @@ USGFingerCommand::USGFingerCommand()
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 LevelsContainer{InLevels};
|
||||
@@ -119,11 +119,11 @@ USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
|
||||
@@ -136,11 +136,11 @@ USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
|
||||
@@ -153,11 +153,11 @@ USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
|
||||
@@ -170,11 +170,11 @@ USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedb
|
||||
|
||||
USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
|
||||
@@ -187,11 +187,11 @@ USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzComma
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(FingerCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -199,11 +199,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerComman
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -211,11 +211,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImp
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -223,11 +223,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> Force
|
||||
|
||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -145,11 +145,11 @@ USGForceFeedbackCommand* USGForceFeedbackCommand::Off(UObject* Outer)
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand()
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -160,11 +160,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand()
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels)
|
||||
: USGFingerCommand(ForceFeedbackLevels),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
|
||||
@@ -178,11 +178,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedb
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||
@@ -194,11 +194,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: USGFingerCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
@@ -211,22 +211,22 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const i
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||
: USGFingerCommand(ForceFeedbackCommandImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand::USGForceFeedbackCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||
: USGFingerCommand(MoveTemp(ForceFeedbackCommandImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGInterpolationSet.h"
|
||||
#include "SGCoreImpl/SGInterpolationSetImpl.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGHandInterpolatorImpl.h"
|
||||
@@ -256,11 +257,11 @@ TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(const USGHand
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor(&OutHandInterpolatorImplContainer);
|
||||
@@ -271,11 +272,11 @@ USGHandInterpolator::USGHandInterpolator()
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -290,11 +291,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -313,11 +314,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -334,11 +335,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -355,11 +356,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -379,11 +380,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
|
||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||
@@ -402,11 +403,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
|
||||
|
||||
USGHandInterpolator::USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetHandInterpolatorImpl(HandInterpolatorImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#include "SGCore/SGRotatorArray.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGHandPoseImpl.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
@@ -139,13 +140,13 @@ USGHandPose* USGHandPose::NewHandPose(
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
};
|
||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -162,13 +163,13 @@ USGHandPose* USGHandPose::NewHandPose(
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
};
|
||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -284,11 +285,11 @@ USGHandPose* USGHandPose::Fist(UObject* Outer, const bool bRightHanded)
|
||||
|
||||
USGHandPose::USGHandPose()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
SGCoreImpl_FSGHandPoseImpl_ctor(&OutHandPoseImplContainer);
|
||||
@@ -301,11 +302,11 @@ USGHandPose::USGHandPose(const bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||
@@ -323,11 +324,11 @@ USGHandPose::USGHandPose(const bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||
@@ -345,21 +346,21 @@ USGHandPose::USGHandPose(const bool bRightHanded, const
|
||||
TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
};
|
||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -373,21 +374,21 @@ USGHandPose::USGHandPose(const bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||
};
|
||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -399,11 +400,11 @@ USGHandPose::USGHandPose(const bool bRightHanded,
|
||||
|
||||
USGHandPose::USGHandPose(const FSGHandPoseImpl& HandPoseImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetHandPoseImpl(HandPoseImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#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"
|
||||
@@ -185,11 +187,11 @@ void USGHandProfile::ResetCalibration(const bool bOnDisk)
|
||||
|
||||
USGHandProfile::USGHandProfile()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
|
||||
@@ -202,11 +204,11 @@ USGHandProfile::USGHandProfile(const bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
|
||||
@@ -222,11 +224,11 @@ USGHandProfile::USGHandProfile(const bool bRightHanded,
|
||||
|
||||
USGHandProfile::USGHandProfile(const FSGHandProfileImpl& HandProfileImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetHandProfileImpl(HandProfileImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -156,11 +156,11 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
|
||||
|
||||
USGHapticGlove::USGHapticGlove()
|
||||
: USGDevice(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -171,88 +171,88 @@ USGHapticGlove::USGHapticGlove()
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||
: USGDevice(SGDeviceImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
: USGDevice(HapticGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
: USGDevice(NovaGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||
: USGDevice(SenseGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
: USGDevice(MoveTemp(SGDeviceImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
: USGDevice(MoveTemp(HapticGloveImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
: USGDevice(MoveTemp(NovaGloveImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
||||
: USGDevice(MoveTemp(SenseGloveImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGCalibrationStage.h"
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
@@ -176,11 +177,11 @@ bool USGHapticGloveCalibrationCheck::MatchesLast(const TArray<FVector>& CurrentR
|
||||
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
|
||||
@@ -192,11 +193,11 @@ USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
|
||||
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
|
||||
@@ -211,11 +212,11 @@ USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRa
|
||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(
|
||||
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
|
||||
#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"
|
||||
@@ -150,11 +155,11 @@ bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -165,11 +170,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
|
||||
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
||||
@@ -183,11 +188,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHa
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
|
||||
@@ -201,11 +206,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
|
||||
@@ -219,11 +224,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -232,11 +237,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -123,11 +123,11 @@ int32 USGHapticGloveCommandBuffer::GetMaxThumpCommands()
|
||||
|
||||
USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGHapticGloveCommandBufferImpl OutHapticGloveCommandBufferImplContainer;
|
||||
SGCoreImpl_FSGHapticGloveCommandBufferImpl_ctor(&OutHapticGloveCommandBufferImplContainer);
|
||||
@@ -140,11 +140,11 @@ USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer()
|
||||
USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer(
|
||||
const FSGHapticGloveCommandBufferImpl& HapticGloveCommandBufferImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetHapticGloveCommandBufferImpl(HapticGloveCommandBufferImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
||||
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||
|
||||
@@ -126,11 +126,11 @@ float USGHapticGloveQuickCalibration::GetDefaultAutoEndTimeout()
|
||||
|
||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration()
|
||||
: USGHapticGloveCalibrationSequence(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -142,11 +142,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration()
|
||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||
const USGHapticGlove* GloveToCalibrate, const float AutoEndTimeout)
|
||||
: USGHapticGloveCalibrationSequence(GloveToCalibrate),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||
FSGIC_TSharedPtr_FSGHapticGloveImpl GloveToCalibrateContainer{GloveToCalibrate->ToHapticGloveImpl()};
|
||||
@@ -160,11 +160,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
||||
: USGHapticGloveCalibrationSequence(HapticGloveQuickCalibrationImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
@@ -172,11 +172,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
||||
: USGHapticGloveCalibrationSequence(MoveTemp(HapticGloveQuickCalibrationImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -126,11 +126,11 @@ USGInterpolationSet* USGInterpolationSet::Deserialize(UObject* Outer, const FStr
|
||||
|
||||
USGInterpolationSet::USGInterpolationSet()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||
SGCoreImpl_FSGInterpolationSetImpl_ctor(&OutInterpolationSetImplContainer);
|
||||
@@ -141,11 +141,11 @@ USGInterpolationSet::USGInterpolationSet()
|
||||
|
||||
USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, const float To1, const float To2)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||
SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2(&OutInterpolationSetImplContainer,
|
||||
@@ -158,11 +158,11 @@ USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, c
|
||||
USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, const float To1, const float To2,
|
||||
const float Min, const float Max)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||
SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max(&OutInterpolationSetImplContainer,
|
||||
@@ -174,11 +174,11 @@ USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, c
|
||||
|
||||
USGInterpolationSet::USGInterpolationSet(const FSGInterpolationSetImpl& InterpolationSetImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetInterpolationSetImpl(InterpolationSetImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -37,9 +37,14 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGDeviceImplCast.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGNovaGloveInfo.h"
|
||||
#include "SGCore/SGNovaGloveSensorData.h"
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||
@@ -331,11 +336,11 @@ FString USGNovaGlove::ToBytes(const USGBuzzCommand* BuzzCommand)
|
||||
|
||||
USGNovaGlove::USGNovaGlove()
|
||||
: USGHapticGlove(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -346,11 +351,11 @@ USGNovaGlove::USGNovaGlove()
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo)
|
||||
: USGHapticGlove(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()};
|
||||
@@ -362,66 +367,66 @@ USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo)
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||
: USGHapticGlove(SGDeviceImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
: USGHapticGlove(HapticGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||
: USGHapticGlove(NovaGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
: USGHapticGlove(SGDeviceImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
: USGHapticGlove(HapticGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||
: USGHapticGlove(NovaGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#include "SGCore/SGNovaGloveCalibration.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FSGNovaGloveHandProfileImpl.h"
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGNovaGloveHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h"
|
||||
@@ -107,13 +108,31 @@ USGNovaGloveHandProfile* USGNovaGloveHandProfile::NewNovaGloveHandProfile(
|
||||
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfile::Default(UObject* Outer, const bool bRightHanded)
|
||||
{
|
||||
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||
SGCoreImpl_FSGNovaGloveHandProfileImpl_Default(&OutNovaGloveHandProfileImplContainer, bRightHanded);
|
||||
|
||||
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfile::Deserialize(UObject* Outer, const FString& SerializedString)
|
||||
{
|
||||
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||
FSGIC_FString SerializedStringContainer{SerializedString};
|
||||
SGCoreImpl_FSGNovaGloveHandProfileImpl_Deserialize(&OutNovaGloveHandProfileImplContainer,
|
||||
&SerializedStringContainer);
|
||||
|
||||
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile::USGNovaGloveHandProfile()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||
SGCoreImpl_FSGNovaGloveHandProfileImpl_ctor(&OutNovaGloveHandProfileImplContainer);
|
||||
@@ -124,11 +143,11 @@ USGNovaGloveHandProfile::USGNovaGloveHandProfile()
|
||||
|
||||
USGNovaGloveHandProfile::USGNovaGloveHandProfile(const bool bRightHanded, const USGHandInterpolator* Interpolator)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||
@@ -141,11 +160,11 @@ USGNovaGloveHandProfile::USGNovaGloveHandProfile(const bool bRightHanded, const
|
||||
|
||||
USGNovaGloveHandProfile::USGNovaGloveHandProfile(const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetNovaGloveHandProfileImpl(NovaGloveHandProfileImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -135,11 +135,11 @@ USGNovaGloveInfo* USGNovaGloveInfo::Deserialize(UObject* Outer, const FString& S
|
||||
|
||||
USGNovaGloveInfo::USGNovaGloveInfo()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer;
|
||||
SGCoreImpl_FSGNovaGloveInfoImpl_ctor(&OutNovaGloveInfoImplContainer);
|
||||
@@ -153,11 +153,11 @@ USGNovaGloveInfo::USGNovaGloveInfo(
|
||||
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
||||
const bool bRightHanded, const FQuat& ImuCorrection, const int32 NumberOfSensors)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer;
|
||||
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||
@@ -174,11 +174,11 @@ USGNovaGloveInfo::USGNovaGloveInfo(
|
||||
|
||||
USGNovaGloveInfo::USGNovaGloveInfo(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetNovaGloveInfoImpl(NovaGloveInfoImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
@@ -240,7 +240,7 @@ bool USGNovaGloveInfo::IsRight() const
|
||||
return SGCoreImpl_FSGNovaGloveInfoImpl_IsRight(&InstanceContainer);
|
||||
}
|
||||
|
||||
FQuat USGNovaGloveInfo::GetImuCorrection() const
|
||||
FQuat USGNovaGloveInfo::GetImuCorrectionQ() const
|
||||
{
|
||||
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
||||
FSGIC_FQuat OutCorrectionContainer;
|
||||
@@ -248,6 +248,14 @@ FQuat USGNovaGloveInfo::GetImuCorrection() const
|
||||
return MoveTemp(OutCorrectionContainer.Quat);
|
||||
}
|
||||
|
||||
FRotator USGNovaGloveInfo::GetImuCorrection() const
|
||||
{
|
||||
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
||||
FSGIC_FQuat OutCorrectionContainer;
|
||||
SGCoreImpl_FSGNovaGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer);
|
||||
return OutCorrectionContainer.Quat.Rotator();
|
||||
}
|
||||
|
||||
int32 USGNovaGloveInfo::GetNumberOfSensors() const
|
||||
{
|
||||
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveInfo.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGNovaGloveSensorDataImpl.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
@@ -156,11 +157,11 @@ USGNovaGloveSensorData* USGNovaGloveSensorData::Deserialize(UObject* Outer, cons
|
||||
|
||||
USGNovaGloveSensorData::USGNovaGloveSensorData()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor(&OutNovaGloveSensorDataImplContainer);
|
||||
@@ -173,11 +174,11 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
|
||||
const FQuat& ImuRotation, const bool bImuParsed,
|
||||
const float BatteryLevel, const bool bCharging)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_FVector ValuesContainer{Values};
|
||||
@@ -194,11 +195,11 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
|
||||
const FRotator& ImuRotation, const bool bImuParsed,
|
||||
const float BatteryLevel, const bool bCharging)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_FVector ValuesContainer{Values};
|
||||
@@ -213,11 +214,11 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
|
||||
|
||||
USGNovaGloveSensorData::USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetNovaGloveSensorDataImpl(NovaGloveSensorDataImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
|
||||
#include "SGInterop/SGIC_ESGSenseGloveThumperCommand.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
#include "SGInterop/SGIC_FSGBasicHandModelImpl.h"
|
||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||
@@ -354,11 +355,11 @@ void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, con
|
||||
|
||||
USGSenseGlove::USGSenseGlove()
|
||||
: USGHapticGlove(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||
@@ -369,11 +370,11 @@ USGSenseGlove::USGSenseGlove()
|
||||
|
||||
USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model)
|
||||
: USGHapticGlove(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGSenseGloveInfoImpl ModelContainer{Model.ToSenseGloveInfoImpl()};
|
||||
@@ -385,66 +386,66 @@ USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model)
|
||||
|
||||
USGSenseGlove::USGSenseGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||
: USGHapticGlove(SGDeviceImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGSenseGlove::USGSenseGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||
: USGHapticGlove(HapticGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGSenseGlove::USGSenseGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||
: USGHapticGlove(SenseGloveImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||
: USGHapticGlove(MoveTemp(SGDeviceImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||
: USGHapticGlove(MoveTemp(HapticGloveImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
||||
: USGHapticGlove(MoveTemp(SenseGloveImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
@@ -692,13 +693,50 @@ bool USGSenseGlove::GetHandPose(UObject* Outer, const USGHandProfile* HandProfil
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand,
|
||||
ESGSenseGloveThumperCommand ThumperCommand)
|
||||
{
|
||||
SyncImplObject();
|
||||
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()
|
||||
};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{
|
||||
BuzzCommand->ToBuzzCommandImpl().Get()
|
||||
};
|
||||
FSGIC_ESGSenseGloveThumperCommand ThumperCommandContainer{ThumperCommand};
|
||||
const bool bResult =
|
||||
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ESenseGloveThumperCommand(
|
||||
&InstanceContainer, &ForceFeedbackCommandContainer, &BuzzCommandContainer, &ThumperCommandContainer);
|
||||
|
||||
SyncUProperties();
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGSenseGlove::SendHaptics(ESGSenseGloveThumperCommand ThumperCommand)
|
||||
{
|
||||
SyncImplObject();
|
||||
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||
FSGIC_ESGSenseGloveThumperCommand ThumperCommandContainer{ThumperCommand};
|
||||
const bool bResult = SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ThumperCommand(
|
||||
&InstanceContainer, &ThumperCommandContainer);
|
||||
|
||||
SyncUProperties();
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
{
|
||||
SyncImplObject();
|
||||
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()
|
||||
};
|
||||
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
|
||||
|
||||
SyncUProperties();
|
||||
@@ -723,7 +761,8 @@ void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackComm
|
||||
|
||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()
|
||||
};
|
||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
||||
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand(
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGSenseGloveHandProfileImpl.h"
|
||||
#include "SGInterop/SGIC_ESGFingerSolver.h"
|
||||
@@ -142,11 +143,11 @@ FVector USGSenseGloveHandProfile::GetDefaultThimbleOffset()
|
||||
|
||||
USGSenseGloveHandProfile::USGSenseGloveHandProfile()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveHandProfileImpl OutSenseGloveHandProfileImplContainer;
|
||||
SGCoreImpl_FSGSenseGloveHandProfileImpl_ctor(&OutSenseGloveHandProfileImplContainer);
|
||||
@@ -159,11 +160,11 @@ USGSenseGloveHandProfile::USGSenseGloveHandProfile(const bool bRightHanded, cons
|
||||
const ESGThumbSolver ThumbSolver, const ESGFingerSolver FingerSolver,
|
||||
const TArray<FVector>& FingerThimbleOffset)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveHandProfileImpl OutSenseGloveHandProfileImplContainer;
|
||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||
@@ -180,11 +181,11 @@ USGSenseGloveHandProfile::USGSenseGloveHandProfile(const bool bRightHanded, cons
|
||||
|
||||
USGSenseGloveHandProfile::USGSenseGloveHandProfile(const FSGSenseGloveHandProfileImpl& SenseGloveHandProfileImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetSenseGloveHandProfileImpl(SenseGloveHandProfileImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -170,7 +170,7 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
};
|
||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||
@@ -199,7 +199,7 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
};
|
||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||
@@ -239,11 +239,11 @@ USGSenseGloveInfo* USGSenseGloveInfo::Deserialize(UObject* Outer, const FString&
|
||||
|
||||
USGSenseGloveInfo::USGSenseGloveInfo()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer);
|
||||
@@ -259,11 +259,11 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||
@@ -291,11 +291,11 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||
@@ -330,7 +330,7 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
};
|
||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||
@@ -358,7 +358,7 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||
};
|
||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||
@@ -374,11 +374,11 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
||||
|
||||
USGSenseGloveInfo::USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetSenseGloveInfoImpl(SenseGloveInfoImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||
#include "SGCore/SGSenseGloveInfo.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGSenseGlovePoseImpl.h"
|
||||
#include "SGInterop/SGIC_FSGSenseGloveHandProfileImpl.h"
|
||||
@@ -138,13 +140,13 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -160,13 +162,13 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -195,11 +197,11 @@ USGSenseGlovePose* USGSenseGlovePose::Deserialize(UObject* Outer, const FString&
|
||||
|
||||
USGSenseGlovePose::USGSenseGlovePose()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor(&OutSenseGlovePoseImplContainer);
|
||||
@@ -213,11 +215,11 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||
const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||
@@ -236,11 +238,11 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||
const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||
@@ -261,13 +263,13 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -284,13 +286,13 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||
{
|
||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||
};
|
||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||
};
|
||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||
@@ -302,11 +304,11 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||
|
||||
USGSenseGlovePose::USGSenseGlovePose(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetSenseGlovePoseImpl(SenseGlovePoseImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -131,7 +131,7 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
};
|
||||
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||
@@ -146,7 +146,7 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
};
|
||||
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||
@@ -187,11 +187,11 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::Deserialize(UObject* Outer, co
|
||||
|
||||
USGSenseGloveSensorData::USGSenseGloveSensorData()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor(&OutSenseGloveSensorDataImplContainer);
|
||||
@@ -203,11 +203,11 @@ USGSenseGloveSensorData::USGSenseGloveSensorData()
|
||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles, const FQuat& ImuRotation,
|
||||
const int32 ParsedValues, const bool bImuParsed)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
||||
@@ -222,11 +222,11 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& Se
|
||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles, const FRotator& ImuRotation,
|
||||
const int32 ParsedValues, const bool bImuParsed)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
||||
@@ -243,7 +243,7 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& Se
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
};
|
||||
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||
@@ -258,7 +258,7 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& Se
|
||||
{
|
||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||
};
|
||||
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||
@@ -270,11 +270,11 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& Se
|
||||
|
||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetSenseGloveSensorDataImpl(SenseGloveSensorDataImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "SGCore/SGSenseGloveVars.h"
|
||||
|
||||
#include "SGCore/SGSenseGloveInfo.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FQuat.h"
|
||||
#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h"
|
||||
@@ -99,7 +100,7 @@ TArray<TArray<FVector>> FSGSenseGloveVars::GetGloveLengths(const FString& Hardwa
|
||||
/*
|
||||
TArray<FSGVectorArray> FSGSenseGloveVars::GetGloveLengths_BP(const FString& HardwareVersion)
|
||||
{
|
||||
return FSGArrayUtils::ToBPNestedArray<FVector, FSGVectorArray>(GetGloveLengths(HardwareVersion));
|
||||
return FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(GetGloveLengths(HardwareVersion));
|
||||
}
|
||||
*/
|
||||
int32 FSGSenseGloveVars::GetSensors(const FString& HardwareVersion)
|
||||
|
||||
@@ -141,11 +141,11 @@ void USGSensorRange::CheckMin(const FVector& CurrentValues, FVector& OutMinValue
|
||||
|
||||
USGSensorRange::USGSensorRange()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSensorRangeImpl OutSensorRangeImplContainer;
|
||||
SGCoreImpl_FSGSensorRangeImpl_ctor(&OutSensorRangeImplContainer);
|
||||
@@ -156,11 +156,11 @@ USGSensorRange::USGSensorRange()
|
||||
|
||||
USGSensorRange::USGSensorRange(const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGSensorRangeImpl OutSensorRangeImplContainer;
|
||||
FSGIC_TArray_FVector MinValuesContainer{MinValues};
|
||||
@@ -174,11 +174,11 @@ USGSensorRange::USGSensorRange(const TArray<FVector>& MinValues, const TArray<FV
|
||||
|
||||
USGSensorRange::USGSensorRange(const FSGSensorRangeImpl& SensorRangeImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetSensorRangeImpl(SensorRangeImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -107,11 +107,11 @@ USGThumperCommand* USGThumperCommand::Off(UObject* Outer)
|
||||
|
||||
USGThumperCommand::USGThumperCommand()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGThumperCommandImpl OutThumperCommandImplContainer;
|
||||
SGCoreImpl_FSGThumperCommandImpl_ctor(&OutThumperCommandImplContainer);
|
||||
@@ -122,11 +122,11 @@ USGThumperCommand::USGThumperCommand()
|
||||
|
||||
USGThumperCommand::USGThumperCommand(const int32 Magnitude)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGThumperCommandImpl OutThumperCommandImplContainer;
|
||||
SGCoreImpl_FSGThumperCommandImpl_ctor_Magnitude(&OutThumperCommandImplContainer, Magnitude);
|
||||
@@ -137,11 +137,11 @@ USGThumperCommand::USGThumperCommand(const int32 Magnitude)
|
||||
|
||||
USGThumperCommand::USGThumperCommand(const FSGThumperCommandImpl& ThumperCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetThumperCommandImpl(ThumperCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "SGFingerCommandImplCast.h"
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_ESGFinger.h"
|
||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||
@@ -132,11 +133,11 @@ USGTimedBuzzCommand* USGTimedBuzzCommand::NewTimedBuzzCommand(
|
||||
|
||||
USGTimedBuzzCommand::USGTimedBuzzCommand()
|
||||
: USGBuzzCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutTimedBuzzCommandImplContainer;
|
||||
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_MakeShared(&OutTimedBuzzCommandImplContainer);
|
||||
@@ -148,11 +149,11 @@ USGTimedBuzzCommand::USGTimedBuzzCommand()
|
||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const ESGFinger Finger, const int32 Magnitude,
|
||||
const float DurationSeconds, const float StartTimeSeconds)
|
||||
: USGBuzzCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_ESGFinger FingerContainer{Finger};
|
||||
@@ -166,11 +167,11 @@ USGTimedBuzzCommand::USGTimedBuzzCommand(const ESGFinger Finger, const int32 Mag
|
||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand,
|
||||
const float DurationSeconds, const float StartTimeSeconds)
|
||||
: USGBuzzCommand(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||
FSGIC_FSGBuzzCommandImpl BaseCommandContainer{BaseCommand->ToBuzzCommandImpl().Get()};
|
||||
@@ -183,22 +184,22 @@ USGTimedBuzzCommand::USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand,
|
||||
|
||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
||||
: USGBuzzCommand(TimedBuzzCommandImpl),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
USGTimedBuzzCommand::USGTimedBuzzCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
||||
: USGBuzzCommand(MoveTemp(TimedBuzzCommandImpl)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->SyncUProperties();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FSGTimedThumpCommandImpl.h"
|
||||
@@ -117,11 +118,11 @@ USGTimedThumpCommand* USGTimedThumpCommand::NewTimedThumpCommand(
|
||||
|
||||
USGTimedThumpCommand::USGTimedThumpCommand()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||
SGCoreImpl_FSGTimedThumpCommandImpl_ctor(&OutTimedThumpCommandImplContainer);
|
||||
@@ -133,11 +134,11 @@ USGTimedThumpCommand::USGTimedThumpCommand()
|
||||
USGTimedThumpCommand::USGTimedThumpCommand(const int32 Magnitude,
|
||||
const float DurationSeconds, const float StartTimeSeconds)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||
SGCoreImpl_FSGTimedThumpCommandImpl_ctor_Magnitude_DurationSeconds_StartTimeSeconds(
|
||||
@@ -150,11 +151,11 @@ USGTimedThumpCommand::USGTimedThumpCommand(const int32 Magnitude,
|
||||
USGTimedThumpCommand::USGTimedThumpCommand(const USGThumperCommand* BaseCommand,
|
||||
const float DurationSeconds, const float StartTimeSeconds)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
FSGIC_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||
FSGIC_FSGThumperCommandImpl BaseCommandContainer{BaseCommand->ToThumperCommandImpl()};
|
||||
@@ -167,11 +168,11 @@ USGTimedThumpCommand::USGTimedThumpCommand(const USGThumperCommand* BaseCommand,
|
||||
|
||||
USGTimedThumpCommand::USGTimedThumpCommand(const FSGTimedThumpCommandImpl& TimedThumpCommandImpl)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
SetTimedThumpCommandImpl(TimedThumpCommandImpl);
|
||||
Pimpl->SyncUProperties();
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Hard-Coded Database that is used in calibration and in solving.
|
||||
* Values herein are used to limit outputs within 'natural' ranges.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,33 +42,72 @@
|
||||
|
||||
#include "SGAnatomy.generated.h"
|
||||
|
||||
/**
|
||||
* "Database" of anatomical values, such as joint limits.
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGAnatomy
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Total sum of all finger flexion that would be considered "total flexion".
|
||||
*/
|
||||
static float GetTotalFingerFlexion();
|
||||
|
||||
/**
|
||||
* Total sum of all finger flexion that would be considered "total extension".
|
||||
*/
|
||||
static float GetTotalFingerExtension();
|
||||
|
||||
/**
|
||||
* Total sum of all thumb flexion that would be considered "total flexion".
|
||||
*/
|
||||
static float GetTotalThumbFlexion();
|
||||
|
||||
/**
|
||||
* Total sum of all thumb flexion that would be considered "total extension".
|
||||
*/
|
||||
static float GetTotalThumbExtension();
|
||||
|
||||
/**
|
||||
* Retrieve one of the limits of a finger joint's movement.
|
||||
*/
|
||||
static float GetFingerJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax);
|
||||
|
||||
/**
|
||||
* Retrieve one of the limits of a thumb joint's movement.
|
||||
*/
|
||||
static float GetThumbJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax);
|
||||
|
||||
static float NormalizeFingerFlex(float FlexionInRadians);
|
||||
/**
|
||||
* Convert a total finger flexion in radians into a 0..1 representation.
|
||||
*/
|
||||
static float NormalizeFingerFlexion(float FlexionInRadians);
|
||||
|
||||
static float NormalizeThumbFlex(float FlexionInRadians);
|
||||
/**
|
||||
* Convert a total thumb flexion in radians into a 0..1 representation.
|
||||
*/
|
||||
static float NormalizeThumbFlexion(float FlexionInRadians);
|
||||
|
||||
/**
|
||||
* Get Hand Angles that would make a Default (Idle) Pose.
|
||||
*/
|
||||
static TArray<TArray<FVector>> GetDefaultHandAngles(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Get Hand Angles that would make a flat hand.
|
||||
*/
|
||||
static TArray<TArray<FVector>> GetFlatHandAngles(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Get hand angles that would make a thumbs up.
|
||||
*/
|
||||
static TArray<TArray<FVector>> GetThumbsUpHandAngles(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Get Hand Angles that would make a fist.
|
||||
*/
|
||||
static TArray<TArray<FVector>> GetFistHandAngles(bool bRightHanded);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* A data class containing the minimum required data for a hand's forward
|
||||
* kinematics.
|
||||
* Used in both kinematics and calibration.
|
||||
*/
|
||||
|
||||
|
||||
@@ -46,12 +48,14 @@
|
||||
|
||||
#include "SGCore/SGFloatArray.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
#include "SGBasicHandModel.generated.h"
|
||||
|
||||
class FSGBasicHandModelImpl;
|
||||
|
||||
/**
|
||||
* Represents data of a user's hand required for forward kinematics.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGBasicHandModel final : public UObject
|
||||
{
|
||||
@@ -62,47 +66,89 @@ public:
|
||||
UObject* Outer, const FSGBasicHandModelImpl& BasicHandModelImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic class constructor.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel with no starting rotations.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<TArray<float>>& Lengths, const TArray<FVector>& StartPositions);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel with no starting rotations.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<FSGFloatArray>& Lengths, const TArray<FVector>& StartPositions);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
static USGBasicHandModel* NewBasicHandModel(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve a default left or right hand model.
|
||||
*/
|
||||
static USGBasicHandModel* Default(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a serialized HandModel back into its class representation.
|
||||
*/
|
||||
static USGBasicHandModel* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default finger lengths (based on right hand).
|
||||
*
|
||||
* @remarks Any missing fingers are replaced with their respective value.
|
||||
*/
|
||||
static TArray<TArray<float>> GetBaseFingerLengths();
|
||||
|
||||
/**
|
||||
* Default joint positions (based on right hand).
|
||||
*
|
||||
* @remarks Any missing positions are replaced with their respective value.
|
||||
*/
|
||||
static TArray<FVector> GetBaseJointPositions();
|
||||
|
||||
static TArray<FVector> GetBaseJointRotations();
|
||||
/**
|
||||
* Default joint angles (based on right hand).
|
||||
*
|
||||
* @remarks Any missing angles are replaced with their respective value.
|
||||
*/
|
||||
static TArray<FVector> GetBaseJointAngles();
|
||||
|
||||
private:
|
||||
struct FImpl;
|
||||
@@ -116,23 +162,44 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic class constructor.
|
||||
*/
|
||||
USGBasicHandModel();
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel with no starting rotations.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel with no starting rotations.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
||||
|
||||
/**
|
||||
* Create a new BasicHandModel.
|
||||
*/
|
||||
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
|
||||
|
||||
@@ -167,54 +234,133 @@ protected:
|
||||
FSGBasicHandModelImpl& ToBasicHandModelImpl();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Whether or not this BasicHandModel was created for a left- or right hand. Used for validation.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* The length of individual finger phalangers in mm, sorted per finger. Generally 5x3.
|
||||
*/
|
||||
TArray<TArray<float>> GetFingerLengths() const;
|
||||
|
||||
/**
|
||||
* Retrieve the finger lengths of a specific finger in cm.
|
||||
*/
|
||||
TArray<float> GetFingerLengths(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Set the finger lengths of a specific finger in cm.
|
||||
*/
|
||||
void SetFingerLengths(ESGFinger Finger, const TArray<float>& Lengths);
|
||||
|
||||
/**
|
||||
* Set the finger lengths of a specific finger in cm.
|
||||
*/
|
||||
void SetFingerLengths(uint8 Finger, const TArray<float>& Lengths);
|
||||
|
||||
/**
|
||||
* Get the finger ratios of all fingers.
|
||||
*/
|
||||
TArray<TArray<float>> GetFingerRatios() const;
|
||||
|
||||
/**
|
||||
* Get the finger ratios of a specific finger.
|
||||
*/
|
||||
TArray<float> GetFingerRatios(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Starting joint positions relative to the device Origin.
|
||||
*/
|
||||
TArray<FVector> GetStartJointPositions() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetStartJointPosition(ESGFinger Finger, const FVector& Position);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetStartJointPosition(uint8 Finger, const FVector& Position);
|
||||
|
||||
/**
|
||||
* Starting joint rotations relative to the device Origin.
|
||||
*/
|
||||
TArray<FQuat> GetStartJointRotationsQ() const;
|
||||
|
||||
/**
|
||||
* Starting joint rotations relative to the device Origin.
|
||||
*/
|
||||
TArray<FRotator> GetStartJointRotations() const;
|
||||
|
||||
/**
|
||||
* Retrieve the start position of a specific finger.
|
||||
*/
|
||||
FVector GetJointPosition(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Set the start position of a specific finger.
|
||||
*/
|
||||
void SetJointPosition(const FVector& NewPosition, ESGFinger Finger);
|
||||
|
||||
/**
|
||||
* Retrieve the start rotation of a specific finger.
|
||||
*/
|
||||
FQuat GetJointRotationQ(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Retrieve the start rotation of a specific finger.
|
||||
*/
|
||||
FRotator GetJointRotation(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Set the start rotation of a specific finger.
|
||||
*/
|
||||
void SetJointRotation(const FQuat& NewRotation, ESGFinger Finger);
|
||||
|
||||
/**
|
||||
* Set the start rotation of a specific finger.
|
||||
*/
|
||||
void SetJointRotation(const FRotator& NewRotation, ESGFinger Finger);
|
||||
|
||||
/**
|
||||
* Get the total lengths of fingers, in cm.
|
||||
*/
|
||||
TArray<float> GetTotalLengths() const;
|
||||
|
||||
/**
|
||||
* Get the total length of a specific finger, in mm.
|
||||
*/
|
||||
float GetTotalLength(ESGFinger Finger) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the lengths of a specific finger, as BasicHandModel representation (L, 0, 0).
|
||||
*
|
||||
* @remarks Used for forwards kinematics.
|
||||
*/
|
||||
TArray<FVector> Get3DLengths(ESGFinger Finger) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Check if this BasicHandModel has the same values as another BasicHandModel.
|
||||
*/
|
||||
bool Equals(const USGBasicHandModel* BasicHandModel) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert this handModel into a string notation, readable for humans. Does not include starting positions / rotations.
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
* Convert this handModel into a string notation, readable for humans. Optionally includes starting positions / rotations.
|
||||
*/
|
||||
FString ToString(bool bLengthsOnly) const;
|
||||
|
||||
/**
|
||||
* Serialize this HandModel into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
@@ -29,7 +29,10 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Represents a Sense Glove Device that has no specific class within the API.
|
||||
* Used to test different iterations of the same product before integrating it
|
||||
* into the Core API.
|
||||
* Allows access to raw sensor values and commands of such a device.
|
||||
*/
|
||||
|
||||
|
||||
@@ -45,6 +48,9 @@
|
||||
class FSGDeviceImpl;
|
||||
class FSGBetaDeviceImpl;
|
||||
|
||||
/**
|
||||
* A Device that adheres to the SenseGlove communications protocol, but which has no implementation in this API.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGBetaDevice final : public USGDevice
|
||||
{
|
||||
@@ -55,14 +61,24 @@ public:
|
||||
|
||||
static USGBetaDevice* NewBetaDevice(UObject* Outer, TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic class constructor.
|
||||
*/
|
||||
static USGBetaDevice* NewBetaDevice(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a Beta Device.
|
||||
*/
|
||||
static USGBetaDevice* NewBetaDevice(
|
||||
UObject* Outer,
|
||||
const FString& ConstantsString, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Deserialize a beta device from its basic constants string. Returns nullptr is unsuccessful.
|
||||
*/
|
||||
static USGBetaDevice* Parse(UObject* Outer, const FString& String);
|
||||
|
||||
private:
|
||||
@@ -77,8 +93,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic class constructor.
|
||||
*/
|
||||
USGBetaDevice();
|
||||
|
||||
/**
|
||||
* Creates a new instance of a Beta Device.
|
||||
*/
|
||||
USGBetaDevice(const FString& ConstantsString, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
@@ -118,26 +140,56 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration.
|
||||
*/
|
||||
virtual ESGDeviceType GetDeviceType() const override;
|
||||
|
||||
/**
|
||||
* Get the unique identifier of this device.
|
||||
*/
|
||||
virtual FString GetDeviceId() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's hardware version.
|
||||
*/
|
||||
virtual FString GetHardwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's firmware version.
|
||||
*/
|
||||
virtual int32 GetFirmwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's sub-firmware version.
|
||||
*/
|
||||
virtual int32 GetSubFirmwareVersion() const override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the constants string for additional processing.
|
||||
*/
|
||||
FString GetConstantsString() const;
|
||||
|
||||
/**
|
||||
* Retrieve a raw sensor string from this Beta Device.
|
||||
*/
|
||||
FString GetSensorData() const;
|
||||
|
||||
/**
|
||||
* Retrieve the last command retrieved from this Beta Device.
|
||||
*/
|
||||
FString GetLastCommand() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Send a raw string command to this device.
|
||||
*/
|
||||
bool SendHaptics(const FString& Command) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
virtual FString ToString() const override;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Buzz motor command specific for the Sense Glove.
|
||||
*/
|
||||
|
||||
|
||||
@@ -40,13 +40,16 @@
|
||||
#include "Templates/UniquePtr.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGFingerCommand.h"
|
||||
#include "SGCore/SGFingerCommand.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGBuzzCommand.generated.h"
|
||||
|
||||
class FSGBuzzCommandImpl;
|
||||
|
||||
/**
|
||||
* A vibration command for the Sense Glove, with levels for each finger.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGBuzzCommand : public USGFingerCommand
|
||||
{
|
||||
@@ -57,15 +60,32 @@ public:
|
||||
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command, where each finger level is contained inside an array of size 5.
|
||||
*/
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, const TArray<int32>& BuzzLevels);
|
||||
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
/**
|
||||
* Create a new Buzz Motor command, indicating the intensity for each finger.
|
||||
*/
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, int32 Thumb, int32 Index, int32 Middle, int32 Ring,
|
||||
int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Buzz Motor command, with only one finger being activated.
|
||||
*/
|
||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
public:
|
||||
/**
|
||||
* A command that turns off all vibration motors of the Sense Glove.
|
||||
*/
|
||||
static USGBuzzCommand* Off(UObject* Outer);
|
||||
|
||||
private:
|
||||
@@ -80,9 +100,24 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGBuzzCommand();
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command, where each finger level is contained inside an array of size 5.
|
||||
*/
|
||||
explicit USGBuzzCommand(const TArray<int32>& BuzzLevels);
|
||||
|
||||
/**
|
||||
* Create a new Buzz Motor command, indicating the intensity for each finger.
|
||||
*/
|
||||
USGBuzzCommand(int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Buzz Motor command, with only one finger being activated.
|
||||
*/
|
||||
USGBuzzCommand(ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
public:
|
||||
@@ -121,7 +156,13 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Copy this Buzz Command into a new object.
|
||||
*/
|
||||
USGBuzzCommand* Copy(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Merge this command with another, taking the maximum value between the two.
|
||||
*/
|
||||
USGBuzzCommand* Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
|
||||
class FSGCalibrationDataPointImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGCalibrationDataPoint final : public UObject
|
||||
{
|
||||
@@ -57,11 +60,17 @@ public:
|
||||
UObject* Outer, const FSGCalibrationDataPointImpl& CalibrationDataPointImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGCalibrationDataPoint* NewCalibrationDataPoint(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new data point.
|
||||
*/
|
||||
static USGCalibrationDataPoint* NewCalibrationDataPoint(
|
||||
UObject* Outer,
|
||||
int32 CurrentStage,const TArray<FVector>& CalibrationValues);
|
||||
int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
||||
|
||||
private:
|
||||
struct FImpl;
|
||||
@@ -75,8 +84,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGCalibrationDataPoint();
|
||||
|
||||
/**
|
||||
* Create a new data point.
|
||||
*/
|
||||
USGCalibrationDataPoint(int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
||||
|
||||
public:
|
||||
@@ -104,10 +119,19 @@ public:
|
||||
const FSGCalibrationDataPointImpl& ToCalibrationDataPointImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Actual calibration values.
|
||||
*/
|
||||
TArray<FVector> GetCalibrationValues() const;
|
||||
|
||||
/**
|
||||
* The Calibration stage this data point belongs to.
|
||||
*/
|
||||
int32 GetStage() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Log Calibration values for storing on disk.
|
||||
*/
|
||||
FString ToLogData(const FString& Delimiter = "\t") const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Represents a Device built by the Sense Glove company that is compatible with
|
||||
* our Communications Protocol. All such devices derive from this abstract
|
||||
* class.
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,14 +51,23 @@ class FSGHapticGloveImpl;
|
||||
class FSGNovaGloveImpl;
|
||||
class FSGSenseGloveImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(Abstract, BlueprintType)
|
||||
class SENSEGLOVECORE_API USGDevice : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Parse a main and sub firmware version from its raw (v4.12) notation
|
||||
*/
|
||||
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FString ToString(ESGDeviceType DeviceType);
|
||||
|
||||
private:
|
||||
@@ -71,6 +82,9 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGDevice();
|
||||
|
||||
public:
|
||||
@@ -200,39 +214,93 @@ protected:
|
||||
virtual void SyncUProperties();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Check which DeviceType this class belongs to.
|
||||
*/
|
||||
virtual ESGDeviceType GetDeviceType() const;
|
||||
|
||||
/**
|
||||
* Retrieve this device's unique identifier.
|
||||
*/
|
||||
virtual FString GetDeviceId() const PURE_VIRTUAL(FSGDevice::GetDeviceId, return FString(););
|
||||
|
||||
/**
|
||||
* Retrieve this device's hardware version.
|
||||
*/
|
||||
virtual FString GetHardwareVersion() const PURE_VIRTUAL(FSGDevice::GetHardwareVersion, return FString(););
|
||||
|
||||
/**
|
||||
* Retrieve this device's main firmware version. v4.12 returns 4.
|
||||
*/
|
||||
virtual int32 GetFirmwareVersion() const PURE_VIRTUAL(FSGDevice::FirmwareVersion, return -1;);
|
||||
|
||||
/**
|
||||
* Retrieve this device's sub firmware version. v4.12 returns 12.
|
||||
*/
|
||||
virtual int32 GetSubFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
virtual FString GetFirmwareString() const;
|
||||
|
||||
/**
|
||||
* Retrieve this Device's Serial/Bluetooth address.
|
||||
*/
|
||||
FString GetAddress() const;
|
||||
|
||||
/**
|
||||
* Check if this device is currently connected to the system.
|
||||
*/
|
||||
bool IsConnected() const;
|
||||
|
||||
/**
|
||||
* Retrieve the connection type of this Sense Glove.
|
||||
*/
|
||||
ESGConnectionType GetConnectionType() const;
|
||||
|
||||
/**
|
||||
* Retrieve the device's Packets per Second Variable.
|
||||
*/
|
||||
int32 PacketsPerSecondReceived() const;
|
||||
|
||||
/**
|
||||
* Retrieve the device's Packets per Second Variable.
|
||||
*/
|
||||
int32 PacketsPerSecondSent() const;
|
||||
|
||||
/**
|
||||
* Retrieve the index of this device within SenseCom.
|
||||
*/
|
||||
int32 GetDeviceIndex() const;
|
||||
|
||||
void SetDeviceIndex(const int32 Index);
|
||||
/**
|
||||
* Change this device's index within the SenseCom. Warning: Can cause errors.
|
||||
*/
|
||||
void SetDeviceIndex(int32 NewIndex);
|
||||
|
||||
/**
|
||||
* Returns true if this device is connected over a connection other than usb cable.
|
||||
*/
|
||||
virtual bool IsWireless() const;
|
||||
|
||||
/**
|
||||
* Returns true if this device operates on a battery.
|
||||
*/
|
||||
virtual bool HasBattery() const;
|
||||
|
||||
/**
|
||||
* Returns true if this device is currently charging.
|
||||
*/
|
||||
virtual bool IsCharging();
|
||||
|
||||
/**
|
||||
* Returns the device's battery level, as a value between 0 (empty) and 1 (full).
|
||||
*/
|
||||
virtual bool GetBatteryLevel(float& OutLevel);
|
||||
|
||||
/**
|
||||
* Get a string representation of this SGDevice, used for debugging.
|
||||
*/
|
||||
virtual FString ToString() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Interface for SenseCom, allows the retrieval of Devices and Data, but only
|
||||
* as.
|
||||
*/
|
||||
|
||||
|
||||
@@ -46,41 +47,91 @@
|
||||
|
||||
class USGDevice;
|
||||
|
||||
/**
|
||||
* Interface for SenseCom, allows the retrieval of Devices and Data.
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGDeviceList
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the number of devices that have been detected by the SenseCom executable.
|
||||
*/
|
||||
static int32 ActiveDevices();
|
||||
|
||||
/**
|
||||
* Returns true if the SenseCom program is running.
|
||||
*/
|
||||
static bool SenseCommRunning();
|
||||
|
||||
/**
|
||||
* Clear the device list, and block any further attempt to add to it until ReInitialize is called.
|
||||
*
|
||||
* @remarks Useful if your IDE has troubles unloading dlls (cough, Unity, Cough).
|
||||
*/
|
||||
static void Dispose();
|
||||
|
||||
/**
|
||||
* When you've accidentally disposed of the list before you meant to.
|
||||
*/
|
||||
static void Reinitialize();
|
||||
|
||||
/**
|
||||
* Retrieve all Sense Glove Devices connected to this system.
|
||||
*/
|
||||
static TArray<USGDevice*> GetDevices(UObject* Outer);
|
||||
|
||||
/// TODO
|
||||
// THIS PROBABLY SHOULD BE REMOVED!
|
||||
/**
|
||||
* Retrieve a list of SGDevices of a specific class.
|
||||
*/
|
||||
static TArray<USGDevice*> GetDevices(UObject* Outer, const TSubclassOf<USGDevice>& DeviceType);
|
||||
|
||||
/**
|
||||
* Retrieve a list of SGDevices of a specific type.
|
||||
*/
|
||||
static TArray<USGDevice*> GetDevices(UObject* Outer, ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Retrieve the latest (raw) sensor data from a specific device in our list.
|
||||
*/
|
||||
static bool GetSensorDataString(int32 IpcIndex, const FString& IpcAddress, FString& OutString);
|
||||
|
||||
/**
|
||||
* Send a (raw) command to a specific device in the list.
|
||||
*/
|
||||
static bool SendHaptics(int32 IpcIndex, const FString& IpcAddress, const FString& Commands);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index);
|
||||
|
||||
/**
|
||||
* Retrieve Device Address.
|
||||
*/
|
||||
static FString GetAddress(int32 IpcIndex, const FString& IpcAddress);
|
||||
|
||||
/**
|
||||
* Retieve this device's connectionType.
|
||||
*/
|
||||
static ESGConnectionType GetConnectionType(int32 IpcIndex, const FString& IpcAddress);
|
||||
|
||||
/**
|
||||
* Returns true if the device at this connection side is properly connected.
|
||||
*/
|
||||
static bool IsConnected(int32 IpcIndex, const FString& IpcAddress);
|
||||
|
||||
/**
|
||||
* Retrieve the device's Packets per Second Variable.
|
||||
*/
|
||||
static int32 PacketsPerSecondReceived(int32 IpcIndex, const FString& IpcAddress);
|
||||
|
||||
/**
|
||||
* Retrieve the device's Packets per Second sent Variable.
|
||||
*/
|
||||
static int32 PacketsPerSecondSent(int32 IpcIndex, const FString& IpcAddress);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Base class for Device Models containing the minimum amount of data gathered
|
||||
* through Communications Protocol. Used for shared functionality.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,12 +42,13 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGDeviceModel.generated.h"
|
||||
|
||||
class FSGDeviceModelImpl;
|
||||
|
||||
/**
|
||||
* Base class containing the minimum amount of data for device models.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGDeviceModel final : public UObject
|
||||
{
|
||||
@@ -57,15 +59,27 @@ public:
|
||||
UObject* Outer, const FSGDeviceModelImpl& DeviceModelImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGDeviceModel* NewDeviceModel(UObject* Outer);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGDeviceModel* NewDeviceModel(
|
||||
UObject* Outer,
|
||||
const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Parse a 32-bit integer value into a set of booleans (010010011) that indicate which (optional) functions this device has.
|
||||
*/
|
||||
static TArray<bool> ParseFunctions(int32 Value, int32 Size);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
||||
|
||||
private:
|
||||
@@ -80,8 +94,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor to be used by child classes.
|
||||
*/
|
||||
USGDeviceModel();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGDeviceModel(const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
public:
|
||||
@@ -115,11 +135,23 @@ protected:
|
||||
FSGDeviceModelImpl& ToDeviceModelImpl();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the Unique identifier of this device.
|
||||
*/
|
||||
FString GetDeviceId() const;
|
||||
|
||||
/**
|
||||
* Retrieve the Hardware (sub) version of this Sense Glove Device.
|
||||
*/
|
||||
FString GetHardwareVersion() const;
|
||||
|
||||
/**
|
||||
* Firmware version running on the device's MicroController. (as v4.12, this is the 4).
|
||||
*/
|
||||
int32 GetFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
* Sub firmware version running on the device's microcontroller (as v4.12, this is the 12).
|
||||
*/
|
||||
int32 GetSubFirmwareVersion() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* A command for five fingers that can be sent to a Sense Glove device.
|
||||
*/
|
||||
|
||||
|
||||
@@ -49,8 +49,11 @@ class FSGFingerCommandImpl;
|
||||
class FSGForceFeedbackCommandImpl;
|
||||
class FSGTimedBuzzCommandImpl;
|
||||
|
||||
/**
|
||||
* A command that contains values (levels) for five fingers.
|
||||
*/
|
||||
UCLASS(Abstract, BlueprintType)
|
||||
class SENSEGLOVECORE_API USGFingerCommand : public UObject
|
||||
class SENSEGLOVECORE_API USGFingerCommand : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -66,8 +69,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
protected:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGFingerCommand();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
explicit USGFingerCommand(const TArray<int32>& InLevels);
|
||||
|
||||
public:
|
||||
@@ -159,7 +168,6 @@ protected:
|
||||
*/
|
||||
void SetFingerCommandImpl(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
* The cast to underlying type method.
|
||||
@@ -178,13 +186,29 @@ protected:
|
||||
virtual void SyncUProperties();
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
TArray<int32> GetLevels() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
int32 GetLevel(int32 Finger) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetLevel(int32 Finger, int32 Value);
|
||||
|
||||
/**
|
||||
* Check if this command contains the same values as another.
|
||||
*/
|
||||
bool Equals(const USGFingerCommand* FingerCommand) const;
|
||||
|
||||
/**
|
||||
* Create a string representation of this finger command.
|
||||
*/
|
||||
FString ToString() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* A command for five fingers that can be sent to a Sense Glove device.
|
||||
*/
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
|
||||
class FSGForceFeedbackCommandImpl;
|
||||
|
||||
/**
|
||||
* A Force-Feedback command for the Sense Glove, with levels for each finger.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGForceFeedbackCommand final : public USGFingerCommand
|
||||
{
|
||||
@@ -59,18 +62,34 @@ public:
|
||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||
UObject* Outer, TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for internal initialization.
|
||||
*/
|
||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger stored in an int[5] array.
|
||||
*/
|
||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||
UObject* Outer, const TArray<int32>& ForceFeedbackLevels);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger.
|
||||
*/
|
||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||
UObject* Outer, int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback command, with only one finger being activated.
|
||||
*/
|
||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||
UObject* Outer, ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
public:
|
||||
/**
|
||||
* A command that turns off all force feedback on the Sense Glove.
|
||||
*/
|
||||
static USGForceFeedbackCommand* Off(UObject* Outer);
|
||||
|
||||
private:
|
||||
@@ -85,9 +104,24 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for internal initialization.
|
||||
*/
|
||||
USGForceFeedbackCommand();
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger stored in an int[5] array.
|
||||
*/
|
||||
explicit USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger.
|
||||
*/
|
||||
USGForceFeedbackCommand(int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback command, with only one finger being activated.
|
||||
*/
|
||||
USGForceFeedbackCommand(ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
public:
|
||||
@@ -126,7 +160,13 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Copy this ForceFeedback Command into a new object.
|
||||
*/
|
||||
USGForceFeedbackCommand* Copy(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Merge this finger command with another, taking the maximum value between the two.
|
||||
*/
|
||||
USGForceFeedbackCommand* Merge(UObject* Outer, const USGForceFeedbackCommand* ForceFeedbackCommand) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Contains interpolation sets for all hand joint movements that can be
|
||||
* calculated using the Sense Glove.
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,15 +44,17 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGInterpolationSet.h"
|
||||
#include "SGCore/SGInterpolationSetArray.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
#include "SGHandInterpolator.generated.h"
|
||||
|
||||
class FSGHandInterpolatorImpl;
|
||||
class USGHandInterpolator;
|
||||
|
||||
/**
|
||||
* Contains interpolation sets of all joint movements that can be calculated into a HandPose.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHandInterpolator final : public UObject
|
||||
{
|
||||
@@ -62,44 +65,80 @@ public:
|
||||
UObject* Outer, const FSGHandInterpolatorImpl& HandInterpolatorImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FQuat& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
static USGHandInterpolator* NewHandInterpolator(
|
||||
UObject* Outer,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a default instance of a left- or right handed interpolator.
|
||||
*/
|
||||
static USGHandInterpolator* Default(UObject* Outer, const bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a serialized HandInterpolator back into a class representation.
|
||||
*/
|
||||
static USGHandInterpolator* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Calculate all angles of a specific finger based on an Interpolator and input angles.
|
||||
*/
|
||||
static TArray<FVector> InterpolateFingerAngles(ESGFinger Finger, const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles);
|
||||
|
||||
/**
|
||||
* Calculate all angles of the Thumb based on an Interpolator and input angles.
|
||||
*/
|
||||
static TArray<FVector> InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles);
|
||||
|
||||
/**
|
||||
* Calculate all hand angles based on an interpolator and total xyz angles.
|
||||
*/
|
||||
static TArray<TArray<FVector>> InterpolateHandAngles(const USGHandInterpolator* Interpolator,
|
||||
const TArray<FVector>& TotalAngles);
|
||||
|
||||
@@ -115,21 +154,42 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGHandInterpolator();
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
*/
|
||||
explicit USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
*/
|
||||
explicit USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
*/
|
||||
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||
const FRotator& CmcStartRotation);
|
||||
|
||||
@@ -158,32 +218,68 @@ public:
|
||||
const FSGHandInterpolatorImpl& ToHandInterpolatorImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Interpolation sets for each finger. First index indicates which finger, Second index indicates the joint movement.
|
||||
*/
|
||||
TArray<TArray<USGInterpolationSet*>> GetJointInterpolations(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Starting rotation of the thumb cmc joint.
|
||||
*/
|
||||
FQuat GetCmcStartRotationQ() const;
|
||||
|
||||
/**
|
||||
* Starting rotation of the thumb cmc joint.
|
||||
*/
|
||||
FRotator GetCmcStartRotation() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Calculate any finger's movement rotation, using an input value.
|
||||
*/
|
||||
float CalculateAngle(ESGFinger Finger, int32 Movement, float Value) const;
|
||||
|
||||
/**
|
||||
* Calculate a finger movement's rotation, using an input value.
|
||||
*/
|
||||
float CalculateAngle(ESGFinger Finger, ESGFingerMovement Movement, float Value) const;
|
||||
|
||||
/**
|
||||
* Calculate a thumb movement's rotation, using an input value.
|
||||
*/
|
||||
float CalculateAngle(ESGFinger Finger, ESGThumbMovement Movement, float Value) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
void SetInterpolation(int32 Finger, int32 Movement, float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
void SetInterpolation(ESGFinger Finger, ESGFingerMovement Movement,
|
||||
float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
void SetInterpolation(ESGThumbMovement Movement, float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Returns an interpolationSet
|
||||
*/
|
||||
USGInterpolationSet* GetInterpolation(UObject* Outer, int32 Finger, int32 Movement) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Check if this handInterpolator matches another.
|
||||
*/
|
||||
bool Equals(const USGHandInterpolator* HandInterpolator) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Serialize this HandInterpolator into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Data class containing all variables to draw or analyze a virtual hand
|
||||
* in different formats.
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,16 +44,20 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGQuatArray.h"
|
||||
#include "SGCore/SGRotatorArray.h"
|
||||
#include "SGCore/SGVectorArray.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHandPose.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class FSGHandPoseImpl;
|
||||
class USGHandPose;
|
||||
|
||||
/**
|
||||
* Contains all variables required to draw or analyze a virtual hand.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHandPose final : public UObject
|
||||
{
|
||||
@@ -63,6 +68,9 @@ public:
|
||||
UObject* Outer, const FSGHandPoseImpl& HandPoseImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
static USGHandPose* NewHandPose(UObject* Outer);
|
||||
|
||||
static USGHandPose* NewHandPose(
|
||||
@@ -70,45 +78,87 @@ public:
|
||||
bool bRightHanded, const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles);
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
static USGHandPose* NewHandPose(
|
||||
UObject* Outer,
|
||||
bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles);
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
static USGHandPose* NewHandPose(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles);
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
static USGHandPose* NewHandPose(
|
||||
UObject* Outer,
|
||||
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Deserialize a HandPose back into usable values.
|
||||
*/
|
||||
static USGHandPose* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Generate a HandPose based on articulation angles (handAngles).
|
||||
*/
|
||||
static USGHandPose* FromHandAngles(UObject* Outer,
|
||||
const TArray<TArray<FVector>>& HandAngles, bool bRightHanded,
|
||||
const USGBasicHandModel* HandDimensions);
|
||||
|
||||
/**
|
||||
* Generate a HandPose based on articulation angles (handAngles), with a default HandModel.
|
||||
*/
|
||||
static USGHandPose* FromHandAngles(UObject* Outer, const TArray<TArray<FVector>>& HandAngles, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Create a new instance of a left or right handed Pose that is "idle"; in a neutral position.
|
||||
*/
|
||||
static USGHandPose* DefaultIdle(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions);
|
||||
|
||||
/**
|
||||
* Create a new instance of a left or right handed Pose that is "idle"; in a neutral position.
|
||||
*/
|
||||
static USGHandPose* DefaultIdle(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing an 'open hand', used in calibration to determine finger extension.
|
||||
*/
|
||||
static USGHandPose* FlatHand(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing an 'open hand', used in calibration to determine finger extension.
|
||||
*/
|
||||
static USGHandPose* FlatHand(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb extension and adduction.
|
||||
*/
|
||||
static USGHandPose* ThumbsUp(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb extension and adduction.
|
||||
*/
|
||||
static USGHandPose* ThumbsUp(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction.
|
||||
*/
|
||||
static USGHandPose* Fist(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions);
|
||||
|
||||
/**
|
||||
* Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction.
|
||||
*/
|
||||
static USGHandPose* Fist(UObject* Outer, bool bRightHanded);
|
||||
|
||||
private:
|
||||
@@ -123,20 +173,35 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
USGHandPose();
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
USGHandPose(bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles);
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
USGHandPose(bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& HandAngles);
|
||||
|
||||
/**
|
||||
* Create a new instance of HandPose.
|
||||
*/
|
||||
USGHandPose(bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGHandPose(bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& HandAngles);
|
||||
@@ -166,25 +231,59 @@ public:
|
||||
const FSGHandPoseImpl& ToHandPoseImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Whether this HandPose was created to be a right- or left hand.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Positions of all hand joints relative to the Sense Glove origin. From thumb to pinky, proximal to distal.
|
||||
*/
|
||||
TArray<TArray<FVector>> GetJointPositions() const;
|
||||
|
||||
/**
|
||||
* Quaternion rotations of all hand joints. From thumb to pinky, proximal to distal.
|
||||
*/
|
||||
TArray<TArray<FQuat>> GetJointRotationsQ() const;
|
||||
|
||||
/**
|
||||
* Rotations of all hand joints. From thumb to pinky, proximal to distal.
|
||||
*/
|
||||
TArray<TArray<FRotator>> GetJointRotations() const;
|
||||
|
||||
/**
|
||||
* Euler representations of all possible hand angles. From thumb to pinky, proximal to distal.
|
||||
*/
|
||||
TArray<TArray<FVector>> GetHandAngles() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true of these two hand poses are roughly equal.
|
||||
*/
|
||||
bool Equals(const USGHandPose* HandPose) const;
|
||||
|
||||
/**
|
||||
* Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed).
|
||||
*
|
||||
* @remarks Useful for animation or for detecting gestures.
|
||||
*/
|
||||
float GetNormalizedFlexion(ESGFinger Finger, bool bClamp01 = true) const;
|
||||
|
||||
/**
|
||||
* Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed).
|
||||
*
|
||||
* @remarks Useful for animation or for detecting gestures.
|
||||
*/
|
||||
TArray<float> GetNormalizedFlexion(bool bClamp01 = true) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FString ToString(bool bShortFormat = false) const;
|
||||
|
||||
/**
|
||||
* Serialize this HandPose into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* A profile containing all the information required for HapticGloves.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,13 +41,15 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||
|
||||
#include "SGHandProfile.generated.h"
|
||||
|
||||
class FSGHandProfileImpl;
|
||||
class USGNovaGloveHandProfile;
|
||||
class USGSenseGloveHandProfile;
|
||||
|
||||
/**
|
||||
* Interpolation profiles for a user's hand, compatible with all HapticGloves.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHandProfile final : public UObject
|
||||
{
|
||||
@@ -58,8 +60,14 @@ public:
|
||||
UObject* Outer, const FSGHandProfileImpl& HandProfileImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
static USGHandProfile* NewHandProfile(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a HandProfile.
|
||||
*/
|
||||
static USGHandProfile* NewHandProfile(
|
||||
UObject* Outer,
|
||||
bool bRightHanded,
|
||||
@@ -67,25 +75,55 @@ public:
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Generate a new handProfile for either a left or right hand.
|
||||
*/
|
||||
static USGHandProfile* Default(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a string notation of a NovaGloveHandProfile into a new instance.
|
||||
*/
|
||||
static USGHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns the directory where HandProfiles are being stored. Does not include a '\\' at the end.
|
||||
*/
|
||||
static FString GetProfileDirectory();
|
||||
|
||||
/**
|
||||
* Filename for the left hand profile.
|
||||
*/
|
||||
static FString GetLeftHandFileName();
|
||||
|
||||
/**
|
||||
* Filename for the right hand profile.
|
||||
*/
|
||||
static FString GetRightHandFileName();
|
||||
|
||||
/**
|
||||
* Returns the fileName of the left or right-handed profiles.
|
||||
*/
|
||||
static FString GetProfileFileName(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieves the latest HandProfile from disk. If this function returns false, latestProfils is equal to SGCOre::HandProfile::Default(rightHand).
|
||||
*/
|
||||
static bool GetLatestProfile(UObject* Outer, bool bRightHanded, USGHandProfile*& OutLatestProfile);
|
||||
|
||||
/**
|
||||
* Stores a HandProfile on disk for other programs to access. Call this function only if your software handles calibration functions.
|
||||
*/
|
||||
static bool StoreProfile(const USGHandProfile* ProfileToStore);
|
||||
|
||||
/**
|
||||
* Resets the Calibration of a specific back to default values.
|
||||
*/
|
||||
static bool ResetCalibration(bool bRightHanded, bool bOnDisk = true);
|
||||
|
||||
/**
|
||||
* Resets the Calibration of both hands back to default values.
|
||||
*/
|
||||
static void ResetCalibration(bool bOnDisk = true);
|
||||
|
||||
private:
|
||||
@@ -100,8 +138,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
USGHandProfile();
|
||||
|
||||
/**
|
||||
* Creates a new instance of a HandProfile.
|
||||
*/
|
||||
USGHandProfile(bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
@@ -131,17 +175,35 @@ public:
|
||||
const FSGHandProfileImpl& ToHandProfileImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Whether this profile was created for a left or right hand.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Profile for SenseGloves.
|
||||
*/
|
||||
USGSenseGloveHandProfile* GetSenseGloveHandProfile(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* User profile for Nova.
|
||||
*/
|
||||
USGNovaGloveHandProfile* GetNovaGloveHandProfile(UObject* Outer) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
bool Equals(const USGHandProfile* HandProfile) const;
|
||||
|
||||
/**
|
||||
* Reset this profile back to its default values.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* An interface for any of our gloves that can track hand motion and/or send
|
||||
* force / vibrotactile feedback.
|
||||
*/
|
||||
|
||||
|
||||
@@ -55,6 +56,9 @@ class FSGSenseGloveImpl;
|
||||
class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
|
||||
/**
|
||||
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHapticGlove : public USGDevice
|
||||
{
|
||||
@@ -69,13 +73,25 @@ protected:
|
||||
static USGHapticGlove* NewHapticGlove(UObject* Outer, TSharedRef<FSGHapticGloveImpl> HapticGloveImpl);
|
||||
|
||||
protected:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGHapticGlove* NewHapticGlove(UObject* Outer);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get all Haptic Gloves detected on this system.
|
||||
*/
|
||||
static TArray<USGHapticGlove*> GetHapticGloves(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Get the first Haptic Glove detected on this system.
|
||||
*/
|
||||
static bool GetGlove(UObject* Outer, USGHapticGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Get the first left/right Haptic Glove detected on this system.
|
||||
*/
|
||||
static bool GetGlove(UObject* Outer, bool bRightHanded, USGHapticGlove*& OutGlove);
|
||||
|
||||
private:
|
||||
@@ -90,6 +106,9 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGHapticGlove();
|
||||
|
||||
public:
|
||||
@@ -158,77 +177,174 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the DeviceType enumerator of this device; used to check if its a SenseGlove/Nova/etc.
|
||||
*/
|
||||
virtual ESGDeviceType GetDeviceType() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this glove's unique identifier.
|
||||
*/
|
||||
virtual FString GetDeviceId() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this glove's hardware (sub) version. "DK1", "DK2", etc.
|
||||
*/
|
||||
virtual FString GetHardwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's main firmware version. v4.12 returns 4.
|
||||
*/
|
||||
virtual int32 GetFirmwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's sub firmware version. v4.12 returns 12.
|
||||
*/
|
||||
virtual int32 GetSubFirmwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Returns true if this glove is made for a right hand. If false, it's a left hand.
|
||||
*/
|
||||
virtual bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Retrieve this glove's IMU rotation, if if has any.
|
||||
*/
|
||||
virtual bool GetImuRotation(FQuat& OutImu);
|
||||
|
||||
/**
|
||||
* Retrieve this glove's IMU rotation, if if has any.
|
||||
*/
|
||||
virtual bool GetImuRotation(FRotator& OutImu);
|
||||
|
||||
/**
|
||||
* Calculate the Hand Pose of this device, provided it has Hand Tracking available
|
||||
*/
|
||||
virtual bool GetHandPose(
|
||||
UObject* Outer,
|
||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve a HandPose based on the latest profile, but with a specific hand geometry.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve a HandPose based on the latest profile and default hand Geometry.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, USGHandPose*& OutHandPose);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting.
|
||||
*/
|
||||
virtual void StopHaptics();
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void StopVibrations();
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
*/
|
||||
virtual bool GetCalibrationValues(TArray<FVector>& OutValues);
|
||||
|
||||
/**
|
||||
* Reset Calibration range for this Device.
|
||||
*/
|
||||
virtual void ResetCalibrationRange();
|
||||
|
||||
/**
|
||||
* Updates calibration values only.
|
||||
*/
|
||||
virtual void UpdateCalibrationRange();
|
||||
|
||||
/**
|
||||
* Updates calibration values only.
|
||||
*/
|
||||
virtual void UpdateCalibrationRange(const TArray<FVector>& CalibrationValues);
|
||||
|
||||
/**
|
||||
* Access the minimum- and maximum sensor values measured by this Haptic Glove, in this session.
|
||||
*/
|
||||
virtual void GetCalibrationRange(TArray<FVector>& OutMinValues,
|
||||
TArray<FVector>& OutMaxValues);
|
||||
|
||||
/**
|
||||
* Updates Calibration values and applies it to the Profile.
|
||||
*/
|
||||
virtual void UpdateCalibration(UObject* Outer, USGHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a handProfile.
|
||||
*/
|
||||
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,13 +41,16 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHapticGloveCalibrationCheck.generated.h"
|
||||
|
||||
class FSGHapticGloveCalibrationCheckImpl;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* An algorithm that checks whether or not our current user is running in the same calibration range as last time.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHapticGloveCalibrationCheck final : public UObject
|
||||
{
|
||||
@@ -58,32 +61,68 @@ public:
|
||||
UObject* Outer, const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(UObject* Outer);
|
||||
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(
|
||||
UObject* Outer, const USGSensorRange* LastCalibrationRange);
|
||||
|
||||
public:
|
||||
/**
|
||||
* SenseGlove: How far from the threshold one can be where we would still call it 'the same as before'.
|
||||
*/
|
||||
static float GetSenseGloveThreshold();
|
||||
|
||||
/**
|
||||
* Nova: How far from the threshold one can be where we would still call it 'the same as before'.
|
||||
*/
|
||||
static float GetNovaGloveThreshold();
|
||||
|
||||
/**
|
||||
* SenseGlove: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||
*/
|
||||
static float GetSenseGloveMinFlexion();
|
||||
|
||||
/**
|
||||
* Nova: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||
*/
|
||||
static float GetNovaGloveMinFlexion();
|
||||
|
||||
/**
|
||||
* SenseGlove: The minimum amount of sensor movement on the thumb abduction before we start testing for a smaller hand.
|
||||
*/
|
||||
static float GetSenseGloveMinAbduction();
|
||||
|
||||
/**
|
||||
* Nova: The minimum amount of sensor movement on the thumb abduction before we start testing for a smaller hand.
|
||||
*/
|
||||
static float GetNovaGloveMinAbduction();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if this DeviceType requires a calibration check.
|
||||
*/
|
||||
static bool NeedsCheck(ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Checks if current values are operating out of the previous range. Returns -1 if all is fine. 0...4 to indicate which finger is out of bounds.
|
||||
*/
|
||||
static int32 OutOfBounds(const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues,
|
||||
ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Returns true if the user has moved enough in both flexion and thumb abduction movement to be considered 'active'
|
||||
*/
|
||||
static bool MovedMinimum(const TArray<FVector>& CurrentRange, ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Returns true if the current sensor values have moved roughly as much as last time.
|
||||
*/
|
||||
static bool MatchesLast(const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange,
|
||||
ESGDeviceType DeviceType);
|
||||
|
||||
@@ -99,8 +138,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
USGHapticGloveCalibrationCheck();
|
||||
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
explicit USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange);
|
||||
|
||||
public:
|
||||
@@ -128,15 +173,30 @@ public:
|
||||
const FSGHapticGloveCalibrationCheckImpl& ToHapticGloveCalibrationCheckImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGSensorRange* GetLastSensorRange(UObject* Outer) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
ESGCalibrationStage GetCalibrationStage() const;
|
||||
|
||||
/**
|
||||
* Whether this algorithm has determined if calibration is required, or not.
|
||||
*/
|
||||
bool ReachedConclusion() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Reset the calibration check. so it may be used again. This does not reset the last range.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/**
|
||||
* Using the currently received Sensor Values, check if calibration is required. This function will have to be called until a conclusion can be reached.
|
||||
*/
|
||||
void CheckRange(const TArray<FVector>& CurrentValues, float DeltaSeconds, ESGDeviceType DeviceType);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,18 +40,21 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGCalibrationDataPoint.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHapticGloveCalibrationSequence.generated.h"
|
||||
|
||||
class FSGHapticGloveCalibrationSequenceImpl;
|
||||
class FSGHapticGloveQuickCalibrationImpl;
|
||||
class USGCalibrationDataPoint;
|
||||
class USGHandPose;
|
||||
class USGHandProfile;
|
||||
class USGHapticGlove;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* A sequence which collects data points until specific criteria have been met. It must be 'fed' an Update command from your program in order to work.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHapticGloveCalibrationSequence : public UObject
|
||||
{
|
||||
@@ -66,16 +68,28 @@ public:
|
||||
UObject* Outer, TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequence);
|
||||
|
||||
protected:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(UObject* Outer);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a base HapitcGlove Calibration Sequence.
|
||||
*/
|
||||
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(
|
||||
UObject* Outer, const USGHapticGlove* LinkedGlove);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The maximum buffer size for calibration points. Once calibrationPoints exceeds this value, the
|
||||
*/
|
||||
static int32 GetMaxDataPoints();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Converts a calibration range taken from a Calibration sequence, and converts it into a profile. Use this if you're not actually using the sequence.
|
||||
*/
|
||||
static bool CompileProfile(UObject* Outer,
|
||||
const USGSensorRange* SensorRange, ESGDeviceType ForDevice, bool bRightHanded,
|
||||
USGHandProfile*& OutProfile);
|
||||
@@ -92,9 +106,15 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
protected:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGHapticGloveCalibrationSequence();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a base HapitcGlove Calibration Sequence.
|
||||
*/
|
||||
explicit USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove);
|
||||
|
||||
public:
|
||||
@@ -172,41 +192,96 @@ protected:
|
||||
virtual void SyncUProperties();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Glove linked to this calibration sequence. Will attempt to grab data from this glove evey time Update() is called.
|
||||
*/
|
||||
USGHapticGlove* GetLinkedGlove(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetLinkedGlove(const USGHapticGlove* LinkedGlove);
|
||||
|
||||
/**
|
||||
* Calibration points collected during this calibration process. One is added every time the "Update()" function is called.
|
||||
* Used to create a profile after the calibration finishes.
|
||||
*/
|
||||
TArray<USGCalibrationDataPoint*> GetCalibrationPoints(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* How much time has elapsed during this calibration sequence. Useful for logging or for automated functions.
|
||||
*/
|
||||
float GetElapsedTime() const;
|
||||
|
||||
/**
|
||||
* Used to determine if the user has manually ended the sequence, to prevent us from adding any more calibration points.
|
||||
*/
|
||||
bool IsManuallyCompleted() const;
|
||||
|
||||
/**
|
||||
* If a sequence consists of multiple stages, this integer will show you which one is currently active.
|
||||
*/
|
||||
int32 GetCurrentStage() const;
|
||||
|
||||
/**
|
||||
* Returns the amount of calibration points collected so far.
|
||||
*/
|
||||
SIZE_T GetCalibrationPointsCount() const;
|
||||
|
||||
/**
|
||||
* Whether or not this sequence was completed as per its own rules.
|
||||
*/
|
||||
bool AutoCompleted() const;
|
||||
|
||||
/**
|
||||
* Returns true if this sequence is marked as 'complete' and can begin compiling a profile.
|
||||
*/
|
||||
bool Completed() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Resets this calibration sequence's data, but not it's LinkedGlove.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void AddDataPoint(const TArray<FVector>& CalibrationPoints);
|
||||
|
||||
/**
|
||||
* Update this calibration sequence with new data. We use deltaSeconds to check for things like stability.
|
||||
*/
|
||||
void Update(float DeltaSeconds);
|
||||
|
||||
/**
|
||||
* Manual confirmation of whatever step we're supposed to making at the moment.
|
||||
*/
|
||||
void ConfirmCurrentStep();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Compile a min/max range from the data points collected by this sequence. Returns true if it's actually possible.
|
||||
*/
|
||||
bool CompileRange(UObject* Outer, USGSensorRange*& OutSensorRange) const;
|
||||
|
||||
/**
|
||||
* Compile a profile from the data points collected by this sequence. Returns true if it's actually possible.
|
||||
*/
|
||||
bool CompileProfile(UObject* Outer, ESGDeviceType ForDevice, bool bRightHanded, USGHandProfile*& OutProfile) const;
|
||||
|
||||
/**
|
||||
* Returns the current HandPose; either the one we should be making, or what it would look like at the moment.
|
||||
*/
|
||||
bool GetHandPose(UObject* Outer, USGHandPose*& OutCurrentHandPose) const;
|
||||
|
||||
/**
|
||||
* Returns the current HandPose; either the one we should be making, or what it would look like at the moment.
|
||||
*/
|
||||
bool GetHandPose(UObject* Outer, bool bRightHanded, USGHandPose*& OutCurrentHandPose) const;
|
||||
|
||||
/**
|
||||
* Retrieve instructions on what to do during the current step.
|
||||
*/
|
||||
FString GetCurrentInstruction(const FString& NextStepKey = FString{""}) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -50,6 +50,9 @@ class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGTimedBuzzCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHapticGloveCommandBuffer final : public UObject
|
||||
{
|
||||
@@ -60,13 +63,25 @@ public:
|
||||
UObject* Outer, const FSGHapticGloveCommandBufferImpl& HapticGloveCommandBufferImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new HapticsStream for a Haptic Glove.
|
||||
*/
|
||||
static USGHapticGloveCommandBuffer* NewHapticGloveCommandBuffer(UObject* Outer);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The base maximum amount of Force-Feedback Commands that can be in a queue.
|
||||
*/
|
||||
static int32 GetMaxForceFeedbackCommands();
|
||||
|
||||
/**
|
||||
* The base maximum amount of Vibrotactile Commands that can be in a queue.
|
||||
*/
|
||||
static int32 GetMaxBuzzCommands();
|
||||
|
||||
/**
|
||||
* The base maximum amount of Thumper Commands that can be in a queue.
|
||||
*/
|
||||
static int32 GetMaxThumpCommands();
|
||||
|
||||
private:
|
||||
@@ -81,6 +96,9 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGHapticGloveCommandBuffer();
|
||||
|
||||
public:
|
||||
@@ -108,38 +126,83 @@ public:
|
||||
const FSGHapticGloveCommandBufferImpl& ToHapticGloveCommandBufferImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* All Force Feedback Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
TArray<USGForceFeedbackCommand*> GetForceFeedbackCommandsQueue(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* All Timed Buzz Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
TArray<USGTimedBuzzCommand*> GetBuzzCommandsQueue(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* All Timed Thump Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
TArray<USGTimedThumpCommand*> GetThumperCommandsQueue(UObject* Outer) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Clears only the Force-Feedback Queue.
|
||||
*/
|
||||
void ClearForceFeedbackCommandsQueue();
|
||||
|
||||
/**
|
||||
* Clears all vibrations in the queue(s).
|
||||
*/
|
||||
void ClearVibrations();
|
||||
|
||||
/**
|
||||
* Clear all ongoing effects to this stream.
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
/**
|
||||
* Add a new Force-Feedback command to the queue. Does not actually send it.
|
||||
*/
|
||||
void AddCommand(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Add a new vibrotactile command to the queue. Does not actually send it.
|
||||
*/
|
||||
void AddCommand(const USGTimedBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Add a new Thumper command to the queue. Does not actually send it. Does not work with SenseGlove, only for Nova's
|
||||
*/
|
||||
void AddCommand(const USGTimedThumpCommand* ThumpCommand);
|
||||
|
||||
/**
|
||||
* Update the active commands, using a deltaSeconds since last update, in seconds. Any timedCommands that are elapsed will be removed from the list.
|
||||
*/
|
||||
void UpdateTimedCommands(float DeltaSeconds);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Compiles all ForceFeedback Levels in the queue into a single one. Does not clear the queue. Returns lastForceFeedbackCommand if no ForceFeedback commands are given.
|
||||
*/
|
||||
USGForceFeedbackCommand* GetTotalForceFeedbackLevels(
|
||||
UObject* Outer, const USGForceFeedbackCommand* LastForceFeedbackCommand) const;
|
||||
|
||||
/**
|
||||
* Compiles all ForceFeedback Levels in the queue into a single one. Does not clear the queue.
|
||||
*/
|
||||
USGForceFeedbackCommand* GetTotalForceFeedbackLevels(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Compiles all active vibrotactile in the queue into a single list of levels. Does not clear the queue.
|
||||
*/
|
||||
USGBuzzCommand* GetTotalBuzzLevels(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Compiles all active vibrotactile in the queue into a single list of levels. Does not clear the queue.
|
||||
*/
|
||||
USGThumperCommand* GetTotalThumperLevels(UObject* Outer) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Compile all commands in the queue(s) into a single set of commands that can be sent to the glove. Only clears the ForceFeedback queue, and only if you want it to.
|
||||
*/
|
||||
void FlushHaptics(UObject* Outer,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||
@@ -147,9 +210,12 @@ public:
|
||||
USGThumperCommand*& OutThumperCommand,
|
||||
bool bClearForceFeedbackQueue = true);
|
||||
|
||||
/**
|
||||
* Compile all commands in the queue(s) into a single set of commands that can be sent to the glove. Also updates & clears all queues.
|
||||
*/
|
||||
void FlushHaptics(UObject* Outer,
|
||||
float DeltaSeconds,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand, USGBuzzCommand*& OutBuzzCommand,
|
||||
USGThumperCommand*& OutThumperCommand);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* An interface to get calibration to / from disk.
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,44 +37,89 @@
|
||||
|
||||
#include "Containers/UnrealString.h"
|
||||
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
|
||||
#include "SGHapticGloveHandProfiles.generated.h"
|
||||
|
||||
class USGHandProfile;
|
||||
class USGHapticGlove;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGHapticGloveHandProfiles
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns the directory where our HandProfiles are stored.
|
||||
*/
|
||||
static FString GetProfileDirectory();
|
||||
|
||||
/**
|
||||
* Set the directory where our HandProfiles are stored.
|
||||
*/
|
||||
static void SetProfileDirectory(const FString& Directory);
|
||||
|
||||
/**
|
||||
* Access the latest Left Hand Profile from disk.
|
||||
*/
|
||||
static void GetLeftHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Sets the newest Left Hand Profile - also stores it on disk.
|
||||
*/
|
||||
static void SetLeftHandProfile(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Access the latest Right Hand Profile from disk.
|
||||
*/
|
||||
static void GetRightHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Sets the newest Right Hand Profile - also stores it on disk.
|
||||
*/
|
||||
static void SetRightHandProfile(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Retrieve a left- or right handed profile.
|
||||
*/
|
||||
static void GetProfile(UObject* Outer, bool bRightHanded, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Store a profile in the global variables and on disk. The profile determines if this is a left or right hand.
|
||||
*/
|
||||
static void SetProfile(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Store a profile in the global variables and on disk. You determine if this is a left or right hand.
|
||||
*/
|
||||
static void SetProfile(const USGHandProfile* HandProfile, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Restore both profiles back to their default values.
|
||||
*/
|
||||
static void RestoreDefaults();
|
||||
|
||||
/**
|
||||
* Restore the left- or right hand profiles back to their default values.
|
||||
*/
|
||||
static void RestoreDefaults(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Load the latest profiles from disk. Automatically called when you first try to access a profile.
|
||||
* Exposed so you can force-reload profiles.
|
||||
*/
|
||||
static void TryLoadingFromDisk();
|
||||
|
||||
/**
|
||||
* Stores the last sensor range of a glove.
|
||||
*/
|
||||
static bool SaveLastRange(const USGSensorRange* CurrentRange, const USGHapticGlove* ForGlove);
|
||||
|
||||
/**
|
||||
* Loads the last sensor range of a glove.
|
||||
*/
|
||||
static bool LoadLastRange(UObject* Outer, const USGHapticGlove* ForGlove, USGSensorRange*& OutLastRange);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
|
||||
class FSGHapticGloveQuickCalibrationImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGHapticGloveQuickCalibration final : public USGHapticGloveCalibrationSequence
|
||||
{
|
||||
@@ -57,14 +60,24 @@ public:
|
||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
||||
UObject* Outer, TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibration);
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a QuickCalibration for Haptic Gloves.
|
||||
*/
|
||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
||||
UObject* Outer,
|
||||
const USGHapticGlove* GloveToCalibrate,
|
||||
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default time in seconds, to end this sequence. 15 seconds is very quick for some people.
|
||||
*/
|
||||
static float GetDefaultAutoEndTimeout();
|
||||
|
||||
private:
|
||||
@@ -79,8 +92,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGHapticGloveQuickCalibration();
|
||||
|
||||
/**
|
||||
* Create a new instance of a QuickCalibration for Haptic Gloves.
|
||||
*/
|
||||
explicit USGHapticGloveQuickCalibration(const USGHapticGlove* GloveToCalibrate,
|
||||
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
||||
|
||||
@@ -121,31 +140,70 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Time, in seconds, after which this sequence stops gathering data. Based on the deltaSeconds variable passed in the Update() function.
|
||||
*/
|
||||
float GetAutoEndTimeout() const;
|
||||
|
||||
/**
|
||||
* When compiling the final profile, we use a Weighted Moving Average filter with this period to filer out some outliers.
|
||||
*/
|
||||
int32 GetSmoothingSamples() const;
|
||||
|
||||
/**
|
||||
* The min/max values recorded during this calibration sequence.
|
||||
*/
|
||||
USGSensorRange* GetSensorRange(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* A temporary profile to apply the sensorRange to. Used to generate a 'preview' HandPose.
|
||||
*/
|
||||
USGHandProfile* GetTemporaryProfile(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Determines if the user has moved enough so that we can animate.
|
||||
*/
|
||||
bool CanAnimate() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* This sequence autocompletes after its autoEndTime has elapsed.
|
||||
*/
|
||||
bool AutoCompleted() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Resets data points, min/max ranges and profile.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/**
|
||||
* Update this calibration sequence with new data. We use deltaSeconds to check for things like stability.
|
||||
*/
|
||||
void Update(float DeltaSeconds);
|
||||
|
||||
/**
|
||||
* Add a new datapoint to this sequence's collection. Updates the range and profile used to generate a preview.
|
||||
*/
|
||||
void AddDataPoint(const TArray<FVector>& CalibrationData);
|
||||
|
||||
/**
|
||||
* After we confirm the current step, we're basically done.
|
||||
*/
|
||||
void ConfirmCurrentStep();
|
||||
|
||||
/**
|
||||
* Compile a sensor range from the data points collected while the sequence was running. Smoothed by a Moving Average Filter.
|
||||
*/
|
||||
bool CompileRange(UObject* Outer, USGSensorRange*& OutSensorRange) const;
|
||||
|
||||
/**
|
||||
* Returns a 'preview' of what a HandPose with this sequence's current settings would look like.
|
||||
*/
|
||||
bool GetHandPose(UObject* Outer, bool bRightHanded, USGHandPose*& OutCurrentHandPose) const;
|
||||
|
||||
/**
|
||||
* Retrieve instructions on what to do during the current step.
|
||||
*/
|
||||
FString GetCurrentInstruction(const FString& NextStepKey = FString{""}) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Data class containing all variables to map an input value from one range to
|
||||
* another.
|
||||
*/
|
||||
|
||||
|
||||
@@ -47,6 +48,9 @@
|
||||
|
||||
class FSGInterpolationSetImpl;
|
||||
|
||||
/**
|
||||
* Set of variables to map a value from one range to the next.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGInterpolationSet final : public UObject
|
||||
{
|
||||
@@ -57,14 +61,26 @@ public:
|
||||
UObject* Outer, const FSGInterpolationSetImpl& InterpolationSetImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a basic interpolation set, without limits.
|
||||
*/
|
||||
static USGInterpolationSet* NewInterpolationSet(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new interpolation set without limits.
|
||||
*/
|
||||
static USGInterpolationSet* NewInterpolationSet(UObject* Outer, float From1, float From2, float To1, float To2);
|
||||
|
||||
/**
|
||||
* Create a new interpolation set with limits.
|
||||
*/
|
||||
static USGInterpolationSet* NewInterpolationSet(
|
||||
UObject* Outer, float From1, float From2, float To1, float To2, float Min, float Max);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert a string notation of an InterpolationSet into a new class instance.
|
||||
*/
|
||||
static USGInterpolationSet* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -79,10 +95,19 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a basic interpolation set, without limits.
|
||||
*/
|
||||
USGInterpolationSet();
|
||||
|
||||
/**
|
||||
* Create a new interpolation set without limits.
|
||||
*/
|
||||
USGInterpolationSet(float From1, float From2, float To1, float To2);
|
||||
|
||||
/**
|
||||
* Create a new interpolation set with limits.
|
||||
*/
|
||||
USGInterpolationSet(float From1, float From2, float To1, float To2, float Min, float Max);
|
||||
|
||||
public:
|
||||
@@ -110,40 +135,91 @@ public:
|
||||
const FSGInterpolationSetImpl& ToInterpolationSetImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* First value of input range.
|
||||
*/
|
||||
float GetX0() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetX0(float X0);
|
||||
|
||||
/**
|
||||
* Second value of input range.
|
||||
*/
|
||||
float GetX1() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetX1(float X1);
|
||||
|
||||
/**
|
||||
* First value of output range.
|
||||
*/
|
||||
float GetY0() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetY0(float Y0);
|
||||
|
||||
/**
|
||||
* Second value of output range.
|
||||
*/
|
||||
float GetY1() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetY1(float Y1);
|
||||
|
||||
/**
|
||||
* Minimum range of the output value.
|
||||
*/
|
||||
float GetMin() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetMin(float Min);
|
||||
|
||||
/**
|
||||
* Maximum range of the output value.
|
||||
*/
|
||||
float GetMax() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetMax(float Max);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Calculate an output value in range [x0...x1] to [y0..y1]
|
||||
*/
|
||||
float Get(float Value, bool bLimit, bool bNormalizeAngle = false) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if this InterpolationSet has the same values as another set.
|
||||
*/
|
||||
bool Equals(const USGInterpolationSet* InterpolationSet) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FString ToString(bool bLimits) const;
|
||||
|
||||
/**
|
||||
* Convert this InterpolationSet into a string notation so it can be stored on disk.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Contains kinematic formulae and wrappers for Sense Glove mathematics.
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,32 +39,50 @@
|
||||
#include "Math/Quat.h"
|
||||
#include "Math/Vector.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGJointKinematics.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGJointKinematics
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Perform forward Kinematics on a set of joints, defined by a start position- and rotation,
|
||||
* joint angles and the lengths in between. Outputs the calculated positions and rotations.
|
||||
*/
|
||||
static bool ForwardKinematics(
|
||||
const FVector& StartPosition, const FQuat& StartRotation,
|
||||
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
|
||||
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
|
||||
|
||||
/**
|
||||
* Perform forward Kinematics on a set of joints, defined by a start position- and rotation,
|
||||
* joint angles and the lengths in between. Outputs the calculated positions and rotations.
|
||||
*/
|
||||
static bool ForwardKinematics(
|
||||
const FVector& StartPosition, const FRotator& StartRotation,
|
||||
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
|
||||
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
|
||||
|
||||
/**
|
||||
* Calculate positions and rotations of a finger based on input angles and profile.
|
||||
*/
|
||||
static bool ForwardKinematics(
|
||||
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
|
||||
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
|
||||
|
||||
/**
|
||||
* Calculate positions and rotations of a finger based on input angles and profile.
|
||||
*/
|
||||
static bool ForwardKinematics(
|
||||
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
|
||||
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Information about the SGCore C++ Library.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* An interface for the "Nova" - a soft glove.
|
||||
* Contains methods for Kinematics, Haptics and Serialization.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,11 +42,7 @@
|
||||
#include "Math/Quat.h"
|
||||
#include "Math/Vector.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGNovaGloveSensorData.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGNovaGlove.generated.h"
|
||||
@@ -53,8 +50,13 @@
|
||||
class FSGNovaGloveImpl;
|
||||
class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGNovaGloveInfo;
|
||||
class USGNovaGloveSensorData;
|
||||
class USGThumperCommand;
|
||||
|
||||
/**
|
||||
* A soft glove with Force- and Vibrotactile Feedback and limited tracking.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGNovaGlove final : public USGHapticGlove
|
||||
{
|
||||
@@ -66,59 +68,113 @@ public:
|
||||
static USGNovaGlove* NewNovaGlove(UObject* Outer, TSharedRef<FSGNovaGloveImpl> NovaGloveImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGNovaGlove* NewNovaGlove(UObject* Outer);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGNovaGlove* NewNovaGlove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Byte indicating a new Nova haptic command.
|
||||
*/
|
||||
static ANSICHAR GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Minimum calibration value distance until we apply the range.
|
||||
*/
|
||||
static FVector GetMinCalibrationRange();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Calculate a Hand Pose based on a HandMode; sensor data from a Nova, and a UserProfile.
|
||||
*/
|
||||
static USGHandPose* CalculateHandPose(UObject* Outer,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGNovaGloveSensorData* NovaData,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Deserializes a Nova from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||
*/
|
||||
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
||||
|
||||
/**
|
||||
* Retrieve all Nova's.
|
||||
*/
|
||||
static TArray<USGNovaGlove*> GetNovaGloves(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Retrieve the first connected Nova there is.
|
||||
*/
|
||||
static bool GetNovaGlove(UObject* Outer, USGNovaGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Retrieve the first (connected) right or left handed Nova.
|
||||
*/
|
||||
static bool GetNovaGlove(UObject* Outer, bool bRightHanded, USGNovaGlove*& OutGlove);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||
*/
|
||||
static TArray<FVector> GetCalibrationValues(const USGNovaGloveSensorData* SensorData);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static void CalibrateInterpolation(UObject* Outer,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||
USGNovaGloveHandProfile*& OutProfile);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without needing an object reference.
|
||||
*/
|
||||
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without needing an object reference.
|
||||
*/
|
||||
static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Converts a thumper command into bytes that the Nova can understand.
|
||||
*/
|
||||
static FString ToBytes(const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Converts a force-feedback command into bytes that the Nova can understand.
|
||||
*/
|
||||
static FString ToBytes(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Converts a buzz-motor command into bytes that the Nova can understand.
|
||||
*/
|
||||
static FString ToBytes(const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
private:
|
||||
@@ -193,78 +249,156 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Return the DeviceType of this Nova.
|
||||
*/
|
||||
virtual ESGDeviceType GetDeviceType() const override;
|
||||
|
||||
/**
|
||||
* Returns this device's unique identifier.
|
||||
*/
|
||||
virtual FString GetDeviceId() const override;
|
||||
|
||||
/**
|
||||
* Access this device's hardware designation.
|
||||
*/
|
||||
virtual FString GetHardwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Access this device's main firmware version. (ex: v3.2 -> 3).
|
||||
*/
|
||||
virtual int32 GetFirmwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Access this device's sub-firmware version. (ex: v3.2 -> 2).
|
||||
*/
|
||||
virtual int32 GetSubFirmwareVersion() const override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if this device operates on a battery.
|
||||
*/
|
||||
virtual bool HasBattery() const override;
|
||||
|
||||
/**
|
||||
* Returns true if this device is currently charging.
|
||||
*/
|
||||
virtual bool IsCharging() override;
|
||||
|
||||
/**
|
||||
* Returns the device's battery level, as a value between 0 (empty) and 1 (full).
|
||||
*/
|
||||
virtual bool GetBatteryLevel(float& OutBatteryLevel) override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the latest Sensor Data from this Sense Glove.
|
||||
*/
|
||||
bool GetSensorData(UObject* Outer, USGNovaGloveSensorData*& OutSensorData);
|
||||
|
||||
/**
|
||||
* Retrieve Nova rotation.
|
||||
*/
|
||||
virtual bool GetImuRotation(FQuat& OutImu) override;
|
||||
|
||||
/**
|
||||
* Retrieve Nova rotation.
|
||||
*/
|
||||
virtual bool GetImuRotation(FRotator& OutImu) override;
|
||||
|
||||
/// HACK
|
||||
/// 'FSGNovaGlove::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
|
||||
/// tell the compiler we want both the GetHandPose from FSGHapticGlove and FSGNovaGlove
|
||||
/// tell the compiler we want both the GetHandPose from USGHapticGlove and USGNovaGlove
|
||||
using USGHapticGlove::GetHandPose;
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove, based on (calibrated) user data.
|
||||
*/
|
||||
bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove, based on (calibrated) user data.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose) override;
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Send all available haptics to a Nova.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand) override;
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override;
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGThumperCommand* ThumperCommand) override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
*/
|
||||
virtual bool GetCalibrationValues(TArray<FVector>& OutValues) override;
|
||||
|
||||
/**
|
||||
* Applies the calibration range of this Nova a HandProfile.
|
||||
*/
|
||||
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const override;
|
||||
|
||||
/**
|
||||
* Applies the calibration range of this SenseGlove to a NovaGloveHandProfile.
|
||||
*/
|
||||
void ApplyCalibration(UObject* Outer, USGNovaGloveHandProfile*& OutProfile) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation) const override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
virtual FString ToString() const override;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,25 +38,34 @@
|
||||
#include "Containers/Array.h"
|
||||
#include "Math/Vector.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
|
||||
#include "SGNovaGloveCalibration.generated.h"
|
||||
|
||||
class USGNovaGloveHandProfile;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGNovaGloveCalibration
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Apply a glove's default interpolation values to a profile, using the 'default' hand angles from calibration.
|
||||
*/
|
||||
static void ApplyDefaultCalibrationInterpolationValues(
|
||||
const TArray<FVector>& RetractedValues,
|
||||
const TArray<FVector>& ExtendedValues,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
|
||||
/**
|
||||
* Apply a set of sensor-to-joint-angle interpolations to a nova profile.
|
||||
*/
|
||||
static void ApplyInterpolationValues(
|
||||
const TArray<FVector>& RetractedValues,
|
||||
const TArray<FVector>& ExtendedValues,
|
||||
const TArray<TArray<FVector>>& RetractedAngles,
|
||||
const TArray<TArray<FVector>>& ExtendedAngles,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Input for Nova kinematics to calculate a HandPose.
|
||||
* Output of calibration algorithms.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,13 +42,14 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
|
||||
#include "SGNovaGloveHandProfile.generated.h"
|
||||
|
||||
class FSGNovaGloveHandProfileImpl;
|
||||
class USGHandInterpolator;
|
||||
|
||||
/**
|
||||
* Contains user-specific data for the Nova to convert sensor data into a hand pose.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGNovaGloveHandProfile final : public UObject
|
||||
{
|
||||
@@ -58,11 +60,28 @@ public:
|
||||
UObject* Outer, const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Nova-Profile.
|
||||
*/
|
||||
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(
|
||||
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a default Nova Profile for a left or right hand.
|
||||
*/
|
||||
static USGNovaGloveHandProfile* Default(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a string notation of a NovaGloveHandProfile into a new instance.
|
||||
*/
|
||||
static USGNovaGloveHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
struct FImpl;
|
||||
|
||||
@@ -75,8 +94,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
USGNovaGloveHandProfile();
|
||||
|
||||
/**
|
||||
* Create a new instance of a Nova-Profile.
|
||||
*/
|
||||
USGNovaGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator);
|
||||
|
||||
public:
|
||||
@@ -104,15 +129,30 @@ public:
|
||||
const FSGNovaGloveHandProfileImpl& ToNovaGloveHandProfileImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Whether this profile was created for a right- or left hand.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Interpolation sets to convert sensor data into a hand pose.
|
||||
*/
|
||||
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
bool Equals(const USGNovaGloveHandProfile* NovaGloveHandProfile) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Contains information on Nova's hardware, extracted from the device.
|
||||
*/
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGNovaGloveInfo.generated.h"
|
||||
|
||||
class FSGNovaGloveInfoImpl;
|
||||
|
||||
/**
|
||||
* Device information extracted from a Nova Glove.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGNovaGloveInfo final : public UObject
|
||||
{
|
||||
@@ -59,16 +59,28 @@ public:
|
||||
UObject* Outer, const FSGNovaGloveInfoImpl& NovaGloveInfoImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
static USGNovaGloveInfo* NewNovaGloveInfo(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveInfo.
|
||||
*/
|
||||
static USGNovaGloveInfo* NewNovaGloveInfo(
|
||||
UObject* Outer,
|
||||
const FString& DeviceId, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Parse an constants string into a NovaGloveInfo class.
|
||||
*/
|
||||
static bool Parse(UObject* Outer, const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo);
|
||||
|
||||
/**
|
||||
* Convert a string representation back into a NovaGloveInfo class.
|
||||
*/
|
||||
static USGNovaGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -83,8 +95,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
USGNovaGloveInfo();
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveInfo.
|
||||
*/
|
||||
USGNovaGloveInfo(const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
||||
@@ -120,25 +138,60 @@ protected:
|
||||
FSGNovaGloveInfoImpl& ToNovaGloveInfoImpl();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Unique identifier of this device.
|
||||
*/
|
||||
FString GetDeviceId() const;
|
||||
|
||||
/**
|
||||
* Hardware (sub) version of this Sense Glove Device.
|
||||
*/
|
||||
FString GetHardwareVersion() const;
|
||||
|
||||
/**
|
||||
* Firmware version running on the device's MicroController. (as v4.12, this is the 4).
|
||||
*/
|
||||
int32 GetFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
* Sub firmware version running on the device's microcontroller (as v4.12, this is the .12).
|
||||
*/
|
||||
int32 GetSubFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
* Determines if this is a right-handed Nova.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
FQuat GetImuCorrection() const;
|
||||
/**
|
||||
* The IMU correction of this Nova.
|
||||
*/
|
||||
FQuat GetImuCorrectionQ() const;
|
||||
|
||||
/**
|
||||
* The IMU correction of this Nova.
|
||||
*/
|
||||
FRotator GetImuCorrection() const;
|
||||
|
||||
/**
|
||||
* The number of sensors in this device.
|
||||
*/
|
||||
int32 GetNumberOfSensors() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if this GloveInfo contains the same information as another.
|
||||
*/
|
||||
bool Equals(const USGNovaGloveInfo* NovaGloveInfo) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a string representation of this Glove Info.
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
* Convert this class into a string representation so it can be unpacked later.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Nova SensorData, parsed from rae string representations.
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveInfo.h"
|
||||
|
||||
#include "SGNovaGloveSensorData.generated.h"
|
||||
|
||||
class FSGNovaGloveSensorDataImpl;
|
||||
class USGNovaGloveInfo;
|
||||
|
||||
/**
|
||||
* Sensor Data coming from a Nova, converted into useful values.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGNovaGloveSensorData final : public UObject
|
||||
{
|
||||
@@ -59,21 +61,39 @@ public:
|
||||
UObject* Outer, const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default constructor for NovaGloveSensorData.
|
||||
*/
|
||||
static USGNovaGloveSensorData* NewNovaGloveSensorData(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveSensorData.
|
||||
*/
|
||||
static USGNovaGloveSensorData* NewNovaGloveSensorData(
|
||||
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
|
||||
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveSensorData.
|
||||
*/
|
||||
static USGNovaGloveSensorData* NewNovaGloveSensorData(
|
||||
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
|
||||
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns a NovaGloveSensorData without any values.
|
||||
*/
|
||||
static USGNovaGloveSensorData* Empty(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Parse the bytes as they come in from the device into useable values.
|
||||
*/
|
||||
static USGNovaGloveSensorData* Parse(UObject* Outer, const FString& RawData, const USGNovaGloveInfo* GloveInfo);
|
||||
|
||||
/**
|
||||
* Convert this sensor data into ta string representation.
|
||||
*/
|
||||
static USGNovaGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -88,11 +108,20 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default constructor for NovaGloveSensorData.
|
||||
*/
|
||||
USGNovaGloveSensorData();
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveSensorData.
|
||||
*/
|
||||
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
|
||||
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
/**
|
||||
* Create a new instance of a NovaGloveSensorData.
|
||||
*/
|
||||
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
|
||||
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
@@ -121,25 +150,55 @@ public:
|
||||
const FSGNovaGloveSensorDataImpl& ToNovaGloveSensorDataImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger.
|
||||
*/
|
||||
TArray<FVector> GetSensorValues() const;
|
||||
|
||||
/**
|
||||
* Quaternion rotation relative to magnetic north.
|
||||
*/
|
||||
FQuat GetImuRotationQ() const;
|
||||
|
||||
/**
|
||||
* Rotation relative to magnetic north.
|
||||
*/
|
||||
FRotator GetImuRotation() const;
|
||||
|
||||
/**
|
||||
* The number of values that were parsed from the sensor string.
|
||||
*/
|
||||
int32 GetParsedValues() const;
|
||||
|
||||
/**
|
||||
* Whether the IMU values were all successfully parsed, or not.
|
||||
*/
|
||||
bool IsImuParsed() const;
|
||||
|
||||
/**
|
||||
* A value between 0..1 that represents the battery level of this Nova Glove (0 .. 100%). Returns -1 if the value wasn't received.
|
||||
*/
|
||||
float GetBatteryLevel() const;
|
||||
|
||||
/**
|
||||
* Returns true if this NovaGlove is connected to a power source
|
||||
*/
|
||||
bool IsCharging() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if this sensor data contains the same values as another.
|
||||
*/
|
||||
bool Equals(const USGNovaGloveSensorData* NovaGloveSensorData) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a readable string representation of this Sensor Data
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
* Convert this sensor data into a string so it can be stored on disk.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -45,6 +45,6 @@ struct SENSEGLOVECORE_API FSGRotatorArray
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove | Core | Nested Arrays", BlueprintReadWrite)
|
||||
TArray<FRotator> RotatorArray;
|
||||
};
|
||||
@@ -40,21 +40,42 @@
|
||||
|
||||
#include "SGSenseCom.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGSenseCom
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Registers current process as the latest SenseCom build.
|
||||
*/
|
||||
static bool RegisterExe();
|
||||
|
||||
/**
|
||||
* Register a particular path as the SenseGlove executable location.
|
||||
*/
|
||||
static bool RegisterExe(const FString& ExePath);
|
||||
|
||||
/**
|
||||
* Retrieve the location of SenseGlove executable.
|
||||
*/
|
||||
static bool GetExePath(FString& OutExePath);
|
||||
|
||||
/**
|
||||
* Returns true if SenseCom scanning is active.
|
||||
*/
|
||||
static bool ScanningActive();
|
||||
|
||||
/**
|
||||
* Returns the directory of the current process.
|
||||
*/
|
||||
static bool GetCurrentExeDirectory(FString& OutDirectory);
|
||||
|
||||
/**
|
||||
* Force-starts the SenseCom application if it is active on the system.
|
||||
*/
|
||||
static bool StartupSenseCom();
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* An interface for the Sense Glove exoskeleton glove.
|
||||
* Contains methods for Kinematics, Haptics and Serialization.
|
||||
*/
|
||||
|
||||
|
||||
@@ -56,6 +57,9 @@ class FSGSenseGloveImpl;
|
||||
class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
|
||||
/**
|
||||
* Interface for the Sense Glove; and exoskeleton Force-Feedback glove.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSenseGlove final : public USGHapticGlove
|
||||
{
|
||||
@@ -67,56 +71,108 @@ public:
|
||||
static USGSenseGlove* NewSenseGlove(UObject* Outer, TSharedRef<FSGSenseGloveImpl> SenseGloveImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static USGSenseGlove* NewSenseGlove(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove.
|
||||
*/
|
||||
static USGSenseGlove* NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Byte indicating a new Sense Glove haptic command.
|
||||
*/
|
||||
static ANSICHAR GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Byte indicating a new Thumper command.
|
||||
*/
|
||||
static ANSICHAR GetThumperByte();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Calculates a GlovePose based on sensor angles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
static USGSenseGlovePose* CalculateGlovePose(UObject* Outer,
|
||||
const USGSenseGloveSensorData* SensorData,
|
||||
const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* Calculates a GlovePose based on gloveAngles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
static USGSenseGlovePose* CalculateGlovePose(UObject* Outer,
|
||||
const TArray<TArray<FVector>>& GloveAngles,
|
||||
const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* @remarks Use this when you already have a GlovePose.
|
||||
*/
|
||||
static USGHandPose* CalculateHandPose(UObject* Outer,
|
||||
const USGSenseGlovePose* GlovePose,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGSenseGloveHandProfile* Profile);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||
*/
|
||||
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
||||
|
||||
/**
|
||||
* Retrieve all Sense Gloves connected to this system.
|
||||
*/
|
||||
static TArray<USGSenseGlove*> GetSenseGloves(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Retrieve the first connected Sense Glove there is.
|
||||
*/
|
||||
static bool GetSenseGlove(UObject* Outer, USGSenseGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Retrieve the first (connected) right or left handed sense glove.
|
||||
*/
|
||||
static bool GetSenseGlove(UObject* Outer, bool bRightHanded, USGSenseGlove*& OutGlove);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||
*/
|
||||
static TArray<FVector> GetCalibrationValues(const USGSenseGlovePose* GlovePose);
|
||||
|
||||
/**
|
||||
* Apply interpolation values to the correct fields in the SenseGlove Profile, based on min/max sensor values.
|
||||
*/
|
||||
static void CalibrateInterpolation(UObject* Outer,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||
bool bRightHanded, USGSenseGloveHandProfile*& OutProfile);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
bool bRightHanded, ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
bool bRightHanded, ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Calculates the full wrist location.
|
||||
*/
|
||||
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
bool bRightHanded, ESGFinger MountedOn,
|
||||
@@ -124,6 +180,9 @@ public:
|
||||
const FQuat& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Calculates the full wrist location.
|
||||
*/
|
||||
static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
bool bRightHanded, ESGFinger MountedOn,
|
||||
@@ -143,8 +202,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
protected:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USGSenseGlove();
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove.
|
||||
*/
|
||||
explicit USGSenseGlove(const USGSenseGloveInfo& Model);
|
||||
|
||||
public:
|
||||
@@ -203,94 +268,203 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve this glove's hardware model, which contains its hardware data.
|
||||
*/
|
||||
USGSenseGloveInfo* GetGloveModel(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Check if this Sense Glove is right handed.
|
||||
*
|
||||
* @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used.
|
||||
*/
|
||||
virtual bool IsRight() const override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration.
|
||||
*/
|
||||
virtual ESGDeviceType GetDeviceType() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this Sense Glove's unique identifier.
|
||||
*/
|
||||
virtual FString GetDeviceId() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this glove's hardware (sub) version.
|
||||
*/
|
||||
virtual FString GetHardwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's firmware version.
|
||||
*/
|
||||
virtual int32 GetFirmwareVersion() const override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's sub-firmware version.
|
||||
*/
|
||||
virtual int32 GetSubFirmwareVersion() const override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the latest Sensor Data from this Sense Glove.
|
||||
*/
|
||||
bool GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
virtual bool GetImuRotation(FQuat& OutImu) override;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
virtual bool GetImuRotation(FRotator& OutImu) override;
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware, based on its latest Sensor Data.
|
||||
*/
|
||||
bool GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware based on a set of Sensor Data.
|
||||
*/
|
||||
bool GetGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/// HACK
|
||||
/// 'FSGSenseGloveImpl::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
|
||||
/// tell the compiler we want both the GetHandPose from FSGHapticGloveImpl and FSGSenseGloveImpl
|
||||
/// tell the compiler we want both the GetHandPose from USGHapticGlove and USGSenseGlove
|
||||
using USGHapticGlove::GetHandPose;
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove's data, based on (calibrated) user data.
|
||||
*/
|
||||
bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Calculate the Hand Pose of this device, provided it has Hand Tracking available.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose) override;
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
*/
|
||||
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override;
|
||||
|
||||
public:
|
||||
/// HACK
|
||||
/// 'USGSenseGlove::SendHaptics' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
|
||||
/// tell the compiler we want both the SendHaptics from USGHapticGlove and USGSenseGlove
|
||||
using USGHapticGlove::SendHaptics;
|
||||
|
||||
/**
|
||||
* Set the level(s) of Force and Vibrotactile feedback, with an optional thumper command.
|
||||
*/
|
||||
bool SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
ESGSenseGloveThumperCommand ThumperCommand = ESGSenseGloveThumperCommand::None);
|
||||
|
||||
/**
|
||||
* Send a thumper command.
|
||||
*/
|
||||
bool SendHaptics(ESGSenseGloveThumperCommand ThumperCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override;
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
||||
|
||||
/**
|
||||
* Retrieve this device's firmware version.
|
||||
*/
|
||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand) override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
*/
|
||||
virtual bool GetCalibrationValues(TArray<FVector>& OutValues) override;
|
||||
|
||||
/**
|
||||
* Reset the glove's calibration range.
|
||||
*/
|
||||
virtual void ResetCalibrationRange() override;
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a handProfile.
|
||||
*/
|
||||
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const override;
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a SenseGloveHandProfile.
|
||||
*/
|
||||
void ApplyCalibration(UObject* Outer, USGSenseGloveHandProfile*& OutProfile) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation) const override;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset,
|
||||
const FQuat& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation) const;
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset,
|
||||
@@ -298,5 +472,8 @@ public:
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
virtual FString ToString() const override;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Input for Sense Glove kinematics to calculate a HandPose.
|
||||
* Output of calibration algorithms.
|
||||
*/
|
||||
|
||||
|
||||
@@ -42,13 +43,16 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGSenseGloveHandProfile.generated.h"
|
||||
|
||||
class FSGSenseGloveHandProfileImpl;
|
||||
class USGHandInterpolator;
|
||||
|
||||
/**
|
||||
* Contains everything a Sense Glove needs to calculate a HandPose.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSenseGloveHandProfile final : public UObject
|
||||
{
|
||||
@@ -59,18 +63,33 @@ public:
|
||||
UObject* Outer, const FSGSenseGloveHandProfileImpl& SenseGloveHandProfileImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new Hand Profile for the Sense Glove.
|
||||
*/
|
||||
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(
|
||||
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver, const TArray<FVector>& FingerThimbleOffset);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve a 'new' profile, for either a left or right hand.
|
||||
*/
|
||||
static USGSenseGloveHandProfile* Default(UObject* Outer, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Deserialize a HandProfile back into usable values.
|
||||
*/
|
||||
static USGSenseGloveHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default offset from thimble to fingertip.
|
||||
*/
|
||||
static FVector GetDefaultThimbleOffset();
|
||||
|
||||
private:
|
||||
@@ -85,8 +104,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGSenseGloveHandProfile();
|
||||
|
||||
/**
|
||||
* Create a new Hand Profile for the Sense Glove.
|
||||
*/
|
||||
USGSenseGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver,
|
||||
const TArray<FVector>& FingerThimbleOffset);
|
||||
@@ -116,21 +141,45 @@ public:
|
||||
const FSGSenseGloveHandProfileImpl& ToSenseGloveHandProfileImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Check whether this profile has been created for a right hand (true) or left hand (false).
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Interpolation set to estimate joint angles.
|
||||
*/
|
||||
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Solver property that determines _how_ HandPoses are calculated.
|
||||
*/
|
||||
ESGThumbSolver GetThumbSolver() const;
|
||||
|
||||
/**
|
||||
* Solver property that determines _how_ finger poses are calculated.
|
||||
*/
|
||||
ESGFingerSolver GetFingerSolver() const;
|
||||
|
||||
/**
|
||||
* Offset from thimble to fingertip, used for Inverse Kinematics.
|
||||
*/
|
||||
TArray<FVector> GetFingerThimbleOffset() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
bool Equals(const USGSenseGloveHandProfile* SenseGloveHandProfile) const;
|
||||
|
||||
/**
|
||||
* Reset calibration on this profile.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Serialize this HandProfile into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Glove information taken from the Sense Glove.
|
||||
*/
|
||||
|
||||
|
||||
@@ -42,13 +42,15 @@
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGVectorArray.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGSenseGloveInfo.generated.h"
|
||||
|
||||
class FSGSenseGloveInfoImpl;
|
||||
|
||||
/**
|
||||
* Glove Information taken from a SenseGlove. Contains everything from unique ID, firmware version, etc.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSenseGloveInfo final : public UObject
|
||||
{
|
||||
@@ -59,8 +61,14 @@ public:
|
||||
UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
static USGSenseGloveInfo* NewSenseGloveInfo(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||
UObject* Outer, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
@@ -68,6 +76,9 @@ public:
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||
UObject* Outer, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
@@ -75,6 +86,9 @@ public:
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||
UObject* Outer, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
@@ -82,6 +96,9 @@ public:
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||
UObject* Outer, const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
@@ -90,9 +107,15 @@ public:
|
||||
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create an instance of the SGModel from its string representation.
|
||||
*/
|
||||
static bool Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
|
||||
bool bUpdateOldModels = true);
|
||||
|
||||
/**
|
||||
* Deserialize a HandProfile back into usable values.
|
||||
*/
|
||||
static USGSenseGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -107,26 +130,41 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
USGSenseGloveInfo();
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
USGSenseGloveInfo(const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
USGSenseGloveInfo(const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
USGSenseGloveInfo(const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
||||
|
||||
/**
|
||||
* Create a new Sense Glove device model.
|
||||
*/
|
||||
USGSenseGloveInfo(const FString& DeviceId,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||
@@ -164,50 +202,116 @@ protected:
|
||||
FSGSenseGloveInfoImpl& ToSenseGloveInfoImpl();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Unique identifier of this device.
|
||||
*/
|
||||
FString GetDeviceId() const;
|
||||
|
||||
/**
|
||||
* Hardware (sub) version of this Sense Glove Device.
|
||||
*/
|
||||
FString GetHardwareVersion() const;
|
||||
|
||||
/**
|
||||
* Firmware version running on the device's MicroController.
|
||||
*/
|
||||
int32 GetFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
* Sub-Firmware version running on the device's MicroController.
|
||||
*/
|
||||
int32 GetSubFirmwareVersion() const;
|
||||
|
||||
/**
|
||||
* Check if this Sense Glove belongs to a left or right hand.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* The number of Sensors in this SenseGlove.
|
||||
*/
|
||||
int32 GetNumberOfSensors() const;
|
||||
|
||||
/**
|
||||
* The IMU correction of this Sense Glove.
|
||||
*/
|
||||
FQuat GetImuCorrectionQ() const;
|
||||
|
||||
/**
|
||||
* The IMU correction of this Sense Glove.
|
||||
*/
|
||||
FRotator GetImuCorrection() const;
|
||||
|
||||
/**
|
||||
* The starting positions of each Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
TArray<FVector> GetStartPositions() const;
|
||||
|
||||
/**
|
||||
* The starting rotations of each Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
TArray<FQuat> GetStartRotationsQ() const;
|
||||
|
||||
/**
|
||||
* The starting rotations of each Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
TArray<FRotator> GetStartRotations() const;
|
||||
|
||||
/**
|
||||
* The lengths of each Sense Glove finger section, in cm.
|
||||
*/
|
||||
TArray<TArray<FVector>> GetGloveLengths() const;
|
||||
|
||||
/**
|
||||
* Whether this device has a specific function (T/F).
|
||||
*/
|
||||
TArray<bool> GetFunctions() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The starting position of one Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
FVector GetStartPosition(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* The starting rotation of one Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
FQuat GetStartRotationQ(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* The starting rotation of one Sense Glove finger, relative to the glove origin.
|
||||
*/
|
||||
FRotator GetStartRotation(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* The lengths of one Sense Glove finger's sections, in cm.
|
||||
*/
|
||||
TArray<FVector> GetGloveLengths(ESGFinger Finger) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Place incoming sensor data into the right format, according to this glove's model.
|
||||
*/
|
||||
TArray<TArray<FVector>> ToGloveAngles(const TArray<TArray<float>>& SensorAngles) const;
|
||||
|
||||
/**
|
||||
* Returns true if this SG_Model has the same values as another.
|
||||
*/
|
||||
bool Equals(const USGSenseGloveInfo* SenseGloveInfo) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a string representation for logging. If shortNotation is false, all values are reported.
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
* Create a string representation for fast logging.
|
||||
*/
|
||||
FString ToString(bool bShortNotation) const;
|
||||
|
||||
/**
|
||||
* Serialize this HandProfile into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Contains position and rotation data of a SenseGlove's exoskeleton, along
|
||||
* with accessors for relevant variables.
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,18 +44,19 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGSenseGloveInfo.h"
|
||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||
#include "SGCore/SGQuatArray.h"
|
||||
#include "SGCore/SGRotatorArray.h"
|
||||
#include "SGCore/SGVectorArray.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
#include "SGSenseGlovePose.generated.h"
|
||||
|
||||
class FSGSenseGlovePoseImpl;
|
||||
class USGSenseGloveHandProfile;
|
||||
class USGSenseGloveInfo;
|
||||
|
||||
/**
|
||||
* Represents a pose of a Sense Glove exoskeleton.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSenseGlovePose final : public UObject
|
||||
{
|
||||
@@ -65,31 +67,52 @@ public:
|
||||
UObject* Outer, const FSGSenseGlovePoseImpl& SenseGlovePoseImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions,
|
||||
const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions,
|
||||
const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions,
|
||||
const TArray<FSGQuatArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions,
|
||||
const TArray<FSGRotatorArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& GloveAngles);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns an idle pose for the Sense Glove if no data can be found.
|
||||
*/
|
||||
static USGSenseGlovePose* IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo);
|
||||
|
||||
/**
|
||||
* Deserialize a GlovePose back into usable values.
|
||||
*/
|
||||
static USGSenseGlovePose* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -104,23 +127,38 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGSenseGlovePose();
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
USGSenseGlovePose(bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions,
|
||||
const TArray<TArray<FQuat>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
USGSenseGlovePose(bool bRightHanded,
|
||||
const TArray<TArray<FVector>>& JointPositions,
|
||||
const TArray<TArray<FRotator>>& JointRotations,
|
||||
const TArray<TArray<FVector>>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
USGSenseGlovePose(bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions,
|
||||
const TArray<FSGQuatArray>& JointRotations,
|
||||
const TArray<FSGVectorArray>& GloveAngles);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a SenseGlovePose.
|
||||
*/
|
||||
USGSenseGlovePose(bool bRightHanded,
|
||||
const TArray<FSGVectorArray>& JointPositions,
|
||||
const TArray<FSGRotatorArray>& JointRotations,
|
||||
@@ -151,33 +189,77 @@ public:
|
||||
const FSGSenseGlovePoseImpl& ToSenseGlovePoseImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Whether this Glove Pose was created for be a right- or left hand, or not.
|
||||
*/
|
||||
bool IsRight() const;
|
||||
|
||||
/**
|
||||
* Positions of each glove joint, relative to the Glove's Origin.
|
||||
*/
|
||||
TArray<TArray<FVector>> GetJointPositions() const;
|
||||
|
||||
/**
|
||||
* Quaternion rotation of each glove joint, relative to the Glove Origin.
|
||||
*/
|
||||
TArray<TArray<FQuat>> GetJointRotationsQ() const;
|
||||
|
||||
/**
|
||||
* Rotation of each glove joint, relative to the Glove Origin.
|
||||
*/
|
||||
TArray<TArray<FRotator>> GetJointRotations() const;
|
||||
|
||||
/**
|
||||
* Glove joint angles in euler notation, relative to the last segment.
|
||||
*
|
||||
* @remarks Essentially sensor angles, though placed in their proper xyz notation.
|
||||
*/
|
||||
TArray<TArray<FVector>> GetGloveAngles() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The position of the tip of the 'thimbles', the furthest link on each glove link.
|
||||
*/
|
||||
TArray<FVector> GetThimblePositions() const;
|
||||
|
||||
/**
|
||||
* The (quaternion) rotation of the 'thimbles', the furthest link on each link.
|
||||
*/
|
||||
TArray<FQuat> GetThimbleRotationsQ() const;
|
||||
|
||||
/**
|
||||
* The rotation of the 'thimbles', the furthest link on each link.
|
||||
*/
|
||||
TArray<FRotator> GetThimbleRotations() const;
|
||||
|
||||
/**
|
||||
* Sum of the Sensor angles in each (xyz) direction. "Total Pronation / Flexion / Abduction".
|
||||
*/
|
||||
TArray<FVector> GetTotalGloveAngles() const;
|
||||
|
||||
/**
|
||||
* Calculate fingertip positions based on a user profile.
|
||||
*/
|
||||
TArray<FVector> CalculateFingerTips(const USGSenseGloveHandProfile* SenseGloveHandProfile) const;
|
||||
|
||||
/**
|
||||
* Calculate fingertip positions, knowing the offset between thimble and fingertips.
|
||||
*/
|
||||
TArray<FVector> CalculateFingerTips(const TArray<FVector>& FingerOffsets) const;
|
||||
|
||||
/**
|
||||
* Returns true if this glove pose equals another.
|
||||
*/
|
||||
bool Equals(const USGSenseGlovePose* SenseGlovePose) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns a user-friendly string representation of this GlovePose for reporting.
|
||||
*/
|
||||
FString ToString(bool bShortFormat = false) const;
|
||||
|
||||
/**
|
||||
* Serialize this GlovePose into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Parsed sensor data coming form a Sense Glove.
|
||||
*/
|
||||
|
||||
|
||||
@@ -44,12 +44,14 @@
|
||||
|
||||
#include "SGCore/SGFloatArray.h"
|
||||
#include "SGCore/SGSenseGloveInfo.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
#include "SGSenseGloveSensorData.generated.h"
|
||||
|
||||
class FSGSenseGloveSensorDataImpl;
|
||||
|
||||
/**
|
||||
* Sense Glove Sensor Data, parsed from a sensor string.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSenseGloveSensorData final : public UObject
|
||||
{
|
||||
@@ -60,29 +62,53 @@ public:
|
||||
UObject* Outer, const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
|
||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
|
||||
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
||||
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns sensor data with no values.
|
||||
*/
|
||||
static USGSenseGloveSensorData* Empty(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Deserialize Sense Glove sensor data from a raw char[] received through IPC.
|
||||
*/
|
||||
static USGSenseGloveSensorData* Parse(UObject* Outer, const FString& RawData, const USGSenseGloveInfo* GloveInfo);
|
||||
|
||||
/**
|
||||
* Deserialize a HandProfile back into useable values.
|
||||
*/
|
||||
static USGSenseGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
private:
|
||||
@@ -97,17 +123,32 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
USGSenseGloveSensorData();
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
|
||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
|
||||
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles,
|
||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Sense Glove Sensor Data class.
|
||||
*/
|
||||
USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles,
|
||||
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
||||
|
||||
@@ -136,26 +177,56 @@ public:
|
||||
const FSGSenseGloveSensorDataImpl& ToSenseGloveSensorDataImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Glove angles in radians, sorted by finger, from proximal to distal.
|
||||
*/
|
||||
TArray<TArray<float>> GetSensorAngles() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FQuat GetImuRotationQ() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FRotator GetImuRotation() const;
|
||||
|
||||
/**
|
||||
* Check how many values have been parsed from the Sensor String.
|
||||
*/
|
||||
int32 GetParsedValues() const;
|
||||
|
||||
/**
|
||||
* Check if the IMU was properly parsed.
|
||||
*/
|
||||
bool IsImuParsed() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Get the glove angles of a specific finger segment.
|
||||
*/
|
||||
TArray<float> GetSensorAngles(ESGFinger Finger) const;
|
||||
|
||||
/**
|
||||
* Returns all glove angles in a sequence, without splitting them per finger.
|
||||
*/
|
||||
TArray<float> GetAngleSequence() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if the values of both data are equal.
|
||||
*/
|
||||
bool Equals(const USGSenseGloveSensorData* SenseGloveSensorData) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve a simple representation of this sensor data for debugging purposes.
|
||||
*/
|
||||
FString ToString() const;
|
||||
|
||||
/**
|
||||
* Serialize this HandProfile into a string representation.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Contains enumerators and classes to aid in Sense Glove Deserialization.
|
||||
*/
|
||||
|
||||
|
||||
@@ -41,39 +41,80 @@
|
||||
#include "Math/Quat.h"
|
||||
#include "Math/Vector.h"
|
||||
|
||||
#include "SGCore/SGSenseGloveInfo.h"
|
||||
|
||||
#include "SGSenseGloveVars.generated.h"
|
||||
|
||||
class USGSenseGloveInfo;
|
||||
|
||||
/**
|
||||
* "Database" class containing Sense Glove internal variables.
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGSenseGloveVars
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve a basic ConstantsString for a Sense Glove of a specific Hardware Version. Used for debugging / unit tests.
|
||||
*
|
||||
* @returns Returns an empty string when an invalid glove version is requested.
|
||||
*/
|
||||
static FString GetStandardConstantsString(const FString& HardwareVersion, float FirmwareVersion, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieve an example sensor string of a Sense Glove with a particular hardware- and firmware version.
|
||||
*/
|
||||
static FString GetSensorString(const FString& HardwareVersion, float FirmwareVersion);
|
||||
|
||||
/**
|
||||
* Retrieve the starting positions of a particular Sense Glove.
|
||||
*/
|
||||
static TArray<FVector> GetStartPositions(const FString& HardwareVersion, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieve the starting rotations of a particular Sense Glove.
|
||||
*/
|
||||
static TArray<FQuat> GetStartRotationsQ(const FString& HardwareVersion, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieve the starting rotations of a particular Sense Glove.
|
||||
*/
|
||||
static TArray<FRotator> GetStartRotations(const FString& HardwareVersion, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieve the glove finger lengths of a particular Sense Glove.
|
||||
*/
|
||||
static TArray<TArray<FVector>> GetGloveLengths(const FString& HardwareVersion);
|
||||
|
||||
/**
|
||||
* Get the number of sensors of a SenseGlove.
|
||||
*/
|
||||
static int32 GetSensors(const FString& HardwareVersion);
|
||||
|
||||
/**
|
||||
* Get the default IMUCorrection for the SenseGlove.
|
||||
*/
|
||||
static FQuat GetImuCorrectionQ(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
/**
|
||||
* Get the default IMUCorrection for the SenseGlove.
|
||||
*/
|
||||
static FRotator GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
/**
|
||||
* Check all functionality of a SenseGlove.
|
||||
*/
|
||||
static TArray<bool> GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||
|
||||
/**
|
||||
* Generate a custom glove info.
|
||||
*/
|
||||
static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion,
|
||||
int32 SubFirmwareVersion, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Generate a custom glove info.
|
||||
*/
|
||||
static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion,
|
||||
int32 SubFirmwareVersion, bool bRightHanded, const FString& CustomId);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
|
||||
class FSGSensorRangeImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGSensorRange final : public UObject
|
||||
{
|
||||
@@ -56,18 +59,36 @@ public:
|
||||
UObject* Outer, const FSGSensorRangeImpl& SensorRangeImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a SensorRange with values at 0, 0.
|
||||
*/
|
||||
static USGSensorRange* NewSensorRange(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new SensorRange with predefined Min/Max values.
|
||||
*/
|
||||
static USGSensorRange* NewSensorRange(UObject* Outer,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Generates a Sensor Range where minimum values are float.MaxValue and maximum values are float.MinValue.
|
||||
*/
|
||||
static USGSensorRange* ForCalibration(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Convert a serialized SensorRange back into the appropriate class.
|
||||
*/
|
||||
static USGSensorRange* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Evaluate maxValues so that it contains the highest x, y, and z values between currentValues and maxValues.
|
||||
*/
|
||||
static void CheckMax(const FVector CurrentValues, FVector& OutMaxValues);
|
||||
|
||||
/**
|
||||
* Evaluate minValues so that it contains the lowest x, y, and z values between currentValues and minValues.
|
||||
*/
|
||||
static void CheckMin(const FVector& CurrentValues, FVector& OutMinValues);
|
||||
|
||||
private:
|
||||
@@ -82,8 +103,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a SensorRange with values at 0, 0.
|
||||
*/
|
||||
USGSensorRange();
|
||||
|
||||
/**
|
||||
* Create a new SensorRange with predefined Min/Max values.
|
||||
*/
|
||||
USGSensorRange(const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
||||
|
||||
public:
|
||||
@@ -111,25 +138,55 @@ public:
|
||||
const FSGSensorRangeImpl& ToSensorRangeImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Access the lowest values values of this range.
|
||||
*/
|
||||
TArray<FVector> GetMinValues() const;
|
||||
|
||||
/**
|
||||
* Set the lowest values values of this range.
|
||||
*/
|
||||
void SetMinValues(const TArray<FVector>& Values);
|
||||
|
||||
/**
|
||||
* Access the highest values values of this range.
|
||||
*/
|
||||
TArray<FVector> GetMaxValues() const;
|
||||
|
||||
/**
|
||||
* Set the highest values values of this range.
|
||||
*/
|
||||
void SetMaxValues(const TArray<FVector>& Values);
|
||||
|
||||
/**
|
||||
* Access the difference between min and max values.
|
||||
*/
|
||||
TArray<FVector> GetRange() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Update the Range based on the current MinValues and MaxValues.
|
||||
*/
|
||||
void UpdateRange();
|
||||
|
||||
/**
|
||||
* In otherValues are greater/smaller than this current range, update them.
|
||||
*/
|
||||
void CheckForExtremes(const TArray<FVector>& OtherValues);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Report the Range value of this SensorRange, separated by a comma.
|
||||
*/
|
||||
FString RangeString(bool bYOnly = true) const;
|
||||
|
||||
/**
|
||||
* Convert this SensorRange into a string rotation [min ... max].
|
||||
*/
|
||||
FString ToString(bool bYOnly = true) const;
|
||||
|
||||
/**
|
||||
* Serialize this SensorRange into a string representation, that can be deserialized later.
|
||||
*/
|
||||
FString SGSerialize() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Thumper command.
|
||||
*/
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
|
||||
class FSGThumperCommandImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGThumperCommand : public UObject
|
||||
{
|
||||
@@ -53,11 +56,20 @@ public:
|
||||
static USGThumperCommand* NewThumperCommand(UObject* Outer, const FSGThumperCommandImpl& ThumperCommandImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
static USGThumperCommand* NewThumperCommand(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new Thumper Command.
|
||||
*/
|
||||
static USGThumperCommand* NewThumperCommand(UObject* Outer, int32 Magnitude);
|
||||
|
||||
public:
|
||||
/**
|
||||
* A command that turns off all force feedback on the Sense Glove.
|
||||
*/
|
||||
static USGThumperCommand* Off(UObject* Outer);
|
||||
|
||||
private:
|
||||
@@ -72,7 +84,14 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
USGThumperCommand();
|
||||
|
||||
/**
|
||||
* Create a new Thumper Command.
|
||||
*/
|
||||
explicit USGThumperCommand(int32 Magnitude);
|
||||
|
||||
public:
|
||||
@@ -100,14 +119,29 @@ public:
|
||||
const FSGThumperCommandImpl& ToThumperCommandImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Thumper intensity, a level between 0 and 100.
|
||||
*/
|
||||
int32 GetMagnitude() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetMagnitude(int32 Magnitude);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Duplicate the Thumper command.
|
||||
*/
|
||||
USGThumperCommand* Copy(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Merge two ThumperCommands into one.
|
||||
*/
|
||||
USGThumperCommand* Merge(UObject* Outer, const USGThumperCommand* ThumperCommand) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
bool Equals(const USGThumperCommand* ThumperCommand) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* @section DESCRIPTION
|
||||
*
|
||||
*
|
||||
* Buzz Motor with timing parameters.
|
||||
*/
|
||||
|
||||
|
||||
@@ -40,12 +40,16 @@
|
||||
#include "Templates/UniquePtr.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGBuzzCommand.h"
|
||||
|
||||
#include "SGTimedBuzzCommand.generated.h"
|
||||
|
||||
class FSGTimedBuzzCommandImpl;
|
||||
class USGBuzzCommand;
|
||||
|
||||
/**
|
||||
* Buzz motor commands that is meant to stop after a few milliseconds.
|
||||
*
|
||||
* @remarks Intended use; this.levels indicates the actual command.
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGTimedBuzzCommand : public USGBuzzCommand
|
||||
{
|
||||
@@ -59,12 +63,21 @@ public:
|
||||
UObject* Outer, TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new TimeBuzzCommand for a single finger.
|
||||
*/
|
||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
||||
UObject* Outer,
|
||||
ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command that expires after timing_ms.
|
||||
*/
|
||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
||||
UObject* Outer,
|
||||
const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
@@ -81,8 +94,19 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
USGTimedBuzzCommand();
|
||||
|
||||
/**
|
||||
* Create a new TimeBuzzCommand for a single finger.
|
||||
*/
|
||||
USGTimedBuzzCommand(ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command that expires after timing_ms.
|
||||
*/
|
||||
USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
public:
|
||||
@@ -121,25 +145,61 @@ protected:
|
||||
virtual void SyncUProperties() override;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Copy this Buzz Command's values into a new object.
|
||||
*/
|
||||
USGBuzzCommand* Copy(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
* Merges this base command with another command.
|
||||
*/
|
||||
USGBuzzCommand* Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Access the base command, which indicates the buzz levels to keep untill time elapses.
|
||||
*/
|
||||
USGBuzzCommand* GetBaseCommand(UObject* Outer) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
int32 GetMagnitude() const;
|
||||
|
||||
/**
|
||||
* The total time [milliseconds] each buzz motor should be vibrating for.
|
||||
*/
|
||||
float GetDuration() const;
|
||||
|
||||
/**
|
||||
* The time elapsed since the command was sent [milliseconds].
|
||||
*/
|
||||
float GetElapsedTime() const;
|
||||
|
||||
/**
|
||||
* Check if this timed command's timing has elapsed.
|
||||
*/
|
||||
bool HasTimeElapsed() const;
|
||||
|
||||
/**
|
||||
* Represents how far this effect is in its playtime; [0...1], where 0 means at the start, and 1 means at the end.
|
||||
*
|
||||
* @param bClamp01 Optional parameter; ensures this value is always between 0 and 1.
|
||||
*/
|
||||
float NormalizedTime(bool bClamp01 = true) const;
|
||||
|
||||
/**
|
||||
* Reset the timings of this BuzzCommand, allowing us to re-use it.
|
||||
*/
|
||||
void ResetTiming();
|
||||
|
||||
/**
|
||||
* Update the elapsed time to check if the buzz motors should stop.
|
||||
*/
|
||||
void UpdateTiming(float DeltaSeconds);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FString ToString() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,12 +40,14 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
|
||||
#include "SGTimedThumpCommand.generated.h"
|
||||
|
||||
class FSGTimedThumpCommandImpl;
|
||||
class USGThumperCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(BlueprintType)
|
||||
class SENSEGLOVECORE_API USGTimedThumpCommand final : public UObject
|
||||
{
|
||||
@@ -56,11 +58,20 @@ public:
|
||||
UObject* Outer, const FSGTimedThumpCommandImpl& TimedThumpCommandImpl);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Internal, empty, for extended classes.
|
||||
*/
|
||||
static USGTimedThumpCommand* NewTimedThumpCommand(UObject* Outer);
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
static USGTimedThumpCommand* NewTimedThumpCommand(
|
||||
UObject* Outer, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
static USGTimedThumpCommand* NewTimedThumpCommand(
|
||||
UObject* Outer, const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
@@ -76,8 +87,19 @@ private:
|
||||
FImplDeleter PimplDeleter;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Internal, empty, for extended classes.
|
||||
*/
|
||||
USGTimedThumpCommand();
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
USGTimedThumpCommand(int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
USGTimedThumpCommand(const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
public:
|
||||
@@ -105,28 +127,61 @@ public:
|
||||
const FSGTimedThumpCommandImpl& ToTimedThumpCommandImpl() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Magnitude in %.
|
||||
*/
|
||||
int32 GetMagnitude() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetMagnitude(int32 Magnitude);
|
||||
|
||||
/**
|
||||
* Duration in seconds.
|
||||
*/
|
||||
float GetDuration() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetDuration(float Duration);
|
||||
|
||||
/**
|
||||
* The elapsed time so far.
|
||||
*/
|
||||
float GetElapsedTime() const;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SetElapsedTime(float ElapsedTime);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if the timed command has elapsed.
|
||||
*/
|
||||
bool HasTimeElapsed() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Copy the parameters of this ThumperCommand into another instance.
|
||||
*/
|
||||
USGTimedThumpCommand* Copy(UObject* Outer, bool bCopyElapsed = true) const;
|
||||
|
||||
/**
|
||||
* Update the timing on this Thumper Command.
|
||||
*/
|
||||
void Update(float DeltaSeconds);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
bool Equals(const USGTimedThumpCommand* TimedThumpCommand) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FString ToString() const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -44,107 +44,241 @@
|
||||
|
||||
#include "SGTracking.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVECORE_API FSGTracking
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Knowing a position & rotation in 3D space, calculate a relative location based on offsets.
|
||||
*/
|
||||
static void CalculateLocation(
|
||||
const FVector& TrackedPosition, const FQuat& TrackedRotation,
|
||||
const FVector& PositionOffset, const FQuat& RotationOffset,
|
||||
FVector& OutNewPosition, FQuat& OutNewRotation);
|
||||
|
||||
/**
|
||||
* Knowing a position & rotation in 3D space, calculate a relative location based on offsets.
|
||||
*/
|
||||
static void CalculateLocation(
|
||||
const FVector& TrackedPosition, const FRotator& TrackedRotation,
|
||||
const FVector& PositionOffset, const FRotator& RotationOffset,
|
||||
FVector& OutNewPosition, FRotator& OutNewRotation);
|
||||
|
||||
/**
|
||||
* Positional offset from each finger to the glove origin.
|
||||
*/
|
||||
static TArray<FVector> GetSenseGloveFingerToGlovePositionOrigin();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOriginQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static TArray<FRotator> GetSenseGloveFingerToGloveRotationOrigin();
|
||||
|
||||
/**
|
||||
* Default position offset from glove origin to wrist location, in cm.
|
||||
*/
|
||||
static FVector GetSenseGloveWristPositionOffset();
|
||||
|
||||
/**
|
||||
* Default rotation offset from glove origin to wrist location.
|
||||
*/
|
||||
static FQuat GetSenseGloveWristRotationOffsetQ();
|
||||
|
||||
/**
|
||||
* Default rotation offset from glove origin to wrist location.
|
||||
*/
|
||||
static FRotator GetSenseGloveWristRotationOffset();
|
||||
|
||||
/**
|
||||
* Get the position and rotation offsets to go from the glove origin to the mounted position.
|
||||
* @remarks Based on CAD. needs to be inverted when going from tracker to glove origin.
|
||||
*/
|
||||
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
|
||||
FVector& OutIPosition, FQuat& OutIRotation);
|
||||
|
||||
/**
|
||||
* Get the position and rotation offsets to go from the glove origin to the mounted position.
|
||||
* @remarks Based on CAD. needs to be inverted when going from tracker to glove origin.
|
||||
*/
|
||||
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
|
||||
FVector& OutIPosition, FRotator& OutIRotation);
|
||||
|
||||
/**
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount offset to get the glove location.
|
||||
*/
|
||||
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount offset to get the glove location.
|
||||
*/
|
||||
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Vive Tracker origin to Finger rotational offset.
|
||||
*/
|
||||
static FVector GetSenseGloveViveToAttachPosition();
|
||||
|
||||
/**
|
||||
* Vive Tracker origin to Finger rotational offset.
|
||||
*/
|
||||
static FQuat GetSenseGloveViveToAttachRotationQ();
|
||||
|
||||
/**
|
||||
* Vive Tracker origin to Finger rotational offset.
|
||||
*/
|
||||
static FRotator GetSenseGloveViveToAttachRotation();
|
||||
|
||||
/**
|
||||
* Oculus Touch origin to Finger rotational offset.
|
||||
*/
|
||||
static FVector GetSenseGloveOculusTouchToAttachPosition();
|
||||
|
||||
/**
|
||||
* Oculus Touch origin to Finger rotational offset.
|
||||
*/
|
||||
static FQuat GetSenseGloveOculusTouchToAttachRotationQ();
|
||||
|
||||
/**
|
||||
* Oculus Touch origin to Finger rotational offset.
|
||||
*/
|
||||
static FRotator GetSenseGloveOculusTouchToAttachRotation();
|
||||
|
||||
/**
|
||||
* Positional offset between Nova Glove Origin and Wrist.
|
||||
*/
|
||||
static FVector GetNovaToWristPositionOffset();
|
||||
|
||||
/**
|
||||
* Rotational offset between Nova Glove Origin and Wrist.
|
||||
*/
|
||||
static FQuat GetNovaToWristRotationOffsetQ();
|
||||
|
||||
/**
|
||||
* Rotational offset between Nova Glove Origin and Wrist.
|
||||
*/
|
||||
static FRotator GetNovaToWristRotationOffset();
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FVector GetRightNovaViveToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetRightNovaViveToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetRightNovaViveToAttachRotation();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FVector GetLeftNovaViveToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetLeftNovaViveToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetLeftNovaViveToAttachRotation();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FVector GetRightNovaQuest2ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetRightNovaQuest2ToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetRightNovaQuest2ToAttachRotation();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FVector GetLeftNovaQuest2ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetLeftNovaQuest2ToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetLeftNovaQuest2ToAttachRotation();
|
||||
|
||||
/**
|
||||
* @remarks Left is a mirror, so we only need R pos.
|
||||
*/
|
||||
static FVector GetRightNovaPico2ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetRightNovaPico2ToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetRightNovaPico2ToAttachRotation();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FQuat GetLeftNovaPico2ToAttachRotationQ();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FRotator GetLeftNovaPico2ToAttachRotation();
|
||||
|
||||
/**
|
||||
* Retrieves Offsets for a particular device.
|
||||
*/
|
||||
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Retrieves Offsets for a particular device.
|
||||
*/
|
||||
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static FString ToString(ESGPositionalTrackingHardware Hardware);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -47,6 +47,7 @@ public class SenseGloveCore : ModuleRules
|
||||
{
|
||||
"Core",
|
||||
"Engine",
|
||||
"SenseGloveTypes",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -57,7 +58,6 @@ public class SenseGloveCore : ModuleRules
|
||||
"SenseGloveCoreImpl",
|
||||
"SenseGloveInterop",
|
||||
"SenseGloveLog",
|
||||
"SenseGloveTypes",
|
||||
"SenseGloveUtils",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "SGBuildHacks/SGInclude_Core_Vect3D.h"
|
||||
#include "SGCoreImpl/SGVect3DImpl.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGUtils/SGCoordinates.h"
|
||||
|
||||
float FSGAnatomyImpl::GetTotalFingerFlexion()
|
||||
{
|
||||
@@ -63,57 +64,59 @@ float FSGAnatomyImpl::GetTotalThumbExtension()
|
||||
float FSGAnatomyImpl::GetFingerJointLimit(
|
||||
const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax)
|
||||
{
|
||||
return FAnatomyType::GetFingerJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
return FSGCoordinates::TransformToUnreal(
|
||||
Movement, FAnatomyType::GetFingerJointLimit(bRightHanded, Joint, Movement, bMax));
|
||||
}
|
||||
|
||||
float FSGAnatomyImpl::GetThumbJointLimit(
|
||||
const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax)
|
||||
{
|
||||
return FAnatomyType::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
return FSGCoordinates::TransformToUnreal(
|
||||
Movement, FAnatomyType::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax));
|
||||
}
|
||||
|
||||
float FSGAnatomyImpl::NormalizeFingerFlex(const float FlexionInRadians)
|
||||
float FSGAnatomyImpl::NormalizeFingerFlexion(const float FlexionInRadians)
|
||||
{
|
||||
return FAnatomyType::NormalizeFingerFlex(FlexionInRadians);
|
||||
return FAnatomyType::NormalizeFingerFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
float FSGAnatomyImpl::NormalizeThumbFlex(const float FlexionInRadians)
|
||||
float FSGAnatomyImpl::NormalizeThumbFlexion(const float FlexionInRadians)
|
||||
{
|
||||
return FAnatomyType::NormalizeThumbFlex(FlexionInRadians);
|
||||
return FAnatomyType::NormalizeThumbFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetDefaultHandAngles(const bool bRightHanded)
|
||||
{
|
||||
TArray<TArray<FVector>> DefaultHandAngles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FAnatomyType::GetDefaultHandAngles(bRightHanded))
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FAnatomyType::GetDefaultHandAngles(bRightHanded))
|
||||
};
|
||||
return DefaultHandAngles;
|
||||
return MoveTemp(DefaultHandAngles);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetFlatHandAngles(const bool bRightHanded)
|
||||
{
|
||||
TArray<TArray<FVector>> FlatHandAngles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FAnatomyType::GetFlatHandAngles(bRightHanded))
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FAnatomyType::GetFlatHandAngles(bRightHanded))
|
||||
};
|
||||
return FlatHandAngles;
|
||||
return MoveTemp(FlatHandAngles);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetThumbsUpHandAngles(const bool bRightHanded)
|
||||
{
|
||||
TArray<TArray<FVector>> ThumbsUpHandAngles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FAnatomyType::GetThumbsUpHandAngles(bRightHanded))
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FAnatomyType::GetThumbsUpHandAngles(bRightHanded))
|
||||
};
|
||||
return ThumbsUpHandAngles;
|
||||
return MoveTemp(ThumbsUpHandAngles);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetFistHandAngles(const bool bRightHanded)
|
||||
{
|
||||
TArray<TArray<FVector>> FistHandAngles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FAnatomyType::GetFistHandAngles(bRightHanded))
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FAnatomyType::GetFistHandAngles(bRightHanded))
|
||||
};
|
||||
return FistHandAngles;
|
||||
return MoveTemp(FistHandAngles);
|
||||
}
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "SGCoreImpl/SGQuatImpl.h"
|
||||
#include "SGCoreImpl/SGVect3DImpl.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGUtils/SGUnits.h"
|
||||
|
||||
struct FSGBasicHandModelImpl::FImpl
|
||||
{
|
||||
@@ -92,7 +93,7 @@ FSGBasicHandModelImpl FSGBasicHandModelImpl::Deserialize(const FString& Serializ
|
||||
const TArray<TArray<float>>& FSGBasicHandModelImpl::GetBaseFingerLengths()
|
||||
{
|
||||
static const TArray<TArray<float>> BaseFingerLengths{
|
||||
FSGArrayUtils::FromStdVector<float>(
|
||||
FSGArrayUtils::FromMillimeters(
|
||||
FSGBasicHandModelImpl::FBasicHandModelType::GetBaseFingerLengths())
|
||||
};
|
||||
return BaseFingerLengths;
|
||||
@@ -101,46 +102,47 @@ const TArray<TArray<float>>& FSGBasicHandModelImpl::GetBaseFingerLengths()
|
||||
const TArray<FVector>& FSGBasicHandModelImpl::GetBaseJointPositions()
|
||||
{
|
||||
static const TArray<FVector> BaseJointPositions{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||
FBasicHandModelType::GetBaseJointPositions())
|
||||
};
|
||||
return BaseJointPositions;
|
||||
}
|
||||
|
||||
const TArray<FVector>& FSGBasicHandModelImpl::GetBaseJointRotations()
|
||||
const TArray<FVector>& FSGBasicHandModelImpl::GetBaseJointAngles()
|
||||
{
|
||||
static const TArray<FVector> BaseJointRotations{
|
||||
static const TArray<FVector> BaseJointAngles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FBasicHandModelType::GetBaseJointRotations())
|
||||
FBasicHandModelType::GetBaseJointAngles())
|
||||
};
|
||||
return BaseJointRotations;
|
||||
return BaseJointAngles;
|
||||
}
|
||||
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<std::vector<float>> LengthsVector{
|
||||
FSGArrayUtils::ToStdVector<float>(Lengths)
|
||||
FSGArrayUtils::ToMillimeters(Lengths)
|
||||
};
|
||||
|
||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{FSGArrayUtils::ToStdVector<
|
||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartPositions)};
|
||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{
|
||||
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartPositions)
|
||||
};
|
||||
|
||||
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
||||
MoveTemp(StartPositionsVector));
|
||||
@@ -149,21 +151,23 @@ FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TAr
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<std::vector<float>> LengthsVector{
|
||||
FSGArrayUtils::ToStdVector<float>(Lengths)
|
||||
FSGArrayUtils::ToMillimeters(Lengths)
|
||||
};
|
||||
|
||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{FSGArrayUtils::ToStdVector<
|
||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartPositions)};
|
||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{
|
||||
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartPositions)
|
||||
};
|
||||
|
||||
std::vector<FSGQuatImpl::FQuatType> StartRotationsVector{FSGArrayUtils::ToStdVector<
|
||||
FQuat, FSGQuatImpl::FQuatType, FSGQuatImpl, &FSGQuatImpl::ToQuat>(StartRotations)};
|
||||
std::vector<FSGQuatImpl::FQuatType> StartRotationsVector{
|
||||
FSGArrayUtils::ToStdVector<FQuat, FSGQuatImpl::FQuatType, FSGQuatImpl, &FSGQuatImpl::ToQuat>(StartRotations)
|
||||
};
|
||||
|
||||
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
||||
MoveTemp(StartPositionsVector),
|
||||
@@ -172,27 +176,31 @@ FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TAr
|
||||
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FBasicHandModelType& BasicHandModel)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->BasicHandModel = BasicHandModel;
|
||||
}
|
||||
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FSGBasicHandModelImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(FSGBasicHandModelImpl&& Rhs) noexcept = default;
|
||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(FSGBasicHandModelImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGBasicHandModelImpl::~FSGBasicHandModelImpl() = default;
|
||||
|
||||
@@ -203,7 +211,11 @@ FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(const FSGBasicHandModelI
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(FSGBasicHandModelImpl&& Rhs) noexcept = default;
|
||||
FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(FSGBasicHandModelImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGBasicHandModelImpl::FBasicHandModelType& FSGBasicHandModelImpl::ToBasicHandModel() const
|
||||
{
|
||||
@@ -223,7 +235,7 @@ void FSGBasicHandModelImpl::SetIsRight(const bool bRightHanded)
|
||||
TArray<TArray<float>> FSGBasicHandModelImpl::GetFingerLengths() const
|
||||
{
|
||||
TArray<TArray<float>> FingerLengths{
|
||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetFingerLengths())
|
||||
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths())
|
||||
};
|
||||
return MoveTemp(FingerLengths);
|
||||
}
|
||||
@@ -231,28 +243,32 @@ TArray<TArray<float>> FSGBasicHandModelImpl::GetFingerLengths() const
|
||||
void FSGBasicHandModelImpl::SetFingerLengths(const TArray<TArray<float>>& FingerLengths)
|
||||
{
|
||||
std::vector<std::vector<float>> FingerLengthsVector{
|
||||
FSGArrayUtils::ToStdVector<float>(FingerLengths)
|
||||
FSGArrayUtils::ToMillimeters(FingerLengths)
|
||||
};
|
||||
Pimpl->BasicHandModel.SetFingerLengths(MoveTemp(FingerLengthsVector));
|
||||
}
|
||||
|
||||
TArray<float> FSGBasicHandModelImpl::GetFingerLengths(ESGFinger Finger) const
|
||||
TArray<float> FSGBasicHandModelImpl::GetFingerLengths(const ESGFinger Finger) const
|
||||
{
|
||||
TArray<float> FingerLengths{FSGArrayUtils::FromStdVector<float>(
|
||||
Pimpl->BasicHandModel.GetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||
TArray<float> FingerLengths{
|
||||
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||
};
|
||||
return MoveTemp(FingerLengths);
|
||||
}
|
||||
|
||||
void FSGBasicHandModelImpl::SetFingerLengths(ESGFinger Finger, const TArray<float>& Lengths)
|
||||
void FSGBasicHandModelImpl::SetFingerLengths(const ESGFinger Finger, const TArray<float>& Lengths)
|
||||
{
|
||||
std::vector<float> LengthsVector{FSGArrayUtils::ToStdVector<float>(Lengths)};
|
||||
std::vector<float> LengthsVector{
|
||||
FSGArrayUtils::ToMillimeters(Lengths)
|
||||
};
|
||||
Pimpl->BasicHandModel.SetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger), MoveTemp(LengthsVector));
|
||||
}
|
||||
|
||||
void FSGBasicHandModelImpl::SetFingerLengths(uint8 Finger, const TArray<float>& Lengths)
|
||||
void FSGBasicHandModelImpl::SetFingerLengths(const uint8 Finger, const TArray<float>& Lengths)
|
||||
{
|
||||
std::vector<float> LengthsVector{FSGArrayUtils::ToStdVector<float>(Lengths)};
|
||||
std::vector<float> LengthsVector{
|
||||
FSGArrayUtils::ToMillimeters(Lengths)
|
||||
};
|
||||
Pimpl->BasicHandModel.SetFingerLengths(Finger, MoveTemp(LengthsVector));
|
||||
}
|
||||
|
||||
@@ -264,7 +280,7 @@ TArray<TArray<float>> FSGBasicHandModelImpl::GetFingerRatios() const
|
||||
return MoveTemp(FingerRatios);
|
||||
}
|
||||
|
||||
TArray<float> FSGBasicHandModelImpl::GetFingerRatios(ESGFinger Finger) const
|
||||
TArray<float> FSGBasicHandModelImpl::GetFingerRatios(const ESGFinger Finger) const
|
||||
{
|
||||
TArray<float> FingerRatios{
|
||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetFingerRatios(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||
@@ -275,7 +291,7 @@ TArray<float> FSGBasicHandModelImpl::GetFingerRatios(ESGFinger Finger) const
|
||||
TArray<FVector> FSGBasicHandModelImpl::GetStartJointPositions() const
|
||||
{
|
||||
TArray<FVector> StartJointPositions{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||
Pimpl->BasicHandModel.GetStartJointPositions())
|
||||
};
|
||||
return MoveTemp(StartJointPositions);
|
||||
@@ -284,21 +300,23 @@ TArray<FVector> FSGBasicHandModelImpl::GetStartJointPositions() const
|
||||
void FSGBasicHandModelImpl::SetStartJointPositions(const TArray<FVector>& StartJointPositions)
|
||||
{
|
||||
std::vector<FSGVect3DImpl::FVect3DType> StartJointPositionsVector{
|
||||
FSGArrayUtils::ToStdVector<
|
||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartJointPositions)
|
||||
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartJointPositions)
|
||||
};
|
||||
Pimpl->BasicHandModel.SetStartJointPositions(MoveTemp(StartJointPositionsVector));
|
||||
}
|
||||
|
||||
void FSGBasicHandModelImpl::SetStartJointPosition(ESGFinger Finger, const FVector& Position)
|
||||
void FSGBasicHandModelImpl::SetStartJointPosition(const ESGFinger Finger, const FVector& Position)
|
||||
{
|
||||
Pimpl->BasicHandModel.SetStartJointPosition(FSGCoreEnumCast::ToEFinger(Finger),
|
||||
FSGVect3DImpl(Position).ToVect3D());
|
||||
Pimpl->BasicHandModel.SetStartJointPosition(
|
||||
FSGCoreEnumCast::ToEFinger(Finger),
|
||||
FSGUnits::CentimetersToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(Position));
|
||||
}
|
||||
|
||||
void FSGBasicHandModelImpl::SetStartJointPosition(const uint8 Finger, const FVector& Position)
|
||||
{
|
||||
Pimpl->BasicHandModel.SetStartJointPosition(Finger, FSGVect3DImpl(Position).ToVect3D());
|
||||
Pimpl->BasicHandModel.SetStartJointPosition(
|
||||
Finger,
|
||||
FSGUnits::CentimetersToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(Position));
|
||||
}
|
||||
|
||||
TArray<FQuat> FSGBasicHandModelImpl::GetStartJointRotations() const
|
||||
@@ -322,13 +340,15 @@ void FSGBasicHandModelImpl::SetStartJointRotations(const TArray<FQuat>& StartJoi
|
||||
|
||||
FVector FSGBasicHandModelImpl::GetJointPosition(const ESGFinger Finger) const
|
||||
{
|
||||
const FSGVect3DImpl Position(Pimpl->BasicHandModel.GetJointPosition(FSGCoreEnumCast::ToEFinger(Finger)));
|
||||
return Position.ToFVector();
|
||||
return FSGUnits::MillimetersToCentimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||
Pimpl->BasicHandModel.GetJointPosition(FSGCoreEnumCast::ToEFinger(Finger)));
|
||||
}
|
||||
|
||||
void FSGBasicHandModelImpl::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger)
|
||||
{
|
||||
Pimpl->BasicHandModel.SetJointPosition(FSGVect3DImpl(NewPosition).ToVect3D(), FSGCoreEnumCast::ToEFinger(Finger));
|
||||
Pimpl->BasicHandModel.SetJointPosition(
|
||||
FSGUnits::CentimetersToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(NewPosition),
|
||||
FSGCoreEnumCast::ToEFinger(Finger));
|
||||
}
|
||||
|
||||
FQuat FSGBasicHandModelImpl::GetJointRotation(const ESGFinger Finger) const
|
||||
@@ -345,21 +365,23 @@ void FSGBasicHandModelImpl::SetJointRotation(const FQuat& NewRotation, const ESG
|
||||
TArray<float> FSGBasicHandModelImpl::GetTotalLengths() const
|
||||
{
|
||||
const TArray<float> TotalLengths{
|
||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetTotalLengths())
|
||||
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetTotalLengths())
|
||||
};
|
||||
return TotalLengths;
|
||||
}
|
||||
|
||||
float FSGBasicHandModelImpl::GetTotalLength(const ESGFinger Finger) const
|
||||
{
|
||||
return Pimpl->BasicHandModel.GetTotalLength(FSGCoreEnumCast::ToEFinger(Finger));
|
||||
return FSGUnits::MillimetersToCentimeters(
|
||||
Pimpl->BasicHandModel.GetTotalLength(FSGCoreEnumCast::ToEFinger(Finger)));
|
||||
}
|
||||
|
||||
TArray<FVector> FSGBasicHandModelImpl::Get3DLengths(const ESGFinger Finger) const
|
||||
{
|
||||
const TArray<FVector> Lengths(FSGArrayUtils::FromStdVector<
|
||||
FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
Pimpl->BasicHandModel.Get3DLengths(FSGCoreEnumCast::ToEFinger(Finger))));
|
||||
const TArray<FVector> Lengths{
|
||||
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||
Pimpl->BasicHandModel.Get3DLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||
};
|
||||
return Lengths;
|
||||
}
|
||||
|
||||
@@ -396,4 +418,4 @@ FSGBasicHandModelImpl::FImpl::~FImpl() = default;
|
||||
void FSGBasicHandModelImpl::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ TSharedRef<FSGBetaDeviceImpl> FSGBetaDeviceImpl::Parse(const FString& String)
|
||||
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl()
|
||||
: FSGDeviceImpl(),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,46 +93,50 @@ FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FString& ConstantsString, const FStri
|
||||
TCHAR_TO_UTF8(*HardwareVersion),
|
||||
FirmwareVersion,
|
||||
SubFirmwareVersion)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDeviceType BetaDevice)
|
||||
: FSGDeviceImpl(std::make_shared<FBetaDeviceType>(BetaDevice)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDevicePtrType BetaDevice)
|
||||
: FSGDeviceImpl(BetaDevice),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FSGBetaDeviceImpl& Rhs)
|
||||
: FSGDeviceImpl(Rhs),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl(FSGBetaDeviceImpl&& Rhs) noexcept = default;
|
||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl(FSGBetaDeviceImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGBetaDeviceImpl::~FSGBetaDeviceImpl() = default;
|
||||
|
||||
@@ -144,7 +148,11 @@ FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(const FSGBetaDeviceImpl& Rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(FSGBetaDeviceImpl&& Rhs) noexcept = default;
|
||||
FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(FSGBetaDeviceImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGBetaDeviceImpl::FBetaDeviceType FSGBetaDeviceImpl::ToBetaDevice() const
|
||||
{
|
||||
|
||||
@@ -75,77 +75,81 @@ const FSGBuzzCommandImpl& FSGBuzzCommandImpl::Off()
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl()
|
||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>()),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TArray<int32>& BuzzLevels)
|
||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGArrayUtils::ToStdVector<int32>(BuzzLevels))),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring,
|
||||
const int32 Pinky)
|
||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(Thumb, Index, Middle, Ring, Pinky)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGCoreEnumCast::ToEFinger(Finger), BuzzLevel)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FBuzzCommandType& BuzzCommand)
|
||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(BuzzCommand)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TSharedRef<FBuzzCommandType> BuzzCommand)
|
||||
: FSGFingerCommandImpl(BuzzCommand),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FSGBuzzCommandImpl& Rhs)
|
||||
: FSGFingerCommandImpl(Rhs),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(FSGBuzzCommandImpl&& Rhs) noexcept = default;
|
||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl(FSGBuzzCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGBuzzCommandImpl::~FSGBuzzCommandImpl() = default;
|
||||
|
||||
@@ -157,7 +161,11 @@ FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(const FSGBuzzCommandImpl& Rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(FSGBuzzCommandImpl&& Rhs) noexcept = default;
|
||||
FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(FSGBuzzCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGBuzzCommandImpl::FBuzzCommandType& FSGBuzzCommandImpl::ToBuzzCommand() const
|
||||
{
|
||||
|
||||
@@ -77,22 +77,22 @@ struct FSGCalibrationDataPointImpl::FImpl
|
||||
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const int32 CurrentStage,
|
||||
const TArray<FVector>& CalibrationValues)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<FSGVect3DImpl::FVect3DType> Values(
|
||||
FSGArrayUtils::ToStdVector<FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(
|
||||
@@ -102,27 +102,31 @@ FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const int32 CurrentStag
|
||||
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const FCalibrationDataPointType& CalibrationDataPoint)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->CalibrationDataPoint = CalibrationDataPoint;
|
||||
}
|
||||
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const FSGCalibrationDataPointImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(FSGCalibrationDataPointImpl&& Rhs) noexcept = default;
|
||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(FSGCalibrationDataPointImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGCalibrationDataPointImpl::~FSGCalibrationDataPointImpl() = default;
|
||||
|
||||
@@ -133,7 +137,10 @@ FSGCalibrationDataPointImpl& FSGCalibrationDataPointImpl::operator=(const FSGCal
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGCalibrationDataPointImpl& FSGCalibrationDataPointImpl::operator=(FSGCalibrationDataPointImpl&& Rhs) noexcept
|
||||
FSGCalibrationDataPointImpl& FSGCalibrationDataPointImpl::operator=(FSGCalibrationDataPointImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGCalibrationDataPointImpl::FCalibrationDataPointType&
|
||||
@@ -188,4 +195,4 @@ FSGCalibrationDataPointImpl::FImpl::~FImpl() = default;
|
||||
void FSGCalibrationDataPointImpl::FImplDeleter::operator()(const FImpl* P) const
|
||||
{
|
||||
delete P;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,6 +354,70 @@ ESGPositionalTrackingHardware FSGCoreEnumCast::ToESGPositionalTrackingHardware(c
|
||||
return ESGPositionalTrackingHardware::None;
|
||||
}
|
||||
|
||||
FSGCoreEnumCast::FESenseGloveThumperCommandType FSGCoreEnumCast::ToESenseGloveThumperCommand(
|
||||
const ESGSenseGloveThumperCommand Enum)
|
||||
{
|
||||
switch (Enum)
|
||||
{
|
||||
case ESGSenseGloveThumperCommand::None:
|
||||
return FESenseGloveThumperCommandType::None;
|
||||
case ESGSenseGloveThumperCommand::TurnOff:
|
||||
return FESenseGloveThumperCommandType::TurnOff;
|
||||
case ESGSenseGloveThumperCommand::CueGameOver:
|
||||
return FESenseGloveThumperCommandType::CueGameOver;
|
||||
case ESGSenseGloveThumperCommand::ButtonDouble100:
|
||||
return FESenseGloveThumperCommandType::ButtonDouble100;
|
||||
case ESGSenseGloveThumperCommand::ButtonDouble60:
|
||||
return FESenseGloveThumperCommandType::ButtonDouble60;
|
||||
case ESGSenseGloveThumperCommand::ImpactThump30:
|
||||
return FESenseGloveThumperCommandType::ImpactThump30;
|
||||
case ESGSenseGloveThumperCommand::ImpactThump10:
|
||||
return FESenseGloveThumperCommandType::ImpactThump10;
|
||||
case ESGSenseGloveThumperCommand::ImpactThump100:
|
||||
return FESenseGloveThumperCommandType::ImpactThump100;
|
||||
case ESGSenseGloveThumperCommand::ObjectGrasp100:
|
||||
return FESenseGloveThumperCommandType::ObjectGrasp100;
|
||||
case ESGSenseGloveThumperCommand::ObjectGrasp60:
|
||||
return FESenseGloveThumperCommandType::ObjectGrasp60;
|
||||
case ESGSenseGloveThumperCommand::ObjectGrasp30:
|
||||
return FESenseGloveThumperCommandType::ObjectGrasp30;
|
||||
}
|
||||
|
||||
// Keep the compiler satisfied!
|
||||
return FESenseGloveThumperCommandType::None;
|
||||
}
|
||||
|
||||
ESGSenseGloveThumperCommand FSGCoreEnumCast::ToESGSenseGloveThumperCommand(const FESenseGloveThumperCommandType Enum)
|
||||
{
|
||||
switch (Enum)
|
||||
{
|
||||
case FESenseGloveThumperCommandType::None:
|
||||
return ESGSenseGloveThumperCommand::None;
|
||||
case FESenseGloveThumperCommandType::TurnOff:
|
||||
return ESGSenseGloveThumperCommand::TurnOff;
|
||||
case FESenseGloveThumperCommandType::CueGameOver:
|
||||
return ESGSenseGloveThumperCommand::CueGameOver;
|
||||
case FESenseGloveThumperCommandType::ButtonDouble100:
|
||||
return ESGSenseGloveThumperCommand::ButtonDouble100;
|
||||
case FESenseGloveThumperCommandType::ButtonDouble60:
|
||||
return ESGSenseGloveThumperCommand::ButtonDouble60;
|
||||
case FESenseGloveThumperCommandType::ImpactThump30:
|
||||
return ESGSenseGloveThumperCommand::ImpactThump30;
|
||||
case FESenseGloveThumperCommandType::ImpactThump10:
|
||||
return ESGSenseGloveThumperCommand::ImpactThump10;
|
||||
case FESenseGloveThumperCommandType::ImpactThump100:
|
||||
return ESGSenseGloveThumperCommand::ImpactThump100;
|
||||
case FESenseGloveThumperCommandType::ObjectGrasp100:
|
||||
return ESGSenseGloveThumperCommand::ObjectGrasp100;
|
||||
case FESenseGloveThumperCommandType::ObjectGrasp60:
|
||||
return ESGSenseGloveThumperCommand::ObjectGrasp60;
|
||||
case FESenseGloveThumperCommandType::ObjectGrasp30:
|
||||
return ESGSenseGloveThumperCommand::ObjectGrasp30;
|
||||
}
|
||||
|
||||
return ESGSenseGloveThumperCommand::None;
|
||||
}
|
||||
|
||||
FSGCoreEnumCast::FEThumbMovementType FSGCoreEnumCast::ToEThumbMovement(const ESGThumbMovement Enum)
|
||||
{
|
||||
switch (Enum)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <SenseGlove/Core/Fingers.hpp>
|
||||
#include <SenseGlove/Core/SenseGloveThumperCommand.hpp>
|
||||
|
||||
#include "SGBuildHacks/SGInclude_Core_Fingers.h"
|
||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
|
||||
@@ -43,6 +44,7 @@
|
||||
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
|
||||
#include "SGBuildHacks/SGInclude_Core_SGDevice.h"
|
||||
#include "SGBuildHacks/SGInclude_Core_Tracking.h"
|
||||
#include "SGCoreImpl/SGHapticGloveCommandBufferImpl.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
class SENSEGLOVECOREIMPL_API FSGCoreEnumCast
|
||||
@@ -56,37 +58,41 @@ public:
|
||||
typedef SGCore::Kinematics::EFingerMovement FEFingerMovementType;
|
||||
typedef SGCore::SG::EFingerSolver FEFingerSolverType;
|
||||
typedef SGCore::EPositionalTrackingHardware FEPositionalTrackingHardware;
|
||||
typedef SGCore::Haptics::ESenseGloveThumperCommand FESenseGloveThumperCommandType;
|
||||
typedef SGCore::Kinematics::EThumbMovement FEThumbMovementType;
|
||||
typedef SGCore::SG::EThumbSolver FEThumbSolverType;
|
||||
|
||||
public:
|
||||
static FEBackendType ToEBackendType(const ESGBackendType Enum);
|
||||
static ESGBackendType ToESGBackendType(const FEBackendType Enum);
|
||||
static FEBackendType ToEBackendType(ESGBackendType Enum);
|
||||
static ESGBackendType ToESGBackendType(FEBackendType Enum);
|
||||
|
||||
static FECalibrationStageType ToECalibrationStage(const ESGCalibrationStage Enum);
|
||||
static ESGCalibrationStage ToESGCalibrationStage(const FECalibrationStageType Enum);
|
||||
static FECalibrationStageType ToECalibrationStage(ESGCalibrationStage Enum);
|
||||
static ESGCalibrationStage ToESGCalibrationStage(FECalibrationStageType Enum);
|
||||
|
||||
static FEConnectionType ToEConnectionType(const ESGConnectionType Enum);
|
||||
static ESGConnectionType ToESGConnectionType(const FEConnectionType Enum);
|
||||
static FEConnectionType ToEConnectionType(ESGConnectionType Enum);
|
||||
static ESGConnectionType ToESGConnectionType(FEConnectionType Enum);
|
||||
|
||||
static FEDeviceType ToEDeviceType(const ESGDeviceType Enum);
|
||||
static ESGDeviceType ToESGDeviceType(const FEDeviceType Enum);
|
||||
static FEDeviceType ToEDeviceType(ESGDeviceType Enum);
|
||||
static ESGDeviceType ToESGDeviceType(FEDeviceType Enum);
|
||||
|
||||
static FEFingerType ToEFinger(const ESGFinger Enum);
|
||||
static ESGFinger ToESGFinger(const FEFingerType Enum);
|
||||
static FEFingerType ToEFinger(ESGFinger Enum);
|
||||
static ESGFinger ToESGFinger(FEFingerType Enum);
|
||||
|
||||
static FEFingerMovementType ToEFingerMovement(const ESGFingerMovement Enum);
|
||||
static ESGFingerMovement ToESGFingerMovement(const FEFingerMovementType Enum);
|
||||
static FEFingerMovementType ToEFingerMovement(ESGFingerMovement Enum);
|
||||
static ESGFingerMovement ToESGFingerMovement(FEFingerMovementType Enum);
|
||||
|
||||
static FEFingerSolverType ToEFingerSolver(const ESGFingerSolver Enum);
|
||||
static ESGFingerSolver ToESGFingerSolver(const FEFingerSolverType Enum);
|
||||
static FEFingerSolverType ToEFingerSolver(ESGFingerSolver Enum);
|
||||
static ESGFingerSolver ToESGFingerSolver(FEFingerSolverType Enum);
|
||||
|
||||
static FEPositionalTrackingHardware ToEPositionalTrackingHardware(const ESGPositionalTrackingHardware Enum);
|
||||
static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(const FEPositionalTrackingHardware Enum);
|
||||
static FEPositionalTrackingHardware ToEPositionalTrackingHardware(ESGPositionalTrackingHardware Enum);
|
||||
static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(FEPositionalTrackingHardware Enum);
|
||||
|
||||
static FEThumbMovementType ToEThumbMovement(const ESGThumbMovement Enum);
|
||||
static ESGThumbMovement ToESGThumbMovement(const FEThumbMovementType Enum);
|
||||
static FESenseGloveThumperCommandType ToESenseGloveThumperCommand(ESGSenseGloveThumperCommand Enum);
|
||||
static ESGSenseGloveThumperCommand ToESGSenseGloveThumperCommand(FESenseGloveThumperCommandType Enum);
|
||||
|
||||
static FEThumbSolverType ToEThumbSolver(const ESGThumbSolver Enum);
|
||||
static ESGThumbSolver ToESGThumbSolver(const FEThumbSolverType Enum);
|
||||
static FEThumbMovementType ToEThumbMovement(ESGThumbMovement Enum);
|
||||
static ESGThumbMovement ToESGThumbMovement(FEThumbMovementType Enum);
|
||||
|
||||
static FEThumbSolverType ToEThumbSolver(ESGThumbSolver Enum);
|
||||
static ESGThumbSolver ToESGThumbSolver(FEThumbSolverType Enum);
|
||||
};
|
||||
@@ -90,21 +90,21 @@ FString FSGDeviceImpl::ToString(ESGDeviceType DeviceType)
|
||||
|
||||
FSGDeviceImpl::FSGDeviceImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGDeviceImpl::FSGDeviceImpl(const FSGDevicePtrType SGDevice)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
ensureAlwaysMsgf(SGDevice.get(), TEXT("Invalid SGDevice!"));
|
||||
Pimpl->SGDevice = SGDevice;
|
||||
@@ -112,16 +112,20 @@ FSGDeviceImpl::FSGDeviceImpl(const FSGDevicePtrType SGDevice)
|
||||
|
||||
FSGDeviceImpl::FSGDeviceImpl(const FSGDeviceImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGDeviceImpl::FSGDeviceImpl(FSGDeviceImpl&& Rhs) noexcept = default;
|
||||
FSGDeviceImpl::FSGDeviceImpl(FSGDeviceImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGDeviceImpl::~FSGDeviceImpl() = default;
|
||||
|
||||
@@ -132,7 +136,11 @@ FSGDeviceImpl& FSGDeviceImpl::operator=(const FSGDeviceImpl& Rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGDeviceImpl& FSGDeviceImpl::operator=(FSGDeviceImpl&& Rhs) noexcept = default;
|
||||
FSGDeviceImpl& FSGDeviceImpl::operator=(FSGDeviceImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGDeviceImpl::FSGDevicePtrType FSGDeviceImpl::ToSGDevicePtr() const
|
||||
{
|
||||
@@ -242,9 +250,9 @@ int32 FSGDeviceImpl::GetDeviceIndex() const
|
||||
return ToSGDevicePtrChecked()->GetDeviceIndex();
|
||||
}
|
||||
|
||||
void FSGDeviceImpl::SetDeviceIndex(const int32 Index)
|
||||
void FSGDeviceImpl::SetDeviceIndex(const int32 NewIndex)
|
||||
{
|
||||
ToSGDevicePtrChecked()->SetDeviceIndex(Index);
|
||||
ToSGDevicePtrChecked()->SetDeviceIndex(NewIndex);
|
||||
}
|
||||
|
||||
bool FSGDeviceImpl::IsWireless() const
|
||||
|
||||
@@ -97,22 +97,22 @@ void FSGDeviceModelImpl::ParseFirmware(const FString& RawFirmware, int32& OutMai
|
||||
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl(
|
||||
const FString& Id, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::string IdString(TCHAR_TO_UTF8(*Id));
|
||||
std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion));
|
||||
@@ -122,27 +122,31 @@ FSGDeviceModelImpl::FSGDeviceModelImpl(
|
||||
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl(const FDeviceModelType& DeviceModel)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->DeviceModel = DeviceModel;
|
||||
}
|
||||
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl(const FSGDeviceModelImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl(FSGDeviceModelImpl&& Rhs) noexcept = default;
|
||||
FSGDeviceModelImpl::FSGDeviceModelImpl(FSGDeviceModelImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGDeviceModelImpl::~FSGDeviceModelImpl() = default;
|
||||
|
||||
@@ -153,7 +157,11 @@ FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(const FSGDeviceModelImpl& Rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(FSGDeviceModelImpl&& Rhs) noexcept = default;
|
||||
FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(FSGDeviceModelImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGDeviceModelImpl::FDeviceModelType& FSGDeviceModelImpl::ToDeviceModel() const
|
||||
{
|
||||
|
||||
@@ -169,16 +169,16 @@ float SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(
|
||||
return FSGAnatomyImpl::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
}
|
||||
|
||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlex(
|
||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(
|
||||
const float FlexionInRadians)
|
||||
{
|
||||
return FSGAnatomyImpl::NormalizeFingerFlex(FlexionInRadians);
|
||||
return FSGAnatomyImpl::NormalizeFingerFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlex(
|
||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion(
|
||||
const float FlexionInRadians)
|
||||
{
|
||||
return FSGAnatomyImpl::NormalizeThumbFlex(FlexionInRadians);
|
||||
return FSGAnatomyImpl::NormalizeThumbFlexion(FlexionInRadians);
|
||||
}
|
||||
|
||||
void SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(
|
||||
@@ -246,10 +246,10 @@ void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(
|
||||
StaticCast<FSGIC_TArray_FVector*>(OutPositions)->Array = FSGBasicHandModelImpl::GetBaseJointPositions();
|
||||
}
|
||||
|
||||
void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointRotations(
|
||||
void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(
|
||||
void* OutRotations)
|
||||
{
|
||||
StaticCast<FSGIC_TArray_FVector*>(OutRotations)->Array = FSGBasicHandModelImpl::GetBaseJointRotations();
|
||||
StaticCast<FSGIC_TArray_FVector*>(OutRotations)->Array = FSGBasicHandModelImpl::GetBaseJointAngles();
|
||||
}
|
||||
|
||||
void SGCoreImpl_FSGBasicHandModelImpl_ctor(
|
||||
@@ -1089,9 +1089,9 @@ int32 SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(
|
||||
|
||||
void SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(
|
||||
void* Instance,
|
||||
const int32 Index)
|
||||
const int32 NewIndex)
|
||||
{
|
||||
return StaticCast<FSGIC_TSharedPtr_FSGDeviceImpl*>(Instance)->Ptr->SetDeviceIndex(Index);
|
||||
return StaticCast<FSGIC_TSharedPtr_FSGDeviceImpl*>(Instance)->Ptr->SetDeviceIndex(NewIndex);
|
||||
}
|
||||
|
||||
bool SGCoreImpl_FSGDeviceImpl_IsWireless(
|
||||
@@ -5033,6 +5033,26 @@ bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose_HandProfile_OutHandPose(
|
||||
StaticCast<FSGIC_FSGHandPoseImpl*>(OutHandPose)->HandPoseImpl);
|
||||
}
|
||||
|
||||
bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ESenseGloveThumperCommand(
|
||||
void* Instance,
|
||||
void* ForceFeedbackCommand,
|
||||
void* BuzzCommand,
|
||||
void* ThumperCommand)
|
||||
{
|
||||
return StaticCast<FSGIC_TSharedPtr_FSGSenseGloveImpl*>(Instance)->Ptr->SendHaptics(
|
||||
StaticCast<FSGIC_FSGForceFeedbackCommandImpl*>(ForceFeedbackCommand)->ForceFeedbackCommandImpl,
|
||||
StaticCast<FSGIC_FSGBuzzCommandImpl*>(BuzzCommand)->BuzzCommandImpl,
|
||||
StaticCast<FSGIC_ESGSenseGloveThumperCommand*>(ThumperCommand)->Command);
|
||||
}
|
||||
|
||||
bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ThumperCommand(
|
||||
void* Instance,
|
||||
void* ThumperCommand)
|
||||
{
|
||||
return StaticCast<FSGIC_TSharedPtr_FSGSenseGloveImpl*>(Instance)->Ptr->SendHaptics(
|
||||
StaticCast<FSGIC_ESGSenseGloveThumperCommand*>(ThumperCommand)->Command);
|
||||
}
|
||||
|
||||
void SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(
|
||||
void* Instance,
|
||||
void* ForceFeedbackCommand)
|
||||
|
||||
@@ -84,21 +84,21 @@ struct FSGFingerCommandImpl::FImpl
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(const TArray<int32>& Levels)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<int32> LevelsVector{
|
||||
FSGArrayUtils::ToStdVector<int32>(Levels)
|
||||
@@ -108,39 +108,43 @@ FSGFingerCommandImpl::FSGFingerCommandImpl(const TArray<int32>& Levels)
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(const FFingerCommandType& FingerCommand)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommand = MakeShared<FFingerCommandType>(FingerCommand);
|
||||
}
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(const TSharedRef<FFingerCommandType> FingerCommand)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->FingerCommand = FImpl::MakeNewFingerCommand(FingerCommand);
|
||||
}
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(const FSGFingerCommandImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
Pimpl->FingerCommand = FImpl::MakeNewFingerCommand(Rhs.Pimpl->FingerCommand);
|
||||
}
|
||||
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(FSGFingerCommandImpl&& Rhs) noexcept = default;
|
||||
FSGFingerCommandImpl::FSGFingerCommandImpl(FSGFingerCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGFingerCommandImpl::~FSGFingerCommandImpl() = default;
|
||||
|
||||
@@ -151,7 +155,11 @@ FSGFingerCommandImpl& FSGFingerCommandImpl::operator=(const FSGFingerCommandImpl
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGFingerCommandImpl& FSGFingerCommandImpl::operator=(FSGFingerCommandImpl&& Rhs) noexcept = default;
|
||||
FSGFingerCommandImpl& FSGFingerCommandImpl::operator=(FSGFingerCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGFingerCommandImpl::FFingerCommandType& FSGFingerCommandImpl::ToFingerCommand() const
|
||||
{
|
||||
|
||||
@@ -75,78 +75,82 @@ const FSGForceFeedbackCommandImpl& FSGForceFeedbackCommandImpl::Off()
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl()
|
||||
: FSGFingerCommandImpl(MakeShared<FForceFeedbackCommandType>()),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const TArray<int32>& ForceFeedbackLevels)
|
||||
: FSGFingerCommandImpl(MakeShared<FForceFeedbackCommandType>(
|
||||
FSGArrayUtils::ToStdVector<int32>(ForceFeedbackLevels))),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const int32 Thumb, const int32 Index, const int32 Middle,
|
||||
const int32 Ring, const int32 Pinky)
|
||||
: FSGFingerCommandImpl(MakeShared<FForceFeedbackCommandType>(Thumb, Index, Middle, Ring, Pinky)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const ESGFinger Finger, const int32 BuzzLevel)
|
||||
: FSGFingerCommandImpl(MakeShared<FForceFeedbackCommandType>(FSGCoreEnumCast::ToEFinger(Finger), BuzzLevel)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const FForceFeedbackCommandType& ForceFeedbackCommand)
|
||||
: FSGFingerCommandImpl(MakeShared<FForceFeedbackCommandType>(ForceFeedbackCommand)),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const TSharedRef<FForceFeedbackCommandType> ForceFeedbackCommand)
|
||||
: FSGFingerCommandImpl(ForceFeedbackCommand),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(const FSGForceFeedbackCommandImpl& Rhs)
|
||||
: FSGFingerCommandImpl(Rhs),
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(FSGForceFeedbackCommandImpl&& Rhs) noexcept = default;
|
||||
FSGForceFeedbackCommandImpl::FSGForceFeedbackCommandImpl(FSGForceFeedbackCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGForceFeedbackCommandImpl::~FSGForceFeedbackCommandImpl() = default;
|
||||
|
||||
@@ -158,7 +162,10 @@ FSGForceFeedbackCommandImpl& FSGForceFeedbackCommandImpl::operator=(const FSGFor
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGForceFeedbackCommandImpl& FSGForceFeedbackCommandImpl::operator=(FSGForceFeedbackCommandImpl&& Rhs) noexcept
|
||||
FSGForceFeedbackCommandImpl& FSGForceFeedbackCommandImpl::operator=(FSGForceFeedbackCommandImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGForceFeedbackCommandImpl::FForceFeedbackCommandType& FSGForceFeedbackCommandImpl::ToForceFeedbackCommand() const
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "SGCoreImpl/SGQuatImpl.h"
|
||||
#include "SGCoreImpl/SGVect3DImpl.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
#include "SGUtils/SGCoordinates.h"
|
||||
|
||||
struct FSGHandInterpolatorImpl::FImpl
|
||||
{
|
||||
@@ -81,72 +82,72 @@ struct FSGHandInterpolatorImpl::FImpl
|
||||
|
||||
FSGHandInterpolatorImpl FSGHandInterpolatorImpl::Default(const bool bRightHanded)
|
||||
{
|
||||
const FSGHandInterpolatorImpl HandInterpolatorImpl(FHandInterpolatorType::Default(bRightHanded));
|
||||
return HandInterpolatorImpl;
|
||||
FSGHandInterpolatorImpl HandInterpolatorImpl(FHandInterpolatorType::Default(bRightHanded));
|
||||
return MoveTemp(HandInterpolatorImpl);
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl FSGHandInterpolatorImpl::Deserialize(const FString& SerializedString)
|
||||
{
|
||||
std::string Serialized(TCHAR_TO_UTF8(*SerializedString));
|
||||
const FSGHandInterpolatorImpl GlovePose(FHandInterpolatorType::Deserialize(MoveTemp(Serialized)));
|
||||
return GlovePose;
|
||||
FSGHandInterpolatorImpl GlovePose(FHandInterpolatorType::Deserialize(MoveTemp(Serialized)));
|
||||
return MoveTemp(GlovePose);
|
||||
}
|
||||
|
||||
TArray<FVector> FSGHandInterpolatorImpl::InterpolateFingerAngles(
|
||||
ESGFinger Finger, const FSGHandInterpolatorImpl& Interpolator, const FVector& TotalGloveAngles)
|
||||
const ESGFinger Finger, const FSGHandInterpolatorImpl& Interpolator, const FVector& TotalGloveAngles)
|
||||
{
|
||||
const TArray<FVector> Angles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
TArray<FVector> Angles{
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FHandInterpolatorType::InterpolateFingerAngles(
|
||||
FSGCoreEnumCast::ToEFinger(Finger), Interpolator.ToHandInterpolator(),
|
||||
FSGVect3DImpl(TotalGloveAngles).ToVect3D()))
|
||||
FSGCoordinates::TransformToSenseGlove<FSGVect3DImpl::FVect3DType>(TotalGloveAngles)))
|
||||
};
|
||||
return Angles;
|
||||
return MoveTemp(Angles);
|
||||
}
|
||||
|
||||
TArray<FVector> FSGHandInterpolatorImpl::InterpolateThumbAngles(const FSGHandInterpolatorImpl& Interpolator,
|
||||
const FVector& TotalGloveAngles)
|
||||
{
|
||||
const TArray<FVector> Angles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
TArray<FVector> Angles{
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FHandInterpolatorType::InterpolateThumbAngles(
|
||||
Interpolator.ToHandInterpolator(), FSGVect3DImpl(TotalGloveAngles).ToVect3D()))
|
||||
Interpolator.ToHandInterpolator(),
|
||||
FSGCoordinates::TransformToSenseGlove<FSGVect3DImpl::FVect3DType>(TotalGloveAngles)))
|
||||
};
|
||||
return Angles;
|
||||
return MoveTemp(Angles);
|
||||
}
|
||||
|
||||
TArray<TArray<FVector>> FSGHandInterpolatorImpl::InterpolateHandAngles(const FSGHandInterpolatorImpl& Interpolator,
|
||||
const TArray<FVector>& TotalAngles)
|
||||
{
|
||||
std::vector<FSGVect3DImpl::FVect3DType> TotalAnglesVector{
|
||||
FSGArrayUtils::ToStdVector<FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(
|
||||
TotalAngles)
|
||||
FSGArrayUtils::ToSenseGloveAngles<FSGVect3DImpl::FVect3DType>(TotalAngles)
|
||||
};
|
||||
const TArray<TArray<FVector>> Angles{
|
||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||
TArray<TArray<FVector>> Angles{
|
||||
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||
FHandInterpolatorType::InterpolateHandAngles(
|
||||
Interpolator.ToHandInterpolator(), MoveTemp(TotalAnglesVector)))
|
||||
};
|
||||
return Angles;
|
||||
return MoveTemp(Angles);
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl()
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const TArray<TArray<FSGInterpolationSetImpl>>& JointInterpolations)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<std::vector<FSGInterpolationSetImpl::FInterpolationSetType>> JointInterpolationsVector{
|
||||
FSGArrayUtils::ToStdVector<FSGInterpolationSetImpl, FSGInterpolationSetImpl::FInterpolationSetType,
|
||||
@@ -158,11 +159,11 @@ FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const TArray<TArray<FSGInterpol
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const TArray<TArray<FSGInterpolationSetImpl>>& JointInterpolations,
|
||||
const FQuat& CmcStartRotation)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
std::vector<std::vector<FSGInterpolationSetImpl::FInterpolationSetType>> JointInterpolationsVector{
|
||||
FSGArrayUtils::ToStdVector<FSGInterpolationSetImpl, FSGInterpolationSetImpl::FInterpolationSetType,
|
||||
@@ -174,27 +175,31 @@ FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const TArray<TArray<FSGInterpol
|
||||
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const FHandInterpolatorType& HandInterpolator)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->HandInterpolator = HandInterpolator;
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const FSGHandInterpolatorImpl& Rhs)
|
||||
:
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||
#else
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
{
|
||||
Pimpl->Owner = this;
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(FSGHandInterpolatorImpl&& Rhs) noexcept = default;
|
||||
FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(FSGHandInterpolatorImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
FSGHandInterpolatorImpl::~FSGHandInterpolatorImpl() = default;
|
||||
|
||||
@@ -205,7 +210,10 @@ FSGHandInterpolatorImpl& FSGHandInterpolatorImpl::operator=(const FSGHandInterpo
|
||||
return *this;
|
||||
}
|
||||
|
||||
FSGHandInterpolatorImpl& FSGHandInterpolatorImpl::operator=(FSGHandInterpolatorImpl&& Rhs) noexcept
|
||||
FSGHandInterpolatorImpl& FSGHandInterpolatorImpl::operator=(FSGHandInterpolatorImpl&& Rhs)
|
||||
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 )
|
||||
noexcept
|
||||
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */
|
||||
= default;
|
||||
|
||||
const FSGHandInterpolatorImpl::FHandInterpolatorType& FSGHandInterpolatorImpl::ToHandInterpolator(
|
||||
@@ -242,28 +250,33 @@ void FSGHandInterpolatorImpl::SetCmcStartRotation(const FQuat& CmcStartRotation)
|
||||
|
||||
float FSGHandInterpolatorImpl::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
|
||||
{
|
||||
return Pimpl->HandInterpolator.CalculateAngle(FSGCoreEnumCast::ToEFinger(Finger), Movement, Value);
|
||||
return FSGCoordinates::TransformToUnreal(
|
||||
Movement, Pimpl->HandInterpolator.CalculateAngle(FSGCoreEnumCast::ToEFinger(Finger), Movement, Value));
|
||||
}
|
||||
|
||||
float FSGHandInterpolatorImpl::CalculateAngle(const ESGFinger Finger, const ESGFingerMovement Movement,
|
||||
const float Value) const
|
||||
{
|
||||
return Pimpl->HandInterpolator.CalculateAngle(
|
||||
FSGCoreEnumCast::ToEFinger(Finger), FSGCoreEnumCast::ToEFingerMovement(Movement), Value);
|
||||
return FSGCoordinates::TransformToUnreal(
|
||||
Movement, Pimpl->HandInterpolator.CalculateAngle(FSGCoreEnumCast::ToEFinger(Finger),
|
||||
FSGCoreEnumCast::ToEFingerMovement(Movement), Value));
|
||||
}
|
||||
|
||||
float FSGHandInterpolatorImpl::CalculateAngle(const ESGFinger Finger, const ESGThumbMovement Movement,
|
||||
const float Value) const
|
||||
{
|
||||
return Pimpl->HandInterpolator.CalculateAngle(
|
||||
FSGCoreEnumCast::ToEFinger(Finger), FSGCoreEnumCast::ToEThumbMovement(Movement), Value);
|
||||
return FSGCoordinates::TransformToUnreal(
|
||||
Movement, Pimpl->HandInterpolator.CalculateAngle(FSGCoreEnumCast::ToEFinger(Finger),
|
||||
FSGCoreEnumCast::ToEThumbMovement(Movement), Value));
|
||||
}
|
||||
|
||||
void FSGHandInterpolatorImpl::SetInterpolation(
|
||||
const int32 Finger, const int32 Movement,
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
Pimpl->HandInterpolator.SetInterpolation(Finger, Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
Pimpl->HandInterpolator.SetInterpolation(Finger, Movement, InputAt0, InputAt1,
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt0),
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt1));
|
||||
}
|
||||
|
||||
void FSGHandInterpolatorImpl::SetInterpolation(
|
||||
@@ -272,7 +285,9 @@ void FSGHandInterpolatorImpl::SetInterpolation(
|
||||
{
|
||||
Pimpl->HandInterpolator.SetInterpolation(
|
||||
FSGCoreEnumCast::ToEFinger(Finger), FSGCoreEnumCast::ToEFingerMovement(Movement),
|
||||
InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
InputAt0, InputAt1,
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt0),
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt1));
|
||||
}
|
||||
|
||||
void FSGHandInterpolatorImpl::SetInterpolation(
|
||||
@@ -280,7 +295,9 @@ void FSGHandInterpolatorImpl::SetInterpolation(
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
Pimpl->HandInterpolator.SetInterpolation(FSGCoreEnumCast::ToEThumbMovement(Movement),
|
||||
InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
InputAt0, InputAt1,
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt0),
|
||||
FSGCoordinates::TransformToUnreal(Movement, AngleAt1));
|
||||
}
|
||||
|
||||
FSGInterpolationSetImpl FSGHandInterpolatorImpl::GetInterpolation(const int32 Finger, const int32 Movement) const
|
||||
@@ -309,4 +326,4 @@ FSGHandInterpolatorImpl::FImpl::~FImpl() = default;
|
||||
void FSGHandInterpolatorImpl::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