Files
Plugin/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandLayerKismetLibrary.cpp
T

191 lines
6.9 KiB
C++

/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHandLayerKismetLibrary.h"
#include "SGCore/SGCustomWaveform.h"
#include "SGCore/SGHandLayer.h"
#include "SGCore/SGHandPose.h"
bool USGHandLayerKismetLibrary::DeviceConnected(const bool bRightHanded)
{
return FSGHandLayer::DeviceConnected(bRightHanded);
}
ESGDeviceType USGHandLayerKismetLibrary::GetDeviceType(const bool bRightHanded)
{
return FSGHandLayer::GetDeviceType(bRightHanded);
}
bool USGHandLayerKismetLibrary::GetFirstGloveHandedness()
{
return FSGHandLayer::GetFirstGloveHandedness();
}
int32 USGHandLayerKismetLibrary::GlovesConnected()
{
return FSGHandLayer::GlovesConnected();
}
bool USGHandLayerKismetLibrary::GetGloveInstance(UObject* WorldContextObject,
const bool bRightHanded, USGHapticGlove*& OutGlove)
{
return FSGHandLayer::GetGloveInstance(WorldContextObject, bRightHanded, OutGlove);
}
ESGHapticGloveCalibrationState USGHandLayerKismetLibrary::GetCalibrationState(const bool bRightHanded)
{
return FSGHandLayer::GetCalibrationState(bRightHanded);
}
FString USGHandLayerKismetLibrary::GetCalibrationInstructions(const bool bRightHanded)
{
return FSGHandLayer::GetCalibrationInstructions(bRightHanded);
}
void USGHandLayerKismetLibrary::ResetCalibration(const bool bRightHanded)
{
FSGHandLayer::ResetCalibration(bRightHanded);
}
void USGHandLayerKismetLibrary::EndCalibration(const bool bRightHanded)
{
FSGHandLayer::EndCalibration(bRightHanded);
}
bool USGHandLayerKismetLibrary::GetHandPose(UObject* WorldContextObject,
const bool bRightHanded, USGHandPose*& OutHandPose)
{
return FSGHandLayer::GetHandPose(WorldContextObject, bRightHanded, OutHandPose);
}
void USGHandLayerKismetLibrary::GetWristLocation_bRH_RP_FQuat_RR_TH_OutWP_OutWR(
const bool bRightHanded,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation)
{
FSGHandLayer::GetWristLocation(bRightHanded, ReferencePosition, ReferenceRotation, TrackingHardware,
OutWristPosition, OutWristRotation);
}
void USGHandLayerKismetLibrary::GetWristLocation_bRH_RP_FRotator_RR_TH_OutWP_OutWR(
const bool bRightHanded,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
FSGHandLayer::GetWristLocation(bRightHanded, ReferencePosition, ReferenceRotation, TrackingHardware,
OutWristPosition, OutWristRotation);
}
void USGHandLayerKismetLibrary::StopAllHaptics(const bool bRightHanded)
{
FSGHandLayer::StopAllHaptics(bRightHanded);
}
bool USGHandLayerKismetLibrary::SendHaptics(const bool bRightHanded)
{
return FSGHandLayer::SendHaptics(bRightHanded);
}
bool USGHandLayerKismetLibrary::SupportsCustomWaveform(const bool bRightHanded, const ESGHapticLocation AtLocation)
{
return FSGHandLayer::SupportsCustomWaveform(bRightHanded, AtLocation);
}
bool USGHandLayerKismetLibrary::SendCustomWaveform(
const bool bRightHanded, USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
{
return FSGHandLayer::SendCustomWaveform(bRightHanded, OutWaveform, Location);
}
bool USGHandLayerKismetLibrary::QueueCommand_ForceFeedbackLevels(
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_ForceFeedbackLevels(bRightHanded, Levels01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::QueueCommand_ForceFeedbackLevel(
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::QueueCommand_VibroLevels(
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_VibroLevels(bRightHanded, Levels01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::QueueCommand_VibroLevel_bRH_F_L01_bSI(
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_VibroLevel(bRightHanded, Finger, Level01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::QueueCommand_VibroLevel_bRH_AL_L01_bSI(
const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_VibroLevel(bRightHanded, AtLocation, Level01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::SupportsWristSqueeze(const bool bRightHanded)
{
return FSGHandLayer::SupportsWristSqueeze(bRightHanded);
}
bool USGHandLayerKismetLibrary::QueueCommand_WristSqueeze(
const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::SupportsFlexionLocks(const bool bRightHanded)
{
return FSGHandLayer::SupportsFlexionLocks(bRightHanded);
}
bool USGHandLayerKismetLibrary::QueueCommand_FlexionLock(
const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate);
}
bool USGHandLayerKismetLibrary::QueueCommand_ClearFlexionLock(
const bool bRightHanded, const int32 Finger, const bool bSendImmediate)
{
return FSGHandLayer::QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate);
}