expose the connected glove in the virtual hand's api

This commit is contained in:
Mamadou Babaei
2023-05-19 18:13:47 +02:00
parent e1261b4fd5
commit 88033a2df1
3 changed files with 16 additions and 0 deletions
@@ -287,6 +287,12 @@ protected:
public:
bool IsGloveConnected() const;
FORCEINLINE USGHapticGlove* GetConnectedGlove() const
{
return Glove;
}
USGHandPose* GetHandPose();
public:
@@ -37,6 +37,7 @@
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "SGCore/SGHandPose.h"
#include "SGCore/SGHapticGlove.h"
#include "SGUtils/SGArrayUtils.h"
TArray<FSGNameArray> UVirtualHandComponentKismetLibrary::GetLeftHandFingerBoneNames()
@@ -208,6 +209,11 @@ bool UVirtualHandComponentKismetLibrary::IsGloveConnected(const USGVirtualHandCo
return VirtualHandComponent->IsGloveConnected();
}
USGHapticGlove* UVirtualHandComponentKismetLibrary::GetConnectedGlove(const USGVirtualHandComponent* VirtualHandComponent)
{
return VirtualHandComponent->GetConnectedGlove();
}
USGHandPose* UVirtualHandComponentKismetLibrary::GetHandPose(USGVirtualHandComponent* VirtualHandComponent)
{
return VirtualHandComponent->GetHandPose();
@@ -52,6 +52,7 @@ class USkeletalMeshComponent;
class USGVirtualHandComponent;
class USGHandPose;
class USGHapticGlove;
UCLASS(meta=(ScriptName = "SesneGloveVirtualHandComponentKismetLibrary"))
class SENSEGLOVEKISMET_API UVirtualHandComponentKismetLibrary final : public USGBlueprintFunctionLibrary
@@ -155,6 +156,9 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static bool IsGloveConnected(const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static USGHapticGlove* GetConnectedGlove(const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static USGHandPose* GetHandPose(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent);