/** * @file * * @author Mamadou Babaei * * @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 * * */ #include "SGCore/SGSenseGloveInfo.h" #include "Runtime/Launch/Resources/Version.h" #include "SGCoreImpl/SGExportedFunctions.h" #include "SGInterop/SGIC_ESGFinger.h" #include "SGInterop/SGIC_FQuat.h" #include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" #include "SGInterop/SGIC_FString.h" #include "SGInterop/SGIC_FVector.h" #include "SGInterop/SGIC_TArray_bool.h" #include "SGInterop/SGIC_TArray_FQuat.h" #include "SGInterop/SGIC_TArray_FVector.h" #include "SGInterop/SGIC_TArray_TArray_float.h" #include "SGInterop/SGIC_TArray_TArray_FVector.h" struct USGSenseGloveInfo::FImpl { /************************ * Member variables ************************/ FSGSenseGloveInfoImpl SenseGloveInfoImpl; /************************ * Owner object ************************/ USGSenseGloveInfo* Owner; /************************ * Constructor / Destructor ************************/ explicit FImpl(USGSenseGloveInfo* InOwner); ~FImpl(); /************************ * Default copy constructor & copy assignment operator ************************/ FImpl(const FImpl& Rhs) = default; FImpl& operator=(const FImpl& Rhs) = default; /************************ * Methods ************************/ void SyncUProperties(); void SyncImplObject(); }; USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) { USGSenseGloveInfo* Instance = NewObject(Outer); Instance->SetSenseGloveInfoImpl(SenseGloveInfoImpl); return Instance; } USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray>& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray>& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{ FSGArrayUtils::FromNestedBPArray(GloveLengths) }; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{ FSGArrayUtils::FromNestedBPArray(GloveLengths) }; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } bool USGSenseGloveInfo::Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo, const bool bUpdateOldModels) { FSGIC_FString ConstantsStringContainer{ConstantsString}; FSGIC_FSGSenseGloveInfoImpl OutGloveInfoImplContainer; const bool bResult = SGCoreImpl_FSGSenseGloveInfoImpl_Parse(&ConstantsStringContainer, &OutGloveInfoImplContainer, bUpdateOldModels); if (bResult) { OutGloveInfo = NewSenseGloveInfo(Outer, MoveTemp(OutGloveInfoImplContainer.SenseGloveInfoImpl)); } return bResult; } USGSenseGloveInfo* USGSenseGloveInfo::Deserialize(UObject* Outer, const FString& SerializedString) { FSGIC_FString SerializedStringContainer{SerializedString}; FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; SGCoreImpl_FSGSenseGloveInfoImpl_Deserialize(&OutSenseGloveInfoImplContainer, &SerializedStringContainer); return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); } USGSenseGloveInfo::USGSenseGloveInfo() : #if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) #else Pimpl(TUniquePtr(new FImpl{this})) #endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */ { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::USGSenseGloveInfo( const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray>& GloveLengths, const TArray& Functions) : #if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) #else Pimpl(TUniquePtr(new FImpl{this})) #endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */ { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::USGSenseGloveInfo( const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray>& GloveLengths, const TArray& Functions) : #if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) #else Pimpl(TUniquePtr(new FImpl{this})) #endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */ { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::USGSenseGloveInfo( const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{ FSGArrayUtils::FromNestedBPArray(GloveLengths) }; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::USGSenseGloveInfo( const FString& DeviceId, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, const TArray& StartPositions, const TArray& StartRotations, const TArray& GloveLengths, const TArray& Functions) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; FSGIC_FString DeviceIdContainer{DeviceId}; FSGIC_FString HardwareVersionContainer{HardwareVersion}; FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; FSGIC_TArray_TArray_FVector GloveLengthsContainer{ FSGArrayUtils::FromNestedBPArray(GloveLengths) }; FSGIC_TArray_bool FunctionsContainer{Functions}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( &OutSenseGloveInfoImplContainer, &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, NumberOfSensors, &ImuCorrectionContainer, &StartPositionsContainer, &StartRotationsContainer, &GloveLengthsContainer, &FunctionsContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) : #if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) #else Pimpl(TUniquePtr(new FImpl{this})) #endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 24 ) */ { SetSenseGloveInfoImpl(SenseGloveInfoImpl); Pimpl->SyncUProperties(); } USGSenseGloveInfo::~USGSenseGloveInfo() = default; void USGSenseGloveInfo::SetSenseGloveInfoImpl(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) { FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoContainer; FSGIC_FSGSenseGloveInfoImpl RhsContainer{SenseGloveInfoImpl}; SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy(&OutSenseGloveInfoContainer, &RhsContainer); Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoContainer.SenseGloveInfoImpl); } const FSGSenseGloveInfoImpl& USGSenseGloveInfo::ToSenseGloveInfoImpl() const { Pimpl->SyncImplObject(); return Pimpl->SenseGloveInfoImpl; } FSGSenseGloveInfoImpl& USGSenseGloveInfo::ToSenseGloveInfoImpl() { Pimpl->SyncImplObject(); return Pimpl->SenseGloveInfoImpl; } FString USGSenseGloveInfo::GetDeviceId() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FString OutIdContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); return MoveTemp(OutIdContainer.String); } FString USGSenseGloveInfo::GetHardwareVersion() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FString OutVersionContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); return MoveTemp(OutVersionContainer.String); } int32 USGSenseGloveInfo::GetFirmwareVersion() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; return SGCoreImpl_FSGSenseGloveInfoImpl_GetFirmwareVersion(&InstanceContainer); } int32 USGSenseGloveInfo::GetSubFirmwareVersion() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; return SGCoreImpl_FSGSenseGloveInfoImpl_GetSubFirmwareVersion(&InstanceContainer); } bool USGSenseGloveInfo::IsRight() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; return SGCoreImpl_FSGSenseGloveInfoImpl_IsRight(&InstanceContainer); } int32 USGSenseGloveInfo::GetNumberOfSensors() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; return SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors(&InstanceContainer); } FQuat USGSenseGloveInfo::GetImuCorrectionQ() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FQuat OutCorrectionContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); return MoveTemp(OutCorrectionContainer.Quat); } FRotator USGSenseGloveInfo::GetImuCorrection() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FQuat OutCorrectionContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); return OutCorrectionContainer.Quat.Rotator(); } TArray USGSenseGloveInfo::GetStartPositions() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_FVector OutPositionsContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPositions(&InstanceContainer, &OutPositionsContainer); return MoveTemp(OutPositionsContainer.Array); } TArray USGSenseGloveInfo::GetStartRotationsQ() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_FQuat OutRotationsContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer); return MoveTemp(OutRotationsContainer.Array); } TArray USGSenseGloveInfo::GetStartRotations() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_FQuat OutRotationsContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer); return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); } TArray> USGSenseGloveInfo::GetGloveLengths() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_TArray_FVector OutLengthsContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths(&InstanceContainer, &OutLengthsContainer); return MoveTemp(OutLengthsContainer.Array); } TArray USGSenseGloveInfo::GetFunctions() const { FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_bool OutFunctionsContainer; SGCoreImpl_FSGSenseGloveInfoImpl_GetFunctions(&InstanceContainer, &OutFunctionsContainer); return MoveTemp(OutFunctionsContainer.Array); } FVector USGSenseGloveInfo::GetStartPosition(const ESGFinger Finger) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FVector OutPositionContainer; FSGIC_ESGFinger FingerContainer{Finger}; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer); return MoveTemp(OutPositionContainer.Vector); } FQuat USGSenseGloveInfo::GetStartRotationQ(const ESGFinger Finger) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FQuat OutRotationContainer; FSGIC_ESGFinger FingerContainer{Finger}; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); return MoveTemp(OutRotationContainer.Quat); } FRotator USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FQuat OutRotationContainer; FSGIC_ESGFinger FingerContainer{Finger}; SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); return OutRotationContainer.Quat.Rotator(); } TArray USGSenseGloveInfo::GetGloveLengths(const ESGFinger Finger) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_FVector OutLengths; FSGIC_ESGFinger FingerContainer{Finger}; SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths_Finger(&InstanceContainer, &OutLengths, &FingerContainer); return MoveTemp(OutLengths.Array); } TArray> USGSenseGloveInfo::ToGloveAngles(const TArray>& SensorAngles) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_TArray_TArray_FVector OutAnglesContainer; FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; SGCoreImpl_FSGSenseGloveInfoImpl_ToGloveAngles(&InstanceContainer, &OutAnglesContainer, &SensorAnglesContainer); return MoveTemp(OutAnglesContainer.Array); } bool USGSenseGloveInfo::Equals(const USGSenseGloveInfo* SenseGloveInfo) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FSGSenseGloveInfoImpl SenseGloveInfoImplContainer{SenseGloveInfo->ToSenseGloveInfoImpl()}; return SGCoreImpl_FSGSenseGloveInfoImpl_Equals(&InstanceContainer, &SenseGloveInfoImplContainer); } FString USGSenseGloveInfo::ToString() const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FString OutStringContainer; SGCoreImpl_FSGSenseGloveInfoImpl_ToString(&InstanceContainer, &OutStringContainer); return MoveTemp(OutStringContainer.String); } FString USGSenseGloveInfo::ToString(const bool bShortNotation) const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FString OutStringContainer; SGCoreImpl_FSGSenseGloveInfoImpl_ToString_bShortNotation(&InstanceContainer, &OutStringContainer, bShortNotation); return MoveTemp(OutStringContainer.String); } FString USGSenseGloveInfo::SGSerialize() const { Pimpl->SyncImplObject(); FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; FSGIC_FString OutStringContainer; SGCoreImpl_FSGSenseGloveInfoImpl_Serialize(&InstanceContainer, &OutStringContainer); return MoveTemp(OutStringContainer.String); } USGSenseGloveInfo::FImpl::FImpl(USGSenseGloveInfo* InOwner) : Owner(InOwner) { } USGSenseGloveInfo::FImpl::~FImpl() = default; void USGSenseGloveInfo::FImplDeleter::operator()(const FImpl* P) const { delete P; } void USGSenseGloveInfo::FImpl::SyncUProperties() { } void USGSenseGloveInfo::FImpl::SyncImplObject() { }