Files
Plugin/Source/SenseGloveKismet/Public/SGKismet/SGVirtualHandComponentKismetLibrary.h
T

142 lines
6.6 KiB
C++

/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 "Containers/Map.h"
#include "HeadMountedDisplayTypes.h"
#include "Math/Rotator.h"
#include "Math/Transform.h"
#include "UObject/NameTypes.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGSettings/SGVirtualHandSettings.h"
#include "SGSettings/SGVirtualHandSettingsOverrides.h"
#include "SGVirtualHandComponentKismetLibrary.generated.h"
class USkeletalMeshComponent;
class USGHandPose;
class USGHapticGlove;
class USGVirtualHandComponent;
UCLASS(meta=(ScriptName = "SenseGloveVirtualHandComponentKismetLibrary"))
class SENSEGLOVEKISMET_API UVirtualHandComponentKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static const TArray<FName>& GetLeftHandBoneNames();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static const TArray<FName>& GetRightHandBoneNames();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static const FName& GetLeftHandBoneName(int32 Joint);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static const FName& GetRightHandBoneName(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 OverridesPluginVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides(
const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static void SetVirtualHandSettingsOverrides(
UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static FSGVirtualHandSettings GetVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent);
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 const FXRMotionControllerData& GetMotionControllerData(
UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
static const FXRHandTrackingState& GetHandTrackingState(
UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static const TArray<FName>& GetHandBoneNames(const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static const FName& GetHandBoneName(const USGVirtualHandComponent* VirtualHandComponent,
int32 Joint);
UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Transform",
Category="SenseGlove | Components | Virtual Hand Component")
static const FTransform& GetHandBoneRefTransform_BN(const USGVirtualHandComponent* VirtualHandComponent,
const FName& BoneName);
UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Transform",
Category="SenseGlove | Components | Virtual Hand Component")
static const FTransform& GetHandBoneRefTransform_J(const USGVirtualHandComponent* VirtualHandComponent,
int32 Joint);
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
static const FTransform& GetHandRootBoneRefTransform(const USGVirtualHandComponent* VirtualHandComponent);
UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Rotation",
Category="SenseGlove | Components | Virtual Hand Component")
static FRotator GetHandBoneRefRotation_BN(const USGVirtualHandComponent* VirtualHandComponent,
const FName& BoneName);
UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Rotation",
Category="SenseGlove | Components | Virtual Hand Component")
static FRotator GetHandBoneRefRotation_J(const USGVirtualHandComponent* VirtualHandComponent,
int32 Joint);
};