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
|
||
|
|
4225eeaaf6
|
||
|
|
2477c97588
|
+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/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [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
|
# 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
|
## 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.
|
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.
|
* 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.
|
* 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.
|
We maintain [a detailed changelog for this project](CHANGELOG.md) as well. Please consult the changelog before upgrading to any newer release.
|
||||||
|
|
||||||
## Documentation
|
## 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).
|
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
|
│ │ └── release
|
||||||
│ │
|
│ │
|
||||||
│ └── v20 (UE 5.0 Linux dependencies)
|
│ └── v20 (UE 5.0 and 5.1 Linux dependencies)
|
||||||
│ │
|
│ │
|
||||||
│ ├── debug
|
│ ├── debug
|
||||||
│ │
|
│ │
|
||||||
@@ -174,4 +170,4 @@ The SenseGlove plug-in for Unreal Engine is licensed under the terms of the [MIT
|
|||||||
|
|
||||||
### Third-Party Licenses
|
### 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,
|
"FileVersion": 3,
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"VersionName": "1.0.0",
|
"VersionName": "1.0.1",
|
||||||
"FriendlyName": "SenseGlove",
|
"FriendlyName": "SenseGlove",
|
||||||
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
|
||||||
"Category": "Virtual Reality",
|
"Category": "Virtual Reality",
|
||||||
"CreatedBy": "SenseGlove",
|
"CreatedBy": "SenseGlove",
|
||||||
"CreatedByURL": "https://www.senseglove.com/",
|
"CreatedByURL": "https://www.senseglove.com/",
|
||||||
"DocsURL": "",
|
"DocsURL": "https://senseglove.gitlab.io/unreal-blueprint-docs/",
|
||||||
"MarketplaceURL": "",
|
"MarketplaceURL": "",
|
||||||
"SupportURL": "https://www.senseglove.com/support/",
|
"SupportURL": "https://www.senseglove.com/support/",
|
||||||
"CanContainContent": true,
|
"CanContainContent": true,
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveBuildHacks",
|
"Name": "SenseGloveBuildHacks",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveConnect",
|
"Name": "SenseGloveConnect",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveConnectImpl",
|
"Name": "SenseGloveConnectImpl",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveConnectKismet",
|
"Name": "SenseGloveConnectKismet",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveCore",
|
"Name": "SenseGloveCore",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveCoreImpl",
|
"Name": "SenseGloveCoreImpl",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveCoreKismet",
|
"Name": "SenseGloveCoreKismet",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -93,8 +93,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "SenseGloveEditor",
|
"Name": "SenseGloveEditor",
|
||||||
"Type": "Runtime",
|
"Type": "Editor",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PostEngineInit",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveInterop",
|
"Name": "SenseGloveInterop",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveKismet",
|
"Name": "SenseGloveKismet",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveLog",
|
"Name": "SenseGloveLog",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveTypes",
|
"Name": "SenseGloveTypes",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SenseGloveUtils",
|
"Name": "SenseGloveUtils",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default",
|
"LoadingPhase": "PreDefault",
|
||||||
"WhitelistPlatforms": [
|
"WhitelistPlatforms": [
|
||||||
"Linux",
|
"Linux",
|
||||||
"Win64"
|
"Win64"
|
||||||
|
|||||||
@@ -34,20 +34,21 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "SGConnect/SGConnect.h"
|
#include "SGConnect/SGConnect.h"
|
||||||
|
|
||||||
#include "SGConnectImpl/SGExportedFunctions.h"
|
#include "SGConnectImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_FString.h"
|
#include "SGInterop/SGIC_FString.h"
|
||||||
|
|
||||||
int32 USGConnect::Init()
|
int32 FSGConnect::Init()
|
||||||
{
|
{
|
||||||
return SGConnect_Init();
|
return SGConnect_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 USGConnect::Dispose()
|
int32 FSGConnect::Dispose()
|
||||||
{
|
{
|
||||||
return SGConnect_Dispose();
|
return SGConnect_Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
FString USGConnect::GetLibraryVersion()
|
FString FSGConnect::GetLibraryVersion()
|
||||||
{
|
{
|
||||||
FSGIC_FString Container;
|
FSGIC_FString Container;
|
||||||
SGConnect_GetLibraryVersion(&Container);
|
SGConnect_GetLibraryVersion(&Container);
|
||||||
|
|||||||
@@ -37,4 +37,4 @@
|
|||||||
#include "Modules/ModuleManager.h"
|
#include "Modules/ModuleManager.h"
|
||||||
#include "SenseGloveConnectModule.h"
|
#include "SenseGloveConnectModule.h"
|
||||||
|
|
||||||
IMPLEMENT_MODULE(FSenseGloveConnectModule, SenseGloveConnect)
|
IMPLEMENT_MODULE(FSenseGloveConnectModule, SenseGloveConnect)
|
||||||
@@ -35,4 +35,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
void FSenseGloveConnectModule::StartupModule()
|
void FSenseGloveConnectModule::StartupModule()
|
||||||
{
|
{
|
||||||
SGLOG("Starting up SenseGloveConnect module...");
|
SGLOG("Starting up SenseGloveConnect module...");
|
||||||
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"), *USGConnect::
|
SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"),
|
||||||
GetLibraryVersion()));
|
*FSGConnect::GetLibraryVersion()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSenseGloveConnectModule::PreUnloadCallback()
|
void FSenseGloveConnectModule::PreUnloadCallback()
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ public:
|
|||||||
virtual void ShutdownModule() override;
|
virtual void ShutdownModule() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef LOCTEXT_NAMESPACE
|
#undef LOCTEXT_NAMESPACE
|
||||||
@@ -35,46 +35,43 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "UObject/Object.h"
|
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGConnect.generated.h"
|
#include "SGConnect.generated.h"
|
||||||
|
|
||||||
UCLASS(BlueprintType)
|
USTRUCT()
|
||||||
class SENSEGLOVECONNECT_API USGConnect: public UObject
|
struct SENSEGLOVECONNECT_API FSGConnect
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Begin Scanning for Sense Glove Devices and set up communications with them.
|
* Begin Scanning for Sense Glove Devices and set up communications with them.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* -3 : An Unexpected error occured. Please try again.
|
* -3 : An Unexpected error occured. Please try again.
|
||||||
* -2 : Device Scanning is already running within a different program.
|
* -2 : Device Scanning is already running within a different program.
|
||||||
* -1 : Device Scanning already being initialized (function called twice in short succession).
|
* -1 : Device Scanning already being initialized (function called twice in short succession).
|
||||||
* 0 : Device Scanning is already running in within this program.
|
* 0 : Device Scanning is already running in within this program.
|
||||||
* 1 : Successfully started up DeviceScanning from the current program.
|
* 1 : Successfully started up DeviceScanning from the current program.
|
||||||
*/
|
*/
|
||||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect")
|
|
||||||
static int32 Init();
|
static int32 Init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispose of unmanaged resources and finalize Sense Glove devices.
|
* Dispose of unmanaged resources and finalize Sense Glove devices.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* -3 : An Unexpected error occured. Please try again.
|
* -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.
|
* -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).
|
* -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.
|
* 0 : There is no deviceScanner running from any program, so disposing is skipped.
|
||||||
* 1 : Successfully disposed of DeviceScanner resources.
|
* 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.
|
* @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();
|
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();
|
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",
|
"CoreUObject",
|
||||||
"Engine",
|
"Engine",
|
||||||
"SenseGloveConnect",
|
"SenseGloveConnect",
|
||||||
|
"SenseGloveKismet",
|
||||||
"SenseGloveLog",
|
"SenseGloveLog",
|
||||||
"SenseGloveTypes",
|
"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);
|
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)
|
TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded)
|
||||||
@@ -85,21 +85,21 @@ TArray<TArray<FVector>> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded
|
|||||||
return MoveTemp(OutAnglesContainer.Array);
|
return MoveTemp(OutAnglesContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||||
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
|
SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded);
|
||||||
return MoveTemp(OutAnglesContainer.Array);
|
return MoveTemp(OutAnglesContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||||
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
|
SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded);
|
||||||
return MoveTemp(OutAnglesContainer.Array);
|
return MoveTemp(OutAnglesContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomy::GetFistHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
FSGIC_TArray_TArray_FVector OutAnglesContainer;
|
||||||
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
|
SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "SGInterop/SGIC_TArray_FQuat.h"
|
#include "SGInterop/SGIC_TArray_FQuat.h"
|
||||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||||
#include "SGInterop/SGIC_TArray_TArray_float.h"
|
#include "SGInterop/SGIC_TArray_TArray_float.h"
|
||||||
|
#include "SGUtils/SGArrayUtils.h"
|
||||||
|
|
||||||
struct USGBasicHandModel::FImpl
|
struct USGBasicHandModel::FImpl
|
||||||
{
|
{
|
||||||
@@ -118,7 +119,7 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
|||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{
|
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_FVector StartPositionsContainer{StartPositions};
|
||||||
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
||||||
@@ -143,6 +144,22 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
|||||||
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
|
||||||
|
const TArray<TArray<float>>& Lengths,
|
||||||
|
const TArray<FVector>& StartPositions,
|
||||||
|
const TArray<FRotator>& StartRotations)
|
||||||
|
{
|
||||||
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
|
||||||
|
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer);
|
||||||
|
|
||||||
|
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
|
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
|
||||||
const TArray<FSGFloatArray>& Lengths,
|
const TArray<FSGFloatArray>& Lengths,
|
||||||
const TArray<FVector>& StartPositions,
|
const TArray<FVector>& StartPositions,
|
||||||
@@ -150,7 +167,7 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
|||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{
|
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_FVector StartPositionsContainer{StartPositions};
|
||||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||||
@@ -161,6 +178,24 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
|
|||||||
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
|
||||||
|
const TArray<FSGFloatArray>& Lengths,
|
||||||
|
const TArray<FVector>& StartPositions,
|
||||||
|
const TArray<FRotator>& StartRotations)
|
||||||
|
{
|
||||||
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float LengthsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
|
||||||
|
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer);
|
||||||
|
|
||||||
|
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGBasicHandModel* USGBasicHandModel::Default(UObject* Outer, const bool bRightHanded)
|
USGBasicHandModel* USGBasicHandModel::Default(UObject* Outer, const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
@@ -190,20 +225,20 @@ TArray<FVector> USGBasicHandModel::GetBaseJointPositions()
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FVector> USGBasicHandModel::GetBaseJointRotations()
|
TArray<FVector> USGBasicHandModel::GetBaseJointAngles()
|
||||||
{
|
{
|
||||||
FSGIC_TArray_FVector OutRotationsContainer;
|
FSGIC_TArray_FVector OutRotationsContainer;
|
||||||
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointRotations(&OutRotationsContainer);
|
SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer);
|
||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
USGBasicHandModel::USGBasicHandModel()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
SGCoreImpl_FSGBasicHandModelImpl_ctor(&OutBasicHandModelImplContainer);
|
SGCoreImpl_FSGBasicHandModelImpl_ctor(&OutBasicHandModelImplContainer);
|
||||||
@@ -215,11 +250,11 @@ USGBasicHandModel::USGBasicHandModel()
|
|||||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||||
@@ -234,15 +269,15 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
|
|||||||
USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||||
const TArray<FVector>& StartPositions)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{
|
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_FVector StartPositionsContainer{StartPositions};
|
||||||
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition(
|
||||||
@@ -255,11 +290,11 @@ USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArr
|
|||||||
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
|
||||||
@@ -273,18 +308,39 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
|
||||||
|
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer);
|
||||||
|
|
||||||
|
Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
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 > 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 > 24 ) */
|
||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
|
||||||
FSGIC_TArray_TArray_float LengthsContainer{
|
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_FVector StartPositionsContainer{StartPositions};
|
||||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||||
@@ -296,13 +352,36 @@ USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArr
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGBasicHandModel::USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
|
||||||
|
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer);
|
||||||
|
|
||||||
|
Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGBasicHandModel::USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl)
|
||||||
|
:
|
||||||
|
#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 > 24 ) */
|
||||||
{
|
{
|
||||||
SetBasicHandModelImpl(BasicHandModelImpl);
|
SetBasicHandModelImpl(BasicHandModelImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -432,7 +511,7 @@ void USGBasicHandModel::SetStartJointPosition(const uint8 Finger, const FVector&
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FQuat> USGBasicHandModel::GetStartJointRotations() const
|
TArray<FQuat> USGBasicHandModel::GetStartJointRotationsQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||||
FSGIC_TArray_FQuat OutRotationsContainer;
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
@@ -440,6 +519,14 @@ TArray<FQuat> USGBasicHandModel::GetStartJointRotations() const
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<FRotator> USGBasicHandModel::GetStartJointRotations() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||||
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
|
FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
@@ -464,7 +551,7 @@ void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFi
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
|
FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
@@ -476,6 +563,18 @@ FQuat USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
|
|||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
|
||||||
|
{
|
||||||
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
|
||||||
|
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFinger Finger)
|
void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFinger Finger)
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
@@ -488,6 +587,18 @@ void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFing
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGBasicHandModel::SetJointRotation(const FRotator& NewRotation, const ESGFinger Finger)
|
||||||
|
{
|
||||||
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||||
|
FSGIC_FQuat NewRotationContainer{NewRotation.Quaternion()};
|
||||||
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
|
SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation(&InstanceContainer, &NewRotationContainer, &FingerContainer);
|
||||||
|
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
TArray<float> USGBasicHandModel::GetTotalLengths() const
|
TArray<float> USGBasicHandModel::GetTotalLengths() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
|
||||||
|
|||||||
@@ -129,11 +129,11 @@ USGBetaDevice* USGBetaDevice::Parse(UObject* Outer, const FString& String)
|
|||||||
|
|
||||||
USGBetaDevice::USGBetaDevice()
|
USGBetaDevice::USGBetaDevice()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -146,11 +146,11 @@ USGBetaDevice::USGBetaDevice(const FString& ConstantsString, const FString& Devi
|
|||||||
const FString& HardwareVersion,
|
const FString& HardwareVersion,
|
||||||
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||||
FSGIC_FString ConstantsStringContainer{ConstantsString};
|
FSGIC_FString ConstantsStringContainer{ConstantsString};
|
||||||
@@ -166,22 +166,22 @@ USGBetaDevice::USGBetaDevice(const FString& ConstantsString, const FString& Devi
|
|||||||
|
|
||||||
USGBetaDevice::USGBetaDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
USGBetaDevice::USGBetaDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
||||||
: USGDevice(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGBetaDevice::USGBetaDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
USGBetaDevice::USGBetaDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
||||||
: USGDevice(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ USGBuzzCommand* USGBuzzCommand::Off(UObject* Outer)
|
|||||||
|
|
||||||
USGBuzzCommand::USGBuzzCommand()
|
USGBuzzCommand::USGBuzzCommand()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGBuzzCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -156,11 +156,11 @@ USGBuzzCommand::USGBuzzCommand()
|
|||||||
|
|
||||||
USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
||||||
: USGFingerCommand(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
|
FSGIC_TArray_int32 BuzzLevelsContainer{BuzzLevels};
|
||||||
@@ -174,11 +174,11 @@ USGBuzzCommand::USGBuzzCommand(const TArray<int32>& BuzzLevels)
|
|||||||
USGBuzzCommand::USGBuzzCommand(
|
USGBuzzCommand::USGBuzzCommand(
|
||||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
SGCoreImpl_FSGBuzzCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||||
@@ -190,11 +190,11 @@ USGBuzzCommand::USGBuzzCommand(
|
|||||||
|
|
||||||
USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_ESGFinger FingerContainer{Finger};
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
@@ -207,22 +207,22 @@ USGBuzzCommand::USGBuzzCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
|||||||
|
|
||||||
USGBuzzCommand::USGBuzzCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
USGBuzzCommand::USGBuzzCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
||||||
: USGFingerCommand(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGBuzzCommand::USGBuzzCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
USGBuzzCommand::USGBuzzCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
||||||
: USGFingerCommand(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,11 +108,11 @@ USGCalibrationDataPoint* USGCalibrationDataPoint::NewCalibrationDataPoint(
|
|||||||
|
|
||||||
USGCalibrationDataPoint::USGCalibrationDataPoint()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||||
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
|
SGCoreImpl_FSGCalibrationDataPointImpl_ctor(&OutCalibrationDataPointImplContainer);
|
||||||
@@ -123,11 +123,11 @@ USGCalibrationDataPoint::USGCalibrationDataPoint()
|
|||||||
|
|
||||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGCalibrationDataPointImpl OutCalibrationDataPointImplContainer;
|
||||||
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
FSGIC_TArray_FVector CalibrationValuesContainer{CalibrationValues};
|
||||||
@@ -140,11 +140,11 @@ USGCalibrationDataPoint::USGCalibrationDataPoint(const int32 CurrentStage, const
|
|||||||
|
|
||||||
USGCalibrationDataPoint::USGCalibrationDataPoint(const FSGCalibrationDataPointImpl& CalibrationDataPointImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetCalibrationDataPointImpl(CalibrationDataPointImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -111,11 +111,11 @@ FString USGDevice::ToString(const ESGDeviceType DeviceType)
|
|||||||
|
|
||||||
USGDevice::USGDevice()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -126,11 +126,11 @@ USGDevice::USGDevice()
|
|||||||
|
|
||||||
USGDevice::USGDevice(const FSGDeviceImpl& SGDeviceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGDeviceImpl RhsContainer{SGDeviceImpl};
|
FSGIC_FSGDeviceImpl RhsContainer{SGDeviceImpl};
|
||||||
@@ -142,11 +142,11 @@ USGDevice::USGDevice(const FSGDeviceImpl& SGDeviceImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGBetaDeviceImpl RhsContainer{BetaDeviceImpl};
|
FSGIC_FSGBetaDeviceImpl RhsContainer{BetaDeviceImpl};
|
||||||
@@ -157,11 +157,11 @@ USGDevice::USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGHapticGloveImpl RhsContainer{HapticGloveImpl};
|
FSGIC_FSGHapticGloveImpl RhsContainer{HapticGloveImpl};
|
||||||
@@ -173,11 +173,11 @@ USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGNovaGloveImpl RhsContainer{NovaGloveImpl};
|
FSGIC_FSGNovaGloveImpl RhsContainer{NovaGloveImpl};
|
||||||
@@ -189,11 +189,11 @@ USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(const FSGSenseGloveImpl& SenseGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGSenseGloveImpl RhsContainer{SenseGloveImpl};
|
FSGIC_FSGSenseGloveImpl RhsContainer{SenseGloveImpl};
|
||||||
@@ -205,11 +205,11 @@ USGDevice::USGDevice(const FSGSenseGloveImpl& SenseGloveImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->SGDeviceImpl = MoveTemp(SGDeviceImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -217,11 +217,11 @@ USGDevice::USGDevice(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->SGDeviceImpl = MoveTemp(BetaDeviceImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -229,11 +229,11 @@ USGDevice::USGDevice(TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->SGDeviceImpl = MoveTemp(HapticGloveImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -241,11 +241,11 @@ USGDevice::USGDevice(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->SGDeviceImpl = MoveTemp(NovaGloveImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -253,11 +253,11 @@ USGDevice::USGDevice(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
|||||||
|
|
||||||
USGDevice::USGDevice(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->SGDeviceImpl = MoveTemp(SenseGloveImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -426,12 +426,12 @@ int32 USGDevice::GetDeviceIndex() const
|
|||||||
return SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(&InstanceContainer);
|
return SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(&InstanceContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void USGDevice::SetDeviceIndex(const int32 Index)
|
void USGDevice::SetDeviceIndex(const int32 NewIndex)
|
||||||
{
|
{
|
||||||
SyncImplObject();
|
SyncImplObject();
|
||||||
|
|
||||||
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()};
|
||||||
SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(&InstanceContainer, Index);
|
SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(&InstanceContainer, NewIndex);
|
||||||
|
|
||||||
SyncUProperties();
|
SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,11 +121,11 @@ void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVer
|
|||||||
|
|
||||||
USGDeviceModel::USGDeviceModel()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGDeviceModelImpl OutDeviceModelImplContainer;
|
||||||
SGCoreImpl_FSGDeviceModelImpl_ctor(&OutDeviceModelImplContainer);
|
SGCoreImpl_FSGDeviceModelImpl_ctor(&OutDeviceModelImplContainer);
|
||||||
@@ -137,11 +137,11 @@ USGDeviceModel::USGDeviceModel()
|
|||||||
USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion,
|
USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion,
|
||||||
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGDeviceModelImpl OutDeviceModelImplContainer;
|
||||||
FSGIC_FString IdContainer{Id};
|
FSGIC_FString IdContainer{Id};
|
||||||
@@ -155,11 +155,11 @@ USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion
|
|||||||
|
|
||||||
USGDeviceModel::USGDeviceModel(const FSGDeviceModelImpl& DeviceModelImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetDeviceModelImpl(DeviceModelImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -88,11 +88,11 @@ struct USGFingerCommand::FImpl
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGFingerCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGFingerCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -103,11 +103,11 @@ USGFingerCommand::USGFingerCommand()
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_TArray_int32 LevelsContainer{InLevels};
|
FSGIC_TArray_int32 LevelsContainer{InLevels};
|
||||||
@@ -119,11 +119,11 @@ USGFingerCommand::USGFingerCommand(const TArray<int32>& InLevels)
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGFingerCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
|
FSGIC_FSGFingerCommandImpl RhsContainer{FingerCommandImpl};
|
||||||
@@ -136,11 +136,11 @@ USGFingerCommand::USGFingerCommand(const FSGFingerCommandImpl& FingerCommandImpl
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
|
FSGIC_FSGBuzzCommandImpl RhsContainer{BuzzCommandImpl};
|
||||||
@@ -153,11 +153,11 @@ USGFingerCommand::USGFingerCommand(const FSGBuzzCommandImpl& BuzzCommandImpl)
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
|
FSGIC_FSGForceFeedbackCommandImpl RhsContainer{ForceFeedbackCommandImpl};
|
||||||
@@ -170,11 +170,11 @@ USGFingerCommand::USGFingerCommand(const FSGForceFeedbackCommandImpl& ForceFeedb
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
|
FSGIC_FSGTimedBuzzCommandImpl RhsContainer{TimedBuzzCommandImpl};
|
||||||
@@ -187,11 +187,11 @@ USGFingerCommand::USGFingerCommand(const FSGTimedBuzzCommandImpl& TimedBuzzComma
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->FingerCommandImpl = MoveTemp(FingerCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -199,11 +199,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGFingerCommandImpl> FingerComman
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->FingerCommandImpl = MoveTemp(BuzzCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -211,11 +211,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGBuzzCommandImpl> BuzzCommandImp
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->FingerCommandImpl = MoveTemp(ForceFeedbackCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -223,11 +223,11 @@ USGFingerCommand::USGFingerCommand(TSharedRef<FSGForceFeedbackCommandImpl> Force
|
|||||||
|
|
||||||
USGFingerCommand::USGFingerCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->FingerCommandImpl = MoveTemp(TimedBuzzCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -145,11 +145,11 @@ USGForceFeedbackCommand* USGForceFeedbackCommand::Off(UObject* Outer)
|
|||||||
|
|
||||||
USGForceFeedbackCommand::USGForceFeedbackCommand()
|
USGForceFeedbackCommand::USGForceFeedbackCommand()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -160,11 +160,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand()
|
|||||||
|
|
||||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels)
|
USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels)
|
||||||
: USGFingerCommand(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
|
FSGIC_TArray_int32 ForceFeedbackLevelsContainer{ForceFeedbackLevels};
|
||||||
@@ -178,11 +178,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(const TArray<int32>& ForceFeedb
|
|||||||
USGForceFeedbackCommand::USGForceFeedbackCommand(
|
USGForceFeedbackCommand::USGForceFeedbackCommand(
|
||||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
SGCoreImpl_FSGForceFeedbackCommandImpl_ctor_Thumb_Index_Middle_Ring_Pinky_MakeShared(
|
||||||
@@ -194,11 +194,11 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(
|
|||||||
|
|
||||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const int32 BuzzLevel)
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGForceFeedbackCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_ESGFinger FingerContainer{Finger};
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
@@ -211,22 +211,22 @@ USGForceFeedbackCommand::USGForceFeedbackCommand(const ESGFinger Finger, const i
|
|||||||
|
|
||||||
USGForceFeedbackCommand::USGForceFeedbackCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
USGForceFeedbackCommand::USGForceFeedbackCommand(const FSGForceFeedbackCommandImpl& ForceFeedbackCommandImpl)
|
||||||
: USGFingerCommand(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGForceFeedbackCommand::USGForceFeedbackCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
USGForceFeedbackCommand::USGForceFeedbackCommand(TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl)
|
||||||
: USGFingerCommand(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGInterpolationSet.h"
|
||||||
#include "SGCoreImpl/SGInterpolationSetImpl.h"
|
#include "SGCoreImpl/SGInterpolationSetImpl.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGHandInterpolatorImpl.h"
|
#include "SGCoreImpl/SGHandInterpolatorImpl.h"
|
||||||
@@ -151,6 +152,21 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
|||||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||||
|
UObject* Outer,
|
||||||
|
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
|
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||||
|
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||||
|
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||||
|
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||||
|
|
||||||
|
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
|
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
|
||||||
@@ -169,6 +185,24 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
|||||||
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
|
||||||
|
UObject* Outer,
|
||||||
|
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
|
FSGArrayUtils::ToImplType<
|
||||||
|
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||||
|
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||||
|
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||||
|
JointInterpolations)};
|
||||||
|
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||||
|
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||||
|
|
||||||
|
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGHandInterpolator* USGHandInterpolator::Default(UObject* Outer, const bool bRightHanded)
|
USGHandInterpolator* USGHandInterpolator::Default(UObject* Outer, const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
@@ -223,11 +257,11 @@ TArray<TArray<FVector>> USGHandInterpolator::InterpolateHandAngles(const USGHand
|
|||||||
|
|
||||||
USGHandInterpolator::USGHandInterpolator()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
SGCoreImpl_FSGHandInterpolatorImpl_ctor(&OutHandInterpolatorImplContainer);
|
SGCoreImpl_FSGHandInterpolatorImpl_ctor(&OutHandInterpolatorImplContainer);
|
||||||
@@ -238,11 +272,11 @@ USGHandInterpolator::USGHandInterpolator()
|
|||||||
|
|
||||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
@@ -257,11 +291,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
|
|||||||
|
|
||||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
@@ -280,11 +314,11 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
|
|||||||
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||||
const FQuat& CmcStartRotation)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
@@ -298,14 +332,35 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||||
const FQuat& CmcStartRotation)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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{
|
||||||
|
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
|
||||||
|
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
|
||||||
|
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||||
|
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||||
|
|
||||||
|
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||||
|
const FQuat& CmcStartRotation)
|
||||||
|
:
|
||||||
|
#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 > 24 ) */
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
|
||||||
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
|
||||||
@@ -322,13 +377,37 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHandInterpolator::USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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{
|
||||||
|
FSGArrayUtils::ToImplType<
|
||||||
|
USGInterpolationSet, FSGInterpolationSetImpl,
|
||||||
|
&USGInterpolationSet::ToInterpolationSetImpl,
|
||||||
|
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
|
||||||
|
JointInterpolations)};
|
||||||
|
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
|
||||||
|
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
|
||||||
|
|
||||||
|
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGHandInterpolator::USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl)
|
||||||
|
:
|
||||||
|
#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 > 24 ) */
|
||||||
{
|
{
|
||||||
SetHandInterpolatorImpl(HandInterpolatorImpl);
|
SetHandInterpolatorImpl(HandInterpolatorImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -365,7 +444,7 @@ TArray<TArray<USGInterpolationSet*>> USGHandInterpolator::GetJointInterpolations
|
|||||||
return JointInterpolations;
|
return JointInterpolations;
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGHandInterpolator::GetCmcStartRotation() const
|
FQuat USGHandInterpolator::GetCmcStartRotationQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
@@ -373,6 +452,14 @@ FQuat USGHandInterpolator::GetCmcStartRotation() const
|
|||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGHandInterpolator::GetCmcStartRotation() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
|
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|||||||
@@ -36,7 +36,9 @@
|
|||||||
#include "SGCore/SGHandPose.h"
|
#include "SGCore/SGHandPose.h"
|
||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
#include "SGCore/SGRotatorArray.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGBasicHandModel.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGHandPoseImpl.h"
|
#include "SGCoreImpl/SGHandPoseImpl.h"
|
||||||
#include "SGInterop/SGIC_ESGFinger.h"
|
#include "SGInterop/SGIC_ESGFinger.h"
|
||||||
@@ -114,6 +116,23 @@ USGHandPose* USGHandPose::NewHandPose(
|
|||||||
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
|
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGHandPose* USGHandPose::NewHandPose(
|
||||||
|
UObject* Outer,
|
||||||
|
const bool bRightHanded,
|
||||||
|
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
|
||||||
|
const TArray<TArray<FVector>>& HandAngles)
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
|
||||||
|
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||||
|
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
|
&JointRotationsContainer, &HandAnglesContainer);
|
||||||
|
|
||||||
|
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGHandPose* USGHandPose::NewHandPose(
|
USGHandPose* USGHandPose::NewHandPose(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||||
@@ -121,13 +140,36 @@ USGHandPose* USGHandPose::NewHandPose(
|
|||||||
{
|
{
|
||||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
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,
|
||||||
|
&JointRotationsContainer, &HandAnglesContainer);
|
||||||
|
|
||||||
|
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
|
||||||
|
}
|
||||||
|
|
||||||
|
USGHandPose* USGHandPose::NewHandPose(
|
||||||
|
UObject* Outer,
|
||||||
|
const bool bRightHanded,
|
||||||
|
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
|
||||||
|
const TArray<FSGVectorArray>& HandAngles)
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
|
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||||
};
|
};
|
||||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
@@ -243,11 +285,11 @@ USGHandPose* USGHandPose::Fist(UObject* Outer, const bool bRightHanded)
|
|||||||
|
|
||||||
USGHandPose::USGHandPose()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
SGCoreImpl_FSGHandPoseImpl_ctor(&OutHandPoseImplContainer);
|
SGCoreImpl_FSGHandPoseImpl_ctor(&OutHandPoseImplContainer);
|
||||||
@@ -256,14 +298,15 @@ USGHandPose::USGHandPose()
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHandPose::USGHandPose(const bool bRightHanded, const TArray<TArray<FVector>>& JointPositions,
|
USGHandPose::USGHandPose(const bool bRightHanded,
|
||||||
const TArray<TArray<FQuat>>& JointRotations, const TArray<TArray<FVector>>& HandAngles)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||||
@@ -277,24 +320,75 @@ USGHandPose::USGHandPose(const bool bRightHanded, const TArray<TArray<FVector>>&
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHandPose::USGHandPose(const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions,
|
USGHandPose::USGHandPose(const bool bRightHanded,
|
||||||
const TArray<FSGQuatArray>& JointRotations, const TArray<FSGVectorArray>& HandAngles)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
|
||||||
|
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||||
|
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
|
&JointRotationsContainer, &HandAnglesContainer);
|
||||||
|
|
||||||
|
Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
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 > 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 > 24 ) */
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
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,
|
||||||
|
&JointRotationsContainer, &HandAnglesContainer);
|
||||||
|
|
||||||
|
Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
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 > 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 > 24 ) */
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
|
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FVector HandAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
|
||||||
};
|
};
|
||||||
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
|
||||||
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
@@ -306,11 +400,11 @@ USGHandPose::USGHandPose(const bool bRightHanded, const TArray<FSGVectorArray>&
|
|||||||
|
|
||||||
USGHandPose::USGHandPose(const FSGHandPoseImpl& HandPoseImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetHandPoseImpl(HandPoseImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -346,7 +440,7 @@ TArray<TArray<FVector>> USGHandPose::GetJointPositions() const
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FQuat>> USGHandPose::GetJointRotations() const
|
TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||||
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
||||||
@@ -354,6 +448,14 @@ TArray<TArray<FQuat>> USGHandPose::GetJointRotations() const
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<TArray<FRotator>> USGHandPose::GetJointRotations() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||||
|
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
||||||
|
SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
|
TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||||
|
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGHandProfileImpl.h"
|
#include "SGCoreImpl/SGHandProfileImpl.h"
|
||||||
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
|
#include "SGInterop/SGIC_FSGHandProfileImpl.h"
|
||||||
@@ -185,11 +187,11 @@ void USGHandProfile::ResetCalibration(const bool bOnDisk)
|
|||||||
|
|
||||||
USGHandProfile::USGHandProfile()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||||
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
|
SGCoreImpl_FSGHandProfileImpl_ctor(&OutHandProfileImplContainer);
|
||||||
@@ -202,11 +204,11 @@ USGHandProfile::USGHandProfile(const bool bRightHanded,
|
|||||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||||
const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHandProfileImpl OutHandProfileImplContainer;
|
||||||
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
|
FSGIC_FSGSenseGloveHandProfileImpl SenseGloveHandProfileContainer
|
||||||
@@ -222,11 +224,11 @@ USGHandProfile::USGHandProfile(const bool bRightHanded,
|
|||||||
|
|
||||||
USGHandProfile::USGHandProfile(const FSGHandProfileImpl& HandProfileImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetHandProfileImpl(HandProfileImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHaptic
|
|||||||
|
|
||||||
USGHapticGlove::USGHapticGlove()
|
USGHapticGlove::USGHapticGlove()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -171,88 +171,88 @@ USGHapticGlove::USGHapticGlove()
|
|||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(const FSGDeviceImpl& SGDeviceImpl)
|
USGHapticGlove::USGHapticGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||||
: USGDevice(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||||
: USGDevice(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||||
: USGDevice(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
USGHapticGlove::USGHapticGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||||
: USGDevice(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
USGHapticGlove::USGHapticGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||||
: USGDevice(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
USGHapticGlove::USGHapticGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||||
: USGDevice(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
USGHapticGlove::USGHapticGlove(TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||||
: USGDevice(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGHapticGlove::USGHapticGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
USGHapticGlove::USGHapticGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
||||||
: USGDevice(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
@@ -349,6 +349,24 @@ bool USGHapticGlove::GetImuRotation(FQuat& OutImu)
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool USGHapticGlove::GetImuRotation(FRotator& OutImu)
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||||
|
FSGIC_FQuat OutImuContainer;
|
||||||
|
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
|
||||||
|
|
||||||
|
SyncUProperties();
|
||||||
|
|
||||||
|
if (bResult)
|
||||||
|
{
|
||||||
|
OutImu = OutImuContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
bool USGHapticGlove::GetHandPose(
|
bool USGHapticGlove::GetHandPose(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||||
@@ -628,6 +646,28 @@ void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQ
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
SGCoreImpl_FSGHapticGloveImpl_GetWristLocation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware,
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
|
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
|
||||||
@@ -651,6 +691,29 @@ void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQ
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
USGHapticGlove::FImpl::FImpl(USGHapticGlove* InOwner)
|
USGHapticGlove::FImpl::FImpl(USGHapticGlove* InOwner)
|
||||||
: Owner(InOwner)
|
: Owner(InOwner)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGSensorRange.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_ESGCalibrationStage.h"
|
#include "SGInterop/SGIC_ESGCalibrationStage.h"
|
||||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||||
@@ -176,11 +177,11 @@ bool USGHapticGloveCalibrationCheck::MatchesLast(const TArray<FVector>& CurrentR
|
|||||||
|
|
||||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||||
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
|
SGCoreImpl_FSGHapticGloveCalibrationCheckImpl_ctor(&OutHapticGloveCalibrationCheckImplContainer);
|
||||||
@@ -192,11 +193,11 @@ USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck()
|
|||||||
|
|
||||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveCalibrationCheckImpl OutHapticGloveCalibrationCheckImplContainer;
|
||||||
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
|
FSGIC_FSGSensorRangeImpl LastCalibrationRangeContainer{LastCalibrationRange->ToSensorRangeImpl()};
|
||||||
@@ -211,11 +212,11 @@ USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(const USGSensorRa
|
|||||||
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(
|
USGHapticGloveCalibrationCheck::USGHapticGloveCalibrationCheck(
|
||||||
const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetHapticGloveCalibrationCheckImpl(HapticGloveCalibrationCheckImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -37,6 +37,11 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGCalibrationDataPoint.h"
|
||||||
|
#include "SGCore/SGHandPose.h"
|
||||||
|
#include "SGCore/SGHandProfile.h"
|
||||||
|
#include "SGCore/SGHapticGlove.h"
|
||||||
|
#include "SGCore/SGSensorRange.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||||
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
|
#include "SGInterop/SGIC_FSGHandPoseImpl.h"
|
||||||
@@ -150,11 +155,11 @@ bool USGHapticGloveCalibrationSequence::CompileProfile(UObject* Outer,
|
|||||||
|
|
||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGHapticGloveCalibrationSequenceImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -165,11 +170,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence()
|
|||||||
|
|
||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||||
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
FSGIC_TSharedPtr_FSGHapticGloveImpl LinkedGloveContainer{LinkedGlove->ToHapticGloveImpl()};
|
||||||
@@ -183,11 +188,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(const USGHa
|
|||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||||
const FSGHapticGloveCalibrationSequenceImpl& HapticGloveCalibrationSequenceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveCalibrationSequenceImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
|
FSGIC_FSGHapticGloveCalibrationSequenceImpl RhsContainer{HapticGloveCalibrationSequenceImpl};
|
||||||
@@ -201,11 +206,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
|||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
|
FSGIC_FSGHapticGloveQuickCalibrationImpl RhsContainer{HapticGloveQuickCalibrationImpl};
|
||||||
@@ -219,11 +224,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
|||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||||
TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequenceImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveCalibrationSequenceImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -232,11 +237,11 @@ USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
|||||||
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
USGHapticGloveCalibrationSequence::USGHapticGloveCalibrationSequence(
|
||||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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->HapticGloveCalibrationSequenceImpl = MoveTemp(HapticGloveQuickCalibrationImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -123,11 +123,11 @@ int32 USGHapticGloveCommandBuffer::GetMaxThumpCommands()
|
|||||||
|
|
||||||
USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGHapticGloveCommandBufferImpl OutHapticGloveCommandBufferImplContainer;
|
||||||
SGCoreImpl_FSGHapticGloveCommandBufferImpl_ctor(&OutHapticGloveCommandBufferImplContainer);
|
SGCoreImpl_FSGHapticGloveCommandBufferImpl_ctor(&OutHapticGloveCommandBufferImplContainer);
|
||||||
@@ -140,11 +140,11 @@ USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer()
|
|||||||
USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer(
|
USGHapticGloveCommandBuffer::USGHapticGloveCommandBuffer(
|
||||||
const FSGHapticGloveCommandBufferImpl& HapticGloveCommandBufferImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetHapticGloveCommandBufferImpl(HapticGloveCommandBufferImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
#include "SGCore/SGHapticGloveHandProfiles.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGHandProfile.h"
|
||||||
#include "SGCore/SGHapticGlove.h"
|
#include "SGCore/SGHapticGlove.h"
|
||||||
#include "SGCore/SGSensorRange.h"
|
#include "SGCore/SGSensorRange.h"
|
||||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||||
|
|||||||
@@ -126,11 +126,11 @@ float USGHapticGloveQuickCalibration::GetDefaultAutoEndTimeout()
|
|||||||
|
|
||||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration()
|
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGHapticGloveQuickCalibrationImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -142,11 +142,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration()
|
|||||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||||
const USGHapticGlove* GloveToCalibrate, const float AutoEndTimeout)
|
const USGHapticGlove* GloveToCalibrate, const float AutoEndTimeout)
|
||||||
: USGHapticGloveCalibrationSequence(GloveToCalibrate),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGHapticGloveQuickCalibrationImpl OutSharedPtrContainer;
|
||||||
FSGIC_TSharedPtr_FSGHapticGloveImpl GloveToCalibrateContainer{GloveToCalibrate->ToHapticGloveImpl()};
|
FSGIC_TSharedPtr_FSGHapticGloveImpl GloveToCalibrateContainer{GloveToCalibrate->ToHapticGloveImpl()};
|
||||||
@@ -160,11 +160,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
|||||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||||
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
const FSGHapticGloveQuickCalibrationImpl& HapticGloveQuickCalibrationImpl)
|
||||||
: USGHapticGloveCalibrationSequence(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
@@ -172,11 +172,11 @@ USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
|||||||
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
USGHapticGloveQuickCalibration::USGHapticGloveQuickCalibration(
|
||||||
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibrationImpl)
|
||||||
: USGHapticGloveCalibrationSequence(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,11 +126,11 @@ USGInterpolationSet* USGInterpolationSet::Deserialize(UObject* Outer, const FStr
|
|||||||
|
|
||||||
USGInterpolationSet::USGInterpolationSet()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||||
SGCoreImpl_FSGInterpolationSetImpl_ctor(&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)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||||
SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2(&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,
|
USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, const float To1, const float To2,
|
||||||
const float Min, const float Max)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer;
|
||||||
SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max(&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)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetInterpolationSetImpl(InterpolationSetImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -54,14 +54,42 @@ bool FSGJointKinematics::ForwardKinematics(
|
|||||||
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
||||||
FSGIC_TArray_FVector OutNewPositionsContainer;
|
FSGIC_TArray_FVector OutNewPositionsContainer;
|
||||||
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
||||||
return
|
|
||||||
|
const bool bResult =
|
||||||
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
|
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
|
||||||
&StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer,
|
&StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer,
|
||||||
&OutNewPositionsContainer, &OutNewRotationsContainer);
|
&OutNewPositionsContainer, &OutNewRotationsContainer);
|
||||||
|
|
||||||
|
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
|
||||||
|
OutNewRotations = MoveTemp(OutNewRotationsContainer.Array);
|
||||||
|
|
||||||
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FSGJointKinematics::ForwardKinematics(
|
bool FSGJointKinematics::ForwardKinematics(
|
||||||
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
|
const FVector& StartPosition, const FRotator& StartRotation, const TArray<FVector>& JointLengths,
|
||||||
|
const TArray<FVector>& JointAngles, TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
|
||||||
|
{
|
||||||
|
FSGIC_FVector StartPositionContainer{StartPosition};
|
||||||
|
FSGIC_FQuat StartRotationContainer{StartRotation.Quaternion()};
|
||||||
|
FSGIC_TArray_FVector JointLengthsContainer{JointLengths};
|
||||||
|
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
||||||
|
FSGIC_TArray_FVector OutNewPositionsContainer;
|
||||||
|
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
||||||
|
|
||||||
|
const bool bResult =
|
||||||
|
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
|
||||||
|
&StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer,
|
||||||
|
&OutNewPositionsContainer, &OutNewRotationsContainer);
|
||||||
|
|
||||||
|
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
|
||||||
|
OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array);
|
||||||
|
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FSGJointKinematics::ForwardKinematics(
|
||||||
|
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
|
||||||
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations)
|
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations)
|
||||||
{
|
{
|
||||||
FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()};
|
FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()};
|
||||||
@@ -69,7 +97,35 @@ bool FSGJointKinematics::ForwardKinematics(
|
|||||||
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
||||||
FSGIC_TArray_FVector OutNewPositionsContainer;
|
FSGIC_TArray_FVector OutNewPositionsContainer;
|
||||||
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
||||||
return
|
|
||||||
|
const bool bResult =
|
||||||
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
|
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
|
||||||
&ProfileContainer, &FingerContainer, &JointAnglesContainer, &OutNewPositions, &OutNewRotations);
|
&ProfileContainer, &FingerContainer, &JointAnglesContainer,
|
||||||
|
&OutNewPositionsContainer, &OutNewRotationsContainer);
|
||||||
|
|
||||||
|
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
|
||||||
|
OutNewRotations = MoveTemp(OutNewRotationsContainer.Array);
|
||||||
|
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FSGJointKinematics::ForwardKinematics(
|
||||||
|
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
|
||||||
|
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
|
||||||
|
{
|
||||||
|
FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()};
|
||||||
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
|
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
|
||||||
|
FSGIC_TArray_FVector OutNewPositionsContainer;
|
||||||
|
FSGIC_TArray_FQuat OutNewRotationsContainer;
|
||||||
|
|
||||||
|
const bool bResult =
|
||||||
|
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
|
||||||
|
&ProfileContainer, &FingerContainer, &JointAnglesContainer,
|
||||||
|
&OutNewPositionsContainer, &OutNewRotationsContainer);
|
||||||
|
|
||||||
|
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
|
||||||
|
OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array);
|
||||||
|
|
||||||
|
return bResult;
|
||||||
}
|
}
|
||||||
@@ -37,9 +37,14 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGBasicHandModel.h"
|
||||||
#include "SGCore/SGBuzzCommand.h"
|
#include "SGCore/SGBuzzCommand.h"
|
||||||
#include "SGCore/SGDeviceImplCast.h"
|
#include "SGCore/SGDeviceImplCast.h"
|
||||||
#include "SGCore/SGForceFeedbackCommand.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 "SGCore/SGThumperCommand.h"
|
||||||
#include "SGCoreImpl/SGDeviceImpl.h"
|
#include "SGCoreImpl/SGDeviceImpl.h"
|
||||||
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
#include "SGCoreImpl/SGHapticGloveImpl.h"
|
||||||
@@ -247,6 +252,25 @@ void USGNovaGlove::CalculateGloveLocation(const FVector& ReferencePosition, cons
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGNovaGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation(
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer, bRightHanded,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
|
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||||
@@ -266,6 +290,25 @@ void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, cons
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation(
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer, bRightHanded,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FString USGNovaGlove::ToBytes(const USGThumperCommand* ThumperCommand)
|
FString USGNovaGlove::ToBytes(const USGThumperCommand* ThumperCommand)
|
||||||
{
|
{
|
||||||
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
||||||
@@ -293,11 +336,11 @@ FString USGNovaGlove::ToBytes(const USGBuzzCommand* BuzzCommand)
|
|||||||
|
|
||||||
USGNovaGlove::USGNovaGlove()
|
USGNovaGlove::USGNovaGlove()
|
||||||
: USGHapticGlove(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -308,11 +351,11 @@ USGNovaGlove::USGNovaGlove()
|
|||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo)
|
USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo)
|
||||||
: USGHapticGlove(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()};
|
FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()};
|
||||||
@@ -324,66 +367,66 @@ USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo)
|
|||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const FSGDeviceImpl& SGDeviceImpl)
|
USGNovaGlove::USGNovaGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
USGNovaGlove::USGNovaGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
USGNovaGlove::USGNovaGlove(const FSGNovaGloveImpl& NovaGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
USGNovaGlove::USGNovaGlove(const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
@@ -521,6 +564,24 @@ bool USGNovaGlove::GetImuRotation(FQuat& OutImu)
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool USGNovaGlove::GetImuRotation(FRotator& OutImu)
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
|
||||||
|
FSGIC_FQuat OutImuContainer;
|
||||||
|
const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
|
||||||
|
|
||||||
|
SyncUProperties();
|
||||||
|
|
||||||
|
if (bResult)
|
||||||
|
{
|
||||||
|
OutImu = OutImuContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
bool USGNovaGlove::GetHandPose(
|
bool USGNovaGlove::GetHandPose(
|
||||||
UObject* Outer, const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile,
|
UObject* Outer, const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile,
|
||||||
USGHandPose*& OutHandPose)
|
USGHandPose*& OutHandPose)
|
||||||
@@ -700,6 +761,29 @@ void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FQua
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware,
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const
|
FVector& OutWristPosition, FQuat& OutWristRotation) const
|
||||||
@@ -722,6 +806,28 @@ void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQua
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
SGCoreImpl_FSGNovaGloveImpl_GetWristLocation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FString USGNovaGlove::ToString() const
|
FString USGNovaGlove::ToString() const
|
||||||
{
|
{
|
||||||
SyncImplObject();
|
SyncImplObject();
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include "SGCore/SGNovaGloveCalibration.h"
|
#include "SGCore/SGNovaGloveCalibration.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||||
|
|
||||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_FSGNovaGloveHandProfileImpl.h"
|
#include "SGInterop/SGIC_FSGNovaGloveHandProfileImpl.h"
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGHandInterpolator.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGNovaGloveHandProfileImpl.h"
|
#include "SGCoreImpl/SGNovaGloveHandProfileImpl.h"
|
||||||
#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h"
|
#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h"
|
||||||
@@ -107,13 +108,31 @@ USGNovaGloveHandProfile* USGNovaGloveHandProfile::NewNovaGloveHandProfile(
|
|||||||
return NewNovaGloveHandProfile(Outer, MoveTemp(OutNovaGloveHandProfileImplContainer.NovaGloveHandProfileImpl));
|
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()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||||
SGCoreImpl_FSGNovaGloveHandProfileImpl_ctor(&OutNovaGloveHandProfileImplContainer);
|
SGCoreImpl_FSGNovaGloveHandProfileImpl_ctor(&OutNovaGloveHandProfileImplContainer);
|
||||||
@@ -124,11 +143,11 @@ USGNovaGloveHandProfile::USGNovaGloveHandProfile()
|
|||||||
|
|
||||||
USGNovaGloveHandProfile::USGNovaGloveHandProfile(const bool bRightHanded, const USGHandInterpolator* Interpolator)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveHandProfileImpl OutNovaGloveHandProfileImplContainer;
|
||||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||||
@@ -141,11 +160,11 @@ USGNovaGloveHandProfile::USGNovaGloveHandProfile(const bool bRightHanded, const
|
|||||||
|
|
||||||
USGNovaGloveHandProfile::USGNovaGloveHandProfile(const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetNovaGloveHandProfileImpl(NovaGloveHandProfileImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -135,11 +135,11 @@ USGNovaGloveInfo* USGNovaGloveInfo::Deserialize(UObject* Outer, const FString& S
|
|||||||
|
|
||||||
USGNovaGloveInfo::USGNovaGloveInfo()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer;
|
||||||
SGCoreImpl_FSGNovaGloveInfoImpl_ctor(&OutNovaGloveInfoImplContainer);
|
SGCoreImpl_FSGNovaGloveInfoImpl_ctor(&OutNovaGloveInfoImplContainer);
|
||||||
@@ -153,11 +153,11 @@ USGNovaGloveInfo::USGNovaGloveInfo(
|
|||||||
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
||||||
const bool bRightHanded, const FQuat& ImuCorrection, const int32 NumberOfSensors)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer;
|
||||||
FSGIC_FString DeviceIdContainer{DeviceId};
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
@@ -174,11 +174,11 @@ USGNovaGloveInfo::USGNovaGloveInfo(
|
|||||||
|
|
||||||
USGNovaGloveInfo::USGNovaGloveInfo(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetNovaGloveInfoImpl(NovaGloveInfoImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -240,7 +240,7 @@ bool USGNovaGloveInfo::IsRight() const
|
|||||||
return SGCoreImpl_FSGNovaGloveInfoImpl_IsRight(&InstanceContainer);
|
return SGCoreImpl_FSGNovaGloveInfoImpl_IsRight(&InstanceContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGNovaGloveInfo::GetImuCorrection() const
|
FQuat USGNovaGloveInfo::GetImuCorrectionQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
||||||
FSGIC_FQuat OutCorrectionContainer;
|
FSGIC_FQuat OutCorrectionContainer;
|
||||||
@@ -248,6 +248,14 @@ FQuat USGNovaGloveInfo::GetImuCorrection() const
|
|||||||
return MoveTemp(OutCorrectionContainer.Quat);
|
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
|
int32 USGNovaGloveInfo::GetNumberOfSensors() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()};
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGNovaGloveInfo.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGNovaGloveSensorDataImpl.h"
|
#include "SGCoreImpl/SGNovaGloveSensorDataImpl.h"
|
||||||
#include "SGInterop/SGIC_FQuat.h"
|
#include "SGInterop/SGIC_FQuat.h"
|
||||||
@@ -111,6 +112,20 @@ USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData(
|
|||||||
return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl));
|
return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData(
|
||||||
|
UObject* Outer, const TArray<FVector>& Values, const int32 ParsedValues,
|
||||||
|
const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
|
||||||
|
{
|
||||||
|
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||||
|
FSGIC_TArray_FVector ValuesContainer{Values};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
|
||||||
|
&OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues,
|
||||||
|
&ImuRotationContainer, bImuParsed, BatteryLevel, bCharging);
|
||||||
|
|
||||||
|
return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGNovaGloveSensorData* USGNovaGloveSensorData::Empty(UObject* Outer)
|
USGNovaGloveSensorData* USGNovaGloveSensorData::Empty(UObject* Outer)
|
||||||
{
|
{
|
||||||
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||||
@@ -142,11 +157,11 @@ USGNovaGloveSensorData* USGNovaGloveSensorData::Deserialize(UObject* Outer, cons
|
|||||||
|
|
||||||
USGNovaGloveSensorData::USGNovaGloveSensorData()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||||
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor(&OutNovaGloveSensorDataImplContainer);
|
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor(&OutNovaGloveSensorDataImplContainer);
|
||||||
@@ -159,11 +174,11 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
|
|||||||
const FQuat& ImuRotation, const bool bImuParsed,
|
const FQuat& ImuRotation, const bool bImuParsed,
|
||||||
const float BatteryLevel, const bool bCharging)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
|
||||||
FSGIC_TArray_FVector ValuesContainer{Values};
|
FSGIC_TArray_FVector ValuesContainer{Values};
|
||||||
@@ -176,13 +191,34 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGNovaGloveSensorData::USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl)
|
USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, const int32 ParsedValues,
|
||||||
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
|
||||||
|
&OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues,
|
||||||
|
&ImuRotationContainer, bImuParsed, BatteryLevel, bCharging);
|
||||||
|
|
||||||
|
Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGNovaGloveSensorData::USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl)
|
||||||
|
:
|
||||||
|
#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 > 24 ) */
|
||||||
{
|
{
|
||||||
SetNovaGloveSensorDataImpl(NovaGloveSensorDataImpl);
|
SetNovaGloveSensorDataImpl(NovaGloveSensorDataImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -212,7 +248,7 @@ TArray<FVector> USGNovaGloveSensorData::GetSensorValues() const
|
|||||||
return MoveTemp(OutValuesContainer.Array);
|
return MoveTemp(OutValuesContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGNovaGloveSensorData::GetImuRotation() const
|
FQuat USGNovaGloveSensorData::GetImuRotationQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
|
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
@@ -220,6 +256,14 @@ FQuat USGNovaGloveSensorData::GetImuRotation() const
|
|||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGNovaGloveSensorData::GetImuRotation() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
int32 USGNovaGloveSensorData::GetParsedValues() const
|
int32 USGNovaGloveSensorData::GetParsedValues() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
|
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* @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 "SGCore/SGRotatorArray.h"
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "SGInterop/SGIC_ESGDeviceType.h"
|
#include "SGInterop/SGIC_ESGDeviceType.h"
|
||||||
#include "SGInterop/SGIC_ESGFinger.h"
|
#include "SGInterop/SGIC_ESGFinger.h"
|
||||||
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
|
#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h"
|
||||||
|
#include "SGInterop/SGIC_ESGSenseGloveThumperCommand.h"
|
||||||
#include "SGInterop/SGIC_FQuat.h"
|
#include "SGInterop/SGIC_FQuat.h"
|
||||||
#include "SGInterop/SGIC_FSGBasicHandModelImpl.h"
|
#include "SGInterop/SGIC_FSGBasicHandModelImpl.h"
|
||||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||||
@@ -276,6 +277,28 @@ void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, con
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
const bool bRightHanded, const ESGFinger MountedOn,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_ESGFinger MountedOnContainer{MountedOn};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation(
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
bRightHanded, &MountedOnContainer,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware,
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
const bool bRightHanded, const ESGFinger MountedOn,
|
const bool bRightHanded, const ESGFinger MountedOn,
|
||||||
@@ -303,13 +326,40 @@ void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, con
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
const bool bRightHanded, const ESGFinger MountedOn,
|
||||||
|
const FVector& GloveWristPositionOffset,
|
||||||
|
const FRotator& GloveWristRotationOffset,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_ESGFinger MountedOnContainer{MountedOn};
|
||||||
|
FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset};
|
||||||
|
FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation(
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
bRightHanded, &MountedOnContainer,
|
||||||
|
&GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove()
|
USGSenseGlove::USGSenseGlove()
|
||||||
: USGHapticGlove(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||||
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer);
|
||||||
@@ -320,11 +370,11 @@ USGSenseGlove::USGSenseGlove()
|
|||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model)
|
USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model)
|
||||||
: USGHapticGlove(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGSenseGloveInfoImpl ModelContainer{Model.ToSenseGloveInfoImpl()};
|
FSGIC_FSGSenseGloveInfoImpl ModelContainer{Model.ToSenseGloveInfoImpl()};
|
||||||
@@ -336,66 +386,66 @@ USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model)
|
|||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(const FSGDeviceImpl& SGDeviceImpl)
|
USGSenseGlove::USGSenseGlove(const FSGDeviceImpl& SGDeviceImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
USGSenseGlove::USGSenseGlove(const FSGHapticGloveImpl& HapticGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
USGSenseGlove::USGSenseGlove(const FSGSenseGloveImpl& SenseGloveImpl)
|
||||||
: USGHapticGlove(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
USGSenseGlove::USGSenseGlove(TSharedRef<FSGDeviceImpl> SGDeviceImpl)
|
||||||
: USGHapticGlove(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
USGSenseGlove::USGSenseGlove(TSharedRef<FSGHapticGloveImpl> HapticGloveImpl)
|
||||||
: USGHapticGlove(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGlove::USGSenseGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
USGSenseGlove::USGSenseGlove(TSharedRef<FSGSenseGloveImpl> SenseGloveImpl)
|
||||||
: USGHapticGlove(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
@@ -520,6 +570,24 @@ bool USGSenseGlove::GetImuRotation(FQuat& OutImu)
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool USGSenseGlove::GetImuRotation(FRotator& OutImu)
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
|
FSGIC_FQuat OutImuContainer;
|
||||||
|
const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
|
||||||
|
|
||||||
|
SyncUProperties();
|
||||||
|
|
||||||
|
if (bResult)
|
||||||
|
{
|
||||||
|
OutImu = OutImuContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
bool USGSenseGlove::GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose)
|
bool USGSenseGlove::GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose)
|
||||||
{
|
{
|
||||||
SyncImplObject();
|
SyncImplObject();
|
||||||
@@ -625,13 +693,50 @@ bool USGSenseGlove::GetHandPose(UObject* Outer, const USGHandProfile* HandProfil
|
|||||||
return bResult;
|
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)
|
void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||||
{
|
{
|
||||||
SyncImplObject();
|
SyncImplObject();
|
||||||
|
|
||||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()
|
||||||
|
};
|
||||||
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
|
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(&InstanceContainer, &ForceFeedbackCommandContainer);
|
||||||
|
|
||||||
SyncUProperties();
|
SyncUProperties();
|
||||||
@@ -656,7 +761,8 @@ void USGSenseGlove::SendHaptics(const USGForceFeedbackCommand* ForceFeedbackComm
|
|||||||
|
|
||||||
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
FSGIC_FSGForceFeedbackCommandImpl ForceFeedbackCommandContainer{
|
||||||
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()};
|
ForceFeedbackCommand->ToForceFeedbackCommandImpl().Get()
|
||||||
|
};
|
||||||
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
FSGIC_FSGBuzzCommandImpl BuzzCommandContainer{BuzzCommand->ToBuzzCommandImpl().Get()};
|
||||||
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
|
||||||
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand(
|
SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand_BuzzCommand_ThumperCommand(
|
||||||
@@ -738,6 +844,29 @@ void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQu
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
|
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
|
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
|
||||||
@@ -762,6 +891,30 @@ void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQu
|
|||||||
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
|
||||||
|
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_ESGFinger MountedOnContainer{MountedOn};
|
||||||
|
FSGIC_FVector OutGlovePositionContainer;
|
||||||
|
FSGIC_FQuat OutGloveRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer, &MountedOnContainer,
|
||||||
|
&OutGlovePositionContainer, &OutGloveRotationContainer);
|
||||||
|
|
||||||
|
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
|
||||||
|
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware,
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const
|
FVector& OutWristPosition, FQuat& OutWristRotation) const
|
||||||
@@ -784,6 +937,28 @@ void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQu
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
const ESGPositionalTrackingHardware TrackingHardware,
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
const FVector& GloveWristPositionOffset,
|
const FVector& GloveWristPositionOffset,
|
||||||
@@ -811,6 +986,33 @@ void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQu
|
|||||||
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
const ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
const FVector& GloveWristPositionOffset,
|
||||||
|
const FRotator& GloveWristRotationOffset,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation) const
|
||||||
|
{
|
||||||
|
SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
|
||||||
|
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
|
||||||
|
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
|
||||||
|
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
|
||||||
|
FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset};
|
||||||
|
FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()};
|
||||||
|
FSGIC_FVector OutWristPositionContainer;
|
||||||
|
FSGIC_FQuat OutWristRotationContainer;
|
||||||
|
SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation(
|
||||||
|
&InstanceContainer,
|
||||||
|
&ReferencePositionContainer, &ReferenceRotationContainer,
|
||||||
|
&TrackingHardwareContainer,
|
||||||
|
&GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer,
|
||||||
|
&OutWristPositionContainer, &OutWristRotationContainer);
|
||||||
|
|
||||||
|
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
|
||||||
|
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FString USGSenseGlove::ToString() const
|
FString USGSenseGlove::ToString() const
|
||||||
{
|
{
|
||||||
SyncImplObject();
|
SyncImplObject();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGHandInterpolator.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGSenseGloveHandProfileImpl.h"
|
#include "SGCoreImpl/SGSenseGloveHandProfileImpl.h"
|
||||||
#include "SGInterop/SGIC_ESGFingerSolver.h"
|
#include "SGInterop/SGIC_ESGFingerSolver.h"
|
||||||
@@ -142,11 +143,11 @@ FVector USGSenseGloveHandProfile::GetDefaultThimbleOffset()
|
|||||||
|
|
||||||
USGSenseGloveHandProfile::USGSenseGloveHandProfile()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveHandProfileImpl OutSenseGloveHandProfileImplContainer;
|
||||||
SGCoreImpl_FSGSenseGloveHandProfileImpl_ctor(&OutSenseGloveHandProfileImplContainer);
|
SGCoreImpl_FSGSenseGloveHandProfileImpl_ctor(&OutSenseGloveHandProfileImplContainer);
|
||||||
@@ -159,11 +160,11 @@ USGSenseGloveHandProfile::USGSenseGloveHandProfile(const bool bRightHanded, cons
|
|||||||
const ESGThumbSolver ThumbSolver, const ESGFingerSolver FingerSolver,
|
const ESGThumbSolver ThumbSolver, const ESGFingerSolver FingerSolver,
|
||||||
const TArray<FVector>& FingerThimbleOffset)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveHandProfileImpl OutSenseGloveHandProfileImplContainer;
|
||||||
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()};
|
||||||
@@ -180,11 +181,11 @@ USGSenseGloveHandProfile::USGSenseGloveHandProfile(const bool bRightHanded, cons
|
|||||||
|
|
||||||
USGSenseGloveHandProfile::USGSenseGloveHandProfile(const FSGSenseGloveHandProfileImpl& SenseGloveHandProfileImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetSenseGloveHandProfileImpl(SenseGloveHandProfileImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion,
|
const FString& HardwareVersion, const int32 FirmwareVersion,
|
||||||
int32 SubFirmwareVersion, bool bRightHanded,
|
const int32 SubFirmwareVersion, const bool bRightHanded,
|
||||||
int32 NumberOfSensors, const FQuat& ImuCorrection,
|
const int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||||
const TArray<FVector>& StartPositions,
|
const TArray<FVector>& StartPositions,
|
||||||
const TArray<FQuat>& StartRotations,
|
const TArray<FQuat>& StartRotations,
|
||||||
const TArray<TArray<FVector>>& GloveLengths,
|
const TArray<TArray<FVector>>& GloveLengths,
|
||||||
@@ -128,9 +128,36 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
|
|||||||
}
|
}
|
||||||
|
|
||||||
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion,
|
const FString& HardwareVersion, const int32 FirmwareVersion,
|
||||||
int32 SubFirmwareVersion, bool bRightHanded,
|
const int32 SubFirmwareVersion, const bool bRightHanded,
|
||||||
int32 NumberOfSensors, const FQuat& ImuCorrection,
|
const int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||||
|
const TArray<FVector>& StartPositions,
|
||||||
|
const TArray<FRotator>& StartRotations,
|
||||||
|
const TArray<TArray<FVector>>& GloveLengths,
|
||||||
|
const TArray<bool>& Functions)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths};
|
||||||
|
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||||
|
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||||
|
&OutSenseGloveInfoImplContainer,
|
||||||
|
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
|
||||||
|
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer,
|
||||||
|
&GloveLengthsContainer, &FunctionsContainer);
|
||||||
|
|
||||||
|
return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl));
|
||||||
|
}
|
||||||
|
|
||||||
|
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
||||||
|
const FString& HardwareVersion, const int32 FirmwareVersion,
|
||||||
|
const int32 SubFirmwareVersion, const bool bRightHanded,
|
||||||
|
const int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||||
const TArray<FVector>& StartPositions,
|
const TArray<FVector>& StartPositions,
|
||||||
const TArray<FQuat>& StartRotations,
|
const TArray<FQuat>& StartRotations,
|
||||||
const TArray<FSGVectorArray>& GloveLengths,
|
const TArray<FSGVectorArray>& GloveLengths,
|
||||||
@@ -143,7 +170,36 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
|
|||||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
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(
|
||||||
|
&OutSenseGloveInfoImplContainer,
|
||||||
|
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
|
||||||
|
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer,
|
||||||
|
&GloveLengthsContainer, &FunctionsContainer);
|
||||||
|
|
||||||
|
return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl));
|
||||||
|
}
|
||||||
|
|
||||||
|
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
|
||||||
|
const FString& HardwareVersion, const int32 FirmwareVersion,
|
||||||
|
const int32 SubFirmwareVersion, const bool bRightHanded,
|
||||||
|
const int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||||
|
const TArray<FVector>& StartPositions,
|
||||||
|
const TArray<FRotator>& StartRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveLengths,
|
||||||
|
const TArray<bool>& Functions)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||||
@@ -183,11 +239,11 @@ USGSenseGloveInfo* USGSenseGloveInfo::Deserialize(UObject* Outer, const FString&
|
|||||||
|
|
||||||
USGSenseGloveInfo::USGSenseGloveInfo()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer);
|
SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer);
|
||||||
@@ -203,11 +259,11 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
|||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
FSGIC_FString DeviceIdContainer{DeviceId};
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
@@ -228,6 +284,38 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGloveInfo::USGSenseGloveInfo(
|
||||||
|
const FString& DeviceId,
|
||||||
|
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
||||||
|
const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||||
|
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 > 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 > 24 ) */
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths};
|
||||||
|
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||||
|
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||||
|
&OutSenseGloveInfoImplContainer,
|
||||||
|
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
|
||||||
|
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer,
|
||||||
|
&GloveLengthsContainer, &FunctionsContainer);
|
||||||
|
|
||||||
|
Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGloveInfo::USGSenseGloveInfo(
|
USGSenseGloveInfo::USGSenseGloveInfo(
|
||||||
const FString& DeviceId,
|
const FString& DeviceId,
|
||||||
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
||||||
@@ -242,7 +330,35 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
|||||||
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
FSGIC_TArray_FQuat StartRotationsContainer{StartRotations};
|
||||||
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
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(
|
||||||
|
&OutSenseGloveInfoImplContainer,
|
||||||
|
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
|
||||||
|
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
|
||||||
|
&StartPositionsContainer, &StartRotationsContainer,
|
||||||
|
&GloveLengthsContainer, &FunctionsContainer);
|
||||||
|
|
||||||
|
Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGSenseGloveInfo::USGSenseGloveInfo(
|
||||||
|
const FString& DeviceId,
|
||||||
|
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
|
||||||
|
const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||||
|
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
|
||||||
|
FSGIC_FString DeviceIdContainer{DeviceId};
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
|
||||||
|
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
|
||||||
|
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_bool FunctionsContainer{Functions};
|
FSGIC_TArray_bool FunctionsContainer{Functions};
|
||||||
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
|
||||||
@@ -258,11 +374,11 @@ USGSenseGloveInfo::USGSenseGloveInfo(
|
|||||||
|
|
||||||
USGSenseGloveInfo::USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetSenseGloveInfoImpl(SenseGloveInfoImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -330,7 +446,7 @@ int32 USGSenseGloveInfo::GetNumberOfSensors() const
|
|||||||
return SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors(&InstanceContainer);
|
return SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors(&InstanceContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGSenseGloveInfo::GetImuCorrection() const
|
FQuat USGSenseGloveInfo::GetImuCorrectionQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
FSGIC_FQuat OutCorrectionContainer;
|
FSGIC_FQuat OutCorrectionContainer;
|
||||||
@@ -338,6 +454,14 @@ FQuat USGSenseGloveInfo::GetImuCorrection() const
|
|||||||
return MoveTemp(OutCorrectionContainer.Quat);
|
return MoveTemp(OutCorrectionContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGSenseGloveInfo::GetImuCorrection() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
|
FSGIC_FQuat OutCorrectionContainer;
|
||||||
|
SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer);
|
||||||
|
return OutCorrectionContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
TArray<FVector> USGSenseGloveInfo::GetStartPositions() const
|
TArray<FVector> USGSenseGloveInfo::GetStartPositions() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
@@ -346,7 +470,7 @@ TArray<FVector> USGSenseGloveInfo::GetStartPositions() const
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FQuat> USGSenseGloveInfo::GetStartRotations() const
|
TArray<FQuat> USGSenseGloveInfo::GetStartRotationsQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
FSGIC_TArray_FQuat OutRotationsContainer;
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
@@ -354,6 +478,14 @@ TArray<FQuat> USGSenseGloveInfo::GetStartRotations() const
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<FRotator> USGSenseGloveInfo::GetStartRotations() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
|
SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> USGSenseGloveInfo::GetGloveLengths() const
|
TArray<TArray<FVector>> USGSenseGloveInfo::GetGloveLengths() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
@@ -381,7 +513,7 @@ FVector USGSenseGloveInfo::GetStartPosition(const ESGFinger Finger) const
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
|
FQuat USGSenseGloveInfo::GetStartRotationQ(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
@@ -392,6 +524,17 @@ FQuat USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
|
|||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
|
||||||
|
{
|
||||||
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
|
SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
TArray<FVector> USGSenseGloveInfo::GetGloveLengths(const ESGFinger Finger) const
|
TArray<FVector> USGSenseGloveInfo::GetGloveLengths(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||||
|
#include "SGCore/SGSenseGloveInfo.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGCoreImpl/SGSenseGlovePoseImpl.h"
|
#include "SGCoreImpl/SGSenseGlovePoseImpl.h"
|
||||||
#include "SGInterop/SGIC_FSGSenseGloveHandProfileImpl.h"
|
#include "SGInterop/SGIC_FSGSenseGloveHandProfileImpl.h"
|
||||||
@@ -115,6 +117,22 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
|
|||||||
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
|
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
|
||||||
|
const TArray<TArray<FVector>>& JointPositions,
|
||||||
|
const TArray<TArray<FRotator>>& JointRotations,
|
||||||
|
const TArray<TArray<FVector>>& GloveAngles)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles};
|
||||||
|
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||||
|
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
|
&JointRotationsContainer, &GloveAnglesContainer);
|
||||||
|
|
||||||
|
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
|
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
|
||||||
const TArray<FSGVectorArray>& JointPositions,
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
const TArray<FSGQuatArray>& JointRotations,
|
const TArray<FSGQuatArray>& JointRotations,
|
||||||
@@ -122,13 +140,35 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
|
|||||||
{
|
{
|
||||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
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,
|
||||||
|
&JointRotationsContainer, &GloveAnglesContainer);
|
||||||
|
|
||||||
|
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
|
||||||
|
}
|
||||||
|
|
||||||
|
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
|
||||||
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
|
const TArray<FSGRotatorArray>& JointRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveAngles)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
|
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||||
};
|
};
|
||||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
@@ -157,11 +197,11 @@ USGSenseGlovePose* USGSenseGlovePose::Deserialize(UObject* Outer, const FString&
|
|||||||
|
|
||||||
USGSenseGlovePose::USGSenseGlovePose()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor(&OutSenseGlovePoseImplContainer);
|
SGCoreImpl_FSGSenseGlovePoseImpl_ctor(&OutSenseGlovePoseImplContainer);
|
||||||
@@ -175,11 +215,11 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
|||||||
const TArray<TArray<FQuat>>& JointRotations,
|
const TArray<TArray<FQuat>>& JointRotations,
|
||||||
const TArray<TArray<FVector>>& GloveAngles)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||||
@@ -193,6 +233,29 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||||
|
const TArray<TArray<FVector>>& JointPositions,
|
||||||
|
const TArray<TArray<FRotator>>& JointRotations,
|
||||||
|
const TArray<TArray<FVector>>& GloveAngles)
|
||||||
|
:
|
||||||
|
#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 > 24 ) */
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles};
|
||||||
|
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||||
|
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
|
&JointRotationsContainer, &GloveAnglesContainer);
|
||||||
|
|
||||||
|
Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||||
const TArray<FSGVectorArray>& JointPositions,
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
const TArray<FSGQuatArray>& JointRotations,
|
const TArray<FSGQuatArray>& JointRotations,
|
||||||
@@ -200,13 +263,36 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
|||||||
{
|
{
|
||||||
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
FSGArrayUtils::FromNestedBPArray<FQuat, FSGQuatArray, &FSGQuatArray::QuatArray>(JointRotations)
|
||||||
};
|
};
|
||||||
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
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,
|
||||||
|
&JointRotationsContainer, &GloveAnglesContainer);
|
||||||
|
|
||||||
|
Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
||||||
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
|
const TArray<FSGRotatorArray>& JointRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveAngles)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
|
||||||
|
FSGIC_TArray_TArray_FVector JointPositionsContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
|
||||||
|
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
|
||||||
|
};
|
||||||
|
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||||
};
|
};
|
||||||
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
|
||||||
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
|
||||||
@@ -218,11 +304,11 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
|
|||||||
|
|
||||||
USGSenseGlovePose::USGSenseGlovePose(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetSenseGlovePoseImpl(SenseGlovePoseImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -258,7 +344,7 @@ TArray<TArray<FVector>> USGSenseGlovePose::GetJointPositions() const
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotations() const
|
TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotationsQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
||||||
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
||||||
@@ -266,6 +352,14 @@ TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotations() const
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<TArray<FRotator>> USGSenseGlovePose::GetJointRotations() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
||||||
|
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
|
||||||
|
SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> USGSenseGlovePose::GetGloveAngles() const
|
TArray<TArray<FVector>> USGSenseGlovePose::GetGloveAngles() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
||||||
@@ -284,7 +378,7 @@ TArray<FVector> USGSenseGlovePose::GetThimblePositions() const
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FQuat> USGSenseGlovePose::GetThimbleRotations() const
|
TArray<FQuat> USGSenseGlovePose::GetThimbleRotationsQ() const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
@@ -294,6 +388,16 @@ TArray<FQuat> USGSenseGlovePose::GetThimbleRotations() const
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<FRotator> USGSenseGlovePose::GetThimbleRotations() const
|
||||||
|
{
|
||||||
|
Pimpl->SyncImplObject();
|
||||||
|
|
||||||
|
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
|
||||||
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
|
SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations(&InstanceContainer, &OutRotationsContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
TArray<FVector> USGSenseGlovePose::GetTotalGloveAngles() const
|
TArray<FVector> USGSenseGlovePose::GetTotalGloveAngles() const
|
||||||
{
|
{
|
||||||
Pimpl->SyncImplObject();
|
Pimpl->SyncImplObject();
|
||||||
|
|||||||
@@ -112,13 +112,26 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
|||||||
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
||||||
|
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
|
||||||
|
const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
|
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
|
||||||
|
|
||||||
|
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
||||||
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
||||||
const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
|
const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||||
};
|
};
|
||||||
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
||||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
@@ -127,6 +140,21 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
|||||||
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
|
||||||
|
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
||||||
|
const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||||
|
};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
|
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
|
||||||
|
|
||||||
|
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGloveSensorData* USGSenseGloveSensorData::Empty(UObject* Outer)
|
USGSenseGloveSensorData* USGSenseGloveSensorData::Empty(UObject* Outer)
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
@@ -159,11 +187,11 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::Deserialize(UObject* Outer, co
|
|||||||
|
|
||||||
USGSenseGloveSensorData::USGSenseGloveSensorData()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor(&OutSenseGloveSensorDataImplContainer);
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor(&OutSenseGloveSensorDataImplContainer);
|
||||||
@@ -175,11 +203,11 @@ USGSenseGloveSensorData::USGSenseGloveSensorData()
|
|||||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles, const FQuat& ImuRotation,
|
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles, const FQuat& ImuRotation,
|
||||||
const int32 ParsedValues, const bool bImuParsed)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
||||||
@@ -191,12 +219,31 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& Se
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 > 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 > 24 ) */
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
|
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
|
||||||
|
|
||||||
|
Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles, const FQuat& ImuRotation,
|
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles, const FQuat& ImuRotation,
|
||||||
const int32 ParsedValues, const bool bImuParsed)
|
const int32 ParsedValues, const bool bImuParsed)
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||||
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||||
};
|
};
|
||||||
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
FSGIC_FQuat ImuRotationContainer{ImuRotation};
|
||||||
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
@@ -206,13 +253,28 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& Se
|
|||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles, const FRotator& ImuRotation,
|
||||||
|
const int32 ParsedValues, const bool bImuParsed)
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
|
||||||
|
FSGIC_TArray_TArray_float SensorAnglesContainer{
|
||||||
|
FSGArrayUtils::FromNestedBPArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
|
||||||
|
};
|
||||||
|
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
|
||||||
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
|
||||||
|
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
|
||||||
|
|
||||||
|
Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl);
|
||||||
|
Pimpl->SyncUProperties();
|
||||||
|
}
|
||||||
|
|
||||||
USGSenseGloveSensorData::USGSenseGloveSensorData(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetSenseGloveSensorDataImpl(SenseGloveSensorDataImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
@@ -242,7 +304,7 @@ TArray<TArray<float>> USGSenseGloveSensorData::GetSensorAngles() const
|
|||||||
return MoveTemp(OutAnglesContainer.Array);
|
return MoveTemp(OutAnglesContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat USGSenseGloveSensorData::GetImuRotation() const
|
FQuat USGSenseGloveSensorData::GetImuRotationQ() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
|
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
@@ -250,6 +312,14 @@ FQuat USGSenseGloveSensorData::GetImuRotation() const
|
|||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator USGSenseGloveSensorData::GetImuRotation() const
|
||||||
|
{
|
||||||
|
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
int32 USGSenseGloveSensorData::GetParsedValues() const
|
int32 USGSenseGloveSensorData::GetParsedValues() const
|
||||||
{
|
{
|
||||||
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
|
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "SGCore/SGSenseGloveVars.h"
|
#include "SGCore/SGSenseGloveVars.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGSenseGloveInfo.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_FQuat.h"
|
#include "SGInterop/SGIC_FQuat.h"
|
||||||
#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h"
|
#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h"
|
||||||
@@ -72,7 +73,7 @@ TArray<FVector> FSGSenseGloveVars::GetStartPositions(const FString& HardwareVers
|
|||||||
return MoveTemp(OutPositionsContainer.Array);
|
return MoveTemp(OutPositionsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FQuat> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded)
|
TArray<FQuat> FSGSenseGloveVars::GetStartRotationsQ(const FString& HardwareVersion, const bool bRightHanded)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_FQuat OutRotationsContainer;
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
@@ -80,6 +81,14 @@ TArray<FQuat> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersio
|
|||||||
return MoveTemp(OutRotationsContainer.Array);
|
return MoveTemp(OutRotationsContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<FRotator> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded)
|
||||||
|
{
|
||||||
|
FSGIC_TArray_FQuat OutRotationsContainer;
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations(&OutRotationsContainer, &HardwareVersionContainer, bRightHanded);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGSenseGloveVars::GetGloveLengths(const FString& HardwareVersion)
|
TArray<TArray<FVector>> FSGSenseGloveVars::GetGloveLengths(const FString& HardwareVersion)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_TArray_FVector OutLengthsContainer;
|
FSGIC_TArray_TArray_FVector OutLengthsContainer;
|
||||||
@@ -91,7 +100,7 @@ TArray<TArray<FVector>> FSGSenseGloveVars::GetGloveLengths(const FString& Hardwa
|
|||||||
/*
|
/*
|
||||||
TArray<FSGVectorArray> FSGSenseGloveVars::GetGloveLengths_BP(const FString& HardwareVersion)
|
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)
|
int32 FSGSenseGloveVars::GetSensors(const FString& HardwareVersion)
|
||||||
@@ -100,8 +109,8 @@ int32 FSGSenseGloveVars::GetSensors(const FString& HardwareVersion)
|
|||||||
return SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors(&HardwareVersionContainer);
|
return SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors(&HardwareVersionContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion, const int32 FirmwareVersion,
|
FQuat FSGSenseGloveVars::GetImuCorrectionQ(const FString& HardwareVersion,
|
||||||
const int32 SubFirmwareVersion)
|
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutCorrectionContainer;
|
FSGIC_FQuat OutCorrectionContainer;
|
||||||
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
@@ -110,8 +119,18 @@ FQuat FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion, const
|
|||||||
return MoveTemp(OutCorrectionContainer.Quat);
|
return MoveTemp(OutCorrectionContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<bool> FSGSenseGloveVars::GetFunctions(const FString& HardwareVersion, const int32 FirmwareVersion,
|
FRotator FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion,
|
||||||
const int32 SubFirmwareVersion)
|
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutCorrectionContainer;
|
||||||
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection(&OutCorrectionContainer,
|
||||||
|
&HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion);
|
||||||
|
return OutCorrectionContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
|
TArray<bool> FSGSenseGloveVars::GetFunctions(const FString& HardwareVersion,
|
||||||
|
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
||||||
{
|
{
|
||||||
FSGIC_TArray_bool OutFunctionsContainer;
|
FSGIC_TArray_bool OutFunctionsContainer;
|
||||||
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
FSGIC_FString HardwareVersionContainer{HardwareVersion};
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ void USGSensorRange::CheckMin(const FVector& CurrentValues, FVector& OutMinValue
|
|||||||
|
|
||||||
USGSensorRange::USGSensorRange()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSensorRangeImpl OutSensorRangeImplContainer;
|
||||||
SGCoreImpl_FSGSensorRangeImpl_ctor(&OutSensorRangeImplContainer);
|
SGCoreImpl_FSGSensorRangeImpl_ctor(&OutSensorRangeImplContainer);
|
||||||
@@ -156,11 +156,11 @@ USGSensorRange::USGSensorRange()
|
|||||||
|
|
||||||
USGSensorRange::USGSensorRange(const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGSensorRangeImpl OutSensorRangeImplContainer;
|
||||||
FSGIC_TArray_FVector MinValuesContainer{MinValues};
|
FSGIC_TArray_FVector MinValuesContainer{MinValues};
|
||||||
@@ -174,11 +174,11 @@ USGSensorRange::USGSensorRange(const TArray<FVector>& MinValues, const TArray<FV
|
|||||||
|
|
||||||
USGSensorRange::USGSensorRange(const FSGSensorRangeImpl& SensorRangeImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetSensorRangeImpl(SensorRangeImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ USGThumperCommand* USGThumperCommand::Off(UObject* Outer)
|
|||||||
|
|
||||||
USGThumperCommand::USGThumperCommand()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGThumperCommandImpl OutThumperCommandImplContainer;
|
||||||
SGCoreImpl_FSGThumperCommandImpl_ctor(&OutThumperCommandImplContainer);
|
SGCoreImpl_FSGThumperCommandImpl_ctor(&OutThumperCommandImplContainer);
|
||||||
@@ -122,11 +122,11 @@ USGThumperCommand::USGThumperCommand()
|
|||||||
|
|
||||||
USGThumperCommand::USGThumperCommand(const int32 Magnitude)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_FSGThumperCommandImpl OutThumperCommandImplContainer;
|
||||||
SGCoreImpl_FSGThumperCommandImpl_ctor_Magnitude(&OutThumperCommandImplContainer, Magnitude);
|
SGCoreImpl_FSGThumperCommandImpl_ctor_Magnitude(&OutThumperCommandImplContainer, Magnitude);
|
||||||
@@ -137,11 +137,11 @@ USGThumperCommand::USGThumperCommand(const int32 Magnitude)
|
|||||||
|
|
||||||
USGThumperCommand::USGThumperCommand(const FSGThumperCommandImpl& ThumperCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetThumperCommandImpl(ThumperCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "SGFingerCommandImplCast.h"
|
#include "SGFingerCommandImplCast.h"
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGBuzzCommand.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_ESGFinger.h"
|
#include "SGInterop/SGIC_ESGFinger.h"
|
||||||
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
#include "SGInterop/SGIC_FSGBuzzCommandImpl.h"
|
||||||
@@ -132,11 +133,11 @@ USGTimedBuzzCommand* USGTimedBuzzCommand::NewTimedBuzzCommand(
|
|||||||
|
|
||||||
USGTimedBuzzCommand::USGTimedBuzzCommand()
|
USGTimedBuzzCommand::USGTimedBuzzCommand()
|
||||||
: USGBuzzCommand(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
FSGIC_TSharedPtr_FSGTimedBuzzCommandImpl OutTimedBuzzCommandImplContainer;
|
||||||
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_MakeShared(&OutTimedBuzzCommandImplContainer);
|
SGCoreImpl_FSGTimedBuzzCommandImpl_ctor_MakeShared(&OutTimedBuzzCommandImplContainer);
|
||||||
@@ -148,11 +149,11 @@ USGTimedBuzzCommand::USGTimedBuzzCommand()
|
|||||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const ESGFinger Finger, const int32 Magnitude,
|
USGTimedBuzzCommand::USGTimedBuzzCommand(const ESGFinger Finger, const int32 Magnitude,
|
||||||
const float DurationSeconds, const float StartTimeSeconds)
|
const float DurationSeconds, const float StartTimeSeconds)
|
||||||
: USGBuzzCommand(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_ESGFinger FingerContainer{Finger};
|
FSGIC_ESGFinger FingerContainer{Finger};
|
||||||
@@ -166,11 +167,11 @@ USGTimedBuzzCommand::USGTimedBuzzCommand(const ESGFinger Finger, const int32 Mag
|
|||||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand,
|
USGTimedBuzzCommand::USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand,
|
||||||
const float DurationSeconds, const float StartTimeSeconds)
|
const float DurationSeconds, const float StartTimeSeconds)
|
||||||
: USGBuzzCommand(),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_TSharedPtr_FSGTimedBuzzCommandImpl OutSharedPtrContainer;
|
||||||
FSGIC_FSGBuzzCommandImpl BaseCommandContainer{BaseCommand->ToBuzzCommandImpl().Get()};
|
FSGIC_FSGBuzzCommandImpl BaseCommandContainer{BaseCommand->ToBuzzCommandImpl().Get()};
|
||||||
@@ -183,22 +184,22 @@ USGTimedBuzzCommand::USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand,
|
|||||||
|
|
||||||
USGTimedBuzzCommand::USGTimedBuzzCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
USGTimedBuzzCommand::USGTimedBuzzCommand(const FSGTimedBuzzCommandImpl& TimedBuzzCommandImpl)
|
||||||
: USGBuzzCommand(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
USGTimedBuzzCommand::USGTimedBuzzCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
USGTimedBuzzCommand::USGTimedBuzzCommand(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl)
|
||||||
: USGBuzzCommand(MoveTemp(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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();
|
Pimpl->SyncUProperties();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "Runtime/Launch/Resources/Version.h"
|
#include "Runtime/Launch/Resources/Version.h"
|
||||||
|
|
||||||
|
#include "SGCore/SGThumperCommand.h"
|
||||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||||
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
|
#include "SGInterop/SGIC_FSGThumperCommandImpl.h"
|
||||||
#include "SGInterop/SGIC_FSGTimedThumpCommandImpl.h"
|
#include "SGInterop/SGIC_FSGTimedThumpCommandImpl.h"
|
||||||
@@ -117,11 +118,11 @@ USGTimedThumpCommand* USGTimedThumpCommand::NewTimedThumpCommand(
|
|||||||
|
|
||||||
USGTimedThumpCommand::USGTimedThumpCommand()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||||
SGCoreImpl_FSGTimedThumpCommandImpl_ctor(&OutTimedThumpCommandImplContainer);
|
SGCoreImpl_FSGTimedThumpCommandImpl_ctor(&OutTimedThumpCommandImplContainer);
|
||||||
@@ -133,11 +134,11 @@ USGTimedThumpCommand::USGTimedThumpCommand()
|
|||||||
USGTimedThumpCommand::USGTimedThumpCommand(const int32 Magnitude,
|
USGTimedThumpCommand::USGTimedThumpCommand(const int32 Magnitude,
|
||||||
const float DurationSeconds, const float StartTimeSeconds)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||||
SGCoreImpl_FSGTimedThumpCommandImpl_ctor_Magnitude_DurationSeconds_StartTimeSeconds(
|
SGCoreImpl_FSGTimedThumpCommandImpl_ctor_Magnitude_DurationSeconds_StartTimeSeconds(
|
||||||
@@ -150,11 +151,11 @@ USGTimedThumpCommand::USGTimedThumpCommand(const int32 Magnitude,
|
|||||||
USGTimedThumpCommand::USGTimedThumpCommand(const USGThumperCommand* BaseCommand,
|
USGTimedThumpCommand::USGTimedThumpCommand(const USGThumperCommand* BaseCommand,
|
||||||
const float DurationSeconds, const float StartTimeSeconds)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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_FSGTimedThumpCommandImpl OutTimedThumpCommandImplContainer;
|
||||||
FSGIC_FSGThumperCommandImpl BaseCommandContainer{BaseCommand->ToThumperCommandImpl()};
|
FSGIC_FSGThumperCommandImpl BaseCommandContainer{BaseCommand->ToThumperCommandImpl()};
|
||||||
@@ -167,11 +168,11 @@ USGTimedThumpCommand::USGTimedThumpCommand(const USGThumperCommand* BaseCommand,
|
|||||||
|
|
||||||
USGTimedThumpCommand::USGTimedThumpCommand(const FSGTimedThumpCommandImpl& TimedThumpCommandImpl)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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);
|
SetTimedThumpCommandImpl(TimedThumpCommandImpl);
|
||||||
Pimpl->SyncUProperties();
|
Pimpl->SyncUProperties();
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#include "SGInterop/SGIC_FVector.h"
|
#include "SGInterop/SGIC_FVector.h"
|
||||||
#include "SGInterop/SGIC_TArray_FQuat.h"
|
#include "SGInterop/SGIC_TArray_FQuat.h"
|
||||||
#include "SGInterop/SGIC_TArray_FVector.h"
|
#include "SGInterop/SGIC_TArray_FVector.h"
|
||||||
|
#include "SGUtils/SGArrayUtils.h"
|
||||||
|
|
||||||
void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation,
|
void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation,
|
||||||
const FVector& PositionOffset, const FQuat& RotationOffset,
|
const FVector& PositionOffset, const FQuat& RotationOffset,
|
||||||
@@ -64,6 +65,26 @@ void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat&
|
|||||||
OutNewRotation = MoveTemp(OutNewRotationContainer.Quat);
|
OutNewRotation = MoveTemp(OutNewRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FRotator& TrackedRotation,
|
||||||
|
const FVector& PositionOffset, const FRotator& RotationOffset,
|
||||||
|
FVector& OutNewPosition, FRotator& OutNewRotation)
|
||||||
|
{
|
||||||
|
FSGIC_FVector TrackedPositionContainer{TrackedPosition};
|
||||||
|
FSGIC_FQuat TrackedRotationContainer{TrackedRotation.Quaternion()};
|
||||||
|
FSGIC_FVector PositionOffsetContainer{PositionOffset};
|
||||||
|
FSGIC_FQuat RotationOffsetContainer{RotationOffset.Quaternion()};
|
||||||
|
FSGIC_FVector OutNewPositionContainer;
|
||||||
|
FSGIC_FQuat OutNewRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGTrackingImpl_CalculateLocation(
|
||||||
|
&TrackedPositionContainer, &TrackedRotationContainer,
|
||||||
|
&PositionOffsetContainer, &RotationOffsetContainer,
|
||||||
|
&OutNewPositionContainer, &OutNewRotationContainer);
|
||||||
|
|
||||||
|
OutNewPosition = MoveTemp(OutNewPositionContainer.Vector);
|
||||||
|
OutNewRotation = OutNewRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
TArray<FVector> FSGTracking::GetSenseGloveFingerToGlovePositionOrigin()
|
TArray<FVector> FSGTracking::GetSenseGloveFingerToGlovePositionOrigin()
|
||||||
{
|
{
|
||||||
FSGIC_TArray_FVector OutOriginContainer;
|
FSGIC_TArray_FVector OutOriginContainer;
|
||||||
@@ -71,13 +92,20 @@ TArray<FVector> FSGTracking::GetSenseGloveFingerToGlovePositionOrigin()
|
|||||||
return MoveTemp(OutOriginContainer.Array);
|
return MoveTemp(OutOriginContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FQuat> FSGTracking::GetSenseGloveFingerToGloveRotationOrigin()
|
TArray<FQuat> FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ()
|
||||||
{
|
{
|
||||||
FSGIC_TArray_FQuat OutOriginContainer;
|
FSGIC_TArray_FQuat OutOriginContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer);
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer);
|
||||||
return MoveTemp(OutOriginContainer.Array);
|
return MoveTemp(OutOriginContainer.Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TArray<FRotator> FSGTracking::GetSenseGloveFingerToGloveRotationOrigin()
|
||||||
|
{
|
||||||
|
FSGIC_TArray_FQuat OutOriginContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer);
|
||||||
|
return FSGArrayUtils::QuatsToRotators(OutOriginContainer.Array);
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetSenseGloveWristPositionOffset()
|
FVector FSGTracking::GetSenseGloveWristPositionOffset()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutOffsetContainer;
|
FSGIC_FVector OutOffsetContainer;
|
||||||
@@ -85,13 +113,20 @@ FVector FSGTracking::GetSenseGloveWristPositionOffset()
|
|||||||
return MoveTemp(OutOffsetContainer.Vector);
|
return MoveTemp(OutOffsetContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetSenseGloveWristRotationOffset()
|
FQuat FSGTracking::GetSenseGloveWristRotationOffsetQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutOffsetContainer;
|
FSGIC_FQuat OutOffsetContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer);
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer);
|
||||||
return MoveTemp(OutOffsetContainer.Quat);
|
return MoveTemp(OutOffsetContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetSenseGloveWristRotationOffset()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutOffsetContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer);
|
||||||
|
return OutOffsetContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
|
void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
|
||||||
FVector& OutIPosition, FQuat& OutIRotation)
|
FVector& OutIPosition, FQuat& OutIRotation)
|
||||||
{
|
{
|
||||||
@@ -106,6 +141,20 @@ void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFin
|
|||||||
OutIRotation = MoveTemp(OutIRotationContainer.Quat);
|
OutIRotation = MoveTemp(OutIRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
|
||||||
|
FVector& OutIPosition, FRotator& OutIRotation)
|
||||||
|
{
|
||||||
|
FSGIC_ESGFinger ToFingerContainer{ToFinger};
|
||||||
|
FSGIC_FVector OutIPositionContainer;
|
||||||
|
FSGIC_FQuat OutIRotationContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset(bRightHanded, &ToFingerContainer,
|
||||||
|
&OutIPositionContainer, &OutIRotationContainer);
|
||||||
|
|
||||||
|
OutIPosition = MoveTemp(OutIPositionContainer.Vector);
|
||||||
|
OutIRotation = OutIRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
||||||
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||||
{
|
{
|
||||||
@@ -121,6 +170,21 @@ void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHar
|
|||||||
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
||||||
|
FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||||
|
{
|
||||||
|
FSGIC_ESGPositionalTrackingHardware HardwareContainer;
|
||||||
|
FSGIC_FVector OutPositionOffsetContainer;
|
||||||
|
FSGIC_FQuat OutRotationOffsetContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset(&HardwareContainer, bRightHanded,
|
||||||
|
&OutPositionOffsetContainer,
|
||||||
|
&OutRotationOffsetContainer);
|
||||||
|
|
||||||
|
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
|
||||||
|
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetSenseGloveViveToAttachPosition()
|
FVector FSGTracking::GetSenseGloveViveToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -128,13 +192,20 @@ FVector FSGTracking::GetSenseGloveViveToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetSenseGloveViveToAttachRotation()
|
FQuat FSGTracking::GetSenseGloveViveToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetSenseGloveViveToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition()
|
FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -142,13 +213,20 @@ FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetSenseGloveOculusTouchToAttachRotation()
|
FQuat FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetSenseGloveOculusTouchToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetNovaToWristPositionOffset()
|
FVector FSGTracking::GetNovaToWristPositionOffset()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutOffsetContainer;
|
FSGIC_FVector OutOffsetContainer;
|
||||||
@@ -156,13 +234,20 @@ FVector FSGTracking::GetNovaToWristPositionOffset()
|
|||||||
return MoveTemp(OutOffsetContainer.Vector);
|
return MoveTemp(OutOffsetContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetNovaToWristRotationOffset()
|
FQuat FSGTracking::GetNovaToWristRotationOffsetQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutOffsetContainer;
|
FSGIC_FQuat OutOffsetContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer);
|
SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer);
|
||||||
return MoveTemp(OutOffsetContainer.Quat);
|
return MoveTemp(OutOffsetContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetNovaToWristRotationOffset()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutOffsetContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer);
|
||||||
|
return OutOffsetContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionOffsetContainer;
|
FSGIC_FVector OutPositionOffsetContainer;
|
||||||
@@ -175,6 +260,19 @@ void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutP
|
|||||||
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded,
|
||||||
|
FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||||
|
{
|
||||||
|
FSGIC_FVector OutPositionOffsetContainer;
|
||||||
|
FSGIC_FQuat OutRotationOffsetContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset(bRightHanded,
|
||||||
|
&OutPositionOffsetContainer, &OutRotationOffsetContainer);
|
||||||
|
|
||||||
|
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
|
||||||
|
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetRightNovaViveToAttachPosition()
|
FVector FSGTracking::GetRightNovaViveToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -182,13 +280,20 @@ FVector FSGTracking::GetRightNovaViveToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetRightNovaViveToAttachRotation()
|
FQuat FSGTracking::GetRightNovaViveToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetRightNovaViveToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetLeftNovaViveToAttachPosition()
|
FVector FSGTracking::GetLeftNovaViveToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -196,13 +301,20 @@ FVector FSGTracking::GetLeftNovaViveToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetLeftNovaViveToAttachRotation()
|
FQuat FSGTracking::GetLeftNovaViveToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetLeftNovaViveToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetRightNovaQuest2ToAttachPosition()
|
FVector FSGTracking::GetRightNovaQuest2ToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -210,13 +322,20 @@ FVector FSGTracking::GetRightNovaQuest2ToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetRightNovaQuest2ToAttachRotation()
|
FQuat FSGTracking::GetRightNovaQuest2ToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetRightNovaQuest2ToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition()
|
FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -224,13 +343,20 @@ FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetLeftNovaQuest2ToAttachRotation()
|
FQuat FSGTracking::GetLeftNovaQuest2ToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetLeftNovaQuest2ToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FVector FSGTracking::GetRightNovaPico2ToAttachPosition()
|
FVector FSGTracking::GetRightNovaPico2ToAttachPosition()
|
||||||
{
|
{
|
||||||
FSGIC_FVector OutPositionContainer;
|
FSGIC_FVector OutPositionContainer;
|
||||||
@@ -238,20 +364,34 @@ FVector FSGTracking::GetRightNovaPico2ToAttachPosition()
|
|||||||
return MoveTemp(OutPositionContainer.Vector);
|
return MoveTemp(OutPositionContainer.Vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetRightNovaPico2ToAttachRotation()
|
FQuat FSGTracking::GetRightNovaPico2ToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
FQuat FSGTracking::GetLeftNovaPico2ToAttachRotation()
|
FRotator FSGTracking::GetRightNovaPico2ToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
|
FQuat FSGTracking::GetLeftNovaPico2ToAttachRotationQ()
|
||||||
{
|
{
|
||||||
FSGIC_FQuat OutRotationContainer;
|
FSGIC_FQuat OutRotationContainer;
|
||||||
SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer);
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer);
|
||||||
return MoveTemp(OutRotationContainer.Quat);
|
return MoveTemp(OutRotationContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FRotator FSGTracking::GetLeftNovaPico2ToAttachRotation()
|
||||||
|
{
|
||||||
|
FSGIC_FQuat OutRotationContainer;
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer);
|
||||||
|
return OutRotationContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
||||||
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||||
{
|
{
|
||||||
@@ -266,6 +406,20 @@ void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware
|
|||||||
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
||||||
|
FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||||
|
{
|
||||||
|
FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware};
|
||||||
|
FSGIC_FVector OutPositionOffsetContainer;
|
||||||
|
FSGIC_FQuat OutRotationOffsetContainer;
|
||||||
|
|
||||||
|
SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset(&HardwareContainer, bRightHanded,
|
||||||
|
&OutPositionOffsetContainer, &OutRotationOffsetContainer);
|
||||||
|
|
||||||
|
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
|
||||||
|
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
|
||||||
|
}
|
||||||
|
|
||||||
FString FSGTracking::ToString(const ESGPositionalTrackingHardware Hardware)
|
FString FSGTracking::ToString(const ESGPositionalTrackingHardware Hardware)
|
||||||
{
|
{
|
||||||
FSGIC_FString OutStringContainer;
|
FSGIC_FString OutStringContainer;
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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"
|
#include "SGAnatomy.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* "Database" of anatomical values, such as joint limits.
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGAnatomy
|
struct SENSEGLOVECORE_API FSGAnatomy
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Total sum of all finger flexion that would be considered "total flexion".
|
||||||
|
*/
|
||||||
static float GetTotalFingerFlexion();
|
static float GetTotalFingerFlexion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total sum of all finger flexion that would be considered "total extension".
|
||||||
|
*/
|
||||||
static float GetTotalFingerExtension();
|
static float GetTotalFingerExtension();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total sum of all thumb flexion that would be considered "total flexion".
|
||||||
|
*/
|
||||||
static float GetTotalThumbFlexion();
|
static float GetTotalThumbFlexion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total sum of all thumb flexion that would be considered "total extension".
|
||||||
|
*/
|
||||||
static float GetTotalThumbExtension();
|
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);
|
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 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);
|
static TArray<TArray<FVector>> GetDefaultHandAngles(bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Hand Angles that would make a flat hand.
|
||||||
|
*/
|
||||||
static TArray<TArray<FVector>> GetFlatHandAngles(bool bRightHanded);
|
static TArray<TArray<FVector>> GetFlatHandAngles(bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get hand angles that would make a thumbs up.
|
||||||
|
*/
|
||||||
static TArray<TArray<FVector>> GetThumbsUpHandAngles(bool bRightHanded);
|
static TArray<TArray<FVector>> GetThumbsUpHandAngles(bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Hand Angles that would make a fist.
|
||||||
|
*/
|
||||||
static TArray<TArray<FVector>> GetFistHandAngles(bool bRightHanded);
|
static TArray<TArray<FVector>> GetFistHandAngles(bool bRightHanded);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,9 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 "SGCore/SGFloatArray.h"
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
|
|
||||||
#include "SGBasicHandModel.generated.h"
|
#include "SGBasicHandModel.generated.h"
|
||||||
|
|
||||||
class FSGBasicHandModelImpl;
|
class FSGBasicHandModelImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents data of a user's hand required for forward kinematics.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGBasicHandModel final : public UObject
|
class SENSEGLOVECORE_API USGBasicHandModel final : public UObject
|
||||||
{
|
{
|
||||||
@@ -62,37 +66,89 @@ public:
|
|||||||
UObject* Outer, const FSGBasicHandModelImpl& BasicHandModelImpl);
|
UObject* Outer, const FSGBasicHandModelImpl& BasicHandModelImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic class constructor.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* NewBasicHandModel(UObject* Outer);
|
static USGBasicHandModel* NewBasicHandModel(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel with no starting rotations.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* NewBasicHandModel(
|
static USGBasicHandModel* NewBasicHandModel(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded, const TArray<TArray<float>>& Lengths, const TArray<FVector>& StartPositions);
|
bool bRightHanded, const TArray<TArray<float>>& Lengths, const TArray<FVector>& StartPositions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel with no starting rotations.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* NewBasicHandModel(
|
static USGBasicHandModel* NewBasicHandModel(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded, const TArray<FSGFloatArray>& Lengths, const TArray<FVector>& StartPositions);
|
bool bRightHanded, const TArray<FSGFloatArray>& Lengths, const TArray<FVector>& StartPositions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* NewBasicHandModel(
|
static USGBasicHandModel* NewBasicHandModel(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
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(
|
static USGBasicHandModel* NewBasicHandModel(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve a default left or right hand model.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* Default(UObject* Outer, bool bRightHanded);
|
static USGBasicHandModel* Default(UObject* Outer, bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a serialized HandModel back into its class representation.
|
||||||
|
*/
|
||||||
static USGBasicHandModel* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGBasicHandModel* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default finger lengths (based on right hand).
|
||||||
|
*
|
||||||
|
* @remarks Any missing fingers are replaced with their respective value.
|
||||||
|
*/
|
||||||
static TArray<TArray<float>> GetBaseFingerLengths();
|
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> 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:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
@@ -106,20 +162,47 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic class constructor.
|
||||||
|
*/
|
||||||
USGBasicHandModel();
|
USGBasicHandModel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel with no starting rotations.
|
||||||
|
*/
|
||||||
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions);
|
const TArray<FVector>& StartPositions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel with no starting rotations.
|
||||||
|
*/
|
||||||
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||||
const TArray<FVector>& StartPositions);
|
const TArray<FVector>& StartPositions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new BasicHandModel.
|
||||||
|
*/
|
||||||
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
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,
|
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
|
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);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -151,48 +234,133 @@ protected:
|
|||||||
FSGBasicHandModelImpl& ToBasicHandModelImpl();
|
FSGBasicHandModelImpl& ToBasicHandModelImpl();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Whether or not this BasicHandModel was created for a left- or right hand. Used for validation.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The length of individual finger phalangers in mm, sorted per finger. Generally 5x3.
|
||||||
|
*/
|
||||||
TArray<TArray<float>> GetFingerLengths() const;
|
TArray<TArray<float>> GetFingerLengths() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the finger lengths of a specific finger in cm.
|
||||||
|
*/
|
||||||
TArray<float> GetFingerLengths(ESGFinger Finger) const;
|
TArray<float> GetFingerLengths(ESGFinger Finger) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the finger lengths of a specific finger in cm.
|
||||||
|
*/
|
||||||
void SetFingerLengths(ESGFinger Finger, const TArray<float>& Lengths);
|
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);
|
void SetFingerLengths(uint8 Finger, const TArray<float>& Lengths);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the finger ratios of all fingers.
|
||||||
|
*/
|
||||||
TArray<TArray<float>> GetFingerRatios() const;
|
TArray<TArray<float>> GetFingerRatios() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the finger ratios of a specific finger.
|
||||||
|
*/
|
||||||
TArray<float> GetFingerRatios(ESGFinger Finger) const;
|
TArray<float> GetFingerRatios(ESGFinger Finger) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starting joint positions relative to the device Origin.
|
||||||
|
*/
|
||||||
TArray<FVector> GetStartJointPositions() const;
|
TArray<FVector> GetStartJointPositions() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetStartJointPosition(ESGFinger Finger, const FVector& Position);
|
void SetStartJointPosition(ESGFinger Finger, const FVector& Position);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetStartJointPosition(uint8 Finger, const FVector& Position);
|
void SetStartJointPosition(uint8 Finger, const FVector& Position);
|
||||||
|
|
||||||
TArray<FQuat> GetStartJointRotations() const;
|
/**
|
||||||
|
* 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;
|
FVector GetJointPosition(ESGFinger Finger) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the start position of a specific finger.
|
||||||
|
*/
|
||||||
void SetJointPosition(const FVector& NewPosition, ESGFinger Finger);
|
void SetJointPosition(const FVector& NewPosition, ESGFinger Finger);
|
||||||
|
|
||||||
FQuat GetJointRotation(ESGFinger Finger) const;
|
/**
|
||||||
|
* 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);
|
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;
|
TArray<float> GetTotalLengths() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the total length of a specific finger, in mm.
|
||||||
|
*/
|
||||||
float GetTotalLength(ESGFinger Finger) const;
|
float GetTotalLength(ESGFinger Finger) const;
|
||||||
|
|
||||||
public:
|
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;
|
TArray<FVector> Get3DLengths(ESGFinger Finger) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Check if this BasicHandModel has the same values as another BasicHandModel.
|
||||||
|
*/
|
||||||
bool Equals(const USGBasicHandModel* BasicHandModel) const;
|
bool Equals(const USGBasicHandModel* BasicHandModel) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert this handModel into a string notation, readable for humans. Does not include starting positions / rotations.
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert this handModel into a string notation, readable for humans. Optionally includes starting positions / rotations.
|
||||||
|
*/
|
||||||
FString ToString(bool bLengthsOnly) const;
|
FString ToString(bool bLengthsOnly) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this HandModel into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
@@ -29,7 +29,10 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 FSGDeviceImpl;
|
||||||
class FSGBetaDeviceImpl;
|
class FSGBetaDeviceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Device that adheres to the SenseGlove communications protocol, but which has no implementation in this API.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGBetaDevice final : public USGDevice
|
class SENSEGLOVECORE_API USGBetaDevice final : public USGDevice
|
||||||
{
|
{
|
||||||
@@ -55,14 +61,24 @@ public:
|
|||||||
|
|
||||||
static USGBetaDevice* NewBetaDevice(UObject* Outer, TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl);
|
static USGBetaDevice* NewBetaDevice(UObject* Outer, TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* The basic class constructor.
|
||||||
|
*/
|
||||||
static USGBetaDevice* NewBetaDevice(UObject* Outer);
|
static USGBetaDevice* NewBetaDevice(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a Beta Device.
|
||||||
|
*/
|
||||||
static USGBetaDevice* NewBetaDevice(
|
static USGBetaDevice* NewBetaDevice(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const FString& ConstantsString, const FString& DeviceId,
|
const FString& ConstantsString, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Deserialize a beta device from its basic constants string. Returns nullptr is unsuccessful.
|
||||||
|
*/
|
||||||
static USGBetaDevice* Parse(UObject* Outer, const FString& String);
|
static USGBetaDevice* Parse(UObject* Outer, const FString& String);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -77,8 +93,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic class constructor.
|
||||||
|
*/
|
||||||
USGBetaDevice();
|
USGBetaDevice();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a Beta Device.
|
||||||
|
*/
|
||||||
USGBetaDevice(const FString& ConstantsString, const FString& DeviceId,
|
USGBetaDevice(const FString& ConstantsString, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||||
|
|
||||||
@@ -118,26 +140,56 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration.
|
||||||
|
*/
|
||||||
virtual ESGDeviceType GetDeviceType() const override;
|
virtual ESGDeviceType GetDeviceType() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the unique identifier of this device.
|
||||||
|
*/
|
||||||
virtual FString GetDeviceId() const override;
|
virtual FString GetDeviceId() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's hardware version.
|
||||||
|
*/
|
||||||
virtual FString GetHardwareVersion() const override;
|
virtual FString GetHardwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's firmware version.
|
||||||
|
*/
|
||||||
virtual int32 GetFirmwareVersion() const override;
|
virtual int32 GetFirmwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's sub-firmware version.
|
||||||
|
*/
|
||||||
virtual int32 GetSubFirmwareVersion() const override;
|
virtual int32 GetSubFirmwareVersion() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve the constants string for additional processing.
|
||||||
|
*/
|
||||||
FString GetConstantsString() const;
|
FString GetConstantsString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a raw sensor string from this Beta Device.
|
||||||
|
*/
|
||||||
FString GetSensorData() const;
|
FString GetSensorData() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the last command retrieved from this Beta Device.
|
||||||
|
*/
|
||||||
FString GetLastCommand() const;
|
FString GetLastCommand() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Send a raw string command to this device.
|
||||||
|
*/
|
||||||
bool SendHaptics(const FString& Command) const;
|
bool SendHaptics(const FString& Command) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a string representation of this device for reporting purposes.
|
||||||
|
*/
|
||||||
virtual FString ToString() const override;
|
virtual FString ToString() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Buzz motor command specific for the Sense Glove.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -40,13 +40,16 @@
|
|||||||
#include "Templates/UniquePtr.h"
|
#include "Templates/UniquePtr.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGFingerCommand.h"
|
#include "SGCore/SGFingerCommand.h"
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGBuzzCommand.generated.h"
|
#include "SGBuzzCommand.generated.h"
|
||||||
|
|
||||||
class FSGBuzzCommandImpl;
|
class FSGBuzzCommandImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A vibration command for the Sense Glove, with levels for each finger.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGBuzzCommand : public USGFingerCommand
|
class SENSEGLOVECORE_API USGBuzzCommand : public USGFingerCommand
|
||||||
{
|
{
|
||||||
@@ -57,15 +60,32 @@ public:
|
|||||||
|
|
||||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl);
|
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, TSharedRef<FSGBuzzCommandImpl> BuzzCommandImpl);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
static USGBuzzCommand* NewBuzzCommand(UObject* Outer);
|
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, 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);
|
static USGBuzzCommand* NewBuzzCommand(UObject* Outer, ESGFinger Finger, int32 BuzzLevel);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* A command that turns off all vibration motors of the Sense Glove.
|
||||||
|
*/
|
||||||
static USGBuzzCommand* Off(UObject* Outer);
|
static USGBuzzCommand* Off(UObject* Outer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -80,9 +100,24 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGBuzzCommand();
|
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);
|
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);
|
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);
|
USGBuzzCommand(ESGFinger Finger, int32 BuzzLevel);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -121,7 +156,13 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy this Buzz Command into a new object.
|
||||||
|
*/
|
||||||
USGBuzzCommand* Copy(UObject* Outer) const;
|
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;
|
USGBuzzCommand* Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,9 @@
|
|||||||
|
|
||||||
class FSGCalibrationDataPointImpl;
|
class FSGCalibrationDataPointImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGCalibrationDataPoint final : public UObject
|
class SENSEGLOVECORE_API USGCalibrationDataPoint final : public UObject
|
||||||
{
|
{
|
||||||
@@ -57,11 +60,17 @@ public:
|
|||||||
UObject* Outer, const FSGCalibrationDataPointImpl& CalibrationDataPointImpl);
|
UObject* Outer, const FSGCalibrationDataPointImpl& CalibrationDataPointImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGCalibrationDataPoint* NewCalibrationDataPoint(UObject* Outer);
|
static USGCalibrationDataPoint* NewCalibrationDataPoint(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new data point.
|
||||||
|
*/
|
||||||
static USGCalibrationDataPoint* NewCalibrationDataPoint(
|
static USGCalibrationDataPoint* NewCalibrationDataPoint(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
int32 CurrentStage,const TArray<FVector>& CalibrationValues);
|
int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
@@ -75,8 +84,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGCalibrationDataPoint();
|
USGCalibrationDataPoint();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new data point.
|
||||||
|
*/
|
||||||
USGCalibrationDataPoint(int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
USGCalibrationDataPoint(int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -104,10 +119,19 @@ public:
|
|||||||
const FSGCalibrationDataPointImpl& ToCalibrationDataPointImpl() const;
|
const FSGCalibrationDataPointImpl& ToCalibrationDataPointImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Actual calibration values.
|
||||||
|
*/
|
||||||
TArray<FVector> GetCalibrationValues() const;
|
TArray<FVector> GetCalibrationValues() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Calibration stage this data point belongs to.
|
||||||
|
*/
|
||||||
int32 GetStage() const;
|
int32 GetStage() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Log Calibration values for storing on disk.
|
||||||
|
*/
|
||||||
FString ToLogData(const FString& Delimiter = "\t") const;
|
FString ToLogData(const FString& Delimiter = "\t") const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,9 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 FSGNovaGloveImpl;
|
||||||
class FSGSenseGloveImpl;
|
class FSGSenseGloveImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(Abstract, BlueprintType)
|
UCLASS(Abstract, BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGDevice : public UObject
|
class SENSEGLOVECORE_API USGDevice : public UObject
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
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 void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static FString ToString(ESGDeviceType DeviceType);
|
static FString ToString(ESGDeviceType DeviceType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -71,6 +82,9 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGDevice();
|
USGDevice();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -200,39 +214,93 @@ protected:
|
|||||||
virtual void SyncUProperties();
|
virtual void SyncUProperties();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Check which DeviceType this class belongs to.
|
||||||
|
*/
|
||||||
virtual ESGDeviceType GetDeviceType() const;
|
virtual ESGDeviceType GetDeviceType() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's unique identifier.
|
||||||
|
*/
|
||||||
virtual FString GetDeviceId() const PURE_VIRTUAL(FSGDevice::GetDeviceId, return FString(););
|
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(););
|
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;);
|
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 int32 GetSubFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
virtual FString GetFirmwareString() const;
|
virtual FString GetFirmwareString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this Device's Serial/Bluetooth address.
|
||||||
|
*/
|
||||||
FString GetAddress() const;
|
FString GetAddress() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this device is currently connected to the system.
|
||||||
|
*/
|
||||||
bool IsConnected() const;
|
bool IsConnected() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the connection type of this Sense Glove.
|
||||||
|
*/
|
||||||
ESGConnectionType GetConnectionType() const;
|
ESGConnectionType GetConnectionType() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the device's Packets per Second Variable.
|
||||||
|
*/
|
||||||
int32 PacketsPerSecondReceived() const;
|
int32 PacketsPerSecondReceived() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the device's Packets per Second Variable.
|
||||||
|
*/
|
||||||
int32 PacketsPerSecondSent() const;
|
int32 PacketsPerSecondSent() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the index of this device within SenseCom.
|
||||||
|
*/
|
||||||
int32 GetDeviceIndex() const;
|
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;
|
virtual bool IsWireless() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this device operates on a battery.
|
||||||
|
*/
|
||||||
virtual bool HasBattery() const;
|
virtual bool HasBattery() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this device is currently charging.
|
||||||
|
*/
|
||||||
virtual bool IsCharging();
|
virtual bool IsCharging();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the device's battery level, as a value between 0 (empty) and 1 (full).
|
||||||
|
*/
|
||||||
virtual bool GetBatteryLevel(float& OutLevel);
|
virtual bool GetBatteryLevel(float& OutLevel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a string representation of this SGDevice, used for debugging.
|
||||||
|
*/
|
||||||
virtual FString ToString() const;
|
virtual FString ToString() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Interface for SenseCom, allows the retrieval of Devices and Data, but only
|
||||||
|
* as.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -46,41 +47,91 @@
|
|||||||
|
|
||||||
class USGDevice;
|
class USGDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for SenseCom, allows the retrieval of Devices and Data.
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGDeviceList
|
struct SENSEGLOVECORE_API FSGDeviceList
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve the number of devices that have been detected by the SenseCom executable.
|
||||||
|
*/
|
||||||
static int32 ActiveDevices();
|
static int32 ActiveDevices();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the SenseCom program is running.
|
||||||
|
*/
|
||||||
static bool SenseCommRunning();
|
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();
|
static void Dispose();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you've accidentally disposed of the list before you meant to.
|
||||||
|
*/
|
||||||
static void Reinitialize();
|
static void Reinitialize();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all Sense Glove Devices connected to this system.
|
||||||
|
*/
|
||||||
static TArray<USGDevice*> GetDevices(UObject* Outer);
|
static TArray<USGDevice*> GetDevices(UObject* Outer);
|
||||||
|
|
||||||
/// TODO
|
/// TODO
|
||||||
// THIS PROBABLY SHOULD BE REMOVED!
|
// THIS PROBABLY SHOULD BE REMOVED!
|
||||||
|
/**
|
||||||
|
* Retrieve a list of SGDevices of a specific class.
|
||||||
|
*/
|
||||||
static TArray<USGDevice*> GetDevices(UObject* Outer, const TSubclassOf<USGDevice>& DeviceType);
|
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);
|
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);
|
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 bool SendHaptics(int32 IpcIndex, const FString& IpcAddress, const FString& Commands);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index);
|
static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve Device Address.
|
||||||
|
*/
|
||||||
static FString GetAddress(int32 IpcIndex, const FString& IpcAddress);
|
static FString GetAddress(int32 IpcIndex, const FString& IpcAddress);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retieve this device's connectionType.
|
||||||
|
*/
|
||||||
static ESGConnectionType GetConnectionType(int32 IpcIndex, const FString& IpcAddress);
|
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);
|
static bool IsConnected(int32 IpcIndex, const FString& IpcAddress);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the device's Packets per Second Variable.
|
||||||
|
*/
|
||||||
static int32 PacketsPerSecondReceived(int32 IpcIndex, const FString& IpcAddress);
|
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);
|
static int32 PacketsPerSecondSent(int32 IpcIndex, const FString& IpcAddress);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
|
||||||
|
|
||||||
#include "SGDeviceModel.generated.h"
|
#include "SGDeviceModel.generated.h"
|
||||||
|
|
||||||
class FSGDeviceModelImpl;
|
class FSGDeviceModelImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class containing the minimum amount of data for device models.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGDeviceModel final : public UObject
|
class SENSEGLOVECORE_API USGDeviceModel final : public UObject
|
||||||
{
|
{
|
||||||
@@ -57,15 +59,27 @@ public:
|
|||||||
UObject* Outer, const FSGDeviceModelImpl& DeviceModelImpl);
|
UObject* Outer, const FSGDeviceModelImpl& DeviceModelImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGDeviceModel* NewDeviceModel(UObject* Outer);
|
static USGDeviceModel* NewDeviceModel(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGDeviceModel* NewDeviceModel(
|
static USGDeviceModel* NewDeviceModel(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||||
|
|
||||||
public:
|
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 TArray<bool> ParseFunctions(int32 Value, int32 Size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -80,8 +94,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor to be used by child classes.
|
||||||
|
*/
|
||||||
USGDeviceModel();
|
USGDeviceModel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGDeviceModel(const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
USGDeviceModel(const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -115,11 +135,23 @@ protected:
|
|||||||
FSGDeviceModelImpl& ToDeviceModelImpl();
|
FSGDeviceModelImpl& ToDeviceModelImpl();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve the Unique identifier of this device.
|
||||||
|
*/
|
||||||
FString GetDeviceId() const;
|
FString GetDeviceId() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the Hardware (sub) version of this Sense Glove Device.
|
||||||
|
*/
|
||||||
FString GetHardwareVersion() const;
|
FString GetHardwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Firmware version running on the device's MicroController. (as v4.12, this is the 4).
|
||||||
|
*/
|
||||||
int32 GetFirmwareVersion() const;
|
int32 GetFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sub firmware version running on the device's microcontroller (as v4.12, this is the 12).
|
||||||
|
*/
|
||||||
int32 GetSubFirmwareVersion() const;
|
int32 GetSubFirmwareVersion() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 FSGForceFeedbackCommandImpl;
|
||||||
class FSGTimedBuzzCommandImpl;
|
class FSGTimedBuzzCommandImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A command that contains values (levels) for five fingers.
|
||||||
|
*/
|
||||||
UCLASS(Abstract, BlueprintType)
|
UCLASS(Abstract, BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGFingerCommand : public UObject
|
class SENSEGLOVECORE_API USGFingerCommand : public UObject
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
@@ -66,8 +69,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGFingerCommand();
|
USGFingerCommand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
explicit USGFingerCommand(const TArray<int32>& InLevels);
|
explicit USGFingerCommand(const TArray<int32>& InLevels);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -159,7 +168,6 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void SetFingerCommandImpl(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
void SetFingerCommandImpl(TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast to underlying type method.
|
* The cast to underlying type method.
|
||||||
@@ -178,13 +186,29 @@ protected:
|
|||||||
virtual void SyncUProperties();
|
virtual void SyncUProperties();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
TArray<int32> GetLevels() const;
|
TArray<int32> GetLevels() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
int32 GetLevel(int32 Finger) const;
|
int32 GetLevel(int32 Finger) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetLevel(int32 Finger, int32 Value);
|
void SetLevel(int32 Finger, int32 Value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this command contains the same values as another.
|
||||||
|
*/
|
||||||
bool Equals(const USGFingerCommand* FingerCommand) const;
|
bool Equals(const USGFingerCommand* FingerCommand) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this finger command.
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* A command for five fingers that can be sent to a Sense Glove device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -47,6 +47,9 @@
|
|||||||
|
|
||||||
class FSGForceFeedbackCommandImpl;
|
class FSGForceFeedbackCommandImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Force-Feedback command for the Sense Glove, with levels for each finger.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGForceFeedbackCommand final : public USGFingerCommand
|
class SENSEGLOVECORE_API USGForceFeedbackCommand final : public USGFingerCommand
|
||||||
{
|
{
|
||||||
@@ -59,18 +62,34 @@ public:
|
|||||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||||
UObject* Outer, TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl);
|
UObject* Outer, TSharedRef<FSGForceFeedbackCommandImpl> ForceFeedbackCommandImpl);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for internal initialization.
|
||||||
|
*/
|
||||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(UObject* Outer);
|
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(
|
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||||
UObject* Outer, const TArray<int32>& ForceFeedbackLevels);
|
UObject* Outer, const TArray<int32>& ForceFeedbackLevels);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Force-Feedback Command, with levels for each finger.
|
||||||
|
*/
|
||||||
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||||
UObject* Outer, int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
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(
|
static USGForceFeedbackCommand* NewForceFeedbackCommand(
|
||||||
UObject* Outer, ESGFinger Finger, int32 BuzzLevel);
|
UObject* Outer, ESGFinger Finger, int32 BuzzLevel);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* A command that turns off all force feedback on the Sense Glove.
|
||||||
|
*/
|
||||||
static USGForceFeedbackCommand* Off(UObject* Outer);
|
static USGForceFeedbackCommand* Off(UObject* Outer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -85,9 +104,24 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for internal initialization.
|
||||||
|
*/
|
||||||
USGForceFeedbackCommand();
|
USGForceFeedbackCommand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Force-Feedback Command, with levels for each finger stored in an int[5] array.
|
||||||
|
*/
|
||||||
explicit USGForceFeedbackCommand(const TArray<int32>& ForceFeedbackLevels);
|
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);
|
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);
|
USGForceFeedbackCommand(ESGFinger Finger, int32 BuzzLevel);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -126,7 +160,13 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy this ForceFeedback Command into a new object.
|
||||||
|
*/
|
||||||
USGForceFeedbackCommand* Copy(UObject* Outer) const;
|
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;
|
USGForceFeedbackCommand* Merge(UObject* Outer, const USGForceFeedbackCommand* ForceFeedbackCommand) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGInterpolationSet.h"
|
|
||||||
#include "SGCore/SGInterpolationSetArray.h"
|
#include "SGCore/SGInterpolationSetArray.h"
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
|
|
||||||
#include "SGHandInterpolator.generated.h"
|
#include "SGHandInterpolator.generated.h"
|
||||||
|
|
||||||
class FSGHandInterpolatorImpl;
|
class FSGHandInterpolatorImpl;
|
||||||
|
class USGHandInterpolator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains interpolation sets of all joint movements that can be calculated into a HandPose.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHandInterpolator final : public UObject
|
class SENSEGLOVECORE_API USGHandInterpolator final : public UObject
|
||||||
{
|
{
|
||||||
@@ -62,36 +65,80 @@ public:
|
|||||||
UObject* Outer, const FSGHandInterpolatorImpl& HandInterpolatorImpl);
|
UObject* Outer, const FSGHandInterpolatorImpl& HandInterpolatorImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
static USGHandInterpolator* NewHandInterpolator(UObject* Outer);
|
static USGHandInterpolator* NewHandInterpolator(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator without a starting rotation.
|
||||||
|
*/
|
||||||
static USGHandInterpolator* NewHandInterpolator(
|
static USGHandInterpolator* NewHandInterpolator(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator without a starting rotation.
|
||||||
|
*/
|
||||||
static USGHandInterpolator* NewHandInterpolator(
|
static USGHandInterpolator* NewHandInterpolator(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator with a starting rotation.
|
||||||
|
*/
|
||||||
static USGHandInterpolator* NewHandInterpolator(
|
static USGHandInterpolator* NewHandInterpolator(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FQuat& CmcStartRotation);
|
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(
|
static USGHandInterpolator* NewHandInterpolator(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a default instance of a left- or right handed interpolator.
|
||||||
|
*/
|
||||||
static USGHandInterpolator* Default(UObject* Outer, const bool bRightHanded);
|
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);
|
static USGHandInterpolator* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Calculate all angles of a specific finger based on an Interpolator and input angles.
|
||||||
|
*/
|
||||||
static TArray<FVector> InterpolateFingerAngles(ESGFinger Finger, const USGHandInterpolator* Interpolator,
|
static TArray<FVector> InterpolateFingerAngles(ESGFinger Finger, const USGHandInterpolator* Interpolator,
|
||||||
const FVector& TotalGloveAngles);
|
const FVector& TotalGloveAngles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate all angles of the Thumb based on an Interpolator and input angles.
|
||||||
|
*/
|
||||||
static TArray<FVector> InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
|
static TArray<FVector> InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
|
||||||
const FVector& TotalGloveAngles);
|
const FVector& TotalGloveAngles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate all hand angles based on an interpolator and total xyz angles.
|
||||||
|
*/
|
||||||
static TArray<TArray<FVector>> InterpolateHandAngles(const USGHandInterpolator* Interpolator,
|
static TArray<TArray<FVector>> InterpolateHandAngles(const USGHandInterpolator* Interpolator,
|
||||||
const TArray<FVector>& TotalAngles);
|
const TArray<FVector>& TotalAngles);
|
||||||
|
|
||||||
@@ -107,18 +154,45 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGHandInterpolator();
|
USGHandInterpolator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator without a starting rotation.
|
||||||
|
*/
|
||||||
explicit USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
explicit USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator without a starting rotation.
|
||||||
|
*/
|
||||||
explicit USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
explicit USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator without a starting rotation.
|
||||||
|
*/
|
||||||
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
|
||||||
const FQuat& CmcStartRotation);
|
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,
|
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||||
const FQuat& CmcStartRotation);
|
const FQuat& CmcStartRotation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new basic HandInterpolator with a starting rotation.
|
||||||
|
*/
|
||||||
|
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
|
||||||
|
const FRotator& CmcStartRotation);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -144,30 +218,68 @@ public:
|
|||||||
const FSGHandInterpolatorImpl& ToHandInterpolatorImpl() const;
|
const FSGHandInterpolatorImpl& ToHandInterpolatorImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Interpolation sets for each finger. First index indicates which finger, Second index indicates the joint movement.
|
||||||
|
*/
|
||||||
TArray<TArray<USGInterpolationSet*>> GetJointInterpolations(UObject* Outer) const;
|
TArray<TArray<USGInterpolationSet*>> GetJointInterpolations(UObject* Outer) const;
|
||||||
|
|
||||||
FQuat GetCmcStartRotation() const;
|
/**
|
||||||
|
* Starting rotation of the thumb cmc joint.
|
||||||
|
*/
|
||||||
|
FQuat GetCmcStartRotationQ() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starting rotation of the thumb cmc joint.
|
||||||
|
*/
|
||||||
|
FRotator GetCmcStartRotation() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Calculate any finger's movement rotation, using an input value.
|
||||||
|
*/
|
||||||
float CalculateAngle(ESGFinger Finger, int32 Movement, float Value) const;
|
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;
|
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;
|
float CalculateAngle(ESGFinger Finger, ESGThumbMovement Movement, float Value) const;
|
||||||
|
|
||||||
public:
|
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);
|
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,
|
void SetInterpolation(ESGFinger Finger, ESGFingerMovement Movement,
|
||||||
float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
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);
|
void SetInterpolation(ESGThumbMovement Movement, float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an interpolationSet
|
||||||
|
*/
|
||||||
USGInterpolationSet* GetInterpolation(UObject* Outer, int32 Finger, int32 Movement) const;
|
USGInterpolationSet* GetInterpolation(UObject* Outer, int32 Finger, int32 Movement) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Check if this handInterpolator matches another.
|
||||||
|
*/
|
||||||
bool Equals(const USGHandInterpolator* HandInterpolator) const;
|
bool Equals(const USGHandInterpolator* HandInterpolator) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Serialize this HandInterpolator into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Data class containing all variables to draw or analyze a virtual hand
|
||||||
|
* in different formats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -43,15 +44,20 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGBasicHandModel.h"
|
|
||||||
#include "SGCore/SGQuatArray.h"
|
#include "SGCore/SGQuatArray.h"
|
||||||
|
#include "SGCore/SGRotatorArray.h"
|
||||||
#include "SGCore/SGVectorArray.h"
|
#include "SGCore/SGVectorArray.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGHandPose.generated.h"
|
#include "SGHandPose.generated.h"
|
||||||
|
|
||||||
|
class USGBasicHandModel;
|
||||||
class FSGHandPoseImpl;
|
class FSGHandPoseImpl;
|
||||||
|
class USGHandPose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains all variables required to draw or analyze a virtual hand.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHandPose final : public UObject
|
class SENSEGLOVECORE_API USGHandPose final : public UObject
|
||||||
{
|
{
|
||||||
@@ -62,6 +68,9 @@ public:
|
|||||||
UObject* Outer, const FSGHandPoseImpl& HandPoseImpl);
|
UObject* Outer, const FSGHandPoseImpl& HandPoseImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
static USGHandPose* NewHandPose(UObject* Outer);
|
static USGHandPose* NewHandPose(UObject* Outer);
|
||||||
|
|
||||||
static USGHandPose* NewHandPose(
|
static USGHandPose* NewHandPose(
|
||||||
@@ -69,34 +78,87 @@ public:
|
|||||||
bool bRightHanded, const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
bool bRightHanded, const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
||||||
const TArray<TArray<FVector>>& HandAngles);
|
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(
|
static USGHandPose* NewHandPose(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||||
const TArray<FSGVectorArray>& HandAngles);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Deserialize a HandPose back into usable values.
|
||||||
|
*/
|
||||||
static USGHandPose* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGHandPose* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a HandPose based on articulation angles (handAngles).
|
||||||
|
*/
|
||||||
static USGHandPose* FromHandAngles(UObject* Outer,
|
static USGHandPose* FromHandAngles(UObject* Outer,
|
||||||
const TArray<TArray<FVector>>& HandAngles, bool bRightHanded,
|
const TArray<TArray<FVector>>& HandAngles, bool bRightHanded,
|
||||||
const USGBasicHandModel* HandDimensions);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
static USGHandPose* Fist(UObject* Outer, bool bRightHanded);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -111,16 +173,39 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
USGHandPose();
|
USGHandPose();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of HandPose.
|
||||||
|
*/
|
||||||
USGHandPose(bool bRightHanded,
|
USGHandPose(bool bRightHanded,
|
||||||
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
|
||||||
const TArray<TArray<FVector>>& HandAngles);
|
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,
|
USGHandPose(bool bRightHanded,
|
||||||
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
|
||||||
const TArray<FSGVectorArray>& HandAngles);
|
const TArray<FSGVectorArray>& HandAngles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
USGHandPose(bool bRightHanded,
|
||||||
|
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
|
||||||
|
const TArray<FSGVectorArray>& HandAngles);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -146,23 +231,59 @@ public:
|
|||||||
const FSGHandPoseImpl& ToHandPoseImpl() const;
|
const FSGHandPoseImpl& ToHandPoseImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Whether this HandPose was created to be a right- or left hand.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
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;
|
TArray<TArray<FVector>> GetJointPositions() const;
|
||||||
|
|
||||||
TArray<TArray<FQuat>> GetJointRotations() 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;
|
TArray<TArray<FVector>> GetHandAngles() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true of these two hand poses are roughly equal.
|
||||||
|
*/
|
||||||
bool Equals(const USGHandPose* HandPose) const;
|
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;
|
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;
|
TArray<float> GetNormalizedFlexion(bool bClamp01 = true) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
FString ToString(bool bShortFormat = false) const;
|
FString ToString(bool bShortFormat = false) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this HandPose into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* A profile containing all the information required for HapticGloves.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -41,13 +41,15 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
|
||||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
|
||||||
|
|
||||||
#include "SGHandProfile.generated.h"
|
#include "SGHandProfile.generated.h"
|
||||||
|
|
||||||
class FSGHandProfileImpl;
|
class FSGHandProfileImpl;
|
||||||
|
class USGNovaGloveHandProfile;
|
||||||
|
class USGSenseGloveHandProfile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interpolation profiles for a user's hand, compatible with all HapticGloves.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHandProfile final : public UObject
|
class SENSEGLOVECORE_API USGHandProfile final : public UObject
|
||||||
{
|
{
|
||||||
@@ -58,8 +60,14 @@ public:
|
|||||||
UObject* Outer, const FSGHandProfileImpl& HandProfileImpl);
|
UObject* Outer, const FSGHandProfileImpl& HandProfileImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
static USGHandProfile* NewHandProfile(UObject* Outer);
|
static USGHandProfile* NewHandProfile(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a HandProfile.
|
||||||
|
*/
|
||||||
static USGHandProfile* NewHandProfile(
|
static USGHandProfile* NewHandProfile(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
bool bRightHanded,
|
bool bRightHanded,
|
||||||
@@ -67,25 +75,55 @@ public:
|
|||||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Generate a new handProfile for either a left or right hand.
|
||||||
|
*/
|
||||||
static USGHandProfile* Default(UObject* Outer, bool bRightHanded);
|
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);
|
static USGHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns the directory where HandProfiles are being stored. Does not include a '\\' at the end.
|
||||||
|
*/
|
||||||
static FString GetProfileDirectory();
|
static FString GetProfileDirectory();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filename for the left hand profile.
|
||||||
|
*/
|
||||||
static FString GetLeftHandFileName();
|
static FString GetLeftHandFileName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filename for the right hand profile.
|
||||||
|
*/
|
||||||
static FString GetRightHandFileName();
|
static FString GetRightHandFileName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the fileName of the left or right-handed profiles.
|
||||||
|
*/
|
||||||
static FString GetProfileFileName(bool bRightHanded);
|
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);
|
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);
|
static bool StoreProfile(const USGHandProfile* ProfileToStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the Calibration of a specific back to default values.
|
||||||
|
*/
|
||||||
static bool ResetCalibration(bool bRightHanded, bool bOnDisk = true);
|
static bool ResetCalibration(bool bRightHanded, bool bOnDisk = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the Calibration of both hands back to default values.
|
||||||
|
*/
|
||||||
static void ResetCalibration(bool bOnDisk = true);
|
static void ResetCalibration(bool bOnDisk = true);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -100,8 +138,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
USGHandProfile();
|
USGHandProfile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a HandProfile.
|
||||||
|
*/
|
||||||
USGHandProfile(bool bRightHanded,
|
USGHandProfile(bool bRightHanded,
|
||||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||||
@@ -131,17 +175,35 @@ public:
|
|||||||
const FSGHandProfileImpl& ToHandProfileImpl() const;
|
const FSGHandProfileImpl& ToHandProfileImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Whether this profile was created for a left or right hand.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Profile for SenseGloves.
|
||||||
|
*/
|
||||||
USGSenseGloveHandProfile* GetSenseGloveHandProfile(UObject* Outer) const;
|
USGSenseGloveHandProfile* GetSenseGloveHandProfile(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User profile for Nova.
|
||||||
|
*/
|
||||||
USGNovaGloveHandProfile* GetNovaGloveHandProfile(UObject* Outer) const;
|
USGNovaGloveHandProfile* GetNovaGloveHandProfile(UObject* Outer) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
bool Equals(const USGHandProfile* HandProfile) const;
|
bool Equals(const USGHandProfile* HandProfile) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset this profile back to its default values.
|
||||||
|
*/
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 USGBuzzCommand;
|
||||||
class USGForceFeedbackCommand;
|
class USGForceFeedbackCommand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHapticGlove : public USGDevice
|
class SENSEGLOVECORE_API USGHapticGlove : public USGDevice
|
||||||
{
|
{
|
||||||
@@ -69,13 +73,25 @@ protected:
|
|||||||
static USGHapticGlove* NewHapticGlove(UObject* Outer, TSharedRef<FSGHapticGloveImpl> HapticGloveImpl);
|
static USGHapticGlove* NewHapticGlove(UObject* Outer, TSharedRef<FSGHapticGloveImpl> HapticGloveImpl);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGHapticGlove* NewHapticGlove(UObject* Outer);
|
static USGHapticGlove* NewHapticGlove(UObject* Outer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get all Haptic Gloves detected on this system.
|
||||||
|
*/
|
||||||
static TArray<USGHapticGlove*> GetHapticGloves(UObject* Outer);
|
static TArray<USGHapticGlove*> GetHapticGloves(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the first Haptic Glove detected on this system.
|
||||||
|
*/
|
||||||
static bool GetGlove(UObject* Outer, USGHapticGlove*& OutGlove);
|
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);
|
static bool GetGlove(UObject* Outer, bool bRightHanded, USGHapticGlove*& OutGlove);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -90,6 +106,9 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGHapticGlove();
|
USGHapticGlove();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -158,67 +177,174 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the DeviceType enumerator of this device; used to check if its a SenseGlove/Nova/etc.
|
||||||
|
*/
|
||||||
virtual ESGDeviceType GetDeviceType() const override;
|
virtual ESGDeviceType GetDeviceType() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this glove's unique identifier.
|
||||||
|
*/
|
||||||
virtual FString GetDeviceId() const override;
|
virtual FString GetDeviceId() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this glove's hardware (sub) version. "DK1", "DK2", etc.
|
||||||
|
*/
|
||||||
virtual FString GetHardwareVersion() const override;
|
virtual FString GetHardwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's main firmware version. v4.12 returns 4.
|
||||||
|
*/
|
||||||
virtual int32 GetFirmwareVersion() const override;
|
virtual int32 GetFirmwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's sub firmware version. v4.12 returns 12.
|
||||||
|
*/
|
||||||
virtual int32 GetSubFirmwareVersion() const override;
|
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;
|
virtual bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this glove's IMU rotation, if if has any.
|
||||||
|
*/
|
||||||
virtual bool GetImuRotation(FQuat& OutImu);
|
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(
|
virtual bool GetHandPose(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,USGHandPose*& OutHandPose);
|
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);
|
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);
|
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);
|
virtual bool GetHandPose(UObject* Outer, USGHandPose*& OutHandPose);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting.
|
||||||
|
*/
|
||||||
virtual void StopHaptics();
|
virtual void StopHaptics();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void StopVibrations();
|
virtual void StopVibrations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand);
|
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGThumperCommand* ThumperCommand);
|
virtual void SendHaptics(const USGThumperCommand* ThumperCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||||
const USGBuzzCommand* BuzzCommand);
|
const USGBuzzCommand* BuzzCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||||
const USGBuzzCommand* BuzzCommand,
|
const USGBuzzCommand* BuzzCommand,
|
||||||
const USGThumperCommand* ThumperCommand);
|
const USGThumperCommand* ThumperCommand);
|
||||||
|
|
||||||
public:
|
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);
|
virtual bool GetCalibrationValues(TArray<FVector>& OutValues);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset Calibration range for this Device.
|
||||||
|
*/
|
||||||
virtual void ResetCalibrationRange();
|
virtual void ResetCalibrationRange();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates calibration values only.
|
||||||
|
*/
|
||||||
virtual void UpdateCalibrationRange();
|
virtual void UpdateCalibrationRange();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates calibration values only.
|
||||||
|
*/
|
||||||
virtual void UpdateCalibrationRange(const TArray<FVector>& CalibrationValues);
|
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,
|
virtual void GetCalibrationRange(TArray<FVector>& OutMinValues,
|
||||||
TArray<FVector>& OutMaxValues);
|
TArray<FVector>& OutMaxValues);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates Calibration values and applies it to the Profile.
|
||||||
|
*/
|
||||||
virtual void UpdateCalibration(UObject* Outer, USGHandProfile*& OutProfile);
|
virtual void UpdateCalibration(UObject* Outer, USGHandProfile*& OutProfile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply this glove's calibration range to a handProfile.
|
||||||
|
*/
|
||||||
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const;
|
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const;
|
||||||
|
|
||||||
public:
|
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,
|
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const;
|
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,
|
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
|
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/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGSensorRange.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGHapticGloveCalibrationCheck.generated.h"
|
#include "SGHapticGloveCalibrationCheck.generated.h"
|
||||||
|
|
||||||
class FSGHapticGloveCalibrationCheckImpl;
|
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)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHapticGloveCalibrationCheck final : public UObject
|
class SENSEGLOVECORE_API USGHapticGloveCalibrationCheck final : public UObject
|
||||||
{
|
{
|
||||||
@@ -58,32 +61,68 @@ public:
|
|||||||
UObject* Outer, const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl);
|
UObject* Outer, const FSGHapticGloveCalibrationCheckImpl& HapticGloveCalibrationCheckImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The last calibration range can be null, at which point you definitely need calibration.
|
||||||
|
*/
|
||||||
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(UObject* Outer);
|
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The last calibration range can be null, at which point you definitely need calibration.
|
||||||
|
*/
|
||||||
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(
|
static USGHapticGloveCalibrationCheck* NewHapticGloveCalibrationCheck(
|
||||||
UObject* Outer, const USGSensorRange* LastCalibrationRange);
|
UObject* Outer, const USGSensorRange* LastCalibrationRange);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* SenseGlove: How far from the threshold one can be where we would still call it 'the same as before'.
|
||||||
|
*/
|
||||||
static float GetSenseGloveThreshold();
|
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();
|
static float GetNovaGloveThreshold();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SenseGlove: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||||
|
*/
|
||||||
static float GetSenseGloveMinFlexion();
|
static float GetSenseGloveMinFlexion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nova: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||||
|
*/
|
||||||
static float GetNovaGloveMinFlexion();
|
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();
|
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();
|
static float GetNovaGloveMinAbduction();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if this DeviceType requires a calibration check.
|
||||||
|
*/
|
||||||
static bool NeedsCheck(ESGDeviceType DeviceType);
|
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,
|
static int32 OutOfBounds(const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues,
|
||||||
ESGDeviceType DeviceType);
|
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);
|
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,
|
static bool MatchesLast(const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange,
|
||||||
ESGDeviceType DeviceType);
|
ESGDeviceType DeviceType);
|
||||||
|
|
||||||
@@ -99,8 +138,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The last calibration range can be null, at which point you definitely need calibration.
|
||||||
|
*/
|
||||||
USGHapticGloveCalibrationCheck();
|
USGHapticGloveCalibrationCheck();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The last calibration range can be null, at which point you definitely need calibration.
|
||||||
|
*/
|
||||||
explicit USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange);
|
explicit USGHapticGloveCalibrationCheck(const USGSensorRange* LastCalibrationRange);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -128,15 +173,30 @@ public:
|
|||||||
const FSGHapticGloveCalibrationCheckImpl& ToHapticGloveCalibrationCheckImpl() const;
|
const FSGHapticGloveCalibrationCheckImpl& ToHapticGloveCalibrationCheckImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGSensorRange* GetLastSensorRange(UObject* Outer) const;
|
USGSensorRange* GetLastSensorRange(UObject* Outer) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
ESGCalibrationStage GetCalibrationStage() const;
|
ESGCalibrationStage GetCalibrationStage() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this algorithm has determined if calibration is required, or not.
|
||||||
|
*/
|
||||||
bool ReachedConclusion() const;
|
bool ReachedConclusion() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Reset the calibration check. so it may be used again. This does not reset the last range.
|
||||||
|
*/
|
||||||
void Reset();
|
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);
|
void CheckRange(const TArray<FVector>& CurrentValues, float DeltaSeconds, ESGDeviceType DeviceType);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -41,18 +40,21 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.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 "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGHapticGloveCalibrationSequence.generated.h"
|
#include "SGHapticGloveCalibrationSequence.generated.h"
|
||||||
|
|
||||||
class FSGHapticGloveCalibrationSequenceImpl;
|
class FSGHapticGloveCalibrationSequenceImpl;
|
||||||
class FSGHapticGloveQuickCalibrationImpl;
|
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)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHapticGloveCalibrationSequence : public UObject
|
class SENSEGLOVECORE_API USGHapticGloveCalibrationSequence : public UObject
|
||||||
{
|
{
|
||||||
@@ -66,16 +68,28 @@ public:
|
|||||||
UObject* Outer, TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequence);
|
UObject* Outer, TSharedRef<FSGHapticGloveCalibrationSequenceImpl> HapticGloveCalibrationSequence);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(UObject* Outer);
|
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(UObject* Outer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a new instance of a base HapitcGlove Calibration Sequence.
|
||||||
|
*/
|
||||||
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(
|
static USGHapticGloveCalibrationSequence* NewHapticGloveCalibrationSequence(
|
||||||
UObject* Outer, const USGHapticGlove* LinkedGlove);
|
UObject* Outer, const USGHapticGlove* LinkedGlove);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The maximum buffer size for calibration points. Once calibrationPoints exceeds this value, the
|
||||||
|
*/
|
||||||
static int32 GetMaxDataPoints();
|
static int32 GetMaxDataPoints();
|
||||||
|
|
||||||
public:
|
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,
|
static bool CompileProfile(UObject* Outer,
|
||||||
const USGSensorRange* SensorRange, ESGDeviceType ForDevice, bool bRightHanded,
|
const USGSensorRange* SensorRange, ESGDeviceType ForDevice, bool bRightHanded,
|
||||||
USGHandProfile*& OutProfile);
|
USGHandProfile*& OutProfile);
|
||||||
@@ -92,9 +106,15 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGHapticGloveCalibrationSequence();
|
USGHapticGloveCalibrationSequence();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a new instance of a base HapitcGlove Calibration Sequence.
|
||||||
|
*/
|
||||||
explicit USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove);
|
explicit USGHapticGloveCalibrationSequence(const USGHapticGlove* LinkedGlove);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -172,41 +192,96 @@ protected:
|
|||||||
virtual void SyncUProperties();
|
virtual void SyncUProperties();
|
||||||
|
|
||||||
public:
|
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;
|
USGHapticGlove* GetLinkedGlove(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetLinkedGlove(const USGHapticGlove* LinkedGlove);
|
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;
|
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;
|
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;
|
bool IsManuallyCompleted() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a sequence consists of multiple stages, this integer will show you which one is currently active.
|
||||||
|
*/
|
||||||
int32 GetCurrentStage() const;
|
int32 GetCurrentStage() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the amount of calibration points collected so far.
|
||||||
|
*/
|
||||||
SIZE_T GetCalibrationPointsCount() const;
|
SIZE_T GetCalibrationPointsCount() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not this sequence was completed as per its own rules.
|
||||||
|
*/
|
||||||
bool AutoCompleted() const;
|
bool AutoCompleted() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this sequence is marked as 'complete' and can begin compiling a profile.
|
||||||
|
*/
|
||||||
bool Completed() const;
|
bool Completed() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Resets this calibration sequence's data, but not it's LinkedGlove.
|
||||||
|
*/
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void AddDataPoint(const TArray<FVector>& CalibrationPoints);
|
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);
|
void Update(float DeltaSeconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manual confirmation of whatever step we're supposed to making at the moment.
|
||||||
|
*/
|
||||||
void ConfirmCurrentStep();
|
void ConfirmCurrentStep();
|
||||||
|
|
||||||
public:
|
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;
|
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;
|
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;
|
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;
|
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;
|
FString GetCurrentInstruction(const FString& NextStepKey = FString{""}) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ class USGBuzzCommand;
|
|||||||
class USGForceFeedbackCommand;
|
class USGForceFeedbackCommand;
|
||||||
class USGTimedBuzzCommand;
|
class USGTimedBuzzCommand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHapticGloveCommandBuffer final : public UObject
|
class SENSEGLOVECORE_API USGHapticGloveCommandBuffer final : public UObject
|
||||||
{
|
{
|
||||||
@@ -60,13 +63,25 @@ public:
|
|||||||
UObject* Outer, const FSGHapticGloveCommandBufferImpl& HapticGloveCommandBufferImpl);
|
UObject* Outer, const FSGHapticGloveCommandBufferImpl& HapticGloveCommandBufferImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a new HapticsStream for a Haptic Glove.
|
||||||
|
*/
|
||||||
static USGHapticGloveCommandBuffer* NewHapticGloveCommandBuffer(UObject* Outer);
|
static USGHapticGloveCommandBuffer* NewHapticGloveCommandBuffer(UObject* Outer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The base maximum amount of Force-Feedback Commands that can be in a queue.
|
||||||
|
*/
|
||||||
static int32 GetMaxForceFeedbackCommands();
|
static int32 GetMaxForceFeedbackCommands();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base maximum amount of Vibrotactile Commands that can be in a queue.
|
||||||
|
*/
|
||||||
static int32 GetMaxBuzzCommands();
|
static int32 GetMaxBuzzCommands();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base maximum amount of Thumper Commands that can be in a queue.
|
||||||
|
*/
|
||||||
static int32 GetMaxThumpCommands();
|
static int32 GetMaxThumpCommands();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -81,6 +96,9 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGHapticGloveCommandBuffer();
|
USGHapticGloveCommandBuffer();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -108,38 +126,83 @@ public:
|
|||||||
const FSGHapticGloveCommandBufferImpl& ToHapticGloveCommandBufferImpl() const;
|
const FSGHapticGloveCommandBufferImpl& ToHapticGloveCommandBufferImpl() const;
|
||||||
|
|
||||||
public:
|
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;
|
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;
|
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;
|
TArray<USGTimedThumpCommand*> GetThumperCommandsQueue(UObject* Outer) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Clears only the Force-Feedback Queue.
|
||||||
|
*/
|
||||||
void ClearForceFeedbackCommandsQueue();
|
void ClearForceFeedbackCommandsQueue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all vibrations in the queue(s).
|
||||||
|
*/
|
||||||
void ClearVibrations();
|
void ClearVibrations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear all ongoing effects to this stream.
|
||||||
|
*/
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new Force-Feedback command to the queue. Does not actually send it.
|
||||||
|
*/
|
||||||
void AddCommand(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
void AddCommand(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new vibrotactile command to the queue. Does not actually send it.
|
||||||
|
*/
|
||||||
void AddCommand(const USGTimedBuzzCommand* BuzzCommand);
|
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);
|
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);
|
void UpdateTimedCommands(float DeltaSeconds);
|
||||||
|
|
||||||
public:
|
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(
|
USGForceFeedbackCommand* GetTotalForceFeedbackLevels(
|
||||||
UObject* Outer, const USGForceFeedbackCommand* LastForceFeedbackCommand) const;
|
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;
|
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;
|
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;
|
USGThumperCommand* GetTotalThumperLevels(UObject* Outer) const;
|
||||||
|
|
||||||
public:
|
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,
|
void FlushHaptics(UObject* Outer,
|
||||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||||
@@ -147,9 +210,12 @@ public:
|
|||||||
USGThumperCommand*& OutThumperCommand,
|
USGThumperCommand*& OutThumperCommand,
|
||||||
bool bClearForceFeedbackQueue = true);
|
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,
|
void FlushHaptics(UObject* Outer,
|
||||||
float DeltaSeconds,
|
float DeltaSeconds,
|
||||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||||
USGForceFeedbackCommand*& OutForceFeedbackCommand, USGBuzzCommand*& OutBuzzCommand,
|
USGForceFeedbackCommand*& OutForceFeedbackCommand, USGBuzzCommand*& OutBuzzCommand,
|
||||||
USGThumperCommand*& OutThumperCommand);
|
USGThumperCommand*& OutThumperCommand);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* An interface to get calibration to / from disk.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -37,44 +37,89 @@
|
|||||||
|
|
||||||
#include "Containers/UnrealString.h"
|
#include "Containers/UnrealString.h"
|
||||||
|
|
||||||
#include "SGCore/SGHandProfile.h"
|
|
||||||
#include "SGCore/SGSensorRange.h"
|
|
||||||
|
|
||||||
#include "SGHapticGloveHandProfiles.generated.h"
|
#include "SGHapticGloveHandProfiles.generated.h"
|
||||||
|
|
||||||
|
class USGHandProfile;
|
||||||
class USGHapticGlove;
|
class USGHapticGlove;
|
||||||
|
class USGSensorRange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGHapticGloveHandProfiles
|
struct SENSEGLOVECORE_API FSGHapticGloveHandProfiles
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns the directory where our HandProfiles are stored.
|
||||||
|
*/
|
||||||
static FString GetProfileDirectory();
|
static FString GetProfileDirectory();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the directory where our HandProfiles are stored.
|
||||||
|
*/
|
||||||
static void SetProfileDirectory(const FString& Directory);
|
static void SetProfileDirectory(const FString& Directory);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the latest Left Hand Profile from disk.
|
||||||
|
*/
|
||||||
static void GetLeftHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
static void GetLeftHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the newest Left Hand Profile - also stores it on disk.
|
||||||
|
*/
|
||||||
static void SetLeftHandProfile(const USGHandProfile* HandProfile);
|
static void SetLeftHandProfile(const USGHandProfile* HandProfile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the latest Right Hand Profile from disk.
|
||||||
|
*/
|
||||||
static void GetRightHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
static void GetRightHandProfile(UObject* Outer, USGHandProfile*& OutHandProfile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the newest Right Hand Profile - also stores it on disk.
|
||||||
|
*/
|
||||||
static void SetRightHandProfile(const USGHandProfile* HandProfile);
|
static void SetRightHandProfile(const USGHandProfile* HandProfile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a left- or right handed profile.
|
||||||
|
*/
|
||||||
static void GetProfile(UObject* Outer, bool bRightHanded, USGHandProfile*& OutHandProfile);
|
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);
|
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);
|
static void SetProfile(const USGHandProfile* HandProfile, bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restore both profiles back to their default values.
|
||||||
|
*/
|
||||||
static void RestoreDefaults();
|
static void RestoreDefaults();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restore the left- or right hand profiles back to their default values.
|
||||||
|
*/
|
||||||
static void RestoreDefaults(bool bRightHanded);
|
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();
|
static void TryLoadingFromDisk();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the last sensor range of a glove.
|
||||||
|
*/
|
||||||
static bool SaveLastRange(const USGSensorRange* CurrentRange, const USGHapticGlove* ForGlove);
|
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);
|
static bool LoadLastRange(UObject* Outer, const USGHapticGlove* ForGlove, USGSensorRange*& OutLastRange);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -45,6 +45,9 @@
|
|||||||
|
|
||||||
class FSGHapticGloveQuickCalibrationImpl;
|
class FSGHapticGloveQuickCalibrationImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGHapticGloveQuickCalibration final : public USGHapticGloveCalibrationSequence
|
class SENSEGLOVECORE_API USGHapticGloveQuickCalibration final : public USGHapticGloveCalibrationSequence
|
||||||
{
|
{
|
||||||
@@ -57,14 +60,24 @@ public:
|
|||||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
||||||
UObject* Outer, TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibration);
|
UObject* Outer, TSharedRef<FSGHapticGloveQuickCalibrationImpl> HapticGloveQuickCalibration);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(UObject* Outer);
|
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a QuickCalibration for Haptic Gloves.
|
||||||
|
*/
|
||||||
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
static USGHapticGloveQuickCalibration* NewHapticGloveQuickCalibration(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const USGHapticGlove* GloveToCalibrate,
|
const USGHapticGlove* GloveToCalibrate,
|
||||||
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default time in seconds, to end this sequence. 15 seconds is very quick for some people.
|
||||||
|
*/
|
||||||
static float GetDefaultAutoEndTimeout();
|
static float GetDefaultAutoEndTimeout();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -79,8 +92,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGHapticGloveQuickCalibration();
|
USGHapticGloveQuickCalibration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a QuickCalibration for Haptic Gloves.
|
||||||
|
*/
|
||||||
explicit USGHapticGloveQuickCalibration(const USGHapticGlove* GloveToCalibrate,
|
explicit USGHapticGloveQuickCalibration(const USGHapticGlove* GloveToCalibrate,
|
||||||
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
float AutoEndTimeout = GetDefaultAutoEndTimeout());
|
||||||
|
|
||||||
@@ -121,31 +140,70 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Time, in seconds, after which this sequence stops gathering data. Based on the deltaSeconds variable passed in the Update() function.
|
||||||
|
*/
|
||||||
float GetAutoEndTimeout() const;
|
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;
|
int32 GetSmoothingSamples() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The min/max values recorded during this calibration sequence.
|
||||||
|
*/
|
||||||
USGSensorRange* GetSensorRange(UObject* Outer) const;
|
USGSensorRange* GetSensorRange(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A temporary profile to apply the sensorRange to. Used to generate a 'preview' HandPose.
|
||||||
|
*/
|
||||||
USGHandProfile* GetTemporaryProfile(UObject* Outer) const;
|
USGHandProfile* GetTemporaryProfile(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the user has moved enough so that we can animate.
|
||||||
|
*/
|
||||||
bool CanAnimate() const;
|
bool CanAnimate() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* This sequence autocompletes after its autoEndTime has elapsed.
|
||||||
|
*/
|
||||||
bool AutoCompleted() const;
|
bool AutoCompleted() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Resets data points, min/max ranges and profile.
|
||||||
|
*/
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update this calibration sequence with new data. We use deltaSeconds to check for things like stability.
|
||||||
|
*/
|
||||||
void Update(float DeltaSeconds);
|
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);
|
void AddDataPoint(const TArray<FVector>& CalibrationData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* After we confirm the current step, we're basically done.
|
||||||
|
*/
|
||||||
void ConfirmCurrentStep();
|
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;
|
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;
|
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;
|
FString GetCurrentInstruction(const FString& NextStepKey = FString{""}) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Data class containing all variables to map an input value from one range to
|
||||||
|
* another.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -47,6 +48,9 @@
|
|||||||
|
|
||||||
class FSGInterpolationSetImpl;
|
class FSGInterpolationSetImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set of variables to map a value from one range to the next.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGInterpolationSet final : public UObject
|
class SENSEGLOVECORE_API USGInterpolationSet final : public UObject
|
||||||
{
|
{
|
||||||
@@ -57,14 +61,26 @@ public:
|
|||||||
UObject* Outer, const FSGInterpolationSetImpl& InterpolationSetImpl);
|
UObject* Outer, const FSGInterpolationSetImpl& InterpolationSetImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Creates a basic interpolation set, without limits.
|
||||||
|
*/
|
||||||
static USGInterpolationSet* NewInterpolationSet(UObject* Outer);
|
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);
|
static USGInterpolationSet* NewInterpolationSet(UObject* Outer, float From1, float From2, float To1, float To2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new interpolation set with limits.
|
||||||
|
*/
|
||||||
static USGInterpolationSet* NewInterpolationSet(
|
static USGInterpolationSet* NewInterpolationSet(
|
||||||
UObject* Outer, float From1, float From2, float To1, float To2, float Min, float Max);
|
UObject* Outer, float From1, float From2, float To1, float To2, float Min, float Max);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert a string notation of an InterpolationSet into a new class instance.
|
||||||
|
*/
|
||||||
static USGInterpolationSet* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGInterpolationSet* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -79,10 +95,19 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Creates a basic interpolation set, without limits.
|
||||||
|
*/
|
||||||
USGInterpolationSet();
|
USGInterpolationSet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new interpolation set without limits.
|
||||||
|
*/
|
||||||
USGInterpolationSet(float From1, float From2, float To1, float To2);
|
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);
|
USGInterpolationSet(float From1, float From2, float To1, float To2, float Min, float Max);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -110,40 +135,91 @@ public:
|
|||||||
const FSGInterpolationSetImpl& ToInterpolationSetImpl() const;
|
const FSGInterpolationSetImpl& ToInterpolationSetImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* First value of input range.
|
||||||
|
*/
|
||||||
float GetX0() const;
|
float GetX0() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetX0(float X0);
|
void SetX0(float X0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Second value of input range.
|
||||||
|
*/
|
||||||
float GetX1() const;
|
float GetX1() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetX1(float X1);
|
void SetX1(float X1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First value of output range.
|
||||||
|
*/
|
||||||
float GetY0() const;
|
float GetY0() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetY0(float Y0);
|
void SetY0(float Y0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Second value of output range.
|
||||||
|
*/
|
||||||
float GetY1() const;
|
float GetY1() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetY1(float Y1);
|
void SetY1(float Y1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum range of the output value.
|
||||||
|
*/
|
||||||
float GetMin() const;
|
float GetMin() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetMin(float Min);
|
void SetMin(float Min);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum range of the output value.
|
||||||
|
*/
|
||||||
float GetMax() const;
|
float GetMax() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetMax(float Max);
|
void SetMax(float Max);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Calculate an output value in range [x0...x1] to [y0..y1]
|
||||||
|
*/
|
||||||
float Get(float Value, bool bLimit, bool bNormalizeAngle = false) const;
|
float Get(float Value, bool bLimit, bool bNormalizeAngle = false) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if this InterpolationSet has the same values as another set.
|
||||||
|
*/
|
||||||
bool Equals(const USGInterpolationSet* InterpolationSet) const;
|
bool Equals(const USGInterpolationSet* InterpolationSet) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
FString ToString(bool bLimits) const;
|
FString ToString(bool bLimits) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert this InterpolationSet into a string notation so it can be stored on disk.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Contains kinematic formulae and wrappers for Sense Glove mathematics.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -39,23 +39,50 @@
|
|||||||
#include "Math/Quat.h"
|
#include "Math/Quat.h"
|
||||||
#include "Math/Vector.h"
|
#include "Math/Vector.h"
|
||||||
|
|
||||||
#include "SGCore/SGBasicHandModel.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGJointKinematics.generated.h"
|
#include "SGJointKinematics.generated.h"
|
||||||
|
|
||||||
|
class USGBasicHandModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGJointKinematics
|
struct SENSEGLOVECORE_API FSGJointKinematics
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
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(
|
static bool ForwardKinematics(
|
||||||
const FVector& StartPosition, const FQuat& StartRotation,
|
const FVector& StartPosition, const FQuat& StartRotation,
|
||||||
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
|
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
|
||||||
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
|
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(
|
static bool ForwardKinematics(
|
||||||
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
|
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
|
||||||
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
|
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
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Information about the SGCore C++ Library.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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/Quat.h"
|
||||||
#include "Math/Vector.h"
|
#include "Math/Vector.h"
|
||||||
|
|
||||||
#include "SGCore/SGBasicHandModel.h"
|
|
||||||
#include "SGCore/SGHandPose.h"
|
|
||||||
#include "SGCore/SGHandProfile.h"
|
|
||||||
#include "SGCore/SGHapticGlove.h"
|
#include "SGCore/SGHapticGlove.h"
|
||||||
#include "SGCore/SGNovaGloveSensorData.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGNovaGlove.generated.h"
|
#include "SGNovaGlove.generated.h"
|
||||||
@@ -53,8 +50,13 @@
|
|||||||
class FSGNovaGloveImpl;
|
class FSGNovaGloveImpl;
|
||||||
class USGBuzzCommand;
|
class USGBuzzCommand;
|
||||||
class USGForceFeedbackCommand;
|
class USGForceFeedbackCommand;
|
||||||
|
class USGNovaGloveInfo;
|
||||||
|
class USGNovaGloveSensorData;
|
||||||
class USGThumperCommand;
|
class USGThumperCommand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A soft glove with Force- and Vibrotactile Feedback and limited tracking.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGNovaGlove final : public USGHapticGlove
|
class SENSEGLOVECORE_API USGNovaGlove final : public USGHapticGlove
|
||||||
{
|
{
|
||||||
@@ -66,51 +68,113 @@ public:
|
|||||||
static USGNovaGlove* NewNovaGlove(UObject* Outer, TSharedRef<FSGNovaGloveImpl> NovaGloveImpl);
|
static USGNovaGlove* NewNovaGlove(UObject* Outer, TSharedRef<FSGNovaGloveImpl> NovaGloveImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGNovaGlove* NewNovaGlove(UObject* Outer);
|
static USGNovaGlove* NewNovaGlove(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGNovaGlove* NewNovaGlove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo);
|
static USGNovaGlove* NewNovaGlove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Byte indicating a new Nova haptic command.
|
||||||
|
*/
|
||||||
static ANSICHAR GetHapticsByte();
|
static ANSICHAR GetHapticsByte();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum calibration value distance until we apply the range.
|
||||||
|
*/
|
||||||
static FVector GetMinCalibrationRange();
|
static FVector GetMinCalibrationRange();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Calculate a Hand Pose based on a HandMode; sensor data from a Nova, and a UserProfile.
|
||||||
|
*/
|
||||||
static USGHandPose* CalculateHandPose(UObject* Outer,
|
static USGHandPose* CalculateHandPose(UObject* Outer,
|
||||||
const USGBasicHandModel* HandModel,
|
const USGBasicHandModel* HandModel,
|
||||||
const USGNovaGloveSensorData* NovaData,
|
const USGNovaGloveSensorData* NovaData,
|
||||||
const USGNovaGloveHandProfile* Profile);
|
const USGNovaGloveHandProfile* Profile);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Deserializes a Nova from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||||
|
*/
|
||||||
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all Nova's.
|
||||||
|
*/
|
||||||
static TArray<USGNovaGlove*> GetNovaGloves(UObject* Outer);
|
static TArray<USGNovaGlove*> GetNovaGloves(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the first connected Nova there is.
|
||||||
|
*/
|
||||||
static bool GetNovaGlove(UObject* Outer, USGNovaGlove*& OutGlove);
|
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);
|
static bool GetNovaGlove(UObject* Outer, bool bRightHanded, USGNovaGlove*& OutGlove);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||||
|
*/
|
||||||
static TArray<FVector> GetCalibrationValues(const USGNovaGloveSensorData* SensorData);
|
static TArray<FVector> GetCalibrationValues(const USGNovaGloveSensorData* SensorData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static void CalibrateInterpolation(UObject* Outer,
|
static void CalibrateInterpolation(UObject* Outer,
|
||||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||||
USGNovaGloveHandProfile*& OutProfile);
|
USGNovaGloveHandProfile*& OutProfile);
|
||||||
|
|
||||||
public:
|
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,
|
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
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,
|
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Converts a thumper command into bytes that the Nova can understand.
|
||||||
|
*/
|
||||||
static FString ToBytes(const USGThumperCommand* ThumperCommand);
|
static FString ToBytes(const USGThumperCommand* ThumperCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a force-feedback command into bytes that the Nova can understand.
|
||||||
|
*/
|
||||||
static FString ToBytes(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
static FString ToBytes(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a buzz-motor command into bytes that the Nova can understand.
|
||||||
|
*/
|
||||||
static FString ToBytes(const USGBuzzCommand* BuzzCommand);
|
static FString ToBytes(const USGBuzzCommand* BuzzCommand);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -185,68 +249,156 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Return the DeviceType of this Nova.
|
||||||
|
*/
|
||||||
virtual ESGDeviceType GetDeviceType() const override;
|
virtual ESGDeviceType GetDeviceType() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this device's unique identifier.
|
||||||
|
*/
|
||||||
virtual FString GetDeviceId() const override;
|
virtual FString GetDeviceId() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access this device's hardware designation.
|
||||||
|
*/
|
||||||
virtual FString GetHardwareVersion() const override;
|
virtual FString GetHardwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access this device's main firmware version. (ex: v3.2 -> 3).
|
||||||
|
*/
|
||||||
virtual int32 GetFirmwareVersion() const override;
|
virtual int32 GetFirmwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access this device's sub-firmware version. (ex: v3.2 -> 2).
|
||||||
|
*/
|
||||||
virtual int32 GetSubFirmwareVersion() const override;
|
virtual int32 GetSubFirmwareVersion() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if this device operates on a battery.
|
||||||
|
*/
|
||||||
virtual bool HasBattery() const override;
|
virtual bool HasBattery() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this device is currently charging.
|
||||||
|
*/
|
||||||
virtual bool IsCharging() override;
|
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;
|
virtual bool GetBatteryLevel(float& OutBatteryLevel) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the latest Sensor Data from this Sense Glove.
|
||||||
|
*/
|
||||||
bool GetSensorData(UObject* Outer, USGNovaGloveSensorData*& OutSensorData);
|
bool GetSensorData(UObject* Outer, USGNovaGloveSensorData*& OutSensorData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve Nova rotation.
|
||||||
|
*/
|
||||||
virtual bool GetImuRotation(FQuat& OutImu) override;
|
virtual bool GetImuRotation(FQuat& OutImu) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve Nova rotation.
|
||||||
|
*/
|
||||||
|
virtual bool GetImuRotation(FRotator& OutImu) override;
|
||||||
|
|
||||||
/// HACK
|
/// HACK
|
||||||
/// 'FSGNovaGlove::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
|
/// '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;
|
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,
|
bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile,
|
||||||
USGHandPose*& OutHandPose);
|
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,
|
virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,
|
||||||
USGHandPose*& OutHandPose) override;
|
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;
|
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Send all available haptics to a Nova.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||||
const USGBuzzCommand* BuzzCommand,
|
const USGBuzzCommand* BuzzCommand,
|
||||||
const USGThumperCommand* ThumperCommand) override;
|
const USGThumperCommand* ThumperCommand) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override;
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGThumperCommand* ThumperCommand) override;
|
virtual void SendHaptics(const USGThumperCommand* ThumperCommand) override;
|
||||||
|
|
||||||
public:
|
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;
|
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;
|
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;
|
void ApplyCalibration(UObject* Outer, USGNovaGloveHandProfile*& OutProfile) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve the location of the glove origin, based on a reference location.
|
||||||
|
*/
|
||||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
|
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,
|
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a string representation of this device for reporting purposes.
|
||||||
|
*/
|
||||||
virtual FString ToString() const override;
|
virtual FString ToString() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,25 +38,34 @@
|
|||||||
#include "Containers/Array.h"
|
#include "Containers/Array.h"
|
||||||
#include "Math/Vector.h"
|
#include "Math/Vector.h"
|
||||||
|
|
||||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
|
||||||
|
|
||||||
#include "SGNovaGloveCalibration.generated.h"
|
#include "SGNovaGloveCalibration.generated.h"
|
||||||
|
|
||||||
|
class USGNovaGloveHandProfile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGNovaGloveCalibration
|
struct SENSEGLOVECORE_API FSGNovaGloveCalibration
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Apply a glove's default interpolation values to a profile, using the 'default' hand angles from calibration.
|
||||||
|
*/
|
||||||
static void ApplyDefaultCalibrationInterpolationValues(
|
static void ApplyDefaultCalibrationInterpolationValues(
|
||||||
const TArray<FVector>& RetractedValues,
|
const TArray<FVector>& RetractedValues,
|
||||||
const TArray<FVector>& ExtendedValues,
|
const TArray<FVector>& ExtendedValues,
|
||||||
const USGNovaGloveHandProfile* Profile);
|
const USGNovaGloveHandProfile* Profile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply a set of sensor-to-joint-angle interpolations to a nova profile.
|
||||||
|
*/
|
||||||
static void ApplyInterpolationValues(
|
static void ApplyInterpolationValues(
|
||||||
const TArray<FVector>& RetractedValues,
|
const TArray<FVector>& RetractedValues,
|
||||||
const TArray<FVector>& ExtendedValues,
|
const TArray<FVector>& ExtendedValues,
|
||||||
const TArray<TArray<FVector>>& RetractedAngles,
|
const TArray<TArray<FVector>>& RetractedAngles,
|
||||||
const TArray<TArray<FVector>>& ExtendedAngles,
|
const TArray<TArray<FVector>>& ExtendedAngles,
|
||||||
const USGNovaGloveHandProfile* Profile);
|
const USGNovaGloveHandProfile* Profile);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Input for Nova kinematics to calculate a HandPose.
|
||||||
|
* Output of calibration algorithms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -41,13 +42,14 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
|
||||||
#include "SGCore/SGHandInterpolator.h"
|
|
||||||
|
|
||||||
#include "SGNovaGloveHandProfile.generated.h"
|
#include "SGNovaGloveHandProfile.generated.h"
|
||||||
|
|
||||||
class FSGNovaGloveHandProfileImpl;
|
class FSGNovaGloveHandProfileImpl;
|
||||||
|
class USGHandInterpolator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains user-specific data for the Nova to convert sensor data into a hand pose.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGNovaGloveHandProfile final : public UObject
|
class SENSEGLOVECORE_API USGNovaGloveHandProfile final : public UObject
|
||||||
{
|
{
|
||||||
@@ -58,11 +60,28 @@ public:
|
|||||||
UObject* Outer, const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl);
|
UObject* Outer, const FSGNovaGloveHandProfileImpl& NovaGloveHandProfileImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(UObject* Outer);
|
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Nova-Profile.
|
||||||
|
*/
|
||||||
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(
|
static USGNovaGloveHandProfile* NewNovaGloveHandProfile(
|
||||||
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator);
|
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:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
|
|
||||||
@@ -75,8 +94,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
USGNovaGloveHandProfile();
|
USGNovaGloveHandProfile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Nova-Profile.
|
||||||
|
*/
|
||||||
USGNovaGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator);
|
USGNovaGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -104,15 +129,30 @@ public:
|
|||||||
const FSGNovaGloveHandProfileImpl& ToNovaGloveHandProfileImpl() const;
|
const FSGNovaGloveHandProfileImpl& ToNovaGloveHandProfileImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Whether this profile was created for a right- or left hand.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interpolation sets to convert sensor data into a hand pose.
|
||||||
|
*/
|
||||||
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
bool Equals(const USGNovaGloveHandProfile* NovaGloveHandProfile) const;
|
bool Equals(const USGNovaGloveHandProfile* NovaGloveHandProfile) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Contains information on Nova's hardware, extracted from the device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
|
||||||
|
|
||||||
#include "SGNovaGloveInfo.generated.h"
|
#include "SGNovaGloveInfo.generated.h"
|
||||||
|
|
||||||
class FSGNovaGloveInfoImpl;
|
class FSGNovaGloveInfoImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Device information extracted from a Nova Glove.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGNovaGloveInfo final : public UObject
|
class SENSEGLOVECORE_API USGNovaGloveInfo final : public UObject
|
||||||
{
|
{
|
||||||
@@ -59,16 +59,28 @@ public:
|
|||||||
UObject* Outer, const FSGNovaGloveInfoImpl& NovaGloveInfoImpl);
|
UObject* Outer, const FSGNovaGloveInfoImpl& NovaGloveInfoImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
static USGNovaGloveInfo* NewNovaGloveInfo(UObject* Outer);
|
static USGNovaGloveInfo* NewNovaGloveInfo(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a NovaGloveInfo.
|
||||||
|
*/
|
||||||
static USGNovaGloveInfo* NewNovaGloveInfo(
|
static USGNovaGloveInfo* NewNovaGloveInfo(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const FString& DeviceId, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& DeviceId, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Parse an constants string into a NovaGloveInfo class.
|
||||||
|
*/
|
||||||
static bool Parse(UObject* Outer, const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo);
|
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);
|
static USGNovaGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -83,8 +95,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
USGNovaGloveInfo();
|
USGNovaGloveInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a NovaGloveInfo.
|
||||||
|
*/
|
||||||
USGNovaGloveInfo(const FString& DeviceId,
|
USGNovaGloveInfo(const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors);
|
||||||
@@ -120,25 +138,60 @@ protected:
|
|||||||
FSGNovaGloveInfoImpl& ToNovaGloveInfoImpl();
|
FSGNovaGloveInfoImpl& ToNovaGloveInfoImpl();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Unique identifier of this device.
|
||||||
|
*/
|
||||||
FString GetDeviceId() const;
|
FString GetDeviceId() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hardware (sub) version of this Sense Glove Device.
|
||||||
|
*/
|
||||||
FString GetHardwareVersion() const;
|
FString GetHardwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Firmware version running on the device's MicroController. (as v4.12, this is the 4).
|
||||||
|
*/
|
||||||
int32 GetFirmwareVersion() const;
|
int32 GetFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sub firmware version running on the device's microcontroller (as v4.12, this is the .12).
|
||||||
|
*/
|
||||||
int32 GetSubFirmwareVersion() const;
|
int32 GetSubFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if this is a right-handed Nova.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
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;
|
int32 GetNumberOfSensors() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if this GloveInfo contains the same information as another.
|
||||||
|
*/
|
||||||
bool Equals(const USGNovaGloveInfo* NovaGloveInfo) const;
|
bool Equals(const USGNovaGloveInfo* NovaGloveInfo) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a string representation of this Glove Info.
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert this class into a string representation so it can be unpacked later.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Nova SensorData, parsed from rae string representations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -43,12 +43,14 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGNovaGloveInfo.h"
|
|
||||||
|
|
||||||
#include "SGNovaGloveSensorData.generated.h"
|
#include "SGNovaGloveSensorData.generated.h"
|
||||||
|
|
||||||
class FSGNovaGloveSensorDataImpl;
|
class FSGNovaGloveSensorDataImpl;
|
||||||
|
class USGNovaGloveInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sensor Data coming from a Nova, converted into useful values.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGNovaGloveSensorData final : public UObject
|
class SENSEGLOVECORE_API USGNovaGloveSensorData final : public UObject
|
||||||
{
|
{
|
||||||
@@ -59,17 +61,39 @@ public:
|
|||||||
UObject* Outer, const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl);
|
UObject* Outer, const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default constructor for NovaGloveSensorData.
|
||||||
|
*/
|
||||||
static USGNovaGloveSensorData* NewNovaGloveSensorData(UObject* Outer);
|
static USGNovaGloveSensorData* NewNovaGloveSensorData(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a NovaGloveSensorData.
|
||||||
|
*/
|
||||||
static USGNovaGloveSensorData* NewNovaGloveSensorData(
|
static USGNovaGloveSensorData* NewNovaGloveSensorData(
|
||||||
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
|
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
|
||||||
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns a NovaGloveSensorData without any values.
|
||||||
|
*/
|
||||||
static USGNovaGloveSensorData* Empty(UObject* Outer);
|
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);
|
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);
|
static USGNovaGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -84,11 +108,23 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default constructor for NovaGloveSensorData.
|
||||||
|
*/
|
||||||
USGNovaGloveSensorData();
|
USGNovaGloveSensorData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a NovaGloveSensorData.
|
||||||
|
*/
|
||||||
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
|
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
|
||||||
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
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);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -114,23 +150,55 @@ public:
|
|||||||
const FSGNovaGloveSensorDataImpl& ToNovaGloveSensorDataImpl() const;
|
const FSGNovaGloveSensorDataImpl& ToNovaGloveSensorDataImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger.
|
||||||
|
*/
|
||||||
TArray<FVector> GetSensorValues() const;
|
TArray<FVector> GetSensorValues() const;
|
||||||
|
|
||||||
FQuat GetImuRotation() 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;
|
int32 GetParsedValues() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the IMU values were all successfully parsed, or not.
|
||||||
|
*/
|
||||||
bool IsImuParsed() const;
|
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;
|
float GetBatteryLevel() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this NovaGlove is connected to a power source
|
||||||
|
*/
|
||||||
bool IsCharging() const;
|
bool IsCharging() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if this sensor data contains the same values as another.
|
||||||
|
*/
|
||||||
bool Equals(const USGNovaGloveSensorData* NovaGloveSensorData) const;
|
bool Equals(const USGNovaGloveSensorData* NovaGloveSensorData) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a readable string representation of this Sensor Data
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert this sensor data into a string so it can be stored on disk.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* @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 "Math/Rotator.h"
|
||||||
|
|
||||||
|
#include "SGRotatorArray.generated.h"
|
||||||
|
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct SENSEGLOVECORE_API FSGRotatorArray
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY(EditAnywhere, Category="SenseGlove | Core | Nested Arrays", BlueprintReadWrite)
|
||||||
|
TArray<FRotator> RotatorArray;
|
||||||
|
};
|
||||||
@@ -40,21 +40,42 @@
|
|||||||
|
|
||||||
#include "SGSenseCom.generated.h"
|
#include "SGSenseCom.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGSenseCom
|
struct SENSEGLOVECORE_API FSGSenseCom
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Registers current process as the latest SenseCom build.
|
||||||
|
*/
|
||||||
static bool RegisterExe();
|
static bool RegisterExe();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a particular path as the SenseGlove executable location.
|
||||||
|
*/
|
||||||
static bool RegisterExe(const FString& ExePath);
|
static bool RegisterExe(const FString& ExePath);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the location of SenseGlove executable.
|
||||||
|
*/
|
||||||
static bool GetExePath(FString& OutExePath);
|
static bool GetExePath(FString& OutExePath);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if SenseCom scanning is active.
|
||||||
|
*/
|
||||||
static bool ScanningActive();
|
static bool ScanningActive();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the directory of the current process.
|
||||||
|
*/
|
||||||
static bool GetCurrentExeDirectory(FString& OutDirectory);
|
static bool GetCurrentExeDirectory(FString& OutDirectory);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force-starts the SenseCom application if it is active on the system.
|
||||||
|
*/
|
||||||
static bool StartupSenseCom();
|
static bool StartupSenseCom();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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 USGBuzzCommand;
|
||||||
class USGForceFeedbackCommand;
|
class USGForceFeedbackCommand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for the Sense Glove; and exoskeleton Force-Feedback glove.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSenseGlove final : public USGHapticGlove
|
class SENSEGLOVECORE_API USGSenseGlove final : public USGHapticGlove
|
||||||
{
|
{
|
||||||
@@ -67,51 +71,108 @@ public:
|
|||||||
static USGSenseGlove* NewSenseGlove(UObject* Outer, TSharedRef<FSGSenseGloveImpl> SenseGloveImpl);
|
static USGSenseGlove* NewSenseGlove(UObject* Outer, TSharedRef<FSGSenseGloveImpl> SenseGloveImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static USGSenseGlove* NewSenseGlove(UObject* Outer);
|
static USGSenseGlove* NewSenseGlove(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Sense Glove.
|
||||||
|
*/
|
||||||
static USGSenseGlove* NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model);
|
static USGSenseGlove* NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Byte indicating a new Sense Glove haptic command.
|
||||||
|
*/
|
||||||
static ANSICHAR GetHapticsByte();
|
static ANSICHAR GetHapticsByte();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Byte indicating a new Thumper command.
|
||||||
|
*/
|
||||||
static ANSICHAR GetThumperByte();
|
static ANSICHAR GetThumperByte();
|
||||||
|
|
||||||
public:
|
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,
|
static USGSenseGlovePose* CalculateGlovePose(UObject* Outer,
|
||||||
const USGSenseGloveSensorData* SensorData,
|
const USGSenseGloveSensorData* SensorData,
|
||||||
const USGSenseGloveInfo* GloveModel);
|
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,
|
static USGSenseGlovePose* CalculateGlovePose(UObject* Outer,
|
||||||
const TArray<TArray<FVector>>& GloveAngles,
|
const TArray<TArray<FVector>>& GloveAngles,
|
||||||
const USGSenseGloveInfo* GloveModel);
|
const USGSenseGloveInfo* GloveModel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @remarks Use this when you already have a GlovePose.
|
||||||
|
*/
|
||||||
static USGHandPose* CalculateHandPose(UObject* Outer,
|
static USGHandPose* CalculateHandPose(UObject* Outer,
|
||||||
const USGSenseGlovePose* GlovePose,
|
const USGSenseGlovePose* GlovePose,
|
||||||
const USGBasicHandModel* HandModel,
|
const USGBasicHandModel* HandModel,
|
||||||
const USGSenseGloveHandProfile* Profile);
|
const USGSenseGloveHandProfile* Profile);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||||
|
*/
|
||||||
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
static USGDevice* Parse(UObject* Outer, const FString& ConstantsString);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all Sense Gloves connected to this system.
|
||||||
|
*/
|
||||||
static TArray<USGSenseGlove*> GetSenseGloves(UObject* Outer);
|
static TArray<USGSenseGlove*> GetSenseGloves(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the first connected Sense Glove there is.
|
||||||
|
*/
|
||||||
static bool GetSenseGlove(UObject* Outer, USGSenseGlove*& OutGlove);
|
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);
|
static bool GetSenseGlove(UObject* Outer, bool bRightHanded, USGSenseGlove*& OutGlove);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||||
|
*/
|
||||||
static TArray<FVector> GetCalibrationValues(const USGSenseGlovePose* GlovePose);
|
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,
|
static void CalibrateInterpolation(UObject* Outer,
|
||||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||||
bool bRightHanded, USGSenseGloveHandProfile*& OutProfile);
|
bool bRightHanded, USGSenseGloveHandProfile*& OutProfile);
|
||||||
|
|
||||||
public:
|
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,
|
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
bool bRightHanded, ESGFinger MountedOn,
|
bool bRightHanded, ESGFinger MountedOn,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
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,
|
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
bool bRightHanded, ESGFinger MountedOn,
|
bool bRightHanded, ESGFinger MountedOn,
|
||||||
@@ -119,6 +180,16 @@ public:
|
|||||||
const FQuat& GloveWristRotationOffset,
|
const FQuat& GloveWristRotationOffset,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the full wrist location.
|
||||||
|
*/
|
||||||
|
static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||||
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
|
bool bRightHanded, ESGFinger MountedOn,
|
||||||
|
const FVector& GloveWristPositionOffset,
|
||||||
|
const FRotator& GloveWristRotationOffset,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
|
|
||||||
@@ -131,8 +202,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USGSenseGlove();
|
USGSenseGlove();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Sense Glove.
|
||||||
|
*/
|
||||||
explicit USGSenseGlove(const USGSenseGloveInfo& Model);
|
explicit USGSenseGlove(const USGSenseGloveInfo& Model);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -191,80 +268,212 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve this glove's hardware model, which contains its hardware data.
|
||||||
|
*/
|
||||||
USGSenseGloveInfo* GetGloveModel(UObject* Outer) const;
|
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;
|
virtual bool IsRight() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration.
|
||||||
|
*/
|
||||||
virtual ESGDeviceType GetDeviceType() const override;
|
virtual ESGDeviceType GetDeviceType() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this Sense Glove's unique identifier.
|
||||||
|
*/
|
||||||
virtual FString GetDeviceId() const override;
|
virtual FString GetDeviceId() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this glove's hardware (sub) version.
|
||||||
|
*/
|
||||||
virtual FString GetHardwareVersion() const override;
|
virtual FString GetHardwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's firmware version.
|
||||||
|
*/
|
||||||
virtual int32 GetFirmwareVersion() const override;
|
virtual int32 GetFirmwareVersion() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's sub-firmware version.
|
||||||
|
*/
|
||||||
virtual int32 GetSubFirmwareVersion() const override;
|
virtual int32 GetSubFirmwareVersion() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the latest Sensor Data from this Sense Glove.
|
||||||
|
*/
|
||||||
bool GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const;
|
bool GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
virtual bool GetImuRotation(FQuat& OutImu) override;
|
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);
|
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);
|
bool GetGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose);
|
||||||
|
|
||||||
/// HACK
|
/// HACK
|
||||||
/// 'FSGSenseGloveImpl::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
|
/// '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;
|
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,
|
bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile,
|
||||||
USGHandPose*& OutHandPose);
|
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,
|
virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,
|
||||||
USGHandPose*& OutHandPose) override;
|
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;
|
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose) override;
|
||||||
|
|
||||||
public:
|
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;
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Haptic Commands to this Glove.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
virtual void SendHaptics(const USGBuzzCommand* BuzzCommand) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve this device's firmware version.
|
||||||
|
*/
|
||||||
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
virtual void SendHaptics(const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||||
const USGBuzzCommand* BuzzCommand,
|
const USGBuzzCommand* BuzzCommand,
|
||||||
const USGThumperCommand* ThumperCommand) override;
|
const USGThumperCommand* ThumperCommand) override;
|
||||||
|
|
||||||
public:
|
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;
|
virtual bool GetCalibrationValues(TArray<FVector>& OutValues) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the glove's calibration range.
|
||||||
|
*/
|
||||||
virtual void ResetCalibrationRange() override;
|
virtual void ResetCalibrationRange() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply this glove's calibration range to a handProfile.
|
||||||
|
*/
|
||||||
virtual void ApplyCalibration(UObject* Outer, USGHandProfile*& OutProfile) const override;
|
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;
|
void ApplyCalibration(UObject* Outer, USGSenseGloveHandProfile*& OutProfile) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve the location of the glove origin, based on a reference location.
|
||||||
|
*/
|
||||||
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
|
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,
|
void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
|
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
|
||||||
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
|
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,
|
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
|
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,
|
void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||||
ESGPositionalTrackingHardware TrackingHardware,
|
ESGPositionalTrackingHardware TrackingHardware,
|
||||||
const FVector& GloveWristPositionOffset,
|
const FVector& GloveWristPositionOffset,
|
||||||
const FQuat& GloveWristRotationOffset,
|
const FQuat& GloveWristRotationOffset,
|
||||||
FVector& OutWristPosition, FQuat& OutWristRotation) const;
|
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,
|
||||||
|
const FRotator& GloveWristRotationOffset,
|
||||||
|
FVector& OutWristPosition, FRotator& OutWristRotation) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a string representation of this device for reporting purposes.
|
||||||
|
*/
|
||||||
virtual FString ToString() const override;
|
virtual FString ToString() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @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/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGHandInterpolator.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGSenseGloveHandProfile.generated.h"
|
#include "SGSenseGloveHandProfile.generated.h"
|
||||||
|
|
||||||
class FSGSenseGloveHandProfileImpl;
|
class FSGSenseGloveHandProfileImpl;
|
||||||
|
class USGHandInterpolator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains everything a Sense Glove needs to calculate a HandPose.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSenseGloveHandProfile final : public UObject
|
class SENSEGLOVECORE_API USGSenseGloveHandProfile final : public UObject
|
||||||
{
|
{
|
||||||
@@ -59,18 +63,33 @@ public:
|
|||||||
UObject* Outer, const FSGSenseGloveHandProfileImpl& SenseGloveHandProfileImpl);
|
UObject* Outer, const FSGSenseGloveHandProfileImpl& SenseGloveHandProfileImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(UObject* Outer);
|
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Hand Profile for the Sense Glove.
|
||||||
|
*/
|
||||||
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(
|
static USGSenseGloveHandProfile* NewSenseGloveHandProfile(
|
||||||
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator,
|
UObject* Outer, bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||||
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver, const TArray<FVector>& FingerThimbleOffset);
|
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver, const TArray<FVector>& FingerThimbleOffset);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve a 'new' profile, for either a left or right hand.
|
||||||
|
*/
|
||||||
static USGSenseGloveHandProfile* Default(UObject* Outer, bool bRightHanded);
|
static USGSenseGloveHandProfile* Default(UObject* Outer, bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize a HandProfile back into usable values.
|
||||||
|
*/
|
||||||
static USGSenseGloveHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGSenseGloveHandProfile* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Default offset from thimble to fingertip.
|
||||||
|
*/
|
||||||
static FVector GetDefaultThimbleOffset();
|
static FVector GetDefaultThimbleOffset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -85,8 +104,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGSenseGloveHandProfile();
|
USGSenseGloveHandProfile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Hand Profile for the Sense Glove.
|
||||||
|
*/
|
||||||
USGSenseGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator,
|
USGSenseGloveHandProfile(bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||||
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver,
|
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver,
|
||||||
const TArray<FVector>& FingerThimbleOffset);
|
const TArray<FVector>& FingerThimbleOffset);
|
||||||
@@ -116,21 +141,45 @@ public:
|
|||||||
const FSGSenseGloveHandProfileImpl& ToSenseGloveHandProfileImpl() const;
|
const FSGSenseGloveHandProfileImpl& ToSenseGloveHandProfileImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Check whether this profile has been created for a right hand (true) or left hand (false).
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interpolation set to estimate joint angles.
|
||||||
|
*/
|
||||||
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
USGHandInterpolator* GetInterpolationSet(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Solver property that determines _how_ HandPoses are calculated.
|
||||||
|
*/
|
||||||
ESGThumbSolver GetThumbSolver() const;
|
ESGThumbSolver GetThumbSolver() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Solver property that determines _how_ finger poses are calculated.
|
||||||
|
*/
|
||||||
ESGFingerSolver GetFingerSolver() const;
|
ESGFingerSolver GetFingerSolver() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offset from thimble to fingertip, used for Inverse Kinematics.
|
||||||
|
*/
|
||||||
TArray<FVector> GetFingerThimbleOffset() const;
|
TArray<FVector> GetFingerThimbleOffset() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
bool Equals(const USGSenseGloveHandProfile* SenseGloveHandProfile) const;
|
bool Equals(const USGSenseGloveHandProfile* SenseGloveHandProfile) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset calibration on this profile.
|
||||||
|
*/
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Serialize this HandProfile into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Glove information taken from the Sense Glove.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -42,13 +42,15 @@
|
|||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGVectorArray.h"
|
#include "SGCore/SGVectorArray.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
#include "SGSenseGloveInfo.generated.h"
|
#include "SGSenseGloveInfo.generated.h"
|
||||||
|
|
||||||
class FSGSenseGloveInfoImpl;
|
class FSGSenseGloveInfoImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Glove Information taken from a SenseGlove. Contains everything from unique ID, firmware version, etc.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSenseGloveInfo final : public UObject
|
class SENSEGLOVECORE_API USGSenseGloveInfo final : public UObject
|
||||||
{
|
{
|
||||||
@@ -59,8 +61,14 @@ public:
|
|||||||
UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl);
|
UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
static USGSenseGloveInfo* NewSenseGloveInfo(UObject* Outer);
|
static USGSenseGloveInfo* NewSenseGloveInfo(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Sense Glove device model.
|
||||||
|
*/
|
||||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||||
UObject* Outer, const FString& DeviceId,
|
UObject* Outer, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
@@ -68,6 +76,19 @@ public:
|
|||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
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,
|
||||||
|
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.
|
||||||
|
*/
|
||||||
static USGSenseGloveInfo* NewSenseGloveInfo(
|
static USGSenseGloveInfo* NewSenseGloveInfo(
|
||||||
UObject* Outer, const FString& DeviceId,
|
UObject* Outer, const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
@@ -75,10 +96,26 @@ public:
|
|||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||||
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
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,
|
||||||
|
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
|
||||||
|
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create an instance of the SGModel from its string representation.
|
||||||
|
*/
|
||||||
static bool Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
|
static bool Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
|
||||||
bool bUpdateOldModels = true);
|
bool bUpdateOldModels = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize a HandProfile back into usable values.
|
||||||
|
*/
|
||||||
static USGSenseGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGSenseGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -93,20 +130,47 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The default constructor.
|
||||||
|
*/
|
||||||
USGSenseGloveInfo();
|
USGSenseGloveInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Sense Glove device model.
|
||||||
|
*/
|
||||||
USGSenseGloveInfo(const FString& DeviceId,
|
USGSenseGloveInfo(const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||||
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
|
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,
|
USGSenseGloveInfo(const FString& DeviceId,
|
||||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
|
||||||
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
|
||||||
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
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,
|
||||||
|
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -138,44 +202,116 @@ protected:
|
|||||||
FSGSenseGloveInfoImpl& ToSenseGloveInfoImpl();
|
FSGSenseGloveInfoImpl& ToSenseGloveInfoImpl();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Unique identifier of this device.
|
||||||
|
*/
|
||||||
FString GetDeviceId() const;
|
FString GetDeviceId() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hardware (sub) version of this Sense Glove Device.
|
||||||
|
*/
|
||||||
FString GetHardwareVersion() const;
|
FString GetHardwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Firmware version running on the device's MicroController.
|
||||||
|
*/
|
||||||
int32 GetFirmwareVersion() const;
|
int32 GetFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sub-Firmware version running on the device's MicroController.
|
||||||
|
*/
|
||||||
int32 GetSubFirmwareVersion() const;
|
int32 GetSubFirmwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this Sense Glove belongs to a left or right hand.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of Sensors in this SenseGlove.
|
||||||
|
*/
|
||||||
int32 GetNumberOfSensors() const;
|
int32 GetNumberOfSensors() const;
|
||||||
|
|
||||||
FQuat GetImuCorrection() 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;
|
TArray<FVector> GetStartPositions() const;
|
||||||
|
|
||||||
TArray<FQuat> GetStartRotations() 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;
|
TArray<TArray<FVector>> GetGloveLengths() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this device has a specific function (T/F).
|
||||||
|
*/
|
||||||
TArray<bool> GetFunctions() const;
|
TArray<bool> GetFunctions() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The starting position of one Sense Glove finger, relative to the glove origin.
|
||||||
|
*/
|
||||||
FVector GetStartPosition(ESGFinger Finger) const;
|
FVector GetStartPosition(ESGFinger Finger) const;
|
||||||
|
|
||||||
FQuat GetStartRotation(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;
|
TArray<FVector> GetGloveLengths(ESGFinger Finger) const;
|
||||||
|
|
||||||
public:
|
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;
|
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;
|
bool Equals(const USGSenseGloveInfo* SenseGloveInfo) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a string representation for logging. If shortNotation is false, all values are reported.
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation for fast logging.
|
||||||
|
*/
|
||||||
FString ToString(bool bShortNotation) const;
|
FString ToString(bool bShortNotation) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this HandProfile into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Contains position and rotation data of a SenseGlove's exoskeleton, along
|
||||||
|
* with accessors for relevant variables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -43,17 +44,19 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGBasicHandModel.h"
|
|
||||||
#include "SGCore/SGSenseGloveInfo.h"
|
|
||||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
|
||||||
#include "SGCore/SGQuatArray.h"
|
#include "SGCore/SGQuatArray.h"
|
||||||
|
#include "SGCore/SGRotatorArray.h"
|
||||||
#include "SGCore/SGVectorArray.h"
|
#include "SGCore/SGVectorArray.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
|
|
||||||
#include "SGSenseGlovePose.generated.h"
|
#include "SGSenseGlovePose.generated.h"
|
||||||
|
|
||||||
class FSGSenseGlovePoseImpl;
|
class FSGSenseGlovePoseImpl;
|
||||||
|
class USGSenseGloveHandProfile;
|
||||||
|
class USGSenseGloveInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a pose of a Sense Glove exoskeleton.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSenseGlovePose final : public UObject
|
class SENSEGLOVECORE_API USGSenseGlovePose final : public UObject
|
||||||
{
|
{
|
||||||
@@ -64,21 +67,52 @@ public:
|
|||||||
UObject* Outer, const FSGSenseGlovePoseImpl& SenseGlovePoseImpl);
|
UObject* Outer, const FSGSenseGlovePoseImpl& SenseGlovePoseImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer);
|
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a SenseGlovePose.
|
||||||
|
*/
|
||||||
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||||
const TArray<TArray<FVector>>& JointPositions,
|
const TArray<TArray<FVector>>& JointPositions,
|
||||||
const TArray<TArray<FQuat>>& JointRotations,
|
const TArray<TArray<FQuat>>& JointRotations,
|
||||||
const TArray<TArray<FVector>>& GloveAngles);
|
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,
|
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
|
||||||
const TArray<FSGVectorArray>& JointPositions,
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
const TArray<FSGQuatArray>& JointRotations,
|
const TArray<FSGQuatArray>& JointRotations,
|
||||||
const TArray<FSGVectorArray>& GloveAngles);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns an idle pose for the Sense Glove if no data can be found.
|
||||||
|
*/
|
||||||
static USGSenseGlovePose* IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo);
|
static USGSenseGlovePose* IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize a GlovePose back into usable values.
|
||||||
|
*/
|
||||||
static USGSenseGlovePose* Deserialize(UObject* Outer, const FString& SerializedString);
|
static USGSenseGlovePose* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -93,18 +127,43 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGSenseGlovePose();
|
USGSenseGlovePose();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a SenseGlovePose.
|
||||||
|
*/
|
||||||
USGSenseGlovePose(bool bRightHanded,
|
USGSenseGlovePose(bool bRightHanded,
|
||||||
const TArray<TArray<FVector>>& JointPositions,
|
const TArray<TArray<FVector>>& JointPositions,
|
||||||
const TArray<TArray<FQuat>>& JointRotations,
|
const TArray<TArray<FQuat>>& JointRotations,
|
||||||
const TArray<TArray<FVector>>& GloveAngles);
|
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,
|
USGSenseGlovePose(bool bRightHanded,
|
||||||
const TArray<FSGVectorArray>& JointPositions,
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
const TArray<FSGQuatArray>& JointRotations,
|
const TArray<FSGQuatArray>& JointRotations,
|
||||||
const TArray<FSGVectorArray>& GloveAngles);
|
const TArray<FSGVectorArray>& GloveAngles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a SenseGlovePose.
|
||||||
|
*/
|
||||||
|
USGSenseGlovePose(bool bRightHanded,
|
||||||
|
const TArray<FSGVectorArray>& JointPositions,
|
||||||
|
const TArray<FSGRotatorArray>& JointRotations,
|
||||||
|
const TArray<FSGVectorArray>& GloveAngles);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -130,29 +189,77 @@ public:
|
|||||||
const FSGSenseGlovePoseImpl& ToSenseGlovePoseImpl() const;
|
const FSGSenseGlovePoseImpl& ToSenseGlovePoseImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Whether this Glove Pose was created for be a right- or left hand, or not.
|
||||||
|
*/
|
||||||
bool IsRight() const;
|
bool IsRight() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Positions of each glove joint, relative to the Glove's Origin.
|
||||||
|
*/
|
||||||
TArray<TArray<FVector>> GetJointPositions() const;
|
TArray<TArray<FVector>> GetJointPositions() const;
|
||||||
|
|
||||||
TArray<TArray<FQuat>> GetJointRotations() 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;
|
TArray<TArray<FVector>> GetGloveAngles() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The position of the tip of the 'thimbles', the furthest link on each glove link.
|
||||||
|
*/
|
||||||
TArray<FVector> GetThimblePositions() const;
|
TArray<FVector> GetThimblePositions() const;
|
||||||
|
|
||||||
TArray<FQuat> GetThimbleRotations() 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;
|
TArray<FVector> GetTotalGloveAngles() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate fingertip positions based on a user profile.
|
||||||
|
*/
|
||||||
TArray<FVector> CalculateFingerTips(const USGSenseGloveHandProfile* SenseGloveHandProfile) const;
|
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;
|
TArray<FVector> CalculateFingerTips(const TArray<FVector>& FingerOffsets) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this glove pose equals another.
|
||||||
|
*/
|
||||||
bool Equals(const USGSenseGlovePose* SenseGlovePose) const;
|
bool Equals(const USGSenseGlovePose* SenseGlovePose) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns a user-friendly string representation of this GlovePose for reporting.
|
||||||
|
*/
|
||||||
FString ToString(bool bShortFormat = false) const;
|
FString ToString(bool bShortFormat = false) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this GlovePose into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Parsed sensor data coming form a Sense Glove.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -44,12 +44,14 @@
|
|||||||
|
|
||||||
#include "SGCore/SGFloatArray.h"
|
#include "SGCore/SGFloatArray.h"
|
||||||
#include "SGCore/SGSenseGloveInfo.h"
|
#include "SGCore/SGSenseGloveInfo.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
|
||||||
|
|
||||||
#include "SGSenseGloveSensorData.generated.h"
|
#include "SGSenseGloveSensorData.generated.h"
|
||||||
|
|
||||||
class FSGSenseGloveSensorDataImpl;
|
class FSGSenseGloveSensorDataImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sense Glove Sensor Data, parsed from a sensor string.
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSenseGloveSensorData final : public UObject
|
class SENSEGLOVECORE_API USGSenseGloveSensorData final : public UObject
|
||||||
{
|
{
|
||||||
@@ -60,21 +62,53 @@ public:
|
|||||||
UObject* Outer, const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl);
|
UObject* Outer, const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(UObject* Outer);
|
static USGSenseGloveSensorData* NewSenseGloveSensorData(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Sense Glove Sensor Data class.
|
||||||
|
*/
|
||||||
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||||
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
|
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
|
||||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
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(
|
static USGSenseGloveSensorData* NewSenseGloveSensorData(
|
||||||
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
|
||||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
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:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns sensor data with no values.
|
||||||
|
*/
|
||||||
static USGSenseGloveSensorData* Empty(UObject* Outer);
|
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);
|
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);
|
static USGSenseGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -89,14 +123,35 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The basic constructor.
|
||||||
|
*/
|
||||||
USGSenseGloveSensorData();
|
USGSenseGloveSensorData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new instance of a Sense Glove Sensor Data class.
|
||||||
|
*/
|
||||||
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
|
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
|
||||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
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,
|
USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles,
|
||||||
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
|
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);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The cast from underlying type constructor.
|
* The cast from underlying type constructor.
|
||||||
@@ -122,24 +177,56 @@ public:
|
|||||||
const FSGSenseGloveSensorDataImpl& ToSenseGloveSensorDataImpl() const;
|
const FSGSenseGloveSensorDataImpl& ToSenseGloveSensorDataImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Glove angles in radians, sorted by finger, from proximal to distal.
|
||||||
|
*/
|
||||||
TArray<TArray<float>> GetSensorAngles() const;
|
TArray<TArray<float>> GetSensorAngles() const;
|
||||||
|
|
||||||
FQuat GetImuRotation() const;
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
FQuat GetImuRotationQ() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
FRotator GetImuRotation() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check how many values have been parsed from the Sensor String.
|
||||||
|
*/
|
||||||
int32 GetParsedValues() const;
|
int32 GetParsedValues() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the IMU was properly parsed.
|
||||||
|
*/
|
||||||
bool IsImuParsed() const;
|
bool IsImuParsed() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Get the glove angles of a specific finger segment.
|
||||||
|
*/
|
||||||
TArray<float> GetSensorAngles(ESGFinger Finger) const;
|
TArray<float> GetSensorAngles(ESGFinger Finger) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all glove angles in a sequence, without splitting them per finger.
|
||||||
|
*/
|
||||||
TArray<float> GetAngleSequence() const;
|
TArray<float> GetAngleSequence() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if the values of both data are equal.
|
||||||
|
*/
|
||||||
bool Equals(const USGSenseGloveSensorData* SenseGloveSensorData) const;
|
bool Equals(const USGSenseGloveSensorData* SenseGloveSensorData) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Retrieve a simple representation of this sensor data for debugging purposes.
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this HandProfile into a string representation.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Contains enumerators and classes to aid in Sense Glove Deserialization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -41,35 +41,80 @@
|
|||||||
#include "Math/Quat.h"
|
#include "Math/Quat.h"
|
||||||
#include "Math/Vector.h"
|
#include "Math/Vector.h"
|
||||||
|
|
||||||
#include "SGCore/SGSenseGloveInfo.h"
|
|
||||||
|
|
||||||
#include "SGSenseGloveVars.generated.h"
|
#include "SGSenseGloveVars.generated.h"
|
||||||
|
|
||||||
|
class USGSenseGloveInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* "Database" class containing Sense Glove internal variables.
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGSenseGloveVars
|
struct SENSEGLOVECORE_API FSGSenseGloveVars
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
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);
|
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);
|
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);
|
static TArray<FVector> GetStartPositions(const FString& HardwareVersion, bool bRightHanded);
|
||||||
|
|
||||||
static TArray<FQuat> GetStartRotations(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);
|
static TArray<TArray<FVector>> GetGloveLengths(const FString& HardwareVersion);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of sensors of a SenseGlove.
|
||||||
|
*/
|
||||||
static int32 GetSensors(const FString& HardwareVersion);
|
static int32 GetSensors(const FString& HardwareVersion);
|
||||||
|
|
||||||
static FQuat GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
|
/**
|
||||||
|
* 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);
|
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,
|
static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion,
|
||||||
int32 SubFirmwareVersion, bool bRightHanded);
|
int32 SubFirmwareVersion, bool bRightHanded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a custom glove info.
|
||||||
|
*/
|
||||||
static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion,
|
static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion,
|
||||||
int32 SubFirmwareVersion, bool bRightHanded, const FString& CustomId);
|
int32 SubFirmwareVersion, bool bRightHanded, const FString& CustomId);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,6 +46,9 @@
|
|||||||
|
|
||||||
class FSGSensorRangeImpl;
|
class FSGSensorRangeImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGSensorRange final : public UObject
|
class SENSEGLOVECORE_API USGSensorRange final : public UObject
|
||||||
{
|
{
|
||||||
@@ -56,18 +59,36 @@ public:
|
|||||||
UObject* Outer, const FSGSensorRangeImpl& SensorRangeImpl);
|
UObject* Outer, const FSGSensorRangeImpl& SensorRangeImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a new instance of a SensorRange with values at 0, 0.
|
||||||
|
*/
|
||||||
static USGSensorRange* NewSensorRange(UObject* Outer);
|
static USGSensorRange* NewSensorRange(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new SensorRange with predefined Min/Max values.
|
||||||
|
*/
|
||||||
static USGSensorRange* NewSensorRange(UObject* Outer,
|
static USGSensorRange* NewSensorRange(UObject* Outer,
|
||||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Generates a Sensor Range where minimum values are float.MaxValue and maximum values are float.MinValue.
|
||||||
|
*/
|
||||||
static USGSensorRange* ForCalibration(UObject* Outer);
|
static USGSensorRange* ForCalibration(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a serialized SensorRange back into the appropriate class.
|
||||||
|
*/
|
||||||
static USGSensorRange* Deserialize(UObject* Outer, const FString& SerializedString);
|
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);
|
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);
|
static void CheckMin(const FVector& CurrentValues, FVector& OutMinValues);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -82,8 +103,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a new instance of a SensorRange with values at 0, 0.
|
||||||
|
*/
|
||||||
USGSensorRange();
|
USGSensorRange();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new SensorRange with predefined Min/Max values.
|
||||||
|
*/
|
||||||
USGSensorRange(const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
USGSensorRange(const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -111,25 +138,55 @@ public:
|
|||||||
const FSGSensorRangeImpl& ToSensorRangeImpl() const;
|
const FSGSensorRangeImpl& ToSensorRangeImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Access the lowest values values of this range.
|
||||||
|
*/
|
||||||
TArray<FVector> GetMinValues() const;
|
TArray<FVector> GetMinValues() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the lowest values values of this range.
|
||||||
|
*/
|
||||||
void SetMinValues(const TArray<FVector>& Values);
|
void SetMinValues(const TArray<FVector>& Values);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the highest values values of this range.
|
||||||
|
*/
|
||||||
TArray<FVector> GetMaxValues() const;
|
TArray<FVector> GetMaxValues() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the highest values values of this range.
|
||||||
|
*/
|
||||||
void SetMaxValues(const TArray<FVector>& Values);
|
void SetMaxValues(const TArray<FVector>& Values);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the difference between min and max values.
|
||||||
|
*/
|
||||||
TArray<FVector> GetRange() const;
|
TArray<FVector> GetRange() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Update the Range based on the current MinValues and MaxValues.
|
||||||
|
*/
|
||||||
void UpdateRange();
|
void UpdateRange();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In otherValues are greater/smaller than this current range, update them.
|
||||||
|
*/
|
||||||
void CheckForExtremes(const TArray<FVector>& OtherValues);
|
void CheckForExtremes(const TArray<FVector>& OtherValues);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Report the Range value of this SensorRange, separated by a comma.
|
||||||
|
*/
|
||||||
FString RangeString(bool bYOnly = true) const;
|
FString RangeString(bool bYOnly = true) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert this SensorRange into a string rotation [min ... max].
|
||||||
|
*/
|
||||||
FString ToString(bool bYOnly = true) const;
|
FString ToString(bool bYOnly = true) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize this SensorRange into a string representation, that can be deserialized later.
|
||||||
|
*/
|
||||||
FString SGSerialize() const;
|
FString SGSerialize() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Thumper command.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -44,6 +44,9 @@
|
|||||||
|
|
||||||
class FSGThumperCommandImpl;
|
class FSGThumperCommandImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGThumperCommand : public UObject
|
class SENSEGLOVECORE_API USGThumperCommand : public UObject
|
||||||
{
|
{
|
||||||
@@ -53,11 +56,20 @@ public:
|
|||||||
static USGThumperCommand* NewThumperCommand(UObject* Outer, const FSGThumperCommandImpl& ThumperCommandImpl);
|
static USGThumperCommand* NewThumperCommand(UObject* Outer, const FSGThumperCommandImpl& ThumperCommandImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for inheritance.
|
||||||
|
*/
|
||||||
static USGThumperCommand* NewThumperCommand(UObject* Outer);
|
static USGThumperCommand* NewThumperCommand(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Thumper Command.
|
||||||
|
*/
|
||||||
static USGThumperCommand* NewThumperCommand(UObject* Outer, int32 Magnitude);
|
static USGThumperCommand* NewThumperCommand(UObject* Outer, int32 Magnitude);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* A command that turns off all force feedback on the Sense Glove.
|
||||||
|
*/
|
||||||
static USGThumperCommand* Off(UObject* Outer);
|
static USGThumperCommand* Off(UObject* Outer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -72,7 +84,14 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for inheritance.
|
||||||
|
*/
|
||||||
USGThumperCommand();
|
USGThumperCommand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Thumper Command.
|
||||||
|
*/
|
||||||
explicit USGThumperCommand(int32 Magnitude);
|
explicit USGThumperCommand(int32 Magnitude);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -100,14 +119,29 @@ public:
|
|||||||
const FSGThumperCommandImpl& ToThumperCommandImpl() const;
|
const FSGThumperCommandImpl& ToThumperCommandImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Thumper intensity, a level between 0 and 100.
|
||||||
|
*/
|
||||||
int32 GetMagnitude() const;
|
int32 GetMagnitude() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetMagnitude(int32 Magnitude);
|
void SetMagnitude(int32 Magnitude);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Duplicate the Thumper command.
|
||||||
|
*/
|
||||||
USGThumperCommand* Copy(UObject* Outer) const;
|
USGThumperCommand* Copy(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merge two ThumperCommands into one.
|
||||||
|
*/
|
||||||
USGThumperCommand* Merge(UObject* Outer, const USGThumperCommand* ThumperCommand) const;
|
USGThumperCommand* Merge(UObject* Outer, const USGThumperCommand* ThumperCommand) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
bool Equals(const USGThumperCommand* ThumperCommand) const;
|
bool Equals(const USGThumperCommand* ThumperCommand) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* @section DESCRIPTION
|
* @section DESCRIPTION
|
||||||
*
|
*
|
||||||
*
|
* Buzz Motor with timing parameters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -40,12 +40,16 @@
|
|||||||
#include "Templates/UniquePtr.h"
|
#include "Templates/UniquePtr.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGBuzzCommand.h"
|
|
||||||
|
|
||||||
#include "SGTimedBuzzCommand.generated.h"
|
#include "SGTimedBuzzCommand.generated.h"
|
||||||
|
|
||||||
class FSGTimedBuzzCommandImpl;
|
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)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGTimedBuzzCommand : public USGBuzzCommand
|
class SENSEGLOVECORE_API USGTimedBuzzCommand : public USGBuzzCommand
|
||||||
{
|
{
|
||||||
@@ -59,12 +63,21 @@ public:
|
|||||||
UObject* Outer, TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
UObject* Outer, TSharedRef<FSGTimedBuzzCommandImpl> TimedBuzzCommandImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for inheritance.
|
||||||
|
*/
|
||||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(UObject* Outer);
|
static USGTimedBuzzCommand* NewTimedBuzzCommand(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new TimeBuzzCommand for a single finger.
|
||||||
|
*/
|
||||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new buzz motor command that expires after timing_ms.
|
||||||
|
*/
|
||||||
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
static USGTimedBuzzCommand* NewTimedBuzzCommand(
|
||||||
UObject* Outer,
|
UObject* Outer,
|
||||||
const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
@@ -81,8 +94,19 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Empty constructor for inheritance.
|
||||||
|
*/
|
||||||
USGTimedBuzzCommand();
|
USGTimedBuzzCommand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new TimeBuzzCommand for a single finger.
|
||||||
|
*/
|
||||||
USGTimedBuzzCommand(ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
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);
|
USGTimedBuzzCommand(const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -121,25 +145,61 @@ protected:
|
|||||||
virtual void SyncUProperties() override;
|
virtual void SyncUProperties() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy this Buzz Command's values into a new object.
|
||||||
|
*/
|
||||||
USGBuzzCommand* Copy(UObject* Outer) const;
|
USGBuzzCommand* Copy(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merges this base command with another command.
|
||||||
|
*/
|
||||||
USGBuzzCommand* Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const;
|
USGBuzzCommand* Merge(UObject* Outer, const USGBuzzCommand* BuzzCommand) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Access the base command, which indicates the buzz levels to keep untill time elapses.
|
||||||
|
*/
|
||||||
USGBuzzCommand* GetBaseCommand(UObject* Outer) const;
|
USGBuzzCommand* GetBaseCommand(UObject* Outer) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
int32 GetMagnitude() const;
|
int32 GetMagnitude() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total time [milliseconds] each buzz motor should be vibrating for.
|
||||||
|
*/
|
||||||
float GetDuration() const;
|
float GetDuration() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The time elapsed since the command was sent [milliseconds].
|
||||||
|
*/
|
||||||
float GetElapsedTime() const;
|
float GetElapsedTime() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this timed command's timing has elapsed.
|
||||||
|
*/
|
||||||
bool HasTimeElapsed() const;
|
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;
|
float NormalizedTime(bool bClamp01 = true) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the timings of this BuzzCommand, allowing us to re-use it.
|
||||||
|
*/
|
||||||
void ResetTiming();
|
void ResetTiming();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the elapsed time to check if the buzz motors should stop.
|
||||||
|
*/
|
||||||
void UpdateTiming(float DeltaSeconds);
|
void UpdateTiming(float DeltaSeconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,12 +40,14 @@
|
|||||||
#include "UObject/Object.h"
|
#include "UObject/Object.h"
|
||||||
#include "UObject/ObjectMacros.h"
|
#include "UObject/ObjectMacros.h"
|
||||||
|
|
||||||
#include "SGCore/SGThumperCommand.h"
|
|
||||||
|
|
||||||
#include "SGTimedThumpCommand.generated.h"
|
#include "SGTimedThumpCommand.generated.h"
|
||||||
|
|
||||||
class FSGTimedThumpCommandImpl;
|
class FSGTimedThumpCommandImpl;
|
||||||
|
class USGThumperCommand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType)
|
||||||
class SENSEGLOVECORE_API USGTimedThumpCommand final : public UObject
|
class SENSEGLOVECORE_API USGTimedThumpCommand final : public UObject
|
||||||
{
|
{
|
||||||
@@ -56,11 +58,20 @@ public:
|
|||||||
UObject* Outer, const FSGTimedThumpCommandImpl& TimedThumpCommandImpl);
|
UObject* Outer, const FSGTimedThumpCommandImpl& TimedThumpCommandImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Internal, empty, for extended classes.
|
||||||
|
*/
|
||||||
static USGTimedThumpCommand* NewTimedThumpCommand(UObject* Outer);
|
static USGTimedThumpCommand* NewTimedThumpCommand(UObject* Outer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Timed Thumper Command.
|
||||||
|
*/
|
||||||
static USGTimedThumpCommand* NewTimedThumpCommand(
|
static USGTimedThumpCommand* NewTimedThumpCommand(
|
||||||
UObject* Outer, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
UObject* Outer, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Timed Thumper Command.
|
||||||
|
*/
|
||||||
static USGTimedThumpCommand* NewTimedThumpCommand(
|
static USGTimedThumpCommand* NewTimedThumpCommand(
|
||||||
UObject* Outer, const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
UObject* Outer, const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
|
|
||||||
@@ -76,8 +87,19 @@ private:
|
|||||||
FImplDeleter PimplDeleter;
|
FImplDeleter PimplDeleter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Internal, empty, for extended classes.
|
||||||
|
*/
|
||||||
USGTimedThumpCommand();
|
USGTimedThumpCommand();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Timed Thumper Command.
|
||||||
|
*/
|
||||||
USGTimedThumpCommand(int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
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);
|
USGTimedThumpCommand(const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -105,28 +127,61 @@ public:
|
|||||||
const FSGTimedThumpCommandImpl& ToTimedThumpCommandImpl() const;
|
const FSGTimedThumpCommandImpl& ToTimedThumpCommandImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Magnitude in %.
|
||||||
|
*/
|
||||||
int32 GetMagnitude() const;
|
int32 GetMagnitude() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetMagnitude(int32 Magnitude);
|
void SetMagnitude(int32 Magnitude);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Duration in seconds.
|
||||||
|
*/
|
||||||
float GetDuration() const;
|
float GetDuration() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetDuration(float Duration);
|
void SetDuration(float Duration);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The elapsed time so far.
|
||||||
|
*/
|
||||||
float GetElapsedTime() const;
|
float GetElapsedTime() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
void SetElapsedTime(float ElapsedTime);
|
void SetElapsedTime(float ElapsedTime);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns true if the timed command has elapsed.
|
||||||
|
*/
|
||||||
bool HasTimeElapsed() const;
|
bool HasTimeElapsed() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Copy the parameters of this ThumperCommand into another instance.
|
||||||
|
*/
|
||||||
USGTimedThumpCommand* Copy(UObject* Outer, bool bCopyElapsed = true) const;
|
USGTimedThumpCommand* Copy(UObject* Outer, bool bCopyElapsed = true) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the timing on this Thumper Command.
|
||||||
|
*/
|
||||||
void Update(float DeltaSeconds);
|
void Update(float DeltaSeconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
bool Equals(const USGTimedThumpCommand* TimedThumpCommand) const;
|
bool Equals(const USGTimedThumpCommand* TimedThumpCommand) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
FString ToString() const;
|
FString ToString() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,69 +44,241 @@
|
|||||||
|
|
||||||
#include "SGTracking.generated.h"
|
#include "SGTracking.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct SENSEGLOVECORE_API FSGTracking
|
struct SENSEGLOVECORE_API FSGTracking
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Knowing a position & rotation in 3D space, calculate a relative location based on offsets.
|
||||||
|
*/
|
||||||
static void CalculateLocation(
|
static void CalculateLocation(
|
||||||
const FVector& TrackedPosition, const FQuat& TrackedRotation,
|
const FVector& TrackedPosition, const FQuat& TrackedRotation,
|
||||||
const FVector& PositionOffset, const FQuat& RotationOffset,
|
const FVector& PositionOffset, const FQuat& RotationOffset,
|
||||||
FVector& OutNewPosition, FQuat& OutNewRotation);
|
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<FVector> GetSenseGloveFingerToGlovePositionOrigin();
|
||||||
|
|
||||||
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOrigin();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOriginQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static TArray<FRotator> GetSenseGloveFingerToGloveRotationOrigin();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default position offset from glove origin to wrist location, in cm.
|
||||||
|
*/
|
||||||
static FVector GetSenseGloveWristPositionOffset();
|
static FVector GetSenseGloveWristPositionOffset();
|
||||||
|
|
||||||
static FQuat GetSenseGloveWristRotationOffset();
|
/**
|
||||||
|
* 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,
|
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
|
||||||
FVector& OutIPosition, FQuat& OutIRotation);
|
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,
|
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
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();
|
static FVector GetSenseGloveViveToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetSenseGloveViveToAttachRotation();
|
/**
|
||||||
|
* 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();
|
static FVector GetSenseGloveOculusTouchToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetSenseGloveOculusTouchToAttachRotation();
|
/**
|
||||||
|
* 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();
|
static FVector GetNovaToWristPositionOffset();
|
||||||
|
|
||||||
static FQuat GetNovaToWristRotationOffset();
|
/**
|
||||||
|
* 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);
|
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 FVector GetRightNovaViveToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetRightNovaViveToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetRightNovaViveToAttachRotationQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetRightNovaViveToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static FVector GetLeftNovaViveToAttachPosition();
|
static FVector GetLeftNovaViveToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetLeftNovaViveToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetLeftNovaViveToAttachRotationQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetLeftNovaViveToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static FVector GetRightNovaQuest2ToAttachPosition();
|
static FVector GetRightNovaQuest2ToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetRightNovaQuest2ToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetRightNovaQuest2ToAttachRotationQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetRightNovaQuest2ToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static FVector GetLeftNovaQuest2ToAttachPosition();
|
static FVector GetLeftNovaQuest2ToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetLeftNovaQuest2ToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetLeftNovaQuest2ToAttachRotationQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetLeftNovaQuest2ToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @remarks Left is a mirror, so we only need R pos.
|
||||||
|
*/
|
||||||
static FVector GetRightNovaPico2ToAttachPosition();
|
static FVector GetRightNovaPico2ToAttachPosition();
|
||||||
|
|
||||||
static FQuat GetRightNovaPico2ToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetRightNovaPico2ToAttachRotationQ();
|
||||||
|
|
||||||
static FQuat GetLeftNovaPico2ToAttachRotation();
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetRightNovaPico2ToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FQuat GetLeftNovaPico2ToAttachRotationQ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FRotator GetLeftNovaPico2ToAttachRotation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves Offsets for a particular device.
|
||||||
|
*/
|
||||||
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
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);
|
static FString ToString(ESGPositionalTrackingHardware Hardware);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public class SenseGloveCore : ModuleRules
|
|||||||
{
|
{
|
||||||
"Core",
|
"Core",
|
||||||
"Engine",
|
"Engine",
|
||||||
|
"SenseGloveTypes",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -57,7 +58,6 @@ public class SenseGloveCore : ModuleRules
|
|||||||
"SenseGloveCoreImpl",
|
"SenseGloveCoreImpl",
|
||||||
"SenseGloveInterop",
|
"SenseGloveInterop",
|
||||||
"SenseGloveLog",
|
"SenseGloveLog",
|
||||||
"SenseGloveTypes",
|
|
||||||
"SenseGloveUtils",
|
"SenseGloveUtils",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "SGBuildHacks/SGInclude_Core_Vect3D.h"
|
#include "SGBuildHacks/SGInclude_Core_Vect3D.h"
|
||||||
#include "SGCoreImpl/SGVect3DImpl.h"
|
#include "SGCoreImpl/SGVect3DImpl.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
#include "SGUtils/SGArrayUtils.h"
|
||||||
|
#include "SGUtils/SGCoordinates.h"
|
||||||
|
|
||||||
float FSGAnatomyImpl::GetTotalFingerFlexion()
|
float FSGAnatomyImpl::GetTotalFingerFlexion()
|
||||||
{
|
{
|
||||||
@@ -63,57 +64,59 @@ float FSGAnatomyImpl::GetTotalThumbExtension()
|
|||||||
float FSGAnatomyImpl::GetFingerJointLimit(
|
float FSGAnatomyImpl::GetFingerJointLimit(
|
||||||
const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax)
|
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(
|
float FSGAnatomyImpl::GetThumbJointLimit(
|
||||||
const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax)
|
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>> FSGAnatomyImpl::GetDefaultHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
TArray<TArray<FVector>> DefaultHandAngles{
|
TArray<TArray<FVector>> DefaultHandAngles{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||||
FAnatomyType::GetDefaultHandAngles(bRightHanded))
|
FAnatomyType::GetDefaultHandAngles(bRightHanded))
|
||||||
};
|
};
|
||||||
return DefaultHandAngles;
|
return MoveTemp(DefaultHandAngles);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetFlatHandAngles(const bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomyImpl::GetFlatHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
TArray<TArray<FVector>> FlatHandAngles{
|
TArray<TArray<FVector>> FlatHandAngles{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||||
FAnatomyType::GetFlatHandAngles(bRightHanded))
|
FAnatomyType::GetFlatHandAngles(bRightHanded))
|
||||||
};
|
};
|
||||||
return FlatHandAngles;
|
return MoveTemp(FlatHandAngles);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetThumbsUpHandAngles(const bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomyImpl::GetThumbsUpHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
TArray<TArray<FVector>> ThumbsUpHandAngles{
|
TArray<TArray<FVector>> ThumbsUpHandAngles{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||||
FAnatomyType::GetThumbsUpHandAngles(bRightHanded))
|
FAnatomyType::GetThumbsUpHandAngles(bRightHanded))
|
||||||
};
|
};
|
||||||
return ThumbsUpHandAngles;
|
return MoveTemp(ThumbsUpHandAngles);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<TArray<FVector>> FSGAnatomyImpl::GetFistHandAngles(const bool bRightHanded)
|
TArray<TArray<FVector>> FSGAnatomyImpl::GetFistHandAngles(const bool bRightHanded)
|
||||||
{
|
{
|
||||||
TArray<TArray<FVector>> FistHandAngles{
|
TArray<TArray<FVector>> FistHandAngles{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromSenseGloveAngles<FSGVect3DImpl::FVect3DType>(
|
||||||
FAnatomyType::GetFistHandAngles(bRightHanded))
|
FAnatomyType::GetFistHandAngles(bRightHanded))
|
||||||
};
|
};
|
||||||
return FistHandAngles;
|
return MoveTemp(FistHandAngles);
|
||||||
}
|
}
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "SGCoreImpl/SGQuatImpl.h"
|
#include "SGCoreImpl/SGQuatImpl.h"
|
||||||
#include "SGCoreImpl/SGVect3DImpl.h"
|
#include "SGCoreImpl/SGVect3DImpl.h"
|
||||||
#include "SGUtils/SGArrayUtils.h"
|
#include "SGUtils/SGArrayUtils.h"
|
||||||
|
#include "SGUtils/SGUnits.h"
|
||||||
|
|
||||||
struct FSGBasicHandModelImpl::FImpl
|
struct FSGBasicHandModelImpl::FImpl
|
||||||
{
|
{
|
||||||
@@ -92,7 +93,7 @@ FSGBasicHandModelImpl FSGBasicHandModelImpl::Deserialize(const FString& Serializ
|
|||||||
const TArray<TArray<float>>& FSGBasicHandModelImpl::GetBaseFingerLengths()
|
const TArray<TArray<float>>& FSGBasicHandModelImpl::GetBaseFingerLengths()
|
||||||
{
|
{
|
||||||
static const TArray<TArray<float>> BaseFingerLengths{
|
static const TArray<TArray<float>> BaseFingerLengths{
|
||||||
FSGArrayUtils::FromStdVector<float>(
|
FSGArrayUtils::FromMillimeters(
|
||||||
FSGBasicHandModelImpl::FBasicHandModelType::GetBaseFingerLengths())
|
FSGBasicHandModelImpl::FBasicHandModelType::GetBaseFingerLengths())
|
||||||
};
|
};
|
||||||
return BaseFingerLengths;
|
return BaseFingerLengths;
|
||||||
@@ -101,46 +102,47 @@ const TArray<TArray<float>>& FSGBasicHandModelImpl::GetBaseFingerLengths()
|
|||||||
const TArray<FVector>& FSGBasicHandModelImpl::GetBaseJointPositions()
|
const TArray<FVector>& FSGBasicHandModelImpl::GetBaseJointPositions()
|
||||||
{
|
{
|
||||||
static const TArray<FVector> BaseJointPositions{
|
static const TArray<FVector> BaseJointPositions{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||||
FBasicHandModelType::GetBaseJointPositions())
|
FBasicHandModelType::GetBaseJointPositions())
|
||||||
};
|
};
|
||||||
return BaseJointPositions;
|
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>(
|
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
||||||
FBasicHandModelType::GetBaseJointRotations())
|
FBasicHandModelType::GetBaseJointAngles())
|
||||||
};
|
};
|
||||||
return BaseJointRotations;
|
return BaseJointAngles;
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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,
|
FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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{
|
std::vector<std::vector<float>> LengthsVector{
|
||||||
FSGArrayUtils::ToStdVector<float>(Lengths)
|
FSGArrayUtils::ToMillimeters(Lengths)
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{FSGArrayUtils::ToStdVector<
|
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{
|
||||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartPositions)};
|
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartPositions)
|
||||||
|
};
|
||||||
|
|
||||||
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
||||||
MoveTemp(StartPositionsVector));
|
MoveTemp(StartPositionsVector));
|
||||||
@@ -149,21 +151,23 @@ FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TAr
|
|||||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TArray<float>>& Lengths,
|
||||||
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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{
|
std::vector<std::vector<float>> LengthsVector{
|
||||||
FSGArrayUtils::ToStdVector<float>(Lengths)
|
FSGArrayUtils::ToMillimeters(Lengths)
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{FSGArrayUtils::ToStdVector<
|
std::vector<FSGVect3DImpl::FVect3DType> StartPositionsVector{
|
||||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartPositions)};
|
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartPositions)
|
||||||
|
};
|
||||||
|
|
||||||
std::vector<FSGQuatImpl::FQuatType> StartRotationsVector{FSGArrayUtils::ToStdVector<
|
std::vector<FSGQuatImpl::FQuatType> StartRotationsVector{
|
||||||
FQuat, FSGQuatImpl::FQuatType, FSGQuatImpl, &FSGQuatImpl::ToQuat>(StartRotations)};
|
FSGArrayUtils::ToStdVector<FQuat, FSGQuatImpl::FQuatType, FSGQuatImpl, &FSGQuatImpl::ToQuat>(StartRotations)
|
||||||
|
};
|
||||||
|
|
||||||
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
Pimpl->BasicHandModel = FSGBasicHandModelImpl::FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector),
|
||||||
MoveTemp(StartPositionsVector),
|
MoveTemp(StartPositionsVector),
|
||||||
@@ -172,27 +176,31 @@ FSGBasicHandModelImpl::FSGBasicHandModelImpl(bool bRightHanded, const TArray<TAr
|
|||||||
|
|
||||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FBasicHandModelType& BasicHandModel)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
Pimpl->BasicHandModel = BasicHandModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FSGBasicHandModelImpl& Rhs)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGBasicHandModelImpl::~FSGBasicHandModelImpl() = default;
|
||||||
|
|
||||||
@@ -203,7 +211,11 @@ FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(const FSGBasicHandModelI
|
|||||||
return *this;
|
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
|
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>> FSGBasicHandModelImpl::GetFingerLengths() const
|
||||||
{
|
{
|
||||||
TArray<TArray<float>> FingerLengths{
|
TArray<TArray<float>> FingerLengths{
|
||||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetFingerLengths())
|
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths())
|
||||||
};
|
};
|
||||||
return MoveTemp(FingerLengths);
|
return MoveTemp(FingerLengths);
|
||||||
}
|
}
|
||||||
@@ -231,28 +243,32 @@ TArray<TArray<float>> FSGBasicHandModelImpl::GetFingerLengths() const
|
|||||||
void FSGBasicHandModelImpl::SetFingerLengths(const TArray<TArray<float>>& FingerLengths)
|
void FSGBasicHandModelImpl::SetFingerLengths(const TArray<TArray<float>>& FingerLengths)
|
||||||
{
|
{
|
||||||
std::vector<std::vector<float>> FingerLengthsVector{
|
std::vector<std::vector<float>> FingerLengthsVector{
|
||||||
FSGArrayUtils::ToStdVector<float>(FingerLengths)
|
FSGArrayUtils::ToMillimeters(FingerLengths)
|
||||||
};
|
};
|
||||||
Pimpl->BasicHandModel.SetFingerLengths(MoveTemp(FingerLengthsVector));
|
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>(
|
TArray<float> FingerLengths{
|
||||||
Pimpl->BasicHandModel.GetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||||
};
|
};
|
||||||
return MoveTemp(FingerLengths);
|
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));
|
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));
|
Pimpl->BasicHandModel.SetFingerLengths(Finger, MoveTemp(LengthsVector));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +280,7 @@ TArray<TArray<float>> FSGBasicHandModelImpl::GetFingerRatios() const
|
|||||||
return MoveTemp(FingerRatios);
|
return MoveTemp(FingerRatios);
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<float> FSGBasicHandModelImpl::GetFingerRatios(ESGFinger Finger) const
|
TArray<float> FSGBasicHandModelImpl::GetFingerRatios(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
TArray<float> FingerRatios{
|
TArray<float> FingerRatios{
|
||||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetFingerRatios(FSGCoreEnumCast::ToEFinger(Finger)))
|
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> FSGBasicHandModelImpl::GetStartJointPositions() const
|
||||||
{
|
{
|
||||||
TArray<FVector> StartJointPositions{
|
TArray<FVector> StartJointPositions{
|
||||||
FSGArrayUtils::FromStdVector<FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||||
Pimpl->BasicHandModel.GetStartJointPositions())
|
Pimpl->BasicHandModel.GetStartJointPositions())
|
||||||
};
|
};
|
||||||
return MoveTemp(StartJointPositions);
|
return MoveTemp(StartJointPositions);
|
||||||
@@ -284,21 +300,23 @@ TArray<FVector> FSGBasicHandModelImpl::GetStartJointPositions() const
|
|||||||
void FSGBasicHandModelImpl::SetStartJointPositions(const TArray<FVector>& StartJointPositions)
|
void FSGBasicHandModelImpl::SetStartJointPositions(const TArray<FVector>& StartJointPositions)
|
||||||
{
|
{
|
||||||
std::vector<FSGVect3DImpl::FVect3DType> StartJointPositionsVector{
|
std::vector<FSGVect3DImpl::FVect3DType> StartJointPositionsVector{
|
||||||
FSGArrayUtils::ToStdVector<
|
FSGArrayUtils::ToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(StartJointPositions)
|
||||||
FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(StartJointPositions)
|
|
||||||
};
|
};
|
||||||
Pimpl->BasicHandModel.SetStartJointPositions(MoveTemp(StartJointPositionsVector));
|
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),
|
Pimpl->BasicHandModel.SetStartJointPosition(
|
||||||
FSGVect3DImpl(Position).ToVect3D());
|
FSGCoreEnumCast::ToEFinger(Finger),
|
||||||
|
FSGUnits::CentimetersToMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(Position));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSGBasicHandModelImpl::SetStartJointPosition(const uint8 Finger, const FVector& 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
|
TArray<FQuat> FSGBasicHandModelImpl::GetStartJointRotations() const
|
||||||
@@ -322,13 +340,15 @@ void FSGBasicHandModelImpl::SetStartJointRotations(const TArray<FQuat>& StartJoi
|
|||||||
|
|
||||||
FVector FSGBasicHandModelImpl::GetJointPosition(const ESGFinger Finger) const
|
FVector FSGBasicHandModelImpl::GetJointPosition(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
const FSGVect3DImpl Position(Pimpl->BasicHandModel.GetJointPosition(FSGCoreEnumCast::ToEFinger(Finger)));
|
return FSGUnits::MillimetersToCentimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||||
return Position.ToFVector();
|
Pimpl->BasicHandModel.GetJointPosition(FSGCoreEnumCast::ToEFinger(Finger)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSGBasicHandModelImpl::SetJointPosition(const FVector& NewPosition, const ESGFinger 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
|
FQuat FSGBasicHandModelImpl::GetJointRotation(const ESGFinger Finger) const
|
||||||
@@ -345,21 +365,23 @@ void FSGBasicHandModelImpl::SetJointRotation(const FQuat& NewRotation, const ESG
|
|||||||
TArray<float> FSGBasicHandModelImpl::GetTotalLengths() const
|
TArray<float> FSGBasicHandModelImpl::GetTotalLengths() const
|
||||||
{
|
{
|
||||||
const TArray<float> TotalLengths{
|
const TArray<float> TotalLengths{
|
||||||
FSGArrayUtils::FromStdVector<float>(Pimpl->BasicHandModel.GetTotalLengths())
|
FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetTotalLengths())
|
||||||
};
|
};
|
||||||
return TotalLengths;
|
return TotalLengths;
|
||||||
}
|
}
|
||||||
|
|
||||||
float FSGBasicHandModelImpl::GetTotalLength(const ESGFinger Finger) const
|
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
|
TArray<FVector> FSGBasicHandModelImpl::Get3DLengths(const ESGFinger Finger) const
|
||||||
{
|
{
|
||||||
const TArray<FVector> Lengths(FSGArrayUtils::FromStdVector<
|
const TArray<FVector> Lengths{
|
||||||
FSGVect3DImpl::FVect3DType, FVector, FSGVect3DImpl, &FSGVect3DImpl::ToFVector>(
|
FSGArrayUtils::FromMillimeters<FSGVect3DImpl::FVect3DType, FSGVect3DImpl>(
|
||||||
Pimpl->BasicHandModel.Get3DLengths(FSGCoreEnumCast::ToEFinger(Finger))));
|
Pimpl->BasicHandModel.Get3DLengths(FSGCoreEnumCast::ToEFinger(Finger)))
|
||||||
|
};
|
||||||
return Lengths;
|
return Lengths;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,4 +418,4 @@ FSGBasicHandModelImpl::FImpl::~FImpl() = default;
|
|||||||
void FSGBasicHandModelImpl::FImplDeleter::operator()(const FImpl* P) const
|
void FSGBasicHandModelImpl::FImplDeleter::operator()(const FImpl* P) const
|
||||||
{
|
{
|
||||||
delete P;
|
delete P;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,11 +77,11 @@ TSharedRef<FSGBetaDeviceImpl> FSGBetaDeviceImpl::Parse(const FString& String)
|
|||||||
|
|
||||||
FSGBetaDeviceImpl::FSGBetaDeviceImpl()
|
FSGBetaDeviceImpl::FSGBetaDeviceImpl()
|
||||||
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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),
|
TCHAR_TO_UTF8(*HardwareVersion),
|
||||||
FirmwareVersion,
|
FirmwareVersion,
|
||||||
SubFirmwareVersion)),
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDeviceType BetaDevice)
|
||||||
: FSGDeviceImpl(std::make_shared<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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDevicePtrType BetaDevice)
|
||||||
: FSGDeviceImpl(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FSGBetaDeviceImpl& Rhs)
|
||||||
: FSGDeviceImpl(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGBetaDeviceImpl::~FSGBetaDeviceImpl() = default;
|
||||||
|
|
||||||
@@ -144,7 +148,11 @@ FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(const FSGBetaDeviceImpl& Rhs)
|
|||||||
return *this;
|
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
|
FSGBetaDeviceImpl::FBetaDeviceType FSGBetaDeviceImpl::ToBetaDevice() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,77 +75,81 @@ const FSGBuzzCommandImpl& FSGBuzzCommandImpl::Off()
|
|||||||
|
|
||||||
FSGBuzzCommandImpl::FSGBuzzCommandImpl()
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl()
|
||||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>()),
|
: 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TArray<int32>& BuzzLevels)
|
||||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGArrayUtils::ToStdVector<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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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,
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring,
|
||||||
const int32 Pinky)
|
const int32 Pinky)
|
||||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(Thumb, Index, Middle, Ring, 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const ESGFinger Finger, const int32 BuzzLevel)
|
||||||
: FSGFingerCommandImpl(MakeShared<FBuzzCommandType>(FSGCoreEnumCast::ToEFinger(Finger), 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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FBuzzCommandType& BuzzCommand)
|
||||||
: FSGFingerCommandImpl(MakeShared<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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const TSharedRef<FBuzzCommandType> BuzzCommand)
|
||||||
: FSGFingerCommandImpl(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
FSGBuzzCommandImpl::FSGBuzzCommandImpl(const FSGBuzzCommandImpl& Rhs)
|
||||||
: FSGFingerCommandImpl(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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGBuzzCommandImpl::~FSGBuzzCommandImpl() = default;
|
||||||
|
|
||||||
@@ -157,7 +161,11 @@ FSGBuzzCommandImpl& FSGBuzzCommandImpl::operator=(const FSGBuzzCommandImpl& Rhs)
|
|||||||
return *this;
|
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
|
const FSGBuzzCommandImpl::FBuzzCommandType& FSGBuzzCommandImpl::ToBuzzCommand() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -77,22 +77,22 @@ struct FSGCalibrationDataPointImpl::FImpl
|
|||||||
|
|
||||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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,
|
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const int32 CurrentStage,
|
||||||
const TArray<FVector>& CalibrationValues)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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(
|
std::vector<FSGVect3DImpl::FVect3DType> Values(
|
||||||
FSGArrayUtils::ToStdVector<FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(
|
FSGArrayUtils::ToStdVector<FVector, FSGVect3DImpl::FVect3DType, FSGVect3DImpl, &FSGVect3DImpl::ToVect3D>(
|
||||||
@@ -102,27 +102,31 @@ FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const int32 CurrentStag
|
|||||||
|
|
||||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const FCalibrationDataPointType& CalibrationDataPoint)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
Pimpl->CalibrationDataPoint = CalibrationDataPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGCalibrationDataPointImpl::FSGCalibrationDataPointImpl(const FSGCalibrationDataPointImpl& Rhs)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGCalibrationDataPointImpl::~FSGCalibrationDataPointImpl() = default;
|
||||||
|
|
||||||
@@ -133,7 +137,10 @@ FSGCalibrationDataPointImpl& FSGCalibrationDataPointImpl::operator=(const FSGCal
|
|||||||
return *this;
|
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;
|
= default;
|
||||||
|
|
||||||
const FSGCalibrationDataPointImpl::FCalibrationDataPointType&
|
const FSGCalibrationDataPointImpl::FCalibrationDataPointType&
|
||||||
@@ -188,4 +195,4 @@ FSGCalibrationDataPointImpl::FImpl::~FImpl() = default;
|
|||||||
void FSGCalibrationDataPointImpl::FImplDeleter::operator()(const FImpl* P) const
|
void FSGCalibrationDataPointImpl::FImplDeleter::operator()(const FImpl* P) const
|
||||||
{
|
{
|
||||||
delete P;
|
delete P;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -354,6 +354,70 @@ ESGPositionalTrackingHardware FSGCoreEnumCast::ToESGPositionalTrackingHardware(c
|
|||||||
return ESGPositionalTrackingHardware::None;
|
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)
|
FSGCoreEnumCast::FEThumbMovementType FSGCoreEnumCast::ToEThumbMovement(const ESGThumbMovement Enum)
|
||||||
{
|
{
|
||||||
switch (Enum)
|
switch (Enum)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SenseGlove/Core/Fingers.hpp>
|
#include <SenseGlove/Core/Fingers.hpp>
|
||||||
|
#include <SenseGlove/Core/SenseGloveThumperCommand.hpp>
|
||||||
|
|
||||||
#include "SGBuildHacks/SGInclude_Core_Fingers.h"
|
#include "SGBuildHacks/SGInclude_Core_Fingers.h"
|
||||||
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
|
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
|
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
|
||||||
#include "SGBuildHacks/SGInclude_Core_SGDevice.h"
|
#include "SGBuildHacks/SGInclude_Core_SGDevice.h"
|
||||||
#include "SGBuildHacks/SGInclude_Core_Tracking.h"
|
#include "SGBuildHacks/SGInclude_Core_Tracking.h"
|
||||||
|
#include "SGCoreImpl/SGHapticGloveCommandBufferImpl.h"
|
||||||
#include "SGTypes/SGCoreTypes.h"
|
#include "SGTypes/SGCoreTypes.h"
|
||||||
|
|
||||||
class SENSEGLOVECOREIMPL_API FSGCoreEnumCast
|
class SENSEGLOVECOREIMPL_API FSGCoreEnumCast
|
||||||
@@ -56,37 +58,41 @@ public:
|
|||||||
typedef SGCore::Kinematics::EFingerMovement FEFingerMovementType;
|
typedef SGCore::Kinematics::EFingerMovement FEFingerMovementType;
|
||||||
typedef SGCore::SG::EFingerSolver FEFingerSolverType;
|
typedef SGCore::SG::EFingerSolver FEFingerSolverType;
|
||||||
typedef SGCore::EPositionalTrackingHardware FEPositionalTrackingHardware;
|
typedef SGCore::EPositionalTrackingHardware FEPositionalTrackingHardware;
|
||||||
|
typedef SGCore::Haptics::ESenseGloveThumperCommand FESenseGloveThumperCommandType;
|
||||||
typedef SGCore::Kinematics::EThumbMovement FEThumbMovementType;
|
typedef SGCore::Kinematics::EThumbMovement FEThumbMovementType;
|
||||||
typedef SGCore::SG::EThumbSolver FEThumbSolverType;
|
typedef SGCore::SG::EThumbSolver FEThumbSolverType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static FEBackendType ToEBackendType(const ESGBackendType Enum);
|
static FEBackendType ToEBackendType(ESGBackendType Enum);
|
||||||
static ESGBackendType ToESGBackendType(const FEBackendType Enum);
|
static ESGBackendType ToESGBackendType(FEBackendType Enum);
|
||||||
|
|
||||||
static FECalibrationStageType ToECalibrationStage(const ESGCalibrationStage Enum);
|
static FECalibrationStageType ToECalibrationStage(ESGCalibrationStage Enum);
|
||||||
static ESGCalibrationStage ToESGCalibrationStage(const FECalibrationStageType Enum);
|
static ESGCalibrationStage ToESGCalibrationStage(FECalibrationStageType Enum);
|
||||||
|
|
||||||
static FEConnectionType ToEConnectionType(const ESGConnectionType Enum);
|
static FEConnectionType ToEConnectionType(ESGConnectionType Enum);
|
||||||
static ESGConnectionType ToESGConnectionType(const FEConnectionType Enum);
|
static ESGConnectionType ToESGConnectionType(FEConnectionType Enum);
|
||||||
|
|
||||||
static FEDeviceType ToEDeviceType(const ESGDeviceType Enum);
|
static FEDeviceType ToEDeviceType(ESGDeviceType Enum);
|
||||||
static ESGDeviceType ToESGDeviceType(const FEDeviceType Enum);
|
static ESGDeviceType ToESGDeviceType(FEDeviceType Enum);
|
||||||
|
|
||||||
static FEFingerType ToEFinger(const ESGFinger Enum);
|
static FEFingerType ToEFinger(ESGFinger Enum);
|
||||||
static ESGFinger ToESGFinger(const FEFingerType Enum);
|
static ESGFinger ToESGFinger(FEFingerType Enum);
|
||||||
|
|
||||||
static FEFingerMovementType ToEFingerMovement(const ESGFingerMovement Enum);
|
static FEFingerMovementType ToEFingerMovement(ESGFingerMovement Enum);
|
||||||
static ESGFingerMovement ToESGFingerMovement(const FEFingerMovementType Enum);
|
static ESGFingerMovement ToESGFingerMovement(FEFingerMovementType Enum);
|
||||||
|
|
||||||
static FEFingerSolverType ToEFingerSolver(const ESGFingerSolver Enum);
|
static FEFingerSolverType ToEFingerSolver(ESGFingerSolver Enum);
|
||||||
static ESGFingerSolver ToESGFingerSolver(const FEFingerSolverType Enum);
|
static ESGFingerSolver ToESGFingerSolver(FEFingerSolverType Enum);
|
||||||
|
|
||||||
static FEPositionalTrackingHardware ToEPositionalTrackingHardware(const ESGPositionalTrackingHardware Enum);
|
static FEPositionalTrackingHardware ToEPositionalTrackingHardware(ESGPositionalTrackingHardware Enum);
|
||||||
static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(const FEPositionalTrackingHardware Enum);
|
static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(FEPositionalTrackingHardware Enum);
|
||||||
|
|
||||||
static FEThumbMovementType ToEThumbMovement(const ESGThumbMovement Enum);
|
static FESenseGloveThumperCommandType ToESenseGloveThumperCommand(ESGSenseGloveThumperCommand Enum);
|
||||||
static ESGThumbMovement ToESGThumbMovement(const FEThumbMovementType Enum);
|
static ESGSenseGloveThumperCommand ToESGSenseGloveThumperCommand(FESenseGloveThumperCommandType Enum);
|
||||||
|
|
||||||
static FEThumbSolverType ToEThumbSolver(const ESGThumbSolver Enum);
|
static FEThumbMovementType ToEThumbMovement(ESGThumbMovement Enum);
|
||||||
static ESGThumbSolver ToESGThumbSolver(const FEThumbSolverType 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()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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!"));
|
ensureAlwaysMsgf(SGDevice.get(), TEXT("Invalid SGDevice!"));
|
||||||
Pimpl->SGDevice = SGDevice;
|
Pimpl->SGDevice = SGDevice;
|
||||||
@@ -112,16 +112,20 @@ FSGDeviceImpl::FSGDeviceImpl(const FSGDevicePtrType SGDevice)
|
|||||||
|
|
||||||
FSGDeviceImpl::FSGDeviceImpl(const FSGDeviceImpl& Rhs)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGDeviceImpl::~FSGDeviceImpl() = default;
|
||||||
|
|
||||||
@@ -132,7 +136,11 @@ FSGDeviceImpl& FSGDeviceImpl::operator=(const FSGDeviceImpl& Rhs)
|
|||||||
return *this;
|
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
|
FSGDeviceImpl::FSGDevicePtrType FSGDeviceImpl::ToSGDevicePtr() const
|
||||||
{
|
{
|
||||||
@@ -242,9 +250,9 @@ int32 FSGDeviceImpl::GetDeviceIndex() const
|
|||||||
return ToSGDevicePtrChecked()->GetDeviceIndex();
|
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
|
bool FSGDeviceImpl::IsWireless() const
|
||||||
|
|||||||
@@ -97,22 +97,22 @@ void FSGDeviceModelImpl::ParseFirmware(const FString& RawFirmware, int32& OutMai
|
|||||||
|
|
||||||
FSGDeviceModelImpl::FSGDeviceModelImpl()
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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(
|
FSGDeviceModelImpl::FSGDeviceModelImpl(
|
||||||
const FString& Id, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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 IdString(TCHAR_TO_UTF8(*Id));
|
||||||
std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion));
|
std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion));
|
||||||
@@ -122,27 +122,31 @@ FSGDeviceModelImpl::FSGDeviceModelImpl(
|
|||||||
|
|
||||||
FSGDeviceModelImpl::FSGDeviceModelImpl(const FDeviceModelType& DeviceModel)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
|
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;
|
Pimpl->DeviceModel = DeviceModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGDeviceModelImpl::FSGDeviceModelImpl(const FSGDeviceModelImpl& Rhs)
|
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))
|
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}, PimplDeleter))
|
||||||
#else
|
#else
|
||||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{*Rhs.Pimpl}))
|
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->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;
|
FSGDeviceModelImpl::~FSGDeviceModelImpl() = default;
|
||||||
|
|
||||||
@@ -153,7 +157,11 @@ FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(const FSGDeviceModelImpl& Rhs)
|
|||||||
return *this;
|
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
|
const FSGDeviceModelImpl::FDeviceModelType& FSGDeviceModelImpl::ToDeviceModel() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -169,16 +169,16 @@ float SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(
|
|||||||
return FSGAnatomyImpl::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
return FSGAnatomyImpl::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlex(
|
float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(
|
||||||
const float FlexionInRadians)
|
const float FlexionInRadians)
|
||||||
{
|
{
|
||||||
return FSGAnatomyImpl::NormalizeFingerFlex(FlexionInRadians);
|
return FSGAnatomyImpl::NormalizeFingerFlexion(FlexionInRadians);
|
||||||
}
|
}
|
||||||
|
|
||||||
float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlex(
|
float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion(
|
||||||
const float FlexionInRadians)
|
const float FlexionInRadians)
|
||||||
{
|
{
|
||||||
return FSGAnatomyImpl::NormalizeThumbFlex(FlexionInRadians);
|
return FSGAnatomyImpl::NormalizeThumbFlexion(FlexionInRadians);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(
|
void SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(
|
||||||
@@ -246,10 +246,10 @@ void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(
|
|||||||
StaticCast<FSGIC_TArray_FVector*>(OutPositions)->Array = FSGBasicHandModelImpl::GetBaseJointPositions();
|
StaticCast<FSGIC_TArray_FVector*>(OutPositions)->Array = FSGBasicHandModelImpl::GetBaseJointPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointRotations(
|
void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(
|
||||||
void* OutRotations)
|
void* OutRotations)
|
||||||
{
|
{
|
||||||
StaticCast<FSGIC_TArray_FVector*>(OutRotations)->Array = FSGBasicHandModelImpl::GetBaseJointRotations();
|
StaticCast<FSGIC_TArray_FVector*>(OutRotations)->Array = FSGBasicHandModelImpl::GetBaseJointAngles();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SGCoreImpl_FSGBasicHandModelImpl_ctor(
|
void SGCoreImpl_FSGBasicHandModelImpl_ctor(
|
||||||
@@ -1089,9 +1089,9 @@ int32 SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(
|
|||||||
|
|
||||||
void SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(
|
void SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(
|
||||||
void* Instance,
|
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(
|
bool SGCoreImpl_FSGDeviceImpl_IsWireless(
|
||||||
@@ -5033,6 +5033,26 @@ bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose_HandProfile_OutHandPose(
|
|||||||
StaticCast<FSGIC_FSGHandPoseImpl*>(OutHandPose)->HandPoseImpl);
|
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 SGCoreImpl_FSGSenseGloveImpl_SendHaptics_ForceFeedbackCommand(
|
||||||
void* Instance,
|
void* Instance,
|
||||||
void* ForceFeedbackCommand)
|
void* ForceFeedbackCommand)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user