Files
Plugin/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGlovePoseKismetLibrary.h
T

129 lines
6.2 KiB
C++

/**
* @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 "SGCore/SGQuatArray.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGSenseGlovePoseKismetLibrary.generated.h"
class USGSenseGloveHandProfile;
class USGSenseGloveInfo;
class USGSenseGlovePose;
UCLASS(meta=(ScriptName = "SesneGloveSenseGlovePoseKismetLibrary"))
class SENSEGLOVECOREKISMET_API USGSenseGlovePoseKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose",
meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose* MakeSenseGlovePose(UObject* WorldContextObject);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose",
Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose*
MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGQuatArrayJointRotations_GloveAngles(
UObject* WorldContextObject, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose",
Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose*
MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGRotatorArrayJointRotations_GloveAngles(
UObject* WorldContextObject, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose",
meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose* IdlePose(UObject* WorldContextObject, const USGSenseGloveInfo* GloveInfo);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose",
meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static bool IsRight(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGVectorArray> GetJointPositions(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGQuatArray> GetJointRotations_TArrayFSGQuatArray(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGRotatorArray> GetJointRotations_TArrayFSGRotatorArray(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGVectorArray> GetGloveAngles(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> GetThimblePositions(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FQuat> GetThimbleRotations_FQuat(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FRotator> GetThimbleRotations_FRotator(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> GetTotalGloveAngles(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> CalculateFingerTips_SenseGloveHandProfileImpl(
const USGSenseGlovePose* SenseGlovePose,
const USGSenseGloveHandProfile* SenseGloveHandProfile);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> CalculateFingerTips_FingerOffsets(const USGSenseGlovePose* SenseGlovePose,
const TArray<FVector>& FingerOffsets);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static bool Equals(const USGSenseGlovePose* A, const USGSenseGlovePose* B);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static FString ToString(const USGSenseGlovePose* SenseGlovePose, bool bShortFormat = false);
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Pose")
static FString SGSerialize(const USGSenseGlovePose* SenseGlovePose);
};