186 lines
9.9 KiB
C++
186 lines
9.9 KiB
C++
/**
|
|
* @file
|
|
*
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
*
|
|
* @section LICENSE
|
|
*
|
|
* (The MIT License)
|
|
*
|
|
* Copyright (c) 2020 - 2023 SenseGlove
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*
|
|
* @section DESCRIPTION
|
|
*
|
|
* A data class containing the minimum required data for a hand's forward
|
|
* kinematics.
|
|
* Used in both kinematics and calibration.
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Array.h"
|
|
#include "Containers/Map.h"
|
|
#include "Math/Rotator.h"
|
|
#include "Math/Transform.h"
|
|
#include "UObject/NameTypes.h"
|
|
|
|
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
|
#include "SGTypes/SGNameArray.h"
|
|
|
|
#include "SGVirtualHandComponentKismetLibrary.generated.h"
|
|
|
|
class USkeletalMeshComponent;
|
|
|
|
class USGVirtualHandComponent;
|
|
class USGHandPose;
|
|
class USGHapticGlove;
|
|
|
|
UCLASS(meta=(ScriptName = "SesneGloveVirtualHandComponentKismetLibrary"))
|
|
class SENSEGLOVEKISMET_API UVirtualHandComponentKismetLibrary final : public USGBlueprintFunctionLibrary
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static TArray<FSGNameArray> GetLeftHandFingerBoneNames();
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static TArray<FSGNameArray> GetRightHandFingerBoneNames();
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetLeftHandFingerBoneName(int32 Finger, int32 Joint);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetRightHandFingerBoneName(int32 Finger, int32 Joint);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static bool IsLeft(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static bool IsRight(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static bool AutoStopsAllHapticsOnEndPlay(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetAutoStopAllHapticsOnEndPlay(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const bool bInAutoStopAllHapticsOnEndPlay);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FVector& GetDefaultFingertipsGrabColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetThumbFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetThumbFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetIndexFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetIndexFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetMiddleFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetMiddleFingertipGrabSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FVector& GetDefaultFingertipsTouchColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetThumbFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetThumbFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetIndexFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetIndexFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetMiddleFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetMiddleFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetRingFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetRingFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetPinkyFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetPinkyFingertipTouchSocketName(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
const FName& SocketName);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static bool IsHiddenInGameIfNoGloveDetected(const USGVirtualHandComponent* VirtualHandComponent);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static void SetHiddenIfNoGloveDetected(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
|
bool bInHiddenIfNoGloveDetected);
|
|
|
|
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);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FName& GetFingerBoneName(const USGVirtualHandComponent* VirtualHandComponent,
|
|
int32 Finger, int32 Joint);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static const FTransform& GetFingerBoneRefTransform(const USGVirtualHandComponent* VirtualHandComponent,
|
|
int32 Finger, int32 Joint);
|
|
|
|
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static FRotator GetFingerBoneRefRotation(const USGVirtualHandComponent* VirtualHandComponent,
|
|
int32 Finger, int32 Joint);
|
|
|
|
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
|
static TMap<FName, FRotator> GetFingersBonesRotations(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent);
|
|
}; |