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

133 lines
6.5 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/SGFloatArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGSenseGloveInfoKismetLibrary.generated.h"
class USGSenseGloveInfo;
UCLASS(meta=(ScriptName = "SesneGloveSenseGloveInfoKismetLibrary"))
class SENSEGLOVECOREKISMET_API USGSenseGloveInfoKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info",
meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo* MakeSenseGloveInfo(UObject* WorldContextObject);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Info",
Category="SenseGlove | Core | SG | Sense Glove Info", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo*
MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPosition_StartRotation_GloveLengths_Functions(
UObject* WorldContextObject, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info",
meta=(WorldContext="WorldContextObject"))
static bool Parse(UObject* WorldContextObject,
const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
bool bUpdateOldModels = true);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info",
meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FString GetDeviceId(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FString GetHardwareVersion(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static int32 GetFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static int32 GetSubFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static bool IsRight(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static int32 GetNumberOfSensors(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetImuCorrection(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FVector> GetStartPositions(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FQuat> GetStartRotations(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FSGVectorArray> GetGloveLengths(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<bool> GetFunctions(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FVector GetStartPosition(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetStartRotation(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Lengths", Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FVector> GetGloveLengths_Finger(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FSGVectorArray> ToGloveAngles(const USGSenseGloveInfo* SenseGloveInfo,
const TArray<FSGFloatArray>& SensorAngles);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static bool Equals(const USGSenseGloveInfo* A, const USGSenseGloveInfo* B);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FString ToString(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, DisplayName="To String", Category="SenseGlove | Core | SG | Sense Glove Info")
static FString ToString_bShortNotation(const USGSenseGloveInfo* SenseGloveInfo, bool bShortNotation);
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Info")
static FString SGSerialize(const USGSenseGloveInfo* SenseGloveInfo);
};