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

181 lines
8.0 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 "GameFramework/Actor.h"
#include "Math/Rotator.h"
#include "Math/Transform.h"
#include "UObject/NameTypes.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGTypes/SGNameArray.h"
#include "SGPawnKismetLibrary.generated.h"
class UCameraComponent;
class USphereComponent;
class ASGPawn;
class USGVirtualHandComponent;
class USGWristTrackerComponent;
UCLASS(meta=(ScriptName = "SesneGlovePawnKismetLibrary"))
class SENSEGLOVEKISMET_API UPawnKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static UCameraComponent* GetCamera(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USGWristTrackerComponent* GetWristTrackerLeft(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USGVirtualHandComponent* GetHandLeft(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftThumbFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftIndexFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftMiddleFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftThumbFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftIndexFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftMiddleFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftRingFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetLeftPinkyFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USGWristTrackerComponent* GetWristTrackerRight(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USGVirtualHandComponent* GetHandRight(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightThumbFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightIndexFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightMiddleFingertipGrabCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightThumbFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightIndexFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightMiddleFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightRingFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static USphereComponent* GetRightPinkyFingertipTouchCollider(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool CanLeftHandGrab(const ASGPawn* Pawn, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsLeftHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsLeftHandGrabbing_OutActor(const ASGPawn* Pawn, AActor*& OutActor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsLeftHandGrabbing(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool CanRightHandGrab(const ASGPawn* Pawn, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsRightHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsRightHandGrabbing_OutActor(const ASGPawn* Pawn);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsRightHandGrabbing(const ASGPawn* Pawn, AActor*& OutActor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool CanGrab(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsGrabbing_Actor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsGrabbing_OutActor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, AActor*& OutActor);
UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn")
static bool IsGrabbing(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
static void GrabLeft(UPARAM(ref) ASGPawn* Pawn, AActor* Actor);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
static void GrabRight(UPARAM(ref) ASGPawn* Pawn, AActor* Actor);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
void Grab(UPARAM(ref) ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
void ReleaseLeft(UPARAM(ref) ASGPawn* Pawn);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
void ReleaseRight(UPARAM(ref) ASGPawn* Pawn);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn")
static void Release(UPARAM(ref) ASGPawn* Pawn, const USGVirtualHandComponent* Hand);
};