implement the nova2 api updates and bump the senseglove libraries to v2.101.0-3e1693fb
This commit is contained in:
@@ -70,6 +70,12 @@ float USGAnatomyKismetLibrary::GetThumbJointLimit(const bool bRightHanded, const
|
||||
return FSGAnatomy::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax);
|
||||
}
|
||||
|
||||
float USGAnatomyKismetLibrary::ClampJointAngle(
|
||||
const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement)
|
||||
{
|
||||
return FSGAnatomy::ClampJointAngle(Value, Finger, bRightHand, Joint, Movement);
|
||||
}
|
||||
|
||||
float USGAnatomyKismetLibrary::NormalizeFingerFlexion(const float FlexionInDegrees)
|
||||
{
|
||||
return FSGAnatomy::NormalizeFingerFlexion(FlexionInDegrees);
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGBuzzCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::MakeBuzzCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGBuzzCommand::NewBuzzCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::MakeBuzzCommand_BL(
|
||||
UObject* WorldContextObject, const TArray<int32>& BuzzLevels)
|
||||
{
|
||||
return USGBuzzCommand::NewBuzzCommand(WorldContextObject, BuzzLevels);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::MakeBuzzCommand_T_I_M_R_P(
|
||||
UObject* WorldContextObject,
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
{
|
||||
return USGBuzzCommand::NewBuzzCommand(WorldContextObject, Thumb, Index, Middle, Ring, Pinky);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::MakeBuzzCommand_F_BL(
|
||||
UObject* WorldContextObject, const ESGFinger Finger, const int32 BuzzLevel)
|
||||
{
|
||||
return USGBuzzCommand::NewBuzzCommand(WorldContextObject, Finger, BuzzLevel);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::Off(UObject* WorldContextObject)
|
||||
{
|
||||
return USGBuzzCommand::Off(WorldContextObject);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::Copy(UObject* WorldContextObject, const USGBuzzCommand* BuzzCommand)
|
||||
{
|
||||
return BuzzCommand->Copy(WorldContextObject);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGBuzzCommandKismetLibrary::Merge(UObject* WorldContextObject,
|
||||
const USGBuzzCommand* A, const USGBuzzCommand* B)
|
||||
{
|
||||
return A->Merge(WorldContextObject, B);
|
||||
}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGCalibrationDataPointKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGCalibrationDataPoint.h"
|
||||
|
||||
USGCalibrationDataPoint* USGCalibrationDataPointKismetLibrary::MakeCalibrationDataPoint(UObject* WorldContextObject)
|
||||
{
|
||||
return USGCalibrationDataPoint::NewCalibrationDataPoint(WorldContextObject);
|
||||
}
|
||||
|
||||
USGCalibrationDataPoint* USGCalibrationDataPointKismetLibrary::MakeCalibrationDataPoint_CS_CV(
|
||||
UObject* WorldContextObject, const int32 CurrentStage, const TArray<FVector>& CalibrationValues)
|
||||
{
|
||||
return USGCalibrationDataPoint::NewCalibrationDataPoint(WorldContextObject, CurrentStage, CalibrationValues);
|
||||
}
|
||||
|
||||
TArray<FVector> USGCalibrationDataPointKismetLibrary::GetCalibrationValues(
|
||||
const USGCalibrationDataPoint* CalibrationDataPoint)
|
||||
{
|
||||
return CalibrationDataPoint->GetCalibrationValues();
|
||||
}
|
||||
|
||||
int32 USGCalibrationDataPointKismetLibrary::GetStage(const USGCalibrationDataPoint* CalibrationDataPoint)
|
||||
{
|
||||
return CalibrationDataPoint->GetStage();
|
||||
}
|
||||
|
||||
FString USGCalibrationDataPointKismetLibrary::ToLogData(const USGCalibrationDataPoint* CalibrationDataPoint,
|
||||
const FString& Delimiter)
|
||||
{
|
||||
return CalibrationDataPoint->ToLogData(Delimiter);
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGCustomWaveformKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGCustomWaveform.h"
|
||||
|
||||
USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform(UObject* WorldContextObject)
|
||||
{
|
||||
return USGCustomWaveform::NewCustomWaveform(WorldContextObject);
|
||||
}
|
||||
|
||||
USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform_A_D(
|
||||
UObject* WorldContextObject, const float Amplitude, const float Duration)
|
||||
{
|
||||
return USGCustomWaveform::NewCustomWaveform(WorldContextObject, Amplitude, Duration);
|
||||
}
|
||||
|
||||
USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform_A_D_F(
|
||||
UObject* WorldContextObject, const float Amplitude, const float Duration, const float Frequency)
|
||||
{
|
||||
return USGCustomWaveform::NewCustomWaveform(WorldContextObject, Amplitude, Duration, Frequency);
|
||||
}
|
||||
|
||||
FString USGCustomWaveformKismetLibrary::ToString_T(const ESGWaveformType Type)
|
||||
{
|
||||
return USGCustomWaveform::ToString(Type);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetAmplitude(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetAmplitude();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetAmplitude(USGCustomWaveform* CustomWaveform, const float Amplitude)
|
||||
{
|
||||
CustomWaveform->SetAmplitude(Amplitude);
|
||||
}
|
||||
|
||||
ESGWaveformType USGCustomWaveformKismetLibrary::GetWaveType(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetWaveType();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetWaveType(USGCustomWaveform* CustomWaveform, const ESGWaveformType Type)
|
||||
{
|
||||
CustomWaveform->SetWaveType(Type);
|
||||
}
|
||||
|
||||
bool USGCustomWaveformKismetLibrary::IsInfinite(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->IsInfinite();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetInfinite(USGCustomWaveform* CustomWaveform, const bool bInfinite)
|
||||
{
|
||||
CustomWaveform->SetInfinite(bInfinite);
|
||||
}
|
||||
|
||||
int32 USGCustomWaveformKismetLibrary::GetRepeatAmount(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetRepeatAmount();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetRepeatAmount(USGCustomWaveform* CustomWaveform, const int32 Amount)
|
||||
{
|
||||
CustomWaveform->SetRepeatAmount(Amount);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetAttackTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetAttackTime();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetAttackTime(USGCustomWaveform* CustomWaveform, const float Time)
|
||||
{
|
||||
CustomWaveform->SetAttackTime(Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetSustainTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetSustainTime();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetSustainTime(USGCustomWaveform* CustomWaveform, const float Time)
|
||||
{
|
||||
CustomWaveform->SetSustainTime(Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetDecayTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetDecayTime();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetDecayTime(USGCustomWaveform* CustomWaveform, const float Time)
|
||||
{
|
||||
CustomWaveform->SetDecayTime(Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetFrequencyStart(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetFrequencyStart();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetFrequencyStart(USGCustomWaveform* CustomWaveform, const float Frequency)
|
||||
{
|
||||
CustomWaveform->SetFrequencyStart(Frequency);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetFrequencyEnd(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetFrequencyEnd();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetFrequencyEnd(USGCustomWaveform* CustomWaveform, const float Frequency)
|
||||
{
|
||||
CustomWaveform->SetFrequencyEnd(Frequency);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetFrequencySwitchTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetFrequencySwitchTime();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetFrequencySwitchTime(USGCustomWaveform* CustomWaveform, const float Time)
|
||||
{
|
||||
CustomWaveform->SetFrequencySwitchTime(Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetFrequencySwitchFactor(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetFrequencySwitchFactor();
|
||||
}
|
||||
|
||||
void USGCustomWaveformKismetLibrary::SetFrequencySwitchFactor(USGCustomWaveform* CustomWaveform, const float Time)
|
||||
{
|
||||
CustomWaveform->SetFrequencySwitchFactor(Time);
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetEffectTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetEffectTime();
|
||||
}
|
||||
|
||||
float USGCustomWaveformKismetLibrary::GetTotalEffectTime(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->GetTotalEffectTime();
|
||||
}
|
||||
|
||||
bool USGCustomWaveformKismetLibrary::FrequencyJumps(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->FrequencyJumps();
|
||||
}
|
||||
|
||||
bool USGCustomWaveformKismetLibrary::Equals(const USGCustomWaveform* A, const USGCustomWaveform* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGCustomWaveformKismetLibrary::ToString(const USGCustomWaveform* CustomWaveform)
|
||||
{
|
||||
return CustomWaveform->ToString();
|
||||
}
|
||||
@@ -36,12 +36,27 @@
|
||||
#include "SGCoreKismet/SGDeviceKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGDevice.h"
|
||||
#include "SGCore/SGHapticChannelInfo.h"
|
||||
|
||||
void USGDeviceKismetLibrary::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion)
|
||||
{
|
||||
return USGDevice::ParseFirmware(RawFirmware, OutMainVersion, OutSubVersion);
|
||||
}
|
||||
|
||||
bool USGDeviceKismetLibrary::FirmwareNewerThan_MF_MF_RM_RS_bI(const int32 MyFirmwareMain, const int32 MyFirmwareSub,
|
||||
const int32 ReferenceMain, const int32 ReferenceSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return USGDevice::FirmwareNewerThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDeviceKismetLibrary::FirmwareOlderThan_MF_MF_RM_RS_bI(const int32 MyFirmwareMain, const int32 MyFirmwareSub,
|
||||
const int32 ReferenceMain, const int32 ReferenceSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return USGDevice::FirmwareOlderThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive);
|
||||
}
|
||||
|
||||
FString USGDeviceKismetLibrary::ToString_DT(const ESGDeviceType DeviceType)
|
||||
{
|
||||
return USGDevice::ToString(DeviceType);
|
||||
@@ -77,6 +92,20 @@ FString USGDeviceKismetLibrary::GetFirmwareString(const USGDevice* SGDevice)
|
||||
return SGDevice->GetFirmwareString();
|
||||
}
|
||||
|
||||
bool USGDeviceKismetLibrary::FirmwareNewerThan_FM_FS_bI(const USGDevice* SGDevice,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return SGDevice->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDeviceKismetLibrary::FirmwareOlderThan_FM_FS_bI(const USGDevice* SGDevice,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return SGDevice->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
FString USGDeviceKismetLibrary::GetAddress(const USGDevice* SGDevice)
|
||||
{
|
||||
return SGDevice->GetAddress();
|
||||
@@ -132,6 +161,21 @@ bool USGDeviceKismetLibrary::GetBatteryLevel(USGDevice* SGDevice, float& OutLeve
|
||||
return SGDevice->GetBatteryLevel(OutLevel);
|
||||
}
|
||||
|
||||
void USGDeviceKismetLibrary::SetHapticChannels(USGDevice* SGDevice, const USGHapticChannelInfo* Channels)
|
||||
{
|
||||
SGDevice->SetHapticChannels(Channels);
|
||||
}
|
||||
|
||||
int32 USGDeviceKismetLibrary::GetHapticChannelCount(const USGDevice* SGDevice)
|
||||
{
|
||||
return SGDevice->GetHapticChannelCount();
|
||||
}
|
||||
|
||||
int32 USGDeviceKismetLibrary::GetHapticChannelCount_CT(const USGDevice* SGDevice, ESGHapticChannelType ChannelType)
|
||||
{
|
||||
return SGDevice->GetHapticChannelCount(ChannelType);
|
||||
}
|
||||
|
||||
FString USGDeviceKismetLibrary::ToString(const USGDevice* SGDevice)
|
||||
{
|
||||
return SGDevice->ToString();
|
||||
|
||||
@@ -81,9 +81,10 @@ bool USGDeviceListKismetLibrary::GetSensorDataString(const int32 IpcIndex, const
|
||||
return FSGDeviceList::GetSensorDataString(IpcIndex, IpcAddress, OutString);
|
||||
}
|
||||
|
||||
bool USGDeviceListKismetLibrary::SendHaptics(const int32 IpcIndex, const FString& IpcAddress, const FString& Commands)
|
||||
bool USGDeviceListKismetLibrary::SendHaptics(
|
||||
const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands)
|
||||
{
|
||||
return FSGDeviceList::SendHaptics(IpcIndex, IpcAddress, Commands);
|
||||
return FSGDeviceList::SendHaptics(IpcIndex, IpcAddress, ChannelIndex, Commands);
|
||||
}
|
||||
|
||||
FString USGDeviceListKismetLibrary::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress,
|
||||
|
||||
@@ -77,4 +77,18 @@ int32 USGDeviceModelKismetLibrary::GetFirmwareVersion(const USGDeviceModel* Devi
|
||||
int32 USGDeviceModelKismetLibrary::GetSubFirmwareVersion(const USGDeviceModel* DeviceModel)
|
||||
{
|
||||
return DeviceModel->GetSubFirmwareVersion();
|
||||
}
|
||||
|
||||
bool USGDeviceModelKismetLibrary::FirmwareNewerThan(const USGDeviceModel* DeviceModel,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return DeviceModel->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGDeviceModelKismetLibrary::FirmwareOlderThan(const USGDeviceModel* DeviceModel,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub,
|
||||
const bool bInclusive)
|
||||
{
|
||||
return DeviceModel->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGForceFeedbackCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::MakeForceFeedbackCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGForceFeedbackCommand::NewForceFeedbackCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::MakeForceFeedbackCommand_FFL(
|
||||
UObject* WorldContextObject, const TArray<int32>& ForceFeedbackLevels)
|
||||
{
|
||||
return USGForceFeedbackCommand::NewForceFeedbackCommand(WorldContextObject, ForceFeedbackLevels);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::MakeForceFeedbackCommand_T_I_M_R_P(
|
||||
UObject* WorldContextObject,
|
||||
const int32 Thumb, const int32 Index, const int32 Middle, const int32 Ring, const int32 Pinky)
|
||||
{
|
||||
return USGForceFeedbackCommand::NewForceFeedbackCommand(
|
||||
WorldContextObject, Thumb, Index, Middle, Ring, Pinky);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::MakeForceFeedbackCommand_F_BL(
|
||||
UObject* WorldContextObject, const ESGFinger Finger, const int32 BuzzLevel)
|
||||
{
|
||||
return USGForceFeedbackCommand::NewForceFeedbackCommand(WorldContextObject, Finger, BuzzLevel);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::Off(UObject* WorldContextObject)
|
||||
{
|
||||
return USGForceFeedbackCommand::Off(WorldContextObject);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::Copy(UObject* WorldContextObject,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
{
|
||||
return ForceFeedbackCommand->Copy(WorldContextObject);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGForceFeedbackCommandKismetLibrary::Merge(UObject* WorldContextObject,
|
||||
const USGForceFeedbackCommand* A,
|
||||
const USGForceFeedbackCommand* B)
|
||||
{
|
||||
return A->Merge(WorldContextObject, B);
|
||||
}
|
||||
+25
-98
@@ -43,120 +43,47 @@ USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator(UObj
|
||||
return USGHandInterpolator::NewHandInterpolator(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JI(
|
||||
UObject* WorldContextObject, const TArray<FSGInterpolationSetArray>& JointInterpolations)
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_bRH(
|
||||
UObject* WorldContextObject, const bool bRightHanded)
|
||||
{
|
||||
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations);
|
||||
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JI_FQuat_CSR(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::Deserialize(
|
||||
UObject* WorldContextObject, const FString& SerializedString, const bool bRightHanded)
|
||||
{
|
||||
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations, CmcStartRotation);
|
||||
return USGHandInterpolator::Deserialize(WorldContextObject, SerializedString, bRightHanded);
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JI_FRotator_CSR(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
|
||||
float USGHandInterpolatorKismetLibrary::CalculateAngle_M_ESGFingerMovement_V_bAL(
|
||||
const USGHandInterpolator* HandInterpolator,
|
||||
const ESGFingerMovement Movement, const float Value, const bool bApplyLimits)
|
||||
{
|
||||
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations, CmcStartRotation);
|
||||
return HandInterpolator->CalculateAngle(Movement, Value, bApplyLimits);
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::Default(UObject* WorldContextObject, const bool bRightHanded)
|
||||
float USGHandInterpolatorKismetLibrary::CalculateAngle_M_ESGFingerMovement_V_bAL(
|
||||
const USGHandInterpolator* HandInterpolator,
|
||||
const ESGThumbMovement Movement, const float Value, const bool bApplyLimits)
|
||||
{
|
||||
return USGHandInterpolator::Default(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGHandInterpolatorKismetLibrary::Deserialize(UObject* WorldContextObject,
|
||||
const FString& SerializedString)
|
||||
{
|
||||
return USGHandInterpolator::Deserialize(WorldContextObject, SerializedString);
|
||||
}
|
||||
|
||||
TArray<FVector> USGHandInterpolatorKismetLibrary::InterpolateFingerAngles(
|
||||
const ESGFinger Finger, const USGHandInterpolator* Interpolator, const FVector& TotalGloveAngles)
|
||||
{
|
||||
return USGHandInterpolator::InterpolateFingerAngles(Finger, Interpolator, TotalGloveAngles);
|
||||
}
|
||||
|
||||
TArray<FVector> USGHandInterpolatorKismetLibrary::InterpolateThumbAngles(
|
||||
const USGHandInterpolator* Interpolator, const FVector& TotalGloveAngles)
|
||||
{
|
||||
return USGHandInterpolator::InterpolateThumbAngles(Interpolator, TotalGloveAngles);
|
||||
return HandInterpolator->CalculateAngle(Movement, Value, bApplyLimits);
|
||||
}
|
||||
|
||||
TArray<FSGVectorArray> USGHandInterpolatorKismetLibrary::InterpolateHandAngles(
|
||||
const USGHandInterpolator* Interpolator, const TArray<FVector>& TotalAngles)
|
||||
const USGHandInterpolator* HandInterpolator,
|
||||
const TArray<FSGFloatArray>& Flexions, const TArray<float>& Abductions, const float CmcTwist) const
|
||||
{
|
||||
return FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(
|
||||
USGHandInterpolator::InterpolateHandAngles(Interpolator, TotalAngles));
|
||||
}
|
||||
TArray<TArray<float>> FlexionsNestedArray{
|
||||
FSGArrayUtils::FromNestedBPArray<
|
||||
float, FSGFloatArray, &FSGFloatArray::FloatArray>(Flexions)
|
||||
};
|
||||
|
||||
TArray<FSGInterpolationSetArray> USGHandInterpolatorKismetLibrary::GetJointInterpolations(
|
||||
UObject* WorldContextObject, const USGHandInterpolator* HandInterpolator) const
|
||||
{
|
||||
return FSGArrayUtils::ToNestedBPArray<USGInterpolationSet, FSGInterpolationSetArray>(
|
||||
HandInterpolator->GetJointInterpolations(WorldContextObject));
|
||||
}
|
||||
TArray<FSGVectorArray> Angles{
|
||||
FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(
|
||||
HandInterpolator->InterpolateHandAngles(FlexionsNestedArray, Abductions, CmcTwist))
|
||||
};
|
||||
|
||||
FQuat USGHandInterpolatorKismetLibrary::GetCmcStartRotation_FQuat(const USGHandInterpolator* HandInterpolator) const
|
||||
{
|
||||
return HandInterpolator->GetCmcStartRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGHandInterpolatorKismetLibrary::GetCmcStartRotation_FRotator(
|
||||
const USGHandInterpolator* HandInterpolator) const
|
||||
{
|
||||
return HandInterpolator->GetCmcStartRotation();
|
||||
}
|
||||
|
||||
float USGHandInterpolatorKismetLibrary::CalculateAngle_F_int32_M_V(
|
||||
const USGHandInterpolator* HandInterpolator, const ESGFinger Finger, const int32 Movement, const float Value)
|
||||
{
|
||||
return HandInterpolator->CalculateAngle(Finger, Movement, Value);
|
||||
}
|
||||
|
||||
float USGHandInterpolatorKismetLibrary::CalculateAngle_F_ESGFingerMovement_M_V(
|
||||
const USGHandInterpolator* HandInterpolator, const ESGFinger Finger, const ESGFingerMovement Movement,
|
||||
const float Value)
|
||||
{
|
||||
return HandInterpolator->CalculateAngle(Finger, Movement, Value);
|
||||
}
|
||||
|
||||
float USGHandInterpolatorKismetLibrary::CalculateAngle_F_ESGThumbMovement_M_V(
|
||||
const USGHandInterpolator* HandInterpolator, const ESGFinger Finger, const ESGThumbMovement Movement,
|
||||
const float Value)
|
||||
{
|
||||
return HandInterpolator->CalculateAngle(Finger, Movement, Value);
|
||||
}
|
||||
|
||||
void USGHandInterpolatorKismetLibrary::SetInterpolation_int32_F_int32_M_IA0_IA1_AA0_AA1(
|
||||
USGHandInterpolator* HandInterpolator, const int32 Finger, const int32 Movement,
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
return HandInterpolator->SetInterpolation(Finger, Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
}
|
||||
|
||||
void USGHandInterpolatorKismetLibrary::SetInterpolation_ESGFinger_F_ESGFingerMovement_M_IA0_IA1_AA0_AA1(
|
||||
USGHandInterpolator* HandInterpolator, const ESGFinger Finger, const ESGFingerMovement Movement,
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
return HandInterpolator->SetInterpolation(Finger, Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
}
|
||||
|
||||
void USGHandInterpolatorKismetLibrary::SetInterpolation_M_IA0_IA1_AA0_AA1(
|
||||
USGHandInterpolator* HandInterpolator, const ESGThumbMovement Movement,
|
||||
const float InputAt0, const float InputAt1, const float AngleAt0, const float AngleAt1)
|
||||
{
|
||||
return HandInterpolator->SetInterpolation(Movement, InputAt0, InputAt1, AngleAt0, AngleAt1);
|
||||
}
|
||||
|
||||
USGInterpolationSet* USGHandInterpolatorKismetLibrary::GetInterpolation(
|
||||
UObject* WorldContextObject,
|
||||
const USGHandInterpolator* HandInterpolator, const int32 Finger, const int32 Movement)
|
||||
{
|
||||
return HandInterpolator->GetInterpolation(WorldContextObject, Finger, Movement);
|
||||
return MoveTemp(Angles);
|
||||
}
|
||||
|
||||
bool USGHandInterpolatorKismetLibrary::Equals(const USGHandInterpolator* A, const USGHandInterpolator* B)
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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(const bool bRightHanded,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
FSGHandLayer::GetWristLocation(bRightHanded, ReferencePosition, ReferenceRotation, TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
bool USGHandLayerKismetLibrary::SendHaptics(const bool bRightHanded)
|
||||
{
|
||||
return FSGHandLayer::SendHaptics(bRightHanded);
|
||||
}
|
||||
|
||||
void USGHandLayerKismetLibrary::StopAllHaptics(const bool bRightHanded)
|
||||
{
|
||||
FSGHandLayer::StopAllHaptics(bRightHanded);
|
||||
}
|
||||
|
||||
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_ForceFeedbackLevels(
|
||||
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
|
||||
{
|
||||
return FSGHandLayer::QueueCommand_ForceFeedbackLevels(bRightHanded, Levels01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool USGHandLayerKismetLibrary::QueueCommand_SetVibroLevel(
|
||||
const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate)
|
||||
{
|
||||
return FSGHandLayer::QueueCommand_SetVibroLevel(bRightHanded, Finger, Level01, bSendImmediate);
|
||||
}
|
||||
|
||||
bool USGHandLayerKismetLibrary::QueueCommand_SetVibroLevels(
|
||||
const bool bRightHanded, const TArray<float>& Levels01, const bool bSendImmediate)
|
||||
{
|
||||
return FSGHandLayer::QueueCommand_SetVibroLevels(bRightHanded, Levels01, bSendImmediate);
|
||||
}
|
||||
|
||||
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::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);
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHandProfileKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
|
||||
USGHandProfile* USGHandProfileKismetLibrary::MakeHandProfile(UObject* WorldContextObject)
|
||||
{
|
||||
return USGHandProfile::NewHandProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfileKismetLibrary::MakeHandProfile_bRH_SGHP_NGHP(
|
||||
UObject* WorldContextObject,
|
||||
const bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile, const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
return USGHandProfile::NewHandProfile(WorldContextObject,
|
||||
bRightHanded, SenseGloveHandProfile, NovaGloveHandProfile);
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfileKismetLibrary::Default(UObject* WorldContextObject, const bool bRightHanded)
|
||||
{
|
||||
return USGHandProfile::Default(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
USGHandProfile* USGHandProfileKismetLibrary::Deserialize(UObject* WorldContextObject, const FString& SerializedString)
|
||||
{
|
||||
return USGHandProfile::Deserialize(WorldContextObject, SerializedString);
|
||||
}
|
||||
|
||||
FString USGHandProfileKismetLibrary::GetProfileDirectory()
|
||||
{
|
||||
return USGHandProfile::GetProfileDirectory();
|
||||
}
|
||||
|
||||
FString USGHandProfileKismetLibrary::GetLeftHandFileName()
|
||||
{
|
||||
return USGHandProfile::GetLeftHandFileName();
|
||||
}
|
||||
|
||||
FString USGHandProfileKismetLibrary::GetRightHandFileName()
|
||||
{
|
||||
return USGHandProfile::GetRightHandFileName();
|
||||
}
|
||||
|
||||
FString USGHandProfileKismetLibrary::GetProfileFileName(const bool bRightHanded)
|
||||
{
|
||||
return USGHandProfile::GetProfileFileName(bRightHanded);
|
||||
}
|
||||
|
||||
bool USGHandProfileKismetLibrary::GetLatestProfile(
|
||||
UObject* WorldContextObject, const bool bRightHanded, USGHandProfile*& OutLatestProfile)
|
||||
{
|
||||
return USGHandProfile::GetLatestProfile(WorldContextObject, bRightHanded, OutLatestProfile);
|
||||
}
|
||||
|
||||
bool USGHandProfileKismetLibrary::StoreProfile(const USGHandProfile* ProfileToStore)
|
||||
{
|
||||
return USGHandProfile::StoreProfile(ProfileToStore);
|
||||
}
|
||||
|
||||
bool USGHandProfileKismetLibrary::ResetCalibration_bRightHanded_bOnDisk(const bool bRightHanded, const bool bOnDisk)
|
||||
{
|
||||
return USGHandProfile::ResetCalibration(bRightHanded, bOnDisk);
|
||||
}
|
||||
|
||||
void USGHandProfileKismetLibrary::ResetCalibration_bObDisk(const bool bOnDisk)
|
||||
{
|
||||
/// NOTE
|
||||
/// Due to overload method with a default parameter value, the compiler will get confused and stops with the error:
|
||||
/// "call to 'ResetCalibration' is ambiguous"
|
||||
/// So:
|
||||
void (*RC)(bool) = &USGHandProfile::ResetCalibration;
|
||||
RC(bOnDisk);
|
||||
}
|
||||
|
||||
bool USGHandProfileKismetLibrary::IsRight(const USGHandProfile* HandProfile)
|
||||
{
|
||||
return HandProfile->IsRight();
|
||||
}
|
||||
|
||||
USGSenseGloveHandProfile* USGHandProfileKismetLibrary::GetSenseGloveHandProfile(
|
||||
UObject* WorldContextObject, const USGHandProfile* HandProfile)
|
||||
{
|
||||
return HandProfile->GetSenseGloveHandProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGHandProfileKismetLibrary::GetNovaGloveHandProfile(
|
||||
UObject* WorldContextObject, const USGHandProfile* HandProfile)
|
||||
{
|
||||
return HandProfile->GetNovaGloveHandProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGHandProfileKismetLibrary::Equals(const USGHandProfile* A, const USGHandProfile* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
void USGHandProfileKismetLibrary::Reset(USGHandProfile* HandProfile)
|
||||
{
|
||||
HandProfile->Reset();
|
||||
}
|
||||
|
||||
FString USGHandProfileKismetLibrary::SGSerialize(const USGHandProfile* HandProfile)
|
||||
{
|
||||
return HandProfile->SGSerialize();
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticChannelInfoKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHapticChannelInfo.h"
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::MakeHapticChannelInfo(UObject* WorldContextObject)
|
||||
{
|
||||
return USGHapticChannelInfo::NewHapticChannelInfo(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::MakeHapticChannelInfo_SI_FAFI(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex)
|
||||
{
|
||||
return USGHapticChannelInfo::NewHapticChannelInfo(WorldContextObject, StreamIndex, FireAndForgetIndex);
|
||||
}
|
||||
|
||||
FString USGHapticChannelInfoKismetLibrary::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex)
|
||||
{
|
||||
return USGHapticChannelInfo::GenerateAddress(DeviceIndex, ChannelIndex);
|
||||
}
|
||||
|
||||
USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::Parse(UObject* WorldContextObject, const FString& IpcString)
|
||||
{
|
||||
return USGHapticChannelInfo::Parse(WorldContextObject, IpcString);
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfoKismetLibrary::GetStreamingType()
|
||||
{
|
||||
return USGHapticChannelInfo::GetStreamingType();
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfoKismetLibrary::GetFireAndForgetType()
|
||||
{
|
||||
return USGHapticChannelInfo::GetFireAndForgetType();
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfoKismetLibrary::GetStreamChannelCount(const USGHapticChannelInfo* HapticChannelInfo)
|
||||
{
|
||||
return HapticChannelInfo->GetStreamChannelCount();
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfoKismetLibrary::GetFireAndForgetChannelCount(const USGHapticChannelInfo* HapticChannelInfo)
|
||||
{
|
||||
return HapticChannelInfo->GetFireAndForgetChannelCount();
|
||||
}
|
||||
|
||||
int32 USGHapticChannelInfoKismetLibrary::GetTotalChannelCount(const USGHapticChannelInfo* HapticChannelInfo)
|
||||
{
|
||||
return HapticChannelInfo->GetTotalChannelCount();
|
||||
}
|
||||
|
||||
FString USGHapticChannelInfoKismetLibrary::GetAddress_Unguarded(const USGHapticChannelInfo* HapticChannelInfo,
|
||||
const ESGHapticChannelType Type, const int32 TypeIndex)
|
||||
{
|
||||
return HapticChannelInfo->GetAddress_Unguarded(Type, TypeIndex);
|
||||
}
|
||||
|
||||
void USGHapticChannelInfoKismetLibrary::GetIpcParams_Unguarded(USGHapticChannelInfo* HapticChannelInfo,
|
||||
const ESGHapticChannelType Type, const int32 TypeIndex,
|
||||
int32& OutIndex, FString& OutAddressString)
|
||||
{
|
||||
HapticChannelInfo->GetIpcParams_Unguarded(Type, TypeIndex, OutIndex, OutAddressString);
|
||||
}
|
||||
|
||||
void USGHapticChannelInfoKismetLibrary::RegenerateAddresses(USGHapticChannelInfo* HapticChannelInfo,
|
||||
const int32 ForDeviceIndex)
|
||||
{
|
||||
HapticChannelInfo->RegenerateAddresses(ForDeviceIndex);
|
||||
}
|
||||
|
||||
TArray<FString> USGHapticChannelInfoKismetLibrary::GetAllAddresses(const USGHapticChannelInfo* HapticChannelInfo)
|
||||
{
|
||||
return HapticChannelInfo->GetAllAddresses();
|
||||
}
|
||||
-128
@@ -1,128 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveCalibrationCheckKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHapticGloveCalibrationCheck.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
|
||||
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheckKismetLibrary::MakeHapticGloveCalibrationCheck(
|
||||
UObject* WorldContextObject)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHapticGloveCalibrationCheck* USGHapticGloveCalibrationCheckKismetLibrary::MakeHapticGloveCalibrationCheck_LCR(
|
||||
UObject* WorldContextObject, const USGSensorRange* LastCalibrationRange)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::NewHapticGloveCalibrationCheck(WorldContextObject, LastCalibrationRange);
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetSenseGloveThreshold()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetSenseGloveThreshold();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetNovaGloveThreshold()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetNovaGloveThreshold();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetSenseGloveMinFlexion()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetSenseGloveMinFlexion();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetNovaGloveMinFlexion()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetNovaGloveMinFlexion();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetSenseGloveMinAbduction()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetSenseGloveMinAbduction();
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationCheckKismetLibrary::GetNovaGloveMinAbduction()
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::GetNovaGloveMinAbduction();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheckKismetLibrary::NeedsCheck(const ESGDeviceType DeviceType)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::NeedsCheck(DeviceType);
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationCheckKismetLibrary::OutOfBounds(
|
||||
const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues, const ESGDeviceType DeviceType)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::OutOfBounds(PreviousRange, CurrentValues, DeviceType);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheckKismetLibrary::MovedMinimum(const TArray<FVector>& CurrentRange,
|
||||
const ESGDeviceType DeviceType)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::MovedMinimum(CurrentRange, DeviceType);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheckKismetLibrary::MatchesLast(
|
||||
const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange, const ESGDeviceType DeviceType)
|
||||
{
|
||||
return USGHapticGloveCalibrationCheck::MatchesLast(CurrentRange, LastRange, DeviceType);
|
||||
}
|
||||
|
||||
ESGCalibrationStage USGHapticGloveCalibrationCheckKismetLibrary::GetCalibrationStage(
|
||||
const USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck)
|
||||
{
|
||||
return HapticGloveCalibrationCheck->GetCalibrationStage();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationCheckKismetLibrary::ReachedConclusion(
|
||||
const USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck)
|
||||
{
|
||||
return HapticGloveCalibrationCheck->ReachedConclusion();
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationCheckKismetLibrary::Reset(USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck)
|
||||
{
|
||||
HapticGloveCalibrationCheck->Reset();
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationCheckKismetLibrary::CheckRange(
|
||||
USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck, const TArray<FVector>& CurrentValues,
|
||||
const float DeltaSeconds, const ESGDeviceType DeviceType)
|
||||
{
|
||||
HapticGloveCalibrationCheck->CheckRange(CurrentValues, DeltaSeconds, DeviceType);
|
||||
}
|
||||
-175
@@ -1,175 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveCalibrationSequenceKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHapticGloveCalibrationSequence.h"
|
||||
|
||||
USGHapticGloveCalibrationSequence*
|
||||
USGHapticGloveCalibrationSequenceKismetLibrary::MakeHapticGloveCalibrationSequence_GTC(
|
||||
UObject* WorldContextObject, const USGHapticGlove* GloveToCalibrate)
|
||||
{
|
||||
return USGHapticGloveCalibrationSequence::NewHapticGloveCalibrationSequence(WorldContextObject, GloveToCalibrate);
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationSequenceKismetLibrary::GetMaxDataPoints()
|
||||
{
|
||||
return USGHapticGloveCalibrationSequence::GetMaxDataPoints();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::CompileProfile_SR_FD_bRH_OutP(
|
||||
UObject* WorldContextObject,
|
||||
const USGSensorRange* SensorRange, const ESGDeviceType ForDevice, const bool bRightHanded,
|
||||
USGHandProfile*& OutProfile)
|
||||
{
|
||||
return USGHapticGloveCalibrationSequence::CompileProfile(WorldContextObject,
|
||||
SensorRange, ForDevice, bRightHanded, OutProfile);
|
||||
}
|
||||
|
||||
USGHapticGlove* USGHapticGloveCalibrationSequenceKismetLibrary::GetLinkedGlove(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetLinkedGlove(WorldContextObject);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequenceKismetLibrary::SetLinkedGlove(
|
||||
USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, const USGHapticGlove* LinkedGlove)
|
||||
{
|
||||
HapticGloveCalibrationSequence->SetLinkedGlove(LinkedGlove);
|
||||
}
|
||||
|
||||
TArray<USGCalibrationDataPoint*> USGHapticGloveCalibrationSequenceKismetLibrary::GetCalibrationPoints(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetCalibrationPoints(WorldContextObject);
|
||||
}
|
||||
|
||||
float USGHapticGloveCalibrationSequenceKismetLibrary::GetElapsedTime(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetElapsedTime();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::IsManuallyCompleted(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->IsManuallyCompleted();
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCalibrationSequenceKismetLibrary::GetCurrentStage(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetCurrentStage();
|
||||
}
|
||||
|
||||
int64 USGHapticGloveCalibrationSequenceKismetLibrary::GetCalibrationPointsCount(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return StaticCast<int64>(HapticGloveCalibrationSequence->GetCalibrationPointsCount());
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::AutoCompleted(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->AutoCompleted();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::Completed(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->Completed();
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequenceKismetLibrary::Reset(
|
||||
USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
HapticGloveCalibrationSequence->Reset();
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequenceKismetLibrary::AddDataPoint(
|
||||
USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, const TArray<FVector>& CalibrationData)
|
||||
{
|
||||
HapticGloveCalibrationSequence->AddDataPoint(CalibrationData);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequenceKismetLibrary::Update(
|
||||
USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, const float DeltaSeconds)
|
||||
{
|
||||
HapticGloveCalibrationSequence->Update(DeltaSeconds);
|
||||
}
|
||||
|
||||
void USGHapticGloveCalibrationSequenceKismetLibrary::ConfirmCurrentStep(
|
||||
USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence)
|
||||
{
|
||||
HapticGloveCalibrationSequence->ConfirmCurrentStep();
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::CompileRange(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, USGSensorRange*& OutSensorRange)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->CompileRange(WorldContextObject, OutSensorRange);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::CompileProfile_FD_bRH_OutP(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
const ESGDeviceType ForDevice, const bool bRightHanded, USGHandProfile*& OutProfile)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->CompileProfile(WorldContextObject, ForDevice, bRightHanded, OutProfile);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::GetHandPose_OutCHP(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, USGHandPose*& OutCurrentHandPose)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetHandPose(WorldContextObject, OutCurrentHandPose);
|
||||
}
|
||||
|
||||
bool USGHapticGloveCalibrationSequenceKismetLibrary::GetHandPose_bRH_OutCHP(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
const bool bRightHanded, USGHandPose*& OutCurrentHandPose)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetHandPose(WorldContextObject, bRightHanded, OutCurrentHandPose);
|
||||
}
|
||||
|
||||
FString USGHapticGloveCalibrationSequenceKismetLibrary::GetCurrentInstruction(
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence, const FString& NextStepKey)
|
||||
{
|
||||
return HapticGloveCalibrationSequence->GetCurrentInstruction(NextStepKey);
|
||||
}
|
||||
-185
@@ -1,185 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveCommandBufferKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGHapticGloveCommandBuffer.h"
|
||||
#include "SGCore/SGTimedBuzzCommand.h"
|
||||
#include "SGCore/SGTimedThumpCommand.h"
|
||||
|
||||
USGHapticGloveCommandBuffer* USGHapticGloveCommandBufferKismetLibrary::MakeHapticGloveCommandBuffer(
|
||||
UObject* WorldContextObject)
|
||||
{
|
||||
return USGHapticGloveCommandBuffer::NewHapticGloveCommandBuffer(WorldContextObject);
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCommandBufferKismetLibrary::GetMaxForceFeedbackCommands()
|
||||
{
|
||||
return USGHapticGloveCommandBuffer::GetMaxForceFeedbackCommands();
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCommandBufferKismetLibrary::GetMaxBuzzCommands()
|
||||
{
|
||||
return USGHapticGloveCommandBuffer::GetMaxBuzzCommands();
|
||||
}
|
||||
|
||||
int32 USGHapticGloveCommandBufferKismetLibrary::GetMaxThumpCommands()
|
||||
{
|
||||
return USGHapticGloveCommandBuffer::GetMaxThumpCommands();
|
||||
}
|
||||
|
||||
TArray<USGForceFeedbackCommand*> USGHapticGloveCommandBufferKismetLibrary::GetForceFeedbackCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetForceFeedbackCommandsQueue(WorldContextObject);
|
||||
}
|
||||
|
||||
TArray<USGTimedBuzzCommand*> USGHapticGloveCommandBufferKismetLibrary::GetBuzzCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetBuzzCommandsQueue(WorldContextObject);
|
||||
}
|
||||
|
||||
TArray<USGTimedThumpCommand*> USGHapticGloveCommandBufferKismetLibrary::GetThumperCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetThumperCommandsQueue(WorldContextObject);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::ClearForceFeedbackCommandsQueue(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
HapticGloveCommandBuffer->ClearForceFeedbackCommandsQueue();
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::ClearVibrations(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
HapticGloveCommandBuffer->ClearVibrations();
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::Clear(USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
HapticGloveCommandBuffer->Clear();
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::AddCommand_ForceFeedbackCommand(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
{
|
||||
HapticGloveCommandBuffer->AddCommand(ForceFeedbackCommand);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::AddCommand_BuzzCommand(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGTimedBuzzCommand* BuzzCommand)
|
||||
{
|
||||
HapticGloveCommandBuffer->AddCommand(BuzzCommand);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::AddCommand_ThumpCommand(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGTimedThumpCommand* ThumpCommand)
|
||||
{
|
||||
HapticGloveCommandBuffer->AddCommand(ThumpCommand);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::UpdateTimedCommands(
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer, const float DeltaSeconds)
|
||||
{
|
||||
HapticGloveCommandBuffer->UpdateTimedCommands(DeltaSeconds);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGHapticGloveCommandBufferKismetLibrary::GetTotalForceFeedbackLevels_LastForceFeedbackCommand(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* LastForceFeedbackCommand)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetTotalForceFeedbackLevels(WorldContextObject, LastForceFeedbackCommand);
|
||||
}
|
||||
|
||||
USGForceFeedbackCommand* USGHapticGloveCommandBufferKismetLibrary::GetTotalForceFeedbackLevels(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetTotalForceFeedbackLevels(WorldContextObject);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGHapticGloveCommandBufferKismetLibrary::GetTotalBuzzLevels(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetTotalBuzzLevels(WorldContextObject);
|
||||
}
|
||||
|
||||
USGThumperCommand* USGHapticGloveCommandBufferKismetLibrary::GetTotalThumperLevels(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer)
|
||||
{
|
||||
return HapticGloveCommandBuffer->GetTotalThumperLevels(WorldContextObject);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::FlushHaptics_LBL_OutFFC_OutBC_OutTC_bCFFQ(
|
||||
UObject* WorldContextObject,
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||
USGBuzzCommand*& OutBuzzCommand,
|
||||
USGThumperCommand*& OutThumperCommand,
|
||||
const bool bClearForceFeedbackQueue)
|
||||
{
|
||||
HapticGloveCommandBuffer->FlushHaptics(WorldContextObject,
|
||||
LastBrakeLevel,
|
||||
OutForceFeedbackCommand, OutBuzzCommand, OutThumperCommand,
|
||||
bClearForceFeedbackQueue);
|
||||
}
|
||||
|
||||
void USGHapticGloveCommandBufferKismetLibrary::FlushHaptics_DS_LBL_OutFFC_OutBuzzCommand_OutTC(
|
||||
UObject* WorldContextObject,
|
||||
USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const float DeltaSeconds,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||
USGBuzzCommand*& OutBuzzCommand,
|
||||
USGThumperCommand*& OutThumperCommand)
|
||||
{
|
||||
HapticGloveCommandBuffer->FlushHaptics(WorldContextObject,
|
||||
DeltaSeconds, LastBrakeLevel,
|
||||
OutForceFeedbackCommand, OutBuzzCommand, OutThumperCommand);
|
||||
}
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveHandProfilesKismetLibrary.h"
|
||||
|
||||
#include "Templates/SharedPointer.h"
|
||||
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGloveHandProfiles.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
|
||||
FString USGHapticGloveHandProfilesKismetLibrary::GetProfileDirectory()
|
||||
{
|
||||
return FSGHapticGloveHandProfiles::GetProfileDirectory();
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::SetProfileDirectory(const FString& Directory)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::SetProfileDirectory(Directory);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::GetLeftHandProfile(UObject* WorldContextObject,
|
||||
USGHandProfile*& OutHandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::GetLeftHandProfile(WorldContextObject, OutHandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::SetLeftHandProfile(const USGHandProfile* HandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::SetLeftHandProfile(HandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::GetRightHandProfile(UObject* WorldContextObject,
|
||||
USGHandProfile*& OutHandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::GetRightHandProfile(WorldContextObject, OutHandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::SetRightHandProfile(const USGHandProfile* HandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::SetRightHandProfile(HandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::GetProfile(UObject* WorldContextObject,
|
||||
const bool bRightHanded, USGHandProfile*& OutHandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::GetProfile(WorldContextObject, bRightHanded, OutHandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::SetProfile_HP(const USGHandProfile* HandProfile)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::SetProfile(HandProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::SetProfile_HP_bRH(const USGHandProfile* HandProfile,
|
||||
const bool bRightHanded)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::SetProfile(HandProfile, bRightHanded);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::RestoreDefaults()
|
||||
{
|
||||
FSGHapticGloveHandProfiles::RestoreDefaults();
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::RestoreDefaults_bRH(const bool bRightHanded)
|
||||
{
|
||||
FSGHapticGloveHandProfiles::RestoreDefaults(bRightHanded);
|
||||
}
|
||||
|
||||
void USGHapticGloveHandProfilesKismetLibrary::TryLoadingFromDisk()
|
||||
{
|
||||
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
|
||||
}
|
||||
|
||||
bool USGHapticGloveHandProfilesKismetLibrary::SaveLastRange(const USGSensorRange* CurrentRange,
|
||||
const USGHapticGlove* ForGlove)
|
||||
{
|
||||
return FSGHapticGloveHandProfiles::SaveLastRange(CurrentRange, ForGlove);
|
||||
}
|
||||
|
||||
bool USGHapticGloveHandProfilesKismetLibrary::LoadLastRange(
|
||||
UObject* WorldContextObject, const USGHapticGlove* ForGlove, USGSensorRange*& OutLastRange)
|
||||
{
|
||||
return FSGHapticGloveHandProfiles::LoadLastRange(WorldContextObject, ForGlove, OutLastRange);
|
||||
}
|
||||
@@ -36,16 +36,14 @@
|
||||
#include "SGCoreKismet/SGHapticGloveKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGBasicHandModel.h"
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
TArray<USGHapticGlove*> USGHapticGloveKismetLibrary::GetHapticGloves(UObject* WorldContextObject)
|
||||
TArray<USGHapticGlove*> USGHapticGloveKismetLibrary::GetHapticGloves(UObject* WorldContextObject,
|
||||
const bool bConnectedOnly)
|
||||
{
|
||||
return USGHapticGlove::GetHapticGloves(WorldContextObject);
|
||||
return USGHapticGlove::GetHapticGloves(WorldContextObject, bConnectedOnly);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetGlove_OutG(UObject* WorldContextObject, USGHapticGlove*& OutGlove)
|
||||
@@ -59,6 +57,16 @@ bool USGHapticGloveKismetLibrary::GetGlove_bRH_OutG(UObject* WorldContextObject,
|
||||
return USGHapticGlove::GetGlove(WorldContextObject, bRightHanded, OutGlove);
|
||||
}
|
||||
|
||||
FString USGHapticGloveKismetLibrary::ToString_S(const ESGHapticGloveCalibrationState State)
|
||||
{
|
||||
return USGHapticGlove::ToString(State);
|
||||
}
|
||||
|
||||
FString USGHapticGloveKismetLibrary::ToString_L(const ESGHapticLocation Location)
|
||||
{
|
||||
return USGHapticGlove::ToString(Location);
|
||||
}
|
||||
|
||||
ESGDeviceType USGHapticGloveKismetLibrary::GetDeviceType(const USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->GetDeviceType();
|
||||
@@ -99,23 +107,9 @@ bool USGHapticGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGHapticGlove* H
|
||||
return HapticGlove->GetImuRotation(OutImu);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetHandPose_HG_HP_OutHP(
|
||||
UObject* WorldContextObject, USGHapticGlove* HapticGlove,
|
||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
{
|
||||
return HapticGlove->GetHandPose(WorldContextObject, HandGeometry, HandProfile, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetHandPose_HP_OutHP(
|
||||
UObject* WorldContextObject,
|
||||
USGHapticGlove* HapticGlove, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
{
|
||||
return HapticGlove->GetHandPose(WorldContextObject, HandProfile, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetHandPose_HG_OutHP(
|
||||
UObject* WorldContextObject,
|
||||
USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose)
|
||||
const USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose)
|
||||
{
|
||||
return HapticGlove->GetHandPose(WorldContextObject, HandGeometry, OutHandPose);
|
||||
}
|
||||
@@ -126,15 +120,44 @@ bool USGHapticGloveKismetLibrary::GetHandPose_OutHP(
|
||||
return HapticGlove->GetHandPose(WorldContextObject, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetHandPose_OutHTP(
|
||||
UObject* WorldContextObject, USGHapticGlove* HapticGlove, const float DeltaTime, USGHandPose*& OutHandPose)
|
||||
bool USGHapticGloveKismetLibrary::GetHandAngles(const USGHapticGlove* HapticGlove,
|
||||
TArray<FSGVectorArray>& OutHandAngles)
|
||||
{
|
||||
#if PLATFORM_ANDROID
|
||||
return HapticGlove->GetHandPose(WorldContextObject, DeltaTime, OutHandPose);
|
||||
#else /* PLATFORM_ANDROID */
|
||||
ensureAlwaysMsgf(false, TEXT("This is an Android only method! Do not call it on other platforms!"));
|
||||
return false;
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
TArray<TArray<FVector>> HandAnglesNestedArray;
|
||||
const bool bResult = HapticGlove->GetHandAngles(HandAnglesNestedArray);
|
||||
OutHandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(MoveTemp(HandAnglesNestedArray));
|
||||
return bResult;
|
||||
}
|
||||
|
||||
USGBasicHandModel* USGHapticGloveKismetLibrary::GetHandGeometry(UObject* WorldContextObject,
|
||||
const USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->GetHandGeometry(WorldContextObject);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SetHandGeometry(USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry)
|
||||
{
|
||||
HapticGlove->SetHandGeometry(HandGeometry);
|
||||
}
|
||||
|
||||
ESGHapticGloveCalibrationState USGHapticGloveKismetLibrary::GetCalibrationState(const USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->GetCalibrationState();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::EndCalibration(USGHapticGlove* HapticGlove)
|
||||
{
|
||||
HapticGlove->EndCalibration();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::ResetCalibration(USGHapticGlove* HapticGlove)
|
||||
{
|
||||
HapticGlove->ResetCalibration();
|
||||
}
|
||||
|
||||
FString USGHapticGloveKismetLibrary::GetCalibrationInstruction(const USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->GetCalibrationInstruction();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::StopHaptics(USGHapticGlove* HapticGlove)
|
||||
@@ -147,78 +170,32 @@ void USGHapticGloveKismetLibrary::StopVibrations(USGHapticGlove* HapticGlove)
|
||||
return HapticGlove->StopVibrations();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SendHaptics_FFC(
|
||||
USGHapticGlove* HapticGlove, const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
bool USGHapticGloveKismetLibrary::SendHaptics(USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->SendHaptics(ForceFeedbackCommand);
|
||||
return HapticGlove->SendHaptics();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SendHaptics_BC(
|
||||
USGHapticGlove* HapticGlove, const USGBuzzCommand* BuzzCommand)
|
||||
bool USGHapticGloveKismetLibrary::QueueForceFeedbackLevels(USGHapticGlove* HapticGlove, const TArray<float>& Levels01)
|
||||
{
|
||||
return HapticGlove->SendHaptics(BuzzCommand);
|
||||
return HapticGlove->QueueForceFeedbackLevels(Levels01);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SendHaptics_TC(
|
||||
USGHapticGlove* HapticGlove, const USGThumperCommand* ThumperCommand)
|
||||
bool USGHapticGloveKismetLibrary::QueueForceFeedbackLevel(USGHapticGlove* HapticGlove,
|
||||
const int32 Finger, const float Level01)
|
||||
{
|
||||
return HapticGlove->SendHaptics(ThumperCommand);
|
||||
return HapticGlove->QueueForceFeedbackLevel(Finger, Level01);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SendHaptics_FFC_BC(
|
||||
USGHapticGlove* HapticGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand)
|
||||
bool USGHapticGloveKismetLibrary::SupportsCustomWaveform(const USGHapticGlove* HapticGlove,
|
||||
const ESGHapticLocation AtLocation)
|
||||
{
|
||||
return HapticGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand);
|
||||
return HapticGlove->SupportsCustomWaveform(AtLocation);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::SendHaptics_FFC_BC_TC(
|
||||
USGHapticGlove* HapticGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand)
|
||||
bool USGHapticGloveKismetLibrary::SendCustomWaveform(USGHapticGlove* HapticGlove,
|
||||
USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
|
||||
{
|
||||
return HapticGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand, ThumperCommand);
|
||||
}
|
||||
|
||||
bool USGHapticGloveKismetLibrary::GetCalibrationValues(USGHapticGlove* HapticGlove, TArray<FVector>& OutValues)
|
||||
{
|
||||
return HapticGlove->GetCalibrationValues(OutValues);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::ResetCalibrationRange(USGHapticGlove* HapticGlove)
|
||||
{
|
||||
HapticGlove->ResetCalibrationRange();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::UpdateCalibrationRange(USGHapticGlove* HapticGlove)
|
||||
{
|
||||
HapticGlove->UpdateCalibrationRange();
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::UpdateCalibrationRange_CV(USGHapticGlove* HapticGlove,
|
||||
const TArray<FVector>& CalibrationValues)
|
||||
{
|
||||
HapticGlove->UpdateCalibrationRange(CalibrationValues);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::GetCalibrationRange(USGHapticGlove* HapticGlove,
|
||||
TArray<FVector>& OutMinValues,
|
||||
TArray<FVector>& OutMaxValues)
|
||||
{
|
||||
HapticGlove->GetCalibrationRange(OutMinValues, OutMaxValues);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::UpdateCalibration(
|
||||
UObject* WorldContextObject, USGHapticGlove* HapticGlove, USGHandProfile*& OutProfile)
|
||||
{
|
||||
HapticGlove->UpdateCalibration(WorldContextObject, OutProfile);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::ApplyCalibration(
|
||||
UObject* WorldContextObject, const USGHapticGlove* HapticGlove, USGHandProfile*& OutProfile)
|
||||
{
|
||||
HapticGlove->ApplyCalibration(WorldContextObject, OutProfile);
|
||||
return HapticGlove->SendCustomWaveform(OutWaveform, Location);
|
||||
}
|
||||
|
||||
void USGHapticGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_OutWR(
|
||||
@@ -263,4 +240,9 @@ void USGHapticGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_OutGR
|
||||
HapticGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
FString USGHapticGloveKismetLibrary::ToString(const USGHapticGlove* HapticGlove)
|
||||
{
|
||||
return HapticGlove->ToString();
|
||||
}
|
||||
-137
@@ -1,137 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveQuickCalibrationKismetLibrary.h"
|
||||
|
||||
USGHapticGloveQuickCalibration* USGHapticGloveQuickCalibrationKismetLibrary::MakeHapticGloveQuickCalibration(
|
||||
UObject* WorldContextObject)
|
||||
{
|
||||
return USGHapticGloveQuickCalibration::NewHapticGloveQuickCalibration(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHapticGloveQuickCalibration* USGHapticGloveQuickCalibrationKismetLibrary::MakeHapticGloveQuickCalibration_GTC_AET(
|
||||
UObject* WorldContextObject, const USGHapticGlove* GloveToCalibrate, const float AutoEndTimeout)
|
||||
{
|
||||
return USGHapticGloveQuickCalibration::NewHapticGloveQuickCalibration(
|
||||
WorldContextObject, GloveToCalibrate, AutoEndTimeout);
|
||||
}
|
||||
|
||||
float USGHapticGloveQuickCalibrationKismetLibrary::GetDefaultAutoEndTimeout()
|
||||
{
|
||||
return USGHapticGloveQuickCalibration::GetDefaultAutoEndTimeout();
|
||||
}
|
||||
|
||||
float USGHapticGloveQuickCalibrationKismetLibrary::GetAutoEndTimeout(
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetAutoEndTimeout();
|
||||
}
|
||||
|
||||
int32 USGHapticGloveQuickCalibrationKismetLibrary::GetSmoothingSamples(
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetSmoothingSamples();
|
||||
}
|
||||
|
||||
USGSensorRange* USGHapticGloveQuickCalibrationKismetLibrary::GetSensorRange(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetSensorRange(WorldContextObject);
|
||||
}
|
||||
|
||||
USGHandProfile* USGHapticGloveQuickCalibrationKismetLibrary::GetTemporaryProfile(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetTemporaryProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGHapticGloveQuickCalibrationKismetLibrary::CanAnimate(
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->CanAnimate();
|
||||
}
|
||||
|
||||
bool USGHapticGloveQuickCalibrationKismetLibrary::AutoCompleted(
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
return HapticGloveQuickCalibration->AutoCompleted();
|
||||
}
|
||||
|
||||
void USGHapticGloveQuickCalibrationKismetLibrary::Reset(
|
||||
USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
HapticGloveQuickCalibration->Reset();
|
||||
}
|
||||
|
||||
void USGHapticGloveQuickCalibrationKismetLibrary::Update(
|
||||
USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, const float DeltaSeconds)
|
||||
{
|
||||
HapticGloveQuickCalibration->Update(DeltaSeconds);
|
||||
}
|
||||
|
||||
void USGHapticGloveQuickCalibrationKismetLibrary::AddDataPoint(
|
||||
USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, const TArray<FVector>& CalibrationData)
|
||||
{
|
||||
HapticGloveQuickCalibration->AddDataPoint(CalibrationData);
|
||||
}
|
||||
|
||||
void USGHapticGloveQuickCalibrationKismetLibrary::ConfirmCurrentStep(
|
||||
USGHapticGloveQuickCalibration* HapticGloveQuickCalibration)
|
||||
{
|
||||
HapticGloveQuickCalibration->ConfirmCurrentStep();
|
||||
}
|
||||
|
||||
bool USGHapticGloveQuickCalibrationKismetLibrary::CompileRange(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, USGSensorRange*& OutSensorRange)
|
||||
{
|
||||
return HapticGloveQuickCalibration->CompileRange(WorldContextObject, OutSensorRange);
|
||||
}
|
||||
|
||||
bool USGHapticGloveQuickCalibrationKismetLibrary::GetHandPose(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, const bool bRightHanded,
|
||||
USGHandPose*& OutCurrentHandPose)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetHandPose(WorldContextObject, bRightHanded, OutCurrentHandPose);
|
||||
}
|
||||
|
||||
FString USGHapticGloveQuickCalibrationKismetLibrary::GetCurrentInstruction(
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, const FString& NextStepKey)
|
||||
{
|
||||
return HapticGloveQuickCalibration->GetCurrentInstruction(NextStepKey);
|
||||
}
|
||||
@@ -42,11 +42,6 @@ FString USGLibraryKismetLibrary::GetVersion()
|
||||
return FSGLibrary::GetVersion();
|
||||
}
|
||||
|
||||
ESGBackendType USGLibraryKismetLibrary::GetBackendType()
|
||||
{
|
||||
return FSGLibrary::GetBackendType();
|
||||
}
|
||||
|
||||
FString USGLibraryKismetLibrary::GetBackendVersion()
|
||||
{
|
||||
return FSGLibrary::GetBackendVersion();
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGNova2GloveKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGNova2Glove.h"
|
||||
#include "SGCore/SGNova2GloveSensorData.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
USGDevice* USGNova2GloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString)
|
||||
{
|
||||
return USGNova2Glove::Parse(WorldContextObject, ConstantsString);
|
||||
}
|
||||
|
||||
TArray<USGNova2Glove*> USGNova2GloveKismetLibrary::GetNova2Gloves(UObject* WorldContextObject)
|
||||
{
|
||||
return USGNova2Glove::GetNova2Gloves(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetNova2Glove_OutG(UObject* WorldContextObject, USGNova2Glove*& OutGlove)
|
||||
{
|
||||
return USGNova2Glove::GetNova2Glove(WorldContextObject, OutGlove);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetNova2Glove_bRH_OutG(UObject* WorldContextObject,
|
||||
const bool bRightHanded, USGNova2Glove*& OutGlove)
|
||||
{
|
||||
return USGNova2Glove::GetNova2Glove(WorldContextObject, bRightHanded, OutGlove);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_HW_OutGP_OutGR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
USGNova2Glove::CalculateGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, bRightHanded, HardwareVersion,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::CalculateGloveLocation_RP_FRotator_RR_TH_bRH_HW_OutGP_OutGR(
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||
{
|
||||
USGNova2Glove::CalculateGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, bRightHanded, HardwareVersion,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::CalculateWristLocation_RP_FQuat_RR_TH_bRH_HW_OutWP_OutWR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
USGNova2Glove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, bRightHanded, HardwareVersion,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_HW_OutWP_OutWR(
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
USGNova2Glove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, bRightHanded, HardwareVersion,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
FString USGNova2GloveKismetLibrary::GetStreamByte()
|
||||
{
|
||||
return FString::Printf(TEXT("%c"), USGNova2Glove::GetStreamByte());
|
||||
}
|
||||
|
||||
TArray<float> USGNova2GloveKismetLibrary::GetNova2SensorRanges()
|
||||
{
|
||||
return USGNova2Glove::GetNova2SensorRanges();
|
||||
}
|
||||
|
||||
TArray<float> USGNova2GloveKismetLibrary::ToNormalizedValues_SD(const USGNova2GloveSensorData* SensorData)
|
||||
{
|
||||
return USGNova2Glove::ToNormalizedValues(SensorData);
|
||||
}
|
||||
|
||||
TArray<float> USGNova2GloveKismetLibrary::ToNormalizedValues_SD_OutSN(
|
||||
UObject* WorldContextObject,
|
||||
const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer)
|
||||
{
|
||||
return USGNova2Glove::ToNormalizedValues(WorldContextObject, SensorData, OutSensorNormalizer);
|
||||
}
|
||||
|
||||
TArray<FSGVectorArray> USGNova2GloveKismetLibrary::CalculateHandAngles(
|
||||
const TArray<float>& NormalizedValues, const USGHandInterpolator* Interpolator, const bool bInfluenceIndex)
|
||||
{
|
||||
TArray<FSGVectorArray> HandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(
|
||||
USGNova2Glove::CalculateHandAngles(NormalizedValues, Interpolator, bInfluenceIndex));
|
||||
return MoveTemp(HandAngles);
|
||||
}
|
||||
|
||||
TArray<FSGVectorArray> USGNova2GloveKismetLibrary::ToNormalizedAngles(
|
||||
const TArray<float>& NormalizedData, const USGNovaGloveInfo* GloveInfo)
|
||||
{
|
||||
return FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(
|
||||
USGNova2Glove::ToNormalizedAngles(NormalizedData, GloveInfo));
|
||||
}
|
||||
|
||||
ESGDeviceType USGNova2GloveKismetLibrary::GetDeviceType(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetDeviceType();
|
||||
}
|
||||
|
||||
FString USGNova2GloveKismetLibrary::GetDeviceId(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetDeviceId();
|
||||
}
|
||||
|
||||
FString USGNova2GloveKismetLibrary::GetHardwareVersion(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetHardwareVersion();
|
||||
}
|
||||
|
||||
int32 USGNova2GloveKismetLibrary::GetFirmwareVersion(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetFirmwareVersion();
|
||||
}
|
||||
|
||||
int32 USGNova2GloveKismetLibrary::GetSubFirmwareVersion(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetSubFirmwareVersion();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::HasBattery(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->HasBattery();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::IsCharging(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->IsCharging();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetBatteryLevel(USGNova2Glove* Nova2Glove, float& OutBatteryLevel)
|
||||
{
|
||||
return Nova2Glove->GetBatteryLevel(OutBatteryLevel);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::IsRight(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->IsRight();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetImuRotation_FQuat_OutI(USGNova2Glove* Nova2Glove, FQuat& OutImu)
|
||||
{
|
||||
return Nova2Glove->GetImuRotation(OutImu);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetImuRotation_FRotator_OutI(USGNova2Glove* Nova2Glove, FRotator& OutImu)
|
||||
{
|
||||
return Nova2Glove->GetImuRotation(OutImu);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetHandPose(
|
||||
UObject* WorldContextObject,
|
||||
USGNova2Glove* Nova2Glove, const USGBasicHandModel* HandModel, USGHandPose*& OutHandPose)
|
||||
{
|
||||
return Nova2Glove->GetHandPose(WorldContextObject, HandModel, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetHandAngles(const USGNova2Glove* Nova2Glove, TArray<FSGVectorArray>& OutHandAngles)
|
||||
{
|
||||
TArray<TArray<FVector>> HandAnglesNestedArray;
|
||||
const bool bResult = Nova2Glove->GetHandAngles(HandAnglesNestedArray);
|
||||
OutHandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(MoveTemp(HandAnglesNestedArray));
|
||||
return bResult;
|
||||
}
|
||||
|
||||
ESGHapticGloveCalibrationState USGNova2GloveKismetLibrary::GetCalibrationState(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetCalibrationState();
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::EndCalibration(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
Nova2Glove->EndCalibration();
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::ResetCalibration(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
Nova2Glove->ResetCalibration();
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::StopHaptics(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
Nova2Glove->StopHaptics();
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::StopVibrations(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
Nova2Glove->StopVibrations();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SendHaptics(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->SendHaptics();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SupportsCustomWaveform(const USGNova2Glove* Nova2Glove,
|
||||
const ESGHapticLocation AtLocation)
|
||||
{
|
||||
return Nova2Glove->SupportsCustomWaveform(AtLocation);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SendCustomWaveform(USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
|
||||
{
|
||||
return Nova2Glove->SendCustomWaveform(OutWaveform, Location);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::QueueForceFeedbackLevels(USGNova2Glove* Nova2Glove, const TArray<float>& Levels01)
|
||||
{
|
||||
return Nova2Glove->QueueForceFeedbackLevels(Levels01);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::QueueForceFeedbackLevel(
|
||||
USGNova2Glove* Nova2Glove, const int32 Finger, const float Level01)
|
||||
{
|
||||
return Nova2Glove->QueueForceFeedbackLevel(Finger, Level01);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
Nova2Glove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||
{
|
||||
Nova2Glove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
Nova2Glove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
Nova2Glove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
USGNovaGloveInfo* USGNova2GloveKismetLibrary::GetGloveInfo(UObject* WorldContextObject, const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->GetGloveInfo(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::DoesIndexInfluenceOthers(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->DoesIndexInfluenceOthers();
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::SetIndexInfluencesOthers(USGNova2Glove* Nova2Glove, const bool bInfluenceOthers)
|
||||
{
|
||||
Nova2Glove->SetIndexInfluencesOthers(bInfluenceOthers);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SupportsOnBoardNormalization(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->SupportsOnBoardNormalization();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetSensorData(
|
||||
UObject* WorldContextObject, USGNova2Glove* Nova2Glove, USGNova2GloveSensorData*& OutSensorData)
|
||||
{
|
||||
return Nova2Glove->GetSensorData(WorldContextObject, OutSensorData);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::GetNormalizedInput(const USGNova2Glove* Nova2Glove, TArray<float>& OutNormalizedValues)
|
||||
{
|
||||
return Nova2Glove->GetNormalizedInput(OutNormalizedValues);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SendRawData(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->SendRawData();
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SendNormalizedData(USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->SendNormalizedData();
|
||||
}
|
||||
|
||||
ESGNova2VibroMotor USGNova2GloveKismetLibrary::ToNovaMotor(const USGNova2Glove* Nova2Glove,
|
||||
const ESGHapticLocation Location)
|
||||
{
|
||||
return Nova2Glove->ToNovaMotor(Location);
|
||||
}
|
||||
|
||||
int32 USGNova2GloveKismetLibrary::ChannelIndex(const USGNova2Glove* Nova2Glove, const ESGNova2VibroMotor Motor)
|
||||
{
|
||||
return Nova2Glove->ChannelIndex(Motor);
|
||||
}
|
||||
|
||||
void USGNova2GloveKismetLibrary::ValidateWaveform(const USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor)
|
||||
{
|
||||
Nova2Glove->ValidateWaveform(OutWaveform, Motor);
|
||||
}
|
||||
|
||||
bool USGNova2GloveKismetLibrary::SendCustomWaveform_Nova2(
|
||||
USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor, const bool bValidateWaveform)
|
||||
{
|
||||
return Nova2Glove->SendCustomWaveform_Nova2(OutWaveform, Motor, bValidateWaveform);
|
||||
}
|
||||
|
||||
FString USGNova2GloveKismetLibrary::ToString(const USGNova2Glove* Nova2Glove)
|
||||
{
|
||||
return Nova2Glove->ToString();
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGNova2GloveSensorDataKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveInfo.h"
|
||||
#include "SGCore/SGNova2GloveSensorData.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData(UObject* WorldContextObject)
|
||||
{
|
||||
return USGNova2GloveSensorData::NewNova2GloveSensorData(WorldContextObject);
|
||||
}
|
||||
|
||||
USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData_NS_V_PV_FQuat_IR_bIP_BL_bC(
|
||||
UObject* WorldContextObject, const ESGNormalizationState NormalizationState,
|
||||
const TArray<FSGVectorArray>& Values, const int32 ParsedValues,
|
||||
const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
|
||||
{
|
||||
return USGNova2GloveSensorData::NewNova2GloveSensorData(
|
||||
WorldContextObject,
|
||||
NormalizationState, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging);
|
||||
}
|
||||
|
||||
USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData_NS_V_PV_FRotator_IR_bIP_BL_b(
|
||||
UObject* WorldContextObject, const ESGNormalizationState NormalizationState,
|
||||
const TArray<FSGVectorArray>& Values, const int32 ParsedValues,
|
||||
const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
|
||||
{
|
||||
return USGNova2GloveSensorData::NewNova2GloveSensorData(
|
||||
WorldContextObject,
|
||||
NormalizationState, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging);
|
||||
}
|
||||
|
||||
USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::Parse(
|
||||
UObject* WorldContextObject, const FString& RawData, const USGNovaGloveInfo* GloveInfo)
|
||||
{
|
||||
return USGNova2GloveSensorData::Parse(WorldContextObject, RawData, GloveInfo);
|
||||
}
|
||||
|
||||
ESGNormalizationState USGNova2GloveSensorDataKismetLibrary::GetSensorState(
|
||||
const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->GetSensorState();
|
||||
}
|
||||
|
||||
TArray<FSGVectorArray> USGNova2GloveSensorDataKismetLibrary::GetSensorValues(
|
||||
const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(Nova2GloveSensorData->GetSensorValues());
|
||||
}
|
||||
|
||||
float USGNova2GloveSensorDataKismetLibrary::GetSensorValue(
|
||||
const USGNova2GloveSensorData* Nova2GloveSensorData,
|
||||
const ESGFinger Finger, const ESGNova2SensorLocation Location)
|
||||
{
|
||||
return Nova2GloveSensorData->GetSensorValue(Finger, Location);
|
||||
}
|
||||
|
||||
int32 USGNova2GloveSensorDataKismetLibrary::GetParsedValues(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->GetParsedValues();
|
||||
}
|
||||
|
||||
FQuat USGNova2GloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->GetImuRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGNova2GloveSensorDataKismetLibrary::GetImuRotation_FRotator(
|
||||
const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->GetImuRotation();
|
||||
}
|
||||
|
||||
bool USGNova2GloveSensorDataKismetLibrary::IsImuParsed(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->IsImuParsed();
|
||||
}
|
||||
|
||||
float USGNova2GloveSensorDataKismetLibrary::GetBatteryLevel(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->GetBatteryLevel();
|
||||
}
|
||||
|
||||
bool USGNova2GloveSensorDataKismetLibrary::IsCharging(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->IsCharging();
|
||||
}
|
||||
|
||||
bool USGNova2GloveSensorDataKismetLibrary::Equals(const USGNova2GloveSensorData* A, const USGNova2GloveSensorData* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGNova2GloveSensorDataKismetLibrary::ToString(const USGNova2GloveSensorData* Nova2GloveSensorData)
|
||||
{
|
||||
return Nova2GloveSensorData->ToString();
|
||||
}
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGNovaGloveCalibrationKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveCalibration.h"
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
void USGNovaGloveCalibrationKismetLibrary::ApplyDefaultCalibrationInterpolationValues(
|
||||
const TArray<FVector>& RetractedValues, const TArray<FVector>& ExtendedValues,
|
||||
const USGNovaGloveHandProfile* Profile)
|
||||
{
|
||||
FSGNovaGloveCalibration::ApplyDefaultCalibrationInterpolationValues(RetractedValues, ExtendedValues, Profile);
|
||||
}
|
||||
|
||||
void USGNovaGloveCalibrationKismetLibrary::ApplyInterpolationValues(const TArray<FVector>& RetractedValues,
|
||||
const TArray<FVector>& ExtendedValues,
|
||||
const TArray<FSGVectorArray>& RetractedAngles,
|
||||
const TArray<FSGVectorArray>& ExtendedAngles,
|
||||
const USGNovaGloveHandProfile* Profile)
|
||||
{
|
||||
FSGNovaGloveCalibration::ApplyInterpolationValues(
|
||||
RetractedValues, ExtendedValues,
|
||||
FSGArrayUtils::FromNestedBPArray<
|
||||
FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(RetractedAngles),
|
||||
FSGArrayUtils::FromNestedBPArray<
|
||||
FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(ExtendedAngles),
|
||||
Profile);
|
||||
}
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGNovaGloveHandProfileKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
#include "SGCore/SGNovaGloveHandProfile.h"
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::MakeNovaGloveHandProfile(UObject* WorldContextObject)
|
||||
{
|
||||
return USGNovaGloveHandProfile::NewNovaGloveHandProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::MakeNovaGloveHandProfile_bRH_I(
|
||||
UObject* WorldContextObject, const bool bRightHanded, const USGHandInterpolator* Interpolator)
|
||||
{
|
||||
return USGNovaGloveHandProfile::NewNovaGloveHandProfile(WorldContextObject, bRightHanded, Interpolator);
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::Default(UObject* WorldContextObject,
|
||||
const bool bRightHanded)
|
||||
{
|
||||
return USGNovaGloveHandProfile::Default(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
USGNovaGloveHandProfile* USGNovaGloveHandProfileKismetLibrary::Deserialize(UObject* WorldContextObject,
|
||||
const FString& SerializedString)
|
||||
{
|
||||
return USGNovaGloveHandProfile::Deserialize(WorldContextObject, SerializedString);
|
||||
}
|
||||
|
||||
bool USGNovaGloveHandProfileKismetLibrary::IsRight(const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
return NovaGloveHandProfile->IsRight();
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGNovaGloveHandProfileKismetLibrary::GetInterpolationSet(
|
||||
UObject* WorldContextObject,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
return NovaGloveHandProfile->GetInterpolationSet(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGNovaGloveHandProfileKismetLibrary::Equals(const USGNovaGloveHandProfile* A, const USGNovaGloveHandProfile* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
void USGNovaGloveHandProfileKismetLibrary::Reset(USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
NovaGloveHandProfile->Reset();
|
||||
}
|
||||
|
||||
FString USGNovaGloveHandProfileKismetLibrary::SGSerialize(const USGNovaGloveHandProfile* NovaGloveHandProfile)
|
||||
{
|
||||
return NovaGloveHandProfile->SGSerialize();
|
||||
}
|
||||
@@ -105,6 +105,20 @@ int32 USGNovaGloveInfoKismetLibrary::GetNumberOfSensors(const USGNovaGloveInfo*
|
||||
return NovaGloveInfo->GetNumberOfSensors();
|
||||
}
|
||||
|
||||
bool USGNovaGloveInfoKismetLibrary::FirmwareNewerThan(
|
||||
const USGNovaGloveInfo* NovaGloveInfo,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const
|
||||
{
|
||||
return NovaGloveInfo->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGNovaGloveInfoKismetLibrary::FirmwareOlderThan(
|
||||
const USGNovaGloveInfo* NovaGloveInfo,
|
||||
const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const
|
||||
{
|
||||
return NovaGloveInfo->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive);
|
||||
}
|
||||
|
||||
bool USGNovaGloveInfoKismetLibrary::Equals(const USGNovaGloveInfo* A, const USGNovaGloveInfo* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
|
||||
@@ -35,31 +35,10 @@
|
||||
|
||||
#include "SGCoreKismet/SGNovaGloveKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGNovaGlove.h"
|
||||
#include "SGCore/SGNovaGloveSensorData.h"
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
|
||||
FString USGNovaGloveKismetLibrary::GetHapticsByte()
|
||||
{
|
||||
return FString::Printf(TEXT("%c"), USGNovaGlove::GetHapticsByte());
|
||||
}
|
||||
|
||||
FVector USGNovaGloveKismetLibrary::GetMinCalibrationRange()
|
||||
{
|
||||
return USGNovaGlove::GetMinCalibrationRange();
|
||||
}
|
||||
|
||||
USGHandPose* USGNovaGloveKismetLibrary::CalculateHandPose(UObject* WorldContextObject,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGNovaGloveSensorData* NovaData,
|
||||
const USGNovaGloveHandProfile* Profile)
|
||||
{
|
||||
return USGNovaGlove::CalculateHandPose(WorldContextObject, HandModel, NovaData, Profile);
|
||||
}
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
USGDevice* USGNovaGloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString)
|
||||
{
|
||||
@@ -82,18 +61,6 @@ bool USGNovaGloveKismetLibrary::GetNovaGlove_bRH_OutG(UObject* WorldContextObjec
|
||||
return USGNovaGlove::GetNovaGlove(WorldContextObject, bRightHanded, OutGlove);
|
||||
}
|
||||
|
||||
TArray<FVector> USGNovaGloveKismetLibrary::GetCalibrationValues_SD(const USGNovaGloveSensorData* SensorData)
|
||||
{
|
||||
return USGNovaGlove::GetCalibrationValues(SensorData);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::CalibrateInterpolation(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues, USGNovaGloveHandProfile*& OutProfile)
|
||||
{
|
||||
USGNovaGlove::CalibrateInterpolation(WorldContextObject, MinValues, MaxValues, OutProfile);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_OutGP_OutGR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
|
||||
@@ -134,19 +101,55 @@ void USGNovaGloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_Out
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToBytes_TC(const USGThumperCommand* ThumperCommand)
|
||||
FString USGNovaGloveKismetLibrary::GetHapticsByte()
|
||||
{
|
||||
return USGNovaGlove::ToBytes(ThumperCommand);
|
||||
return FString::Printf(TEXT("%c"), USGNovaGlove::GetHapticsByte());
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToBytes_FFC(const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
FString USGNovaGloveKismetLibrary::GetThresholdsByte()
|
||||
{
|
||||
return USGNovaGlove::ToBytes(ForceFeedbackCommand);
|
||||
return FString::Printf(TEXT("%c"), USGNovaGlove::GetThresholdsByte());
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToBytes_BC(const USGBuzzCommand* BuzzCommand)
|
||||
FString USGNovaGloveKismetLibrary::GetIgnoreThresholdsByte()
|
||||
{
|
||||
return USGNovaGlove::ToBytes(BuzzCommand);
|
||||
return FString::Printf(TEXT("%c"), USGNovaGlove::GetIgnoreThresholdsByte());
|
||||
}
|
||||
|
||||
TArray<float> USGNovaGloveKismetLibrary::GetNovaSensorRanges()
|
||||
{
|
||||
return USGNovaGlove::GetNovaSensorRanges();
|
||||
}
|
||||
|
||||
TArray<float> USGNovaGloveKismetLibrary::ToNormalizedValues_SD(const USGNovaGloveSensorData* SensorData)
|
||||
{
|
||||
return USGNovaGlove::ToNormalizedValues(SensorData);
|
||||
}
|
||||
|
||||
TArray<float> USGNovaGloveKismetLibrary::ToNormalizedValues_SD_OutSN(
|
||||
UObject* WorldContextObject,
|
||||
const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer)
|
||||
{
|
||||
return USGNovaGlove::ToNormalizedValues(WorldContextObject, SensorData, OutSensorNormalizer);
|
||||
}
|
||||
|
||||
TArray<FSGVectorArray> USGNovaGloveKismetLibrary::CalculateHandAngles(
|
||||
const TArray<float>& NormalizedValues, const USGHandInterpolator* Interpolator)
|
||||
{
|
||||
TArray<FSGVectorArray> HandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(
|
||||
USGNovaGlove::CalculateHandAngles(NormalizedValues, Interpolator));
|
||||
return MoveTemp(HandAngles);
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds)
|
||||
{
|
||||
return USGNovaGlove::ToNovaCommandAsFlexion(Thresholds);
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToNovaCommandAsRaw(
|
||||
const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator)
|
||||
{
|
||||
return USGNovaGlove::ToNovaCommandAsRaw(Thresholds, Interpolator);
|
||||
}
|
||||
|
||||
ESGDeviceType USGNovaGloveKismetLibrary::GetDeviceType(const USGNovaGlove* NovaGlove)
|
||||
@@ -174,6 +177,11 @@ int32 USGNovaGloveKismetLibrary::GetSubFirmwareVersion(const USGNovaGlove* NovaG
|
||||
return NovaGlove->GetSubFirmwareVersion();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::SetDeviceIndex(USGNovaGlove* NovaGlove, const int32 NewIndex)
|
||||
{
|
||||
NovaGlove->SetDeviceIndex(NewIndex);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::HasBattery(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->HasBattery();
|
||||
@@ -189,10 +197,9 @@ bool USGNovaGloveKismetLibrary::GetBatteryLevel(USGNovaGlove* NovaGlove, float&
|
||||
return NovaGlove->GetBatteryLevel(OutBatteryLevel);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetSensorData(
|
||||
UObject* WorldContextObject, USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData)
|
||||
bool USGNovaGloveKismetLibrary::IsRight(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->GetSensorData(WorldContextObject, OutSensorData);
|
||||
return NovaGlove->IsRight();
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetImuRotation_FQuat_OutI(USGNovaGlove* NovaGlove, FQuat& OutImu)
|
||||
@@ -205,66 +212,72 @@ bool USGNovaGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGNovaGlove* NovaG
|
||||
return NovaGlove->GetImuRotation(OutImu);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetHandPose_HM_P_OutHP(
|
||||
UObject* WorldContextObject, USGNovaGlove* NovaGlove,
|
||||
const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile, USGHandPose*& OutHandPose)
|
||||
bool USGNovaGloveKismetLibrary::GetHandPose(
|
||||
UObject* WorldContextObject,
|
||||
USGNovaGlove* NovaGlove, const USGBasicHandModel* HandModel, USGHandPose*& OutHandPose)
|
||||
{
|
||||
return NovaGlove->GetHandPose(WorldContextObject, HandModel, Profile, OutHandPose);
|
||||
return NovaGlove->GetHandPose(WorldContextObject, HandModel, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetHandPose_HG_HP_OutHP(
|
||||
UObject* WorldContextObject, USGNovaGlove* NovaGlove,
|
||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
bool USGNovaGloveKismetLibrary::GetHandAngles(const USGNovaGlove* NovaGlove, TArray<FSGVectorArray>& OutHandAngles)
|
||||
{
|
||||
return NovaGlove->GetHandPose(WorldContextObject, HandGeometry, HandProfile, OutHandPose);
|
||||
TArray<TArray<FVector>> HandAnglesNestedArray;
|
||||
const bool bResult = NovaGlove->GetHandAngles(HandAnglesNestedArray);
|
||||
OutHandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(MoveTemp(HandAnglesNestedArray));
|
||||
return bResult;
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetHandPose_HP_OutHP(
|
||||
UObject* WorldContextObject, USGNovaGlove* NovaGlove,
|
||||
const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
ESGHapticGloveCalibrationState USGNovaGloveKismetLibrary::GetCalibrationState(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->GetHandPose(WorldContextObject, HandProfile, OutHandPose);
|
||||
return NovaGlove->GetCalibrationState();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::SendHaptics_FFC(USGNovaGlove* NovaGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
void USGNovaGloveKismetLibrary::EndCalibration(USGNovaGlove* NovaGlove)
|
||||
{
|
||||
NovaGlove->SendHaptics(ForceFeedbackCommand);
|
||||
NovaGlove->EndCalibration();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::SendHaptics_BC(USGNovaGlove* NovaGlove, const USGBuzzCommand* BuzzCommand)
|
||||
void USGNovaGloveKismetLibrary::ResetCalibration(USGNovaGlove* NovaGlove)
|
||||
{
|
||||
NovaGlove->SendHaptics(BuzzCommand);
|
||||
NovaGlove->ResetCalibration();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::SendHaptics_TC(USGNovaGlove* NovaGlove, const USGThumperCommand* ThumperCommand)
|
||||
void USGNovaGloveKismetLibrary::StopHaptics(USGNovaGlove* NovaGlove)
|
||||
{
|
||||
NovaGlove->SendHaptics(ThumperCommand);
|
||||
NovaGlove->StopHaptics();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::SendHaptics_FFC_BC_TC(USGNovaGlove* NovaGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand)
|
||||
void USGNovaGloveKismetLibrary::StopVibrations(USGNovaGlove* NovaGlove)
|
||||
{
|
||||
NovaGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand, ThumperCommand);
|
||||
NovaGlove->StopVibrations();
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetCalibrationValues_OutV(USGNovaGlove* NovaGlove, TArray<FVector>& OutValues)
|
||||
bool USGNovaGloveKismetLibrary::SendHaptics(USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->GetCalibrationValues(OutValues);
|
||||
return NovaGlove->SendHaptics();
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::ApplyCalibration_USGHandProfile_OutP(
|
||||
UObject* WorldContextObject, const USGNovaGlove* NovaGlove, USGHandProfile*& OutProfile)
|
||||
bool USGNovaGloveKismetLibrary::SupportsCustomWaveform(const USGNovaGlove* NovaGlove,
|
||||
const ESGHapticLocation AtLocation)
|
||||
{
|
||||
return NovaGlove->ApplyCalibration(WorldContextObject, OutProfile);
|
||||
return NovaGlove->SupportsCustomWaveform(AtLocation);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::ApplyCalibration_USGNovaGloveHandProfile_OutP(
|
||||
UObject* WorldContextObject, const USGNovaGlove* NovaGlove, USGNovaGloveHandProfile*& OutProfile)
|
||||
bool USGNovaGloveKismetLibrary::SendCustomWaveform(USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, const ESGHapticLocation Location)
|
||||
{
|
||||
return NovaGlove->ApplyCalibration(WorldContextObject, OutProfile);
|
||||
return NovaGlove->SendCustomWaveform(OutWaveform, Location);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueForceFeedbackLevels(USGNovaGlove* NovaGlove, const TArray<float>& Levels01)
|
||||
{
|
||||
return NovaGlove->QueueForceFeedbackLevels(Levels01);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueForceFeedbackLevel(
|
||||
USGNovaGlove* NovaGlove, const int32 Finger, const float Level01)
|
||||
{
|
||||
return NovaGlove->QueueForceFeedbackLevel(Finger, Level01);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR(
|
||||
@@ -273,9 +286,9 @@ void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutG
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
return NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR(
|
||||
@@ -284,9 +297,9 @@ void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotato
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||
{
|
||||
return NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR(
|
||||
@@ -295,9 +308,9 @@ void USGNovaGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutW
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
return NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR(
|
||||
@@ -306,9 +319,92 @@ void USGNovaGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotato
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
return NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
USGNovaGloveInfo* USGNovaGloveKismetLibrary::GetGloveInfo(UObject* WorldContextObject, const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->GetGloveInfo(WorldContextObject);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::SupportsThresholds(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->SupportsThresholds();
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::SupportsCustomWaveforms(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->SupportsCustomWaveforms();
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::SupportsOnBoardNormalization(const USGNovaGlove* NovaGlove)
|
||||
{
|
||||
return NovaGlove->SupportsOnBoardNormalization();
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::GetSensorData(
|
||||
UObject* WorldContextObject, USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData)
|
||||
{
|
||||
return NovaGlove->GetSensorData(WorldContextObject, OutSensorData);
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToNovaCommand(
|
||||
const USGNovaGlove* NovaGlove,
|
||||
const TArray<float>& ForceFeedbackLevels, const TArray<float>& BuzzLevels, const float WristLevel)
|
||||
{
|
||||
return NovaGlove->ToNovaCommand(ForceFeedbackLevels, BuzzLevels, WristLevel);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueVibroLevels(USGNovaGlove* NovaGlove, const TArray<float>& Amplitudes)
|
||||
{
|
||||
return NovaGlove->QueueVibroLevels(Amplitudes);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueVibroLevel(USGNovaGlove* NovaGlove, const int32 Finger, const float Amplitude)
|
||||
{
|
||||
return NovaGlove->QueueVibroLevel(Finger, Amplitude);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueWristLevel(USGNovaGlove* NovaGlove, const float Amplitude)
|
||||
{
|
||||
return NovaGlove->QueueWristLevel(Amplitude);
|
||||
}
|
||||
|
||||
ESGNovaVibroMotor USGNovaGloveKismetLibrary::ToNovaMotor(const USGNovaGlove* NovaGlove,
|
||||
const ESGHapticLocation Location)
|
||||
{
|
||||
return NovaGlove->ToNovaMotor(Location);
|
||||
}
|
||||
|
||||
int32 USGNovaGloveKismetLibrary::ChannelIndex(const USGNovaGlove* NovaGlove, const ESGNovaVibroMotor Motor)
|
||||
{
|
||||
return NovaGlove->ChannelIndex(Motor);
|
||||
}
|
||||
|
||||
void USGNovaGloveKismetLibrary::ValidateWaveform(const USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor)
|
||||
{
|
||||
NovaGlove->ValidateWaveform(OutWaveform, Motor);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::SendCustomWaveform_Nova(
|
||||
USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor, const bool bValidateWaveform)
|
||||
{
|
||||
return NovaGlove->SendCustomWaveform_Nova(OutWaveform, Motor, bValidateWaveform);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueThresholdCommand_Flexion(USGNovaGlove* NovaGlove,
|
||||
const int32 Finger, const float FlexionThreshold)
|
||||
{
|
||||
return NovaGlove->QueueThresholdCommand_Flexion(Finger, FlexionThreshold);
|
||||
}
|
||||
|
||||
bool USGNovaGloveKismetLibrary::QueueClearThreshold(USGNovaGlove* NovaGlove, const int32 Finger)
|
||||
{
|
||||
return NovaGlove->QueueClearThreshold(Finger);
|
||||
}
|
||||
|
||||
FString USGNovaGloveKismetLibrary::ToString(const USGNovaGlove* NovaGlove)
|
||||
|
||||
+12
-5
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGNovaGloveInfo.h"
|
||||
#include "SGCore/SGNovaGloveSensorData.h"
|
||||
|
||||
USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::MakeNovaGloveSensorData(UObject* WorldContextObject)
|
||||
@@ -81,6 +82,17 @@ TArray<FVector> USGNovaGloveSensorDataKismetLibrary::GetSensorValues(
|
||||
return NovaGloveSensorData->GetSensorValues();
|
||||
}
|
||||
|
||||
float USGNovaGloveSensorDataKismetLibrary::GetSensorValue(const USGNovaGloveSensorData* NovaGloveSensorData,
|
||||
const ESGFinger Finger, const ESGNovaSensorLocation Location)
|
||||
{
|
||||
return NovaGloveSensorData->GetSensorValue(Finger, Location);
|
||||
}
|
||||
|
||||
int32 USGNovaGloveSensorDataKismetLibrary::GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData)
|
||||
{
|
||||
return NovaGloveSensorData->GetParsedValues();
|
||||
}
|
||||
|
||||
FQuat USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGNovaGloveSensorData* NovaGloveSensorData)
|
||||
{
|
||||
return NovaGloveSensorData->GetImuRotationQ();
|
||||
@@ -91,11 +103,6 @@ FRotator USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FRotator(const USGN
|
||||
return NovaGloveSensorData->GetImuRotation();
|
||||
}
|
||||
|
||||
int32 USGNovaGloveSensorDataKismetLibrary::GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData)
|
||||
{
|
||||
return NovaGloveSensorData->GetParsedValues();
|
||||
}
|
||||
|
||||
bool USGNovaGloveSensorDataKismetLibrary::IsImuParsed(const USGNovaGloveSensorData* NovaGloveSensorData)
|
||||
{
|
||||
return NovaGloveSensorData->IsImuParsed();
|
||||
|
||||
-112
@@ -1,112 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGSenseGloveHandProfileKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGSenseGloveHandProfile.h"
|
||||
|
||||
USGSenseGloveHandProfile* USGSenseGloveHandProfileKismetLibrary::MakeSenseGloveHandProfile(UObject* WorldContextObject)
|
||||
{
|
||||
return USGSenseGloveHandProfile::NewSenseGloveHandProfile(WorldContextObject);
|
||||
}
|
||||
|
||||
USGSenseGloveHandProfile* USGSenseGloveHandProfileKismetLibrary::MakeSenseGloveHandProfile_bRH_I_TS_FS_FTO(
|
||||
UObject* WorldContextObject, const bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||
const ESGThumbSolver ThumbSolver, const ESGFingerSolver FingerSolver, const TArray<FVector>& FingerThimbleOffset)
|
||||
{
|
||||
return USGSenseGloveHandProfile::NewSenseGloveHandProfile(
|
||||
WorldContextObject, bRightHanded, Interpolator, ThumbSolver, FingerSolver, FingerThimbleOffset);
|
||||
}
|
||||
|
||||
USGSenseGloveHandProfile* USGSenseGloveHandProfileKismetLibrary::Default(
|
||||
UObject* WorldContextObject, const bool bRightHanded)
|
||||
{
|
||||
return USGSenseGloveHandProfile::Default(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
USGSenseGloveHandProfile* USGSenseGloveHandProfileKismetLibrary::Deserialize(
|
||||
UObject* WorldContextObject, const FString& SerializedString)
|
||||
{
|
||||
return USGSenseGloveHandProfile::Deserialize(WorldContextObject, SerializedString);
|
||||
}
|
||||
|
||||
FVector USGSenseGloveHandProfileKismetLibrary::GetDefaultThimbleOffset()
|
||||
{
|
||||
return USGSenseGloveHandProfile::GetDefaultThimbleOffset();
|
||||
}
|
||||
|
||||
bool USGSenseGloveHandProfileKismetLibrary::IsRight(const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->IsRight();
|
||||
}
|
||||
|
||||
USGHandInterpolator* USGSenseGloveHandProfileKismetLibrary::GetInterpolationSet(
|
||||
UObject* WorldContextObject, const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->GetInterpolationSet(WorldContextObject);
|
||||
}
|
||||
|
||||
ESGThumbSolver USGSenseGloveHandProfileKismetLibrary::GetThumbSolver(
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->GetThumbSolver();
|
||||
}
|
||||
|
||||
ESGFingerSolver USGSenseGloveHandProfileKismetLibrary::GetFingerSolver(
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->GetFingerSolver();
|
||||
}
|
||||
|
||||
TArray<FVector> USGSenseGloveHandProfileKismetLibrary::GetFingerThimbleOffset(
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->GetFingerThimbleOffset();
|
||||
}
|
||||
|
||||
bool USGSenseGloveHandProfileKismetLibrary::Equals(const USGSenseGloveHandProfile* A, const USGSenseGloveHandProfile* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
void USGSenseGloveHandProfileKismetLibrary::Reset(USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
SenseGloveHandProfile->Reset();
|
||||
}
|
||||
|
||||
FString USGSenseGloveHandProfileKismetLibrary::SGSerialize(const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGloveHandProfile->SGSerialize();
|
||||
}
|
||||
@@ -195,16 +195,16 @@ bool USGSenseGloveInfoKismetLibrary::Equals(const USGSenseGloveInfo* A, const US
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGSenseGloveInfoKismetLibrary::ToString(const USGSenseGloveInfo* SenseGloveInfo)
|
||||
{
|
||||
return SenseGloveInfo->ToString();
|
||||
}
|
||||
|
||||
FString USGSenseGloveInfoKismetLibrary::ToString_bSN(const USGSenseGloveInfo* SenseGloveInfo, const bool bShortNotation)
|
||||
{
|
||||
return SenseGloveInfo->ToString(bShortNotation);
|
||||
}
|
||||
|
||||
FString USGSenseGloveInfoKismetLibrary::ToString(const USGSenseGloveInfo* SenseGloveInfo)
|
||||
{
|
||||
return SenseGloveInfo->ToString();
|
||||
}
|
||||
|
||||
FString USGSenseGloveInfoKismetLibrary::SGSerialize(const USGSenseGloveInfo* SenseGloveInfo)
|
||||
{
|
||||
return SenseGloveInfo->SGSerialize();
|
||||
|
||||
@@ -35,44 +35,12 @@
|
||||
|
||||
#include "SGCoreKismet/SGSenseGloveKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGBuzzCommand.h"
|
||||
#include "SGCore/SGForceFeedbackCommand.h"
|
||||
#include "SGCore/SGDevice.h"
|
||||
#include "SGCore/SGHandInterpolator.h"
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGSenseGlove.h"
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
|
||||
FString USGSenseGloveKismetLibrary::GetHapticsByte()
|
||||
{
|
||||
return FString::Printf(TEXT("%c"), USGSenseGlove::GetHapticsByte());
|
||||
}
|
||||
|
||||
FString USGSenseGloveKismetLibrary::GetThumperByte()
|
||||
{
|
||||
return FString::Printf(TEXT("%c"), USGSenseGlove::GetThumperByte());
|
||||
}
|
||||
|
||||
USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_SD_GM(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel)
|
||||
{
|
||||
return USGSenseGlove::CalculateGlovePose(WorldContextObject, SensorData, GloveModel);
|
||||
}
|
||||
|
||||
USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_GA_GM(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGVectorArray>& GloveAngles, const USGSenseGloveInfo* GloveModel)
|
||||
{
|
||||
TArray<TArray<FVector>> GloveAnglesNestedArray{
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
return USGSenseGlove::CalculateGlovePose(WorldContextObject, MoveTemp(GloveAnglesNestedArray), GloveModel);
|
||||
}
|
||||
|
||||
USGHandPose* USGSenseGloveKismetLibrary::CalculateHandPose(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile)
|
||||
{
|
||||
return USGSenseGlove::CalculateHandPose(WorldContextObject, GlovePose, HandModel, Profile);
|
||||
}
|
||||
#include "SGCore/SGSenseGloveSensorNormalizer.h"
|
||||
#include "SGUtils/SGArrayUtils.h"
|
||||
|
||||
USGDevice* USGSenseGloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString)
|
||||
{
|
||||
@@ -95,19 +63,6 @@ bool USGSenseGloveKismetLibrary::GetSenseGlove_bRH_OutG(UObject* WorldContextObj
|
||||
return USGSenseGlove::GetSenseGlove(WorldContextObject, bRightHanded, OutGlove);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSenseGloveKismetLibrary::GetCalibrationValues_GlovePose(const USGSenseGlovePose* GlovePose)
|
||||
{
|
||||
return USGSenseGlove::GetCalibrationValues(GlovePose);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::CalibrateInterpolation(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||
const bool bRightHanded, USGSenseGloveHandProfile*& OutProfile)
|
||||
{
|
||||
USGSenseGlove::CalibrateInterpolation(WorldContextObject, MinValues, MaxValues, bRightHanded, OutProfile);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_MO_OutGP_FQuat_OutGR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn,
|
||||
@@ -153,15 +108,68 @@ USGSenseGloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_MO_GWPO
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
USGSenseGloveInfo* USGSenseGloveKismetLibrary::GetGloveModel(
|
||||
UObject* WorldContextObject, const USGSenseGlove* SenseGlove)
|
||||
FString USGSenseGloveKismetLibrary::GetHapticsByte()
|
||||
{
|
||||
return SenseGlove->GetGloveModel(WorldContextObject);
|
||||
return FString::Printf(TEXT("%c"), USGSenseGlove::GetHapticsByte());
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::IsRight(const USGSenseGlove* SenseGlove)
|
||||
FString USGSenseGloveKismetLibrary::GetThumperByte()
|
||||
{
|
||||
return SenseGlove->IsRight();
|
||||
return FString::Printf(TEXT("%c"), USGSenseGlove::GetThumperByte());
|
||||
}
|
||||
|
||||
FVector USGSenseGloveKismetLibrary::GetDefaultThimbleOffset()
|
||||
{
|
||||
return USGSenseGlove::GetDefaultThimbleOffset();
|
||||
}
|
||||
|
||||
USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_SD_GM(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel)
|
||||
{
|
||||
return USGSenseGlove::CalculateGlovePose(WorldContextObject, SensorData, GloveModel);
|
||||
}
|
||||
|
||||
USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_GA_GM(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGVectorArray>& GloveAngles, const USGSenseGloveInfo* GloveModel)
|
||||
{
|
||||
TArray<TArray<FVector>> GloveAnglesNestedArray{
|
||||
FSGArrayUtils::FromNestedBPArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
|
||||
};
|
||||
return USGSenseGlove::CalculateGlovePose(WorldContextObject, MoveTemp(GloveAnglesNestedArray), GloveModel);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::NormalizeValues(
|
||||
const TArray<FVector>& SumAngles, const USGSenseGloveSensorNormalizer* Normalizer,
|
||||
TArray<float>& OutFlexions, TArray<float>& OutAbductions)
|
||||
{
|
||||
USGSenseGlove::NormalizeValues(SumAngles, Normalizer, OutFlexions, OutAbductions);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::CalculateHandAngles(
|
||||
const USGSenseGlovePose* GlovePose,
|
||||
const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles,
|
||||
TArray<FSGVectorArray>& OutHandAngles)
|
||||
{
|
||||
TArray<TArray<FVector>> OutHandAnglesArray;
|
||||
USGSenseGlove::CalculateHandAngles(GlovePose, Normalizer, NormalizedToAngles, OutHandAnglesArray);
|
||||
|
||||
TArray<FSGVectorArray> OutHandHandAnglesNestedArray{
|
||||
FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(OutHandAnglesArray)
|
||||
};
|
||||
OutHandAngles = MoveTemp(OutHandHandAnglesNestedArray);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::CalculateHandPose(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel,
|
||||
const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles,
|
||||
USGHandPose*& OutHandPose)
|
||||
{
|
||||
USGSenseGlove::CalculateHandPose(
|
||||
WorldContextObject,
|
||||
GlovePose, HandModel, Normalizer, NormalizedToAngles, OutHandPose);
|
||||
}
|
||||
|
||||
ESGDeviceType USGSenseGloveKismetLibrary::GetDeviceType(const USGSenseGlove* SenseGlove)
|
||||
@@ -189,10 +197,9 @@ int32 USGSenseGloveKismetLibrary::GetSubFirmwareVersion(const USGSenseGlove* Sen
|
||||
return SenseGlove->GetSubFirmwareVersion();
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetSensorData(UObject* WorldContextObject, const USGSenseGlove* SenseGlove,
|
||||
USGSenseGloveSensorData*& OutSensorData)
|
||||
bool USGSenseGloveKismetLibrary::IsRight(const USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->GetSensorData(WorldContextObject, OutSensorData);
|
||||
return SenseGlove->IsRight();
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetImuRotation_FQuat_OutI(USGSenseGlove* SenseGlove, FQuat& OutImu)
|
||||
@@ -205,6 +212,182 @@ bool USGSenseGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGSenseGlove* Sen
|
||||
return SenseGlove->GetImuRotation(OutImu);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetHandPose(
|
||||
UObject* WorldContextObject, USGSenseGlove* SenseGlove, const USGBasicHandModel* HandModel,
|
||||
USGHandPose*& OutHandPose)
|
||||
{
|
||||
return SenseGlove->GetHandPose(WorldContextObject, HandModel, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetHandAngles(const USGSenseGlove* SenseGlove, TArray<FSGVectorArray>& OutHandAngles)
|
||||
{
|
||||
TArray<TArray<FVector>> HandAnglesNestedArray;
|
||||
const bool bResult = SenseGlove->GetHandAngles(HandAnglesNestedArray);
|
||||
OutHandAngles = FSGArrayUtils::ToNestedBPArray<FVector, FSGVectorArray>(MoveTemp(HandAnglesNestedArray));
|
||||
return bResult;
|
||||
}
|
||||
|
||||
ESGHapticGloveCalibrationState USGSenseGloveKismetLibrary::GetCalibrationState(const USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->GetCalibrationState();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::EndCalibration(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
SenseGlove->EndCalibration();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::ResetCalibration(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
SenseGlove->ResetCalibration();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::StopHaptics(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
SenseGlove->StopHaptics();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::StopVibrations(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
SenseGlove->StopVibrations();
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::SendHaptics(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->SendHaptics();
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::QueueForceFeedbackLevels(USGSenseGlove* SenseGlove, const TArray<float>& Levels01)
|
||||
{
|
||||
return SenseGlove->QueueForceFeedbackLevels(Levels01);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::QueueForceFeedbackLevel(USGSenseGlove* SenseGlove,
|
||||
const int32 Finger, const float Level01)
|
||||
{
|
||||
return SenseGlove->QueueForceFeedbackLevel(Finger, Level01);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||
{
|
||||
SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_MO_OutGP_FQuat_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, MountedOn,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_MO_OutGP_FRotator_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, FVector& OutGlovePosition,
|
||||
FRotator& OutGloveRotation)
|
||||
{
|
||||
SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, MountedOn,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_GWPO_FQuat_GWRO_OutWP_FQuat_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
GloveWristPositionOffset, GloveWristRotationOffset,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_GWPO_FRotator_GWRO_OutWP_FRotator_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
GloveWristPositionOffset, GloveWristRotationOffset,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
USGSenseGloveInfo* USGSenseGloveKismetLibrary::GetGloveInfo(
|
||||
UObject* WorldContextObject, const USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->GetGloveInfo(WorldContextObject);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSenseGloveKismetLibrary::GetFingerThimbleOffsets(const USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->GetFingerThimbleOffsets();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::SetFingerThimbleOffset(USGSenseGlove* SenseGlove,
|
||||
const int32 Finger, const FVector& Offset)
|
||||
{
|
||||
SenseGlove->SetFingerThimbleOffset(Finger, Offset);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::SupportsWristActuator(const USGSenseGlove* SenseGlove)
|
||||
{
|
||||
return SenseGlove->SupportsWristActuator();
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetSensorData(UObject* WorldContextObject, const USGSenseGlove* SenseGlove,
|
||||
USGSenseGloveSensorData*& OutSensorData)
|
||||
{
|
||||
return SenseGlove->GetSensorData(WorldContextObject, OutSensorData);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetGlovePose_OutGP(UObject* WorldContextObject, USGSenseGlove* SenseGlove,
|
||||
USGSenseGlovePose*& OutGlovePose)
|
||||
{
|
||||
@@ -218,171 +401,20 @@ bool USGSenseGloveKismetLibrary::GetGlovePose_SD_OutGP(
|
||||
return SenseGlove->GetGlovePose(WorldContextObject, SensorData, OutGlovePose);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetHandPose_HM_P_OutHP(
|
||||
UObject* WorldContextObject, USGSenseGlove* SenseGlove,
|
||||
const USGBasicHandModel* HandModel, const USGSenseGloveHandProfile* Profile, USGHandPose*& OutHandPose)
|
||||
bool USGSenseGloveKismetLibrary::QueueVibroLevels(USGSenseGlove* SenseGlove, const TArray<float>& Amplitudes)
|
||||
{
|
||||
return SenseGlove->GetHandPose(WorldContextObject, HandModel, Profile, OutHandPose);
|
||||
return SenseGlove->QueueVibroLevels(Amplitudes);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetHandPose_HG_HP_OutHP(
|
||||
UObject* WorldContextObject, USGSenseGlove* SenseGlove,
|
||||
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
bool USGSenseGloveKismetLibrary::QueueVibroLevel(USGSenseGlove* SenseGlove, const int32 Finger, const float Amplitude)
|
||||
{
|
||||
return SenseGlove->GetHandPose(WorldContextObject, HandGeometry, HandProfile, OutHandPose);
|
||||
return SenseGlove->QueueVibroLevel(Finger, Amplitude);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetHandPose_HP_OutHP(
|
||||
UObject* WorldContextObject, USGSenseGlove* SenseGlove,
|
||||
const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
|
||||
bool USGSenseGloveKismetLibrary::QueueThumperCommand(USGSenseGlove* SenseGlove,
|
||||
const ESGSenseGloveThumperCommand Command)
|
||||
{
|
||||
return SenseGlove->GetHandPose(WorldContextObject, HandProfile, OutHandPose);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::SendHaptics_FFC_BC_ESGSenseGloveThumperCommand_TC(
|
||||
USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand,
|
||||
ESGSenseGloveThumperCommand ThumperCommand)
|
||||
{
|
||||
return SenseGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand, ThumperCommand);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::SendHaptics_TC(USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand ThumperCommand)
|
||||
{
|
||||
return SenseGlove->SendHaptics(ThumperCommand);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::SendHaptics_FFC(USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand)
|
||||
{
|
||||
SenseGlove->SendHaptics(ForceFeedbackCommand);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::SendHaptics_BC(USGSenseGlove* SenseGlove,const USGBuzzCommand* BuzzCommand)
|
||||
{
|
||||
SenseGlove->SendHaptics(BuzzCommand);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::SendHaptics_FFC_BC_TC(USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand)
|
||||
{
|
||||
SenseGlove->SendHaptics(ForceFeedbackCommand, BuzzCommand, ThumperCommand);
|
||||
}
|
||||
|
||||
bool USGSenseGloveKismetLibrary::GetCalibrationValues_OutV(USGSenseGlove* SenseGlove, TArray<FVector>& OutValues)
|
||||
{
|
||||
return SenseGlove->GetCalibrationValues(OutValues);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::ResetCalibrationRange(USGSenseGlove* SenseGlove)
|
||||
{
|
||||
SenseGlove->ResetCalibrationRange();
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::ApplyCalibration_USGHandProfile_OutP(
|
||||
UObject* WorldContextObject, const USGSenseGlove* SenseGlove, USGHandProfile*& OutProfile)
|
||||
{
|
||||
return SenseGlove->ApplyCalibration(WorldContextObject, OutProfile);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::ApplyCalibration_USGSenseGloveHandProfile_OutP(
|
||||
UObject* WorldContextObject, const USGSenseGlove* SenseGlove, USGSenseGloveHandProfile*& OutProfile)
|
||||
{
|
||||
return SenseGlove->ApplyCalibration(WorldContextObject, OutProfile);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
return SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation)
|
||||
{
|
||||
return SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_MO_OutGP_FQuat_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation)
|
||||
{
|
||||
return SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, MountedOn,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_MO_OutGP_FRotator_OutGR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, FVector& OutGlovePosition,
|
||||
FRotator& OutGloveRotation)
|
||||
{
|
||||
return SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware, MountedOn,
|
||||
OutGlovePosition, OutGloveRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
return SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
return SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_GWPO_FQuat_GWRO_OutWP_FQuat_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation)
|
||||
{
|
||||
return SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
GloveWristPositionOffset, GloveWristRotationOffset,
|
||||
OutWristPosition, OutWristRotation);
|
||||
}
|
||||
|
||||
void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_GWPO_FRotator_GWRO_OutWP_FRotator_OutWR(
|
||||
const USGSenseGlove* SenseGlove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
const ESGPositionalTrackingHardware TrackingHardware,
|
||||
const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation)
|
||||
{
|
||||
return SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
|
||||
TrackingHardware,
|
||||
GloveWristPositionOffset, GloveWristRotationOffset,
|
||||
OutWristPosition, OutWristRotation);
|
||||
return SenseGlove->QueueThumperCommand(Command);
|
||||
}
|
||||
|
||||
FString USGSenseGloveKismetLibrary::ToString(const USGSenseGlove* SenseGlove)
|
||||
|
||||
@@ -120,16 +120,10 @@ TArray<FVector> USGSenseGlovePoseKismetLibrary::GetTotalGloveAngles(const USGSen
|
||||
return SenseGlovePose->GetTotalGloveAngles();
|
||||
}
|
||||
|
||||
TArray<FVector> USGSenseGlovePoseKismetLibrary::CalculateFingerTips_SenseGloveHandProfileImpl(
|
||||
const USGSenseGlovePose* SenseGlovePose, const USGSenseGloveHandProfile* SenseGloveHandProfile)
|
||||
{
|
||||
return SenseGlovePose->CalculateFingerTips(SenseGloveHandProfile);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSenseGlovePoseKismetLibrary::CalculateFingerTips_FingerOffsets(
|
||||
TArray<FVector> USGSenseGlovePoseKismetLibrary::CalculateFingertips(
|
||||
const USGSenseGlovePose* SenseGlovePose, const TArray<FVector>& FingerOffsets)
|
||||
{
|
||||
return SenseGlovePose->CalculateFingerTips(FingerOffsets);
|
||||
return SenseGlovePose->CalculateFingertips(FingerOffsets);
|
||||
}
|
||||
|
||||
bool USGSenseGlovePoseKismetLibrary::Equals(const USGSenseGlovePose* A, const USGSenseGlovePose* B)
|
||||
|
||||
+12
-12
@@ -85,6 +85,18 @@ TArray<FSGFloatArray> USGSenseGloveSensorDataKismetLibrary::GetSensorAngles(
|
||||
return FSGArrayUtils::ToNestedBPArray<float, FSGFloatArray>(SenseGloveSensorData->GetSensorAngles());
|
||||
}
|
||||
|
||||
TArray<float> USGSenseGloveSensorDataKismetLibrary::GetSensorAngles_F(
|
||||
const USGSenseGloveSensorData* SenseGloveSensorData, const ESGFinger Finger)
|
||||
{
|
||||
return SenseGloveSensorData->GetSensorAngles(Finger);
|
||||
}
|
||||
|
||||
TArray<float> USGSenseGloveSensorDataKismetLibrary::GetAngleSequence(
|
||||
const USGSenseGloveSensorData* SenseGloveSensorData)
|
||||
{
|
||||
return SenseGloveSensorData->GetAngleSequence();
|
||||
}
|
||||
|
||||
FQuat USGSenseGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGSenseGloveSensorData* SenseGloveSensorData)
|
||||
{
|
||||
return SenseGloveSensorData->GetImuRotationQ();
|
||||
@@ -106,18 +118,6 @@ bool USGSenseGloveSensorDataKismetLibrary::IsImuParsed(const USGSenseGloveSensor
|
||||
return SenseGloveSensorData->IsImuParsed();
|
||||
}
|
||||
|
||||
TArray<float> USGSenseGloveSensorDataKismetLibrary::GetSensorAngles_F(
|
||||
const USGSenseGloveSensorData* SenseGloveSensorData, const ESGFinger Finger)
|
||||
{
|
||||
return SenseGloveSensorData->GetSensorAngles(Finger);
|
||||
}
|
||||
|
||||
TArray<float> USGSenseGloveSensorDataKismetLibrary::GetAngleSequence(
|
||||
const USGSenseGloveSensorData* SenseGloveSensorData)
|
||||
{
|
||||
return SenseGloveSensorData->GetAngleSequence();
|
||||
}
|
||||
|
||||
bool USGSenseGloveSensorDataKismetLibrary::Equals(const USGSenseGloveSensorData* A, const USGSenseGloveSensorData* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
|
||||
+14
-15
@@ -33,31 +33,30 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SGCoreKismet/SGFingerCommandKismetLibrary.h"
|
||||
#include "SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGFingerCommand.h"
|
||||
#include "SGCore/SGSenseGloveSensorNormalizer.h"
|
||||
|
||||
TArray<int32> USGFingerCommandKismetLibrary::GetLevels(const USGFingerCommand* FingerCommand)
|
||||
USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizerKismetLibrary::MakeSenseGloveSensorNormalizer(
|
||||
UObject* WorldContextObject)
|
||||
{
|
||||
return FingerCommand->GetLevels();
|
||||
return USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer(WorldContextObject);
|
||||
}
|
||||
|
||||
int32 USGFingerCommandKismetLibrary::GetLevel(const USGFingerCommand* FingerCommand, const int32 Finger)
|
||||
USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizerKismetLibrary::MakeSenseGloveSensorNormalizer_bRH(
|
||||
UObject* WorldContextObject, const bool bRightHanded)
|
||||
{
|
||||
return FingerCommand->GetLevel(Finger);
|
||||
return USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer(WorldContextObject, bRightHanded);
|
||||
}
|
||||
|
||||
void USGFingerCommandKismetLibrary::SetLevel(USGFingerCommand* FingerCommand, const int32 Finger, const int32 Value)
|
||||
float USGSenseGloveSensorNormalizerKismetLibrary::NormalizeFlexion(
|
||||
const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, const int32 Finger, const float SumFlexionAngles)
|
||||
{
|
||||
FingerCommand->SetLevel(Finger, Value);
|
||||
return SenseGloveSensorNormalizer->NormalizeFlexion(Finger, SumFlexionAngles);
|
||||
}
|
||||
|
||||
bool USGFingerCommandKismetLibrary::Equals(const USGFingerCommand* A, const USGFingerCommand* B)
|
||||
float USGSenseGloveSensorNormalizerKismetLibrary::NormalizeAbduction(
|
||||
const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, const int32 Finger, const float SumAbductionAngles)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGFingerCommandKismetLibrary::ToString(const USGFingerCommand* FingerCommand)
|
||||
{
|
||||
return FingerCommand->ToString();
|
||||
return SenseGloveSensorNormalizer->NormalizeFlexion(Finger, SumAbductionAngles);
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGSensorNormalizationKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGSensorNormalization.h"
|
||||
|
||||
USGSensorNormalization* USGSensorNormalizationKismetLibrary::MakeSensorNormalization(UObject* WorldContextObject)
|
||||
{
|
||||
return USGSensorNormalization::NewSensorNormalization(WorldContextObject);
|
||||
}
|
||||
|
||||
USGSensorNormalization* USGSensorNormalizationKismetLibrary::MakeSensorNormalization_MR(
|
||||
UObject* WorldContextObject, const TArray<float>& MovementRanges)
|
||||
{
|
||||
return USGSensorNormalization::NewSensorNormalization(WorldContextObject, MovementRanges);
|
||||
}
|
||||
|
||||
bool USGSensorNormalizationKismetLibrary::CollectsNormalization(const USGSensorNormalization* SensorNormalization)
|
||||
{
|
||||
return SensorNormalization->CollectsNormalization();
|
||||
}
|
||||
|
||||
void USGSensorNormalizationKismetLibrary::SetCollectNormalization(USGSensorNormalization* SensorNormalization,
|
||||
const bool bCollectNormalization)
|
||||
{
|
||||
SensorNormalization->SetCollectNormalization(bCollectNormalization);
|
||||
}
|
||||
|
||||
int32 USGSensorNormalizationKismetLibrary::GetLength(const USGSensorNormalization* SensorNormalization)
|
||||
{
|
||||
return SensorNormalization->GetLength();
|
||||
}
|
||||
|
||||
int32 USGSensorNormalizationKismetLibrary::GetMoveCount(const USGSensorNormalization* SensorNormalization)
|
||||
{
|
||||
return SensorNormalization->GetMoveCount();
|
||||
}
|
||||
|
||||
bool USGSensorNormalizationKismetLibrary::AllSensorsMoving(const USGSensorNormalization* SensorNormalization)
|
||||
{
|
||||
return SensorNormalization->AllSensorsMoving();
|
||||
}
|
||||
|
||||
void USGSensorNormalizationKismetLibrary::ResetNormalization(USGSensorNormalization* SensorNormalization)
|
||||
{
|
||||
SensorNormalization->ResetNormalization();
|
||||
}
|
||||
|
||||
void USGSensorNormalizationKismetLibrary::UpdateNormalization(USGSensorNormalization* SensorNormalization,
|
||||
const float Value, const int32 Index)
|
||||
{
|
||||
SensorNormalization->UpdateNormalization(Value, Index);
|
||||
}
|
||||
|
||||
float USGSensorNormalizationKismetLibrary::NormalizeValue(USGSensorNormalization* SensorNormalization,
|
||||
const float Value, const int32 Index)
|
||||
{
|
||||
return SensorNormalization->NormalizeValue(Value, Index);
|
||||
}
|
||||
|
||||
TArray<float> USGSensorNormalizationKismetLibrary::NormalizeValues(USGSensorNormalization* SensorNormalization,
|
||||
const TArray<float>& Values)
|
||||
{
|
||||
return SensorNormalization->NormalizeValues(Values);
|
||||
}
|
||||
|
||||
bool USGSensorNormalizationKismetLibrary::MovedEnough(const USGSensorNormalization* SensorNormalization,
|
||||
const int32 Index)
|
||||
{
|
||||
return SensorNormalization->MovedEnough(Index);
|
||||
}
|
||||
|
||||
float USGSensorNormalizationKismetLibrary::Denormalize(
|
||||
const USGSensorNormalization* SensorNormalization,
|
||||
const float Value01, const int32 Index, const float FallbackValue)
|
||||
{
|
||||
return SensorNormalization->Denormalize(Value01, Index, FallbackValue);
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGSensorRangeKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
|
||||
USGSensorRange* USGSensorRangeKismetLibrary::MakeSensorRange(UObject* WorldContextObject)
|
||||
{
|
||||
return USGSensorRange::NewSensorRange(WorldContextObject);
|
||||
}
|
||||
|
||||
USGSensorRange* USGSensorRangeKismetLibrary::MakeSensorRange_MV_MV(
|
||||
UObject* WorldContextObject, const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues)
|
||||
{
|
||||
return USGSensorRange::NewSensorRange(WorldContextObject, MinValues, MaxValues);
|
||||
}
|
||||
|
||||
USGSensorRange* USGSensorRangeKismetLibrary::ForCalibration(UObject* WorldContextObject)
|
||||
{
|
||||
return USGSensorRange::ForCalibration(WorldContextObject);
|
||||
}
|
||||
|
||||
USGSensorRange* USGSensorRangeKismetLibrary::Deserialize(UObject* WorldContextObject, const FString& SerializedString)
|
||||
{
|
||||
return USGSensorRange::Deserialize(WorldContextObject, SerializedString);
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::CheckMax(const FVector CurrentValues, FVector& OutMaxValues)
|
||||
{
|
||||
USGSensorRange::CheckMax(CurrentValues, OutMaxValues);
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::CheckMin(const FVector& CurrentValues, FVector& OutMinValues)
|
||||
{
|
||||
USGSensorRange::CheckMin(CurrentValues, OutMinValues);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSensorRangeKismetLibrary::GetMinValues(const USGSensorRange* SensorRange)
|
||||
{
|
||||
return SensorRange->GetMinValues();
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::SetMinValues(USGSensorRange* SensorRange, const TArray<FVector>& Values)
|
||||
{
|
||||
SensorRange->SetMinValues(Values);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSensorRangeKismetLibrary::GetMaxValues(const USGSensorRange* SensorRange)
|
||||
{
|
||||
return SensorRange->GetMaxValues();
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::SetMaxValues(USGSensorRange* SensorRange, const TArray<FVector>& Values)
|
||||
{
|
||||
SensorRange->SetMaxValues(Values);
|
||||
}
|
||||
|
||||
TArray<FVector> USGSensorRangeKismetLibrary::GetRange(const USGSensorRange* SensorRange)
|
||||
{
|
||||
return SensorRange->GetRange();
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::UpdateRange(USGSensorRange* SensorRange)
|
||||
{
|
||||
SensorRange->UpdateRange();
|
||||
}
|
||||
|
||||
void USGSensorRangeKismetLibrary::CheckForExtremes(USGSensorRange* SensorRange, const TArray<FVector>& OtherValues)
|
||||
{
|
||||
SensorRange->CheckForExtremes(OtherValues);
|
||||
}
|
||||
|
||||
FString USGSensorRangeKismetLibrary::RangeString(const USGSensorRange* SensorRange, const bool bYOnly)
|
||||
{
|
||||
return SensorRange->RangeString(bYOnly);
|
||||
}
|
||||
|
||||
FString USGSensorRangeKismetLibrary::ToString(const USGSensorRange* SensorRange, const bool bYOnly)
|
||||
{
|
||||
return SensorRange->ToString(bYOnly);
|
||||
}
|
||||
|
||||
FString USGSensorRangeKismetLibrary::SGSerialize(const USGSensorRange* SensorRange)
|
||||
{
|
||||
return SensorRange->SGSerialize();
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGThresholdCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGThresholdCommand.h"
|
||||
|
||||
USGThresholdCommand* USGThresholdCommandKismetLibrary::MakeThresholdCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGThresholdCommand::NewThresholdCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGThresholdCommand* USGThresholdCommandKismetLibrary::MakeThresholdCommand_AF_TV(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<bool>& AffectedFingers, const TArray<float>& ThresholdValues)
|
||||
{
|
||||
return USGThresholdCommand::NewThresholdCommand(WorldContextObject, AffectedFingers, ThresholdValues);
|
||||
}
|
||||
|
||||
float USGThresholdCommandKismetLibrary::GetThreshold(const USGThresholdCommand* ThresholdCommand, const int32 Finger)
|
||||
{
|
||||
return ThresholdCommand->GetThreshold(Finger);
|
||||
}
|
||||
|
||||
void USGThresholdCommandKismetLibrary::SetThreshold(USGThresholdCommand* ThresholdCommand,
|
||||
const int32 Finger, const float ThresholdValue)
|
||||
{
|
||||
ThresholdCommand->SetThreshold(Finger, ThresholdValue);
|
||||
}
|
||||
|
||||
TArray<float> USGThresholdCommandKismetLibrary::GetThresholds(const USGThresholdCommand* ThresholdCommand)
|
||||
{
|
||||
return ThresholdCommand->GetThresholds();
|
||||
}
|
||||
|
||||
void USGThresholdCommandKismetLibrary::SetThresholds(
|
||||
USGThresholdCommand* ThresholdCommand,
|
||||
const TArray<bool>& AffectedFingers, const TArray<float>& ThresholdValues)
|
||||
{
|
||||
ThresholdCommand->SetThresholds(AffectedFingers, ThresholdValues);
|
||||
}
|
||||
|
||||
bool USGThresholdCommandKismetLibrary::GetFingerActive(const USGThresholdCommand* ThresholdCommand, const int32 Finger)
|
||||
{
|
||||
return ThresholdCommand->GetFingerActive(Finger);
|
||||
}
|
||||
|
||||
TArray<bool> USGThresholdCommandKismetLibrary::GetActiveFingers(const USGThresholdCommand* ThresholdCommand)
|
||||
{
|
||||
return ThresholdCommand->GetActiveFingers();
|
||||
}
|
||||
|
||||
void USGThresholdCommandKismetLibrary::ClearThreshold(USGThresholdCommand* ThresholdCommand, const int32 Finger)
|
||||
{
|
||||
ThresholdCommand->ClearThreshold(Finger);
|
||||
}
|
||||
|
||||
void USGThresholdCommandKismetLibrary::ClearThresholds(USGThresholdCommand* ThresholdCommand)
|
||||
{
|
||||
ThresholdCommand->ClearThresholds();
|
||||
}
|
||||
|
||||
bool USGThresholdCommandKismetLibrary::Equals(const USGThresholdCommand* A, const USGThresholdCommand* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGThresholdCommandKismetLibrary::ToString(const USGThresholdCommand* ThresholdCommand)
|
||||
{
|
||||
return ThresholdCommand->ToString();
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGThumperCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGThumperCommand.h"
|
||||
|
||||
USGThumperCommand* USGThumperCommandKismetLibrary::MakeThumperCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGThumperCommand::NewThumperCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGThumperCommand* USGThumperCommandKismetLibrary::MakeThumperCommand_M(
|
||||
UObject* WorldContextObject, const int32 Magnitude)
|
||||
{
|
||||
return USGThumperCommand::NewThumperCommand(WorldContextObject, Magnitude);
|
||||
}
|
||||
|
||||
USGThumperCommand* USGThumperCommandKismetLibrary::Off(UObject* WorldContextObject)
|
||||
{
|
||||
return USGThumperCommand::Off(WorldContextObject);
|
||||
}
|
||||
|
||||
int32 USGThumperCommandKismetLibrary::GetMagnitude(const USGThumperCommand* ThumperCommand)
|
||||
{
|
||||
return ThumperCommand->GetMagnitude();
|
||||
}
|
||||
|
||||
void USGThumperCommandKismetLibrary::SetMagnitude(USGThumperCommand* ThumperCommand, const int32 Magnitude)
|
||||
{
|
||||
return ThumperCommand->SetMagnitude(Magnitude);
|
||||
}
|
||||
|
||||
USGThumperCommand* USGThumperCommandKismetLibrary::Copy(UObject* WorldContextObject,
|
||||
const USGThumperCommand* ThumperCommand)
|
||||
{
|
||||
return ThumperCommand->Copy(WorldContextObject);
|
||||
}
|
||||
|
||||
USGThumperCommand* USGThumperCommandKismetLibrary::Merge(UObject* WorldContextObject,
|
||||
const USGThumperCommand* A, const USGThumperCommand* B)
|
||||
{
|
||||
return A->Merge(WorldContextObject, B);
|
||||
}
|
||||
|
||||
bool USGThumperCommandKismetLibrary::Equals(const USGThumperCommand* A, const USGThumperCommand* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGTimedBuzzCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGTimedBuzzCommand.h"
|
||||
|
||||
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand_F_M_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
const ESGFinger Finger, const int32 Magnitude, const float DurationSeconds, const float StartTimeSeconds)
|
||||
{
|
||||
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject,
|
||||
Finger, Magnitude, DurationSeconds, StartTimeSeconds);
|
||||
}
|
||||
|
||||
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand_BC_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
const USGBuzzCommand* BaseCommand, const float DurationSeconds, const float StartTimeSeconds)
|
||||
{
|
||||
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject,
|
||||
BaseCommand, DurationSeconds, StartTimeSeconds);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::Copy(UObject* WorldContextObject,
|
||||
const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->Copy(WorldContextObject);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::Merge(UObject* WorldContextObject,
|
||||
const USGTimedBuzzCommand* A, const USGBuzzCommand* B)
|
||||
{
|
||||
return A->Merge(WorldContextObject, B);
|
||||
}
|
||||
|
||||
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::GetBaseCommand(UObject* WorldContextObject,
|
||||
const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->GetBaseCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
float USGTimedBuzzCommandKismetLibrary::GetDuration(const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->GetDuration();
|
||||
}
|
||||
|
||||
float USGTimedBuzzCommandKismetLibrary::GetElapsedTime(const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->GetElapsedTime();
|
||||
}
|
||||
|
||||
bool USGTimedBuzzCommandKismetLibrary::HasTimeElapsed(const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->HasTimeElapsed();
|
||||
}
|
||||
|
||||
float USGTimedBuzzCommandKismetLibrary::NormalizedTime(const USGTimedBuzzCommand* TimedBuzzCommand, const bool bClamp01)
|
||||
{
|
||||
return TimedBuzzCommand->NormalizedTime(bClamp01);
|
||||
}
|
||||
|
||||
void USGTimedBuzzCommandKismetLibrary::ResetTiming(USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
TimedBuzzCommand->ResetTiming();
|
||||
}
|
||||
|
||||
void USGTimedBuzzCommandKismetLibrary::UpdateTiming(USGTimedBuzzCommand* TimedBuzzCommand, const float DeltaSeconds)
|
||||
{
|
||||
TimedBuzzCommand->UpdateTiming(DeltaSeconds);
|
||||
}
|
||||
|
||||
FString USGTimedBuzzCommandKismetLibrary::ToString(const USGTimedBuzzCommand* TimedBuzzCommand)
|
||||
{
|
||||
return TimedBuzzCommand->ToString();
|
||||
}
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGTimedThumpCommandKismetLibrary.h"
|
||||
|
||||
#include "SGCore/SGTimedThumpCommand.h"
|
||||
|
||||
USGTimedThumpCommand* USGTimedThumpCommandKismetLibrary::MakeTimedThumpCommand(UObject* WorldContextObject)
|
||||
{
|
||||
return USGTimedThumpCommand::NewTimedThumpCommand(WorldContextObject);
|
||||
}
|
||||
|
||||
USGTimedThumpCommand*
|
||||
USGTimedThumpCommandKismetLibrary::MakeTimedThumpCommand_M_DS_STS(
|
||||
UObject* WorldContextObject, const int32 Magnitude, const float DurationSeconds, const float StartTimeSeconds)
|
||||
{
|
||||
return USGTimedThumpCommand::NewTimedThumpCommand(WorldContextObject, Magnitude, DurationSeconds, StartTimeSeconds);
|
||||
}
|
||||
|
||||
USGTimedThumpCommand*
|
||||
USGTimedThumpCommandKismetLibrary::MakeTimedThumpCommand_BC_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
const USGThumperCommand* BaseCommand, const float DurationSeconds, const float StartTimeSeconds)
|
||||
{
|
||||
return USGTimedThumpCommand::NewTimedThumpCommand(WorldContextObject,
|
||||
BaseCommand, DurationSeconds, StartTimeSeconds);
|
||||
}
|
||||
|
||||
int32 USGTimedThumpCommandKismetLibrary::GetMagnitude(const USGTimedThumpCommand* TimedThumpCommand)
|
||||
{
|
||||
return TimedThumpCommand->GetMagnitude();
|
||||
}
|
||||
|
||||
float USGTimedThumpCommandKismetLibrary::GetDuration(const USGTimedThumpCommand* TimedThumpCommand)
|
||||
{
|
||||
return TimedThumpCommand->GetDuration();
|
||||
}
|
||||
|
||||
float USGTimedThumpCommandKismetLibrary::GetElapsedTime(const USGTimedThumpCommand* TimedThumpCommand)
|
||||
{
|
||||
return TimedThumpCommand->GetElapsedTime();
|
||||
}
|
||||
|
||||
bool USGTimedThumpCommandKismetLibrary::HasTimeElapsed(const USGTimedThumpCommand* TimedThumpCommand)
|
||||
{
|
||||
return TimedThumpCommand->HasTimeElapsed();
|
||||
}
|
||||
|
||||
USGTimedThumpCommand* USGTimedThumpCommandKismetLibrary::Copy(
|
||||
UObject* WorldContextObject, const USGTimedThumpCommand* TimedThumpCommand, const bool bCopyElapsed)
|
||||
{
|
||||
return TimedThumpCommand->Copy(WorldContextObject, bCopyElapsed);
|
||||
}
|
||||
|
||||
void USGTimedThumpCommandKismetLibrary::Update(USGTimedThumpCommand* TimedThumpCommand, const float DeltaSeconds)
|
||||
{
|
||||
TimedThumpCommand->Update(DeltaSeconds);
|
||||
}
|
||||
|
||||
bool USGTimedThumpCommandKismetLibrary::Equals(const USGTimedThumpCommand* A, const USGTimedThumpCommand* B)
|
||||
{
|
||||
return A->Equals(B);
|
||||
}
|
||||
|
||||
FString USGTimedThumpCommandKismetLibrary::ToString(const USGTimedThumpCommand* TimedThumpCommand)
|
||||
{
|
||||
return TimedThumpCommand->ToString();
|
||||
}
|
||||
@@ -160,18 +160,6 @@ FRotator USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FRotator()
|
||||
return FSGTracking::GetNovaToWristRotationOffset();
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO(
|
||||
const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO(
|
||||
const bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNovaViveToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNovaViveToAttachPosition();
|
||||
@@ -257,6 +245,78 @@ FRotator USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FRotator()
|
||||
return FSGTracking::GetLeftNovaPico2ToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNovaQuestProToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNovaQuestProToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNovaQuestProToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNovaQuestProToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNovaQuestProToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNovaQuestProToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaQuestProToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaQuestProToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaQuestProToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNovaViveFocus3ToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNovaViveFocus3ToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNovaViveFocus3ToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaViveFocus3ToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaViveFocus3ToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNovaViveFocus3ToAttachRotation();
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO(
|
||||
const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO(
|
||||
const bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FQuat_OutRO(
|
||||
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||
@@ -272,6 +332,188 @@ USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FRotator_OutRO(
|
||||
return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNova2ToWristPositionOffset()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ToWristPositionOffset();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNova2ToWristRotationOffset_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ToWristRotationOffsetQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNova2ToWristRotationOffset_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ToWristRotationOffset();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNova2ToWristPositionOffset()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ToWristPositionOffset();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNova2ToWristRotationOffset_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ToWristRotationOffsetQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNova2ToWristRotationOffset_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ToWristRotationOffset();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNova2Quest2ToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNova2Quest2ToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNova2Quest2ToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2Quest2ToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2Quest2ToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2Quest2ToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNova2QuestProToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNova2QuestProToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNova2QuestProToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNova2QuestProToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNova2QuestProToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNova2QuestProToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2QuestProToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2QuestProToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2QuestProToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveTrackerToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveTrackerToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveTrackerToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveTrackerToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveTrackerToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveTrackerToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveWristTrackerToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveWristTrackerToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetRightNova2ViveWristTrackerToAttachRotation();
|
||||
}
|
||||
|
||||
FVector USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachPosition()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveWristTrackerToAttachPosition();
|
||||
}
|
||||
|
||||
FQuat USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachRotation_FQuat()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotationQ();
|
||||
}
|
||||
|
||||
FRotator USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachRotation_FRotator()
|
||||
{
|
||||
return FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotation();
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNova2GloveWristOffset_bRH_HW_OutPO_FQuat_OutRO(
|
||||
const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNova2GloveWristOffset(bRightHanded, HardwareVersion,
|
||||
OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNova2GloveWristOffset_bRH_HW_OutPO_FRotator_OutRO(
|
||||
const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNova2GloveWristOffset(bRightHanded, HardwareVersion,
|
||||
OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FQuat_OutRO(
|
||||
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNova2GloveTrackerOffset(Hardware, bRightHanded, HardwareVersion,
|
||||
OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
void USGTrackingKismetLibrary::GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FRotator_OutRO(
|
||||
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset)
|
||||
{
|
||||
return FSGTracking::GetNova2GloveTrackerOffset(Hardware, bRightHanded, HardwareVersion,
|
||||
OutPositionOffset, OutRotationOffset);
|
||||
}
|
||||
|
||||
FString USGTrackingKismetLibrary::ToString(const ESGPositionalTrackingHardware Hardware)
|
||||
{
|
||||
return FSGTracking::ToString(Hardware);
|
||||
|
||||
@@ -89,6 +89,12 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy")
|
||||
static float GetThumbJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax);
|
||||
|
||||
/*
|
||||
* Limit a value between specific joint angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy")
|
||||
static float ClampJointAngle(float Value, int32 Finger, bool bRightHand, int32 Joint, int32 Movement);
|
||||
|
||||
/**
|
||||
* Convert a total finger flexion in degrees.
|
||||
*/
|
||||
@@ -124,4 +130,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy")
|
||||
static TArray<FSGVectorArray> GetFistHandAngles(bool bRightHanded);
|
||||
};
|
||||
};
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Buzz motor command specific for the Sense Glove.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGBuzzCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGBuzzCommand;
|
||||
|
||||
/**
|
||||
* A vibration command for the Sense Glove, with levels for each finger.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveBuzzCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGBuzzCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* MakeBuzzCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command, where each finger level is contained inside an array of size 5.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Buzz Command", Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* MakeBuzzCommand_BL(UObject* WorldContextObject, const TArray<int32>& BuzzLevels);
|
||||
|
||||
/**
|
||||
* Create a new Buzz Motor command, indicating the intensity for each finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Buzz Command", Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* MakeBuzzCommand_T_I_M_R_P(UObject* WorldContextObject,
|
||||
int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Buzz Motor command, with only one finger being activated.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Buzz Command", Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* MakeBuzzCommand_F_BL(UObject* WorldContextObject, ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
/**
|
||||
* A command that turns off all vibration motors of the Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* Off(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Copy this Buzz Command into a new object.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* Copy(UObject* WorldContextObject, const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Merge this command with another, taking the maximum value between the two.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* Merge(UObject* WorldContextObject, const USGBuzzCommand* A, const USGBuzzCommand* B);
|
||||
};
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGCalibrationDataPointKismetLibrary.generated.h"
|
||||
|
||||
class USGCalibrationDataPoint;
|
||||
|
||||
UCLASS(meta=(ScriptName = "SesneGloveCalibrationDataPointKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGCalibrationDataPointKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Calibraion Data Point",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGCalibrationDataPoint* MakeCalibrationDataPoint(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new data point.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Calibration Data Point",
|
||||
Category="SenseGlove | Core | Calibration | Calibraion Data Point", meta=(WorldContext="WorldContextObject"))
|
||||
static USGCalibrationDataPoint* MakeCalibrationDataPoint_CS_CV(
|
||||
UObject* WorldContextObject,
|
||||
int32 CurrentStage, const TArray<FVector>& CalibrationValues);
|
||||
|
||||
/**
|
||||
* Actual calibration values.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Calibraion Data Point")
|
||||
static TArray<FVector> GetCalibrationValues(const USGCalibrationDataPoint* CalibrationDataPoint);
|
||||
|
||||
/**
|
||||
* The Calibration stage this data point belongs to.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Calibraion Data Point")
|
||||
static int32 GetStage(const USGCalibrationDataPoint* CalibrationDataPoint);
|
||||
|
||||
/**
|
||||
* Log Calibration values for storing on disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Calibraion Data Point")
|
||||
static FString ToLogData(const USGCalibrationDataPoint* CalibrationDataPoint, const FString& Delimiter = "\t");
|
||||
};
|
||||
@@ -0,0 +1,267 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Describes a vibration based on a number of parameters. Is sent to Nova Gloves
|
||||
* to be generated on the hardware and played.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGCustomWaveformKismetLibrary.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class USGCustomWaveform;
|
||||
|
||||
/**
|
||||
* A single vibration pulse for Nova Gloves.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveCustomWaveformKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGCustomWaveformKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGCustomWaveform* MakeCustomWaveform(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of CustomWaveform.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Custom Waveform", Category="SenseGlove | Core | CV | Custom Waveform",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGCustomWaveform* MakeCustomWaveform_A_D(
|
||||
UObject* WorldContextObject,
|
||||
float Amplitude, float Duration);
|
||||
|
||||
/**
|
||||
* Create a new instance of CustomWaveform.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Custom Waveform", Category="SenseGlove | Core | CV | Custom Waveform",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGCustomWaveform* MakeCustomWaveform_A_D_F(
|
||||
UObject* WorldContextObject,
|
||||
float Amplitude, float Duration, float Frequency);
|
||||
|
||||
/**
|
||||
* Creates a string representation of the ESGWaveformType.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="ToString", Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static FString ToString_T(ESGWaveformType Type);
|
||||
|
||||
/**
|
||||
* Get the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetAmplitude(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value).
|
||||
* @param Amplitude
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetAmplitude(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Amplitude);
|
||||
|
||||
/**
|
||||
* Get the Type of waveform pattern that is used.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
ESGWaveformType GetWaveType(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set the Type of waveform pattern that is used.
|
||||
* @param Type
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetWaveType(UPARAM(ref) USGCustomWaveform* CustomWaveform, ESGWaveformType Type);
|
||||
|
||||
/**
|
||||
* Get whether or not this Waveform is infinitely repeating.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static bool IsInfinite(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set whether or not this Waveform is infinitely repeating.
|
||||
* @param bInfinite
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetInfinite(UPARAM(ref) USGCustomWaveform* CustomWaveform, bool bInfinite);
|
||||
|
||||
/**
|
||||
* Get the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform", meta=(WorldContext="WorldContextObject"))
|
||||
int32 GetRepeatAmount(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely.
|
||||
* @param Amount
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetRepeatAmount(UPARAM(ref) USGCustomWaveform* CustomWaveform, int32 Amount);
|
||||
|
||||
/**
|
||||
* Get time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an
|
||||
* instant start. Linear only.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetAttackTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an
|
||||
* instant start. Linear only.
|
||||
* @param Time
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetAttackTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time);
|
||||
|
||||
/**
|
||||
* Get time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetSustainTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s.
|
||||
* @param Time
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetSustainTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time);
|
||||
|
||||
/**
|
||||
* Get time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set
|
||||
* to 0 for instant stop. Linear only.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetDecayTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set
|
||||
* to 0 for instant stop. Linear only.
|
||||
* @param Time
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetDecayTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time);
|
||||
|
||||
/**
|
||||
* Get the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetFrequencyStart(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves.
|
||||
* @param Frequency
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetFrequencyStart(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Frequency);
|
||||
|
||||
/**
|
||||
* Get the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static float GetFrequencyEnd(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves.
|
||||
* @param Frequency
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void SetFrequencyEnd(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Frequency);
|
||||
|
||||
/**
|
||||
* Get value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes,
|
||||
* we increase the frequency by FrequencySwitch factor.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetFrequencySwitchTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Set value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes,
|
||||
* we increase the frequency by FrequencySwitch factor.
|
||||
* @param Time
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetFrequencySwitchTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time);
|
||||
|
||||
/**
|
||||
* After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x].
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetFrequencySwitchFactor(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x].
|
||||
* param Time
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static void SetFrequencySwitchFactor(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time);
|
||||
|
||||
/**
|
||||
* The total command time of a single play of this pattern (not taking into account the RepeatAmount).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetEffectTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Total time for the entire effect (effect time multiplied by the repeat amount).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static float GetTotalEffectTime(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* If true, the frequency of this waveform jumps at any time during its playtime by FrequencySwitchFactor.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static bool FrequencyJumps(const USGCustomWaveform* CustomWaveform);
|
||||
|
||||
/**
|
||||
* Check if this CustomWaveform is roughly equal to another.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static bool Equals(const USGCustomWaveform* A, const USGCustomWaveform* B);
|
||||
|
||||
/**
|
||||
* Create a string representation of this CustomWaveform.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform")
|
||||
static FString ToString(const USGCustomWaveform* CustomWaveform);
|
||||
};
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "SGDeviceKismetLibrary.generated.h"
|
||||
|
||||
class USGDevice;
|
||||
class USGHapticChannelInfo;
|
||||
|
||||
UCLASS(meta=(ScriptName = "SesneGloveSGDeviceKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGDeviceKismetLibrary : public USGBlueprintFunctionLibrary
|
||||
@@ -56,6 +57,32 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
||||
static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion);
|
||||
|
||||
/**
|
||||
* If true, my firmware is newer than the reference firmware.
|
||||
* @param MyFirmwareMain
|
||||
* @param MyFirmwareSub
|
||||
* @param ReferenceMain
|
||||
* @param ReferenceSub
|
||||
* @param bInclusive
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Firmware Newer Than", Category="SenseGlove | Core | SGDevice")
|
||||
static bool FirmwareNewerThan_MF_MF_RM_RS_bI(int32 MyFirmwareMain, int32 MyFirmwareSub,
|
||||
int32 ReferenceMain, int32 ReferenceSub,
|
||||
bool bInclusive);
|
||||
|
||||
/**
|
||||
* If true, my firmware is older than the reference firmware.
|
||||
* @param MyFirmwareMain
|
||||
* @param MyFirmwareSub
|
||||
* @param ReferenceMain
|
||||
* @param ReferenceSub
|
||||
* @param bInclusive
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Firmware Older Than", Category="SenseGlove | Core | SGDevice")
|
||||
static bool FirmwareOlderThan_MF_MF_RM_RS_bI(int32 MyFirmwareMain, int32 MyFirmwareSub,
|
||||
int32 ReferenceMain, int32 ReferenceSub,
|
||||
bool bInclusive);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -98,6 +125,26 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
||||
static FString GetFirmwareString(const USGDevice* SGDevice);
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is newer than certain version.
|
||||
* @param FirmwareMain
|
||||
* @param FirmwareSub
|
||||
* @param bInclusive
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Firmware Newer Than", Category="SenseGlove | Core | SGDevice")
|
||||
bool FirmwareNewerThan_FM_FS_bI(const USGDevice* SGDevice,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive);
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is older than certain version.
|
||||
* @param FirmwareMain
|
||||
* @param FirmwareSub
|
||||
* @param bInclusive
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Firmware Older Than", Category="SenseGlove | Core | SGDevice")
|
||||
static bool FirmwareOlderThan_FM_FS_bI(const USGDevice* SGDevice,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive);
|
||||
|
||||
/**
|
||||
* Retrieve this Device's Serial/Bluetooth address.
|
||||
*/
|
||||
@@ -164,9 +211,29 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
||||
static bool GetBatteryLevel(UPARAM(ref) USGDevice* SGDevice, float& OutLevel);
|
||||
|
||||
/**
|
||||
* Assign this Device's Haptic Channels. Should not be done outside the API unless you know what you're doing.
|
||||
* @param Channels
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice")
|
||||
static void SetHapticChannels(UPARAM(ref) USGDevice* SGDevice, const USGHapticChannelInfo* Channels);
|
||||
|
||||
/**
|
||||
* The number of haptic channels this device can support.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Haptic Channel Index", Category="SenseGlove | Core | SGDevice")
|
||||
static int32 GetHapticChannelCount(const USGDevice* SGDevice);
|
||||
|
||||
/**
|
||||
* How many channels of a specific type this SGDevice possesses.
|
||||
* @param ChannelType
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Haptic Channel Index", Category="SenseGlove | Core | SGDevice")
|
||||
static int32 GetHapticChannelCount_CT(const USGDevice* SGDevice, ESGHapticChannelType ChannelType);
|
||||
|
||||
/**
|
||||
* Get a string representation of this SGDevice, used for debugging.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice")
|
||||
static FString ToString(const USGDevice* SGDevice);
|
||||
};
|
||||
};
|
||||
@@ -113,7 +113,8 @@ public:
|
||||
* Send a (raw) command to a specific device in the list.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List")
|
||||
static bool SendHaptics(int32 IpcIndex, const FString& IpcAddress, const FString& Commands);
|
||||
static bool SendHaptics(
|
||||
const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List")
|
||||
static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index);
|
||||
|
||||
@@ -102,4 +102,18 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model")
|
||||
static int32 GetSubFirmwareVersion(const USGDeviceModel* DeviceModel);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is newer than certain version.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model")
|
||||
static bool FirmwareNewerThan(const USGDeviceModel* DeviceModel,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive);
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is older than certain version.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model")
|
||||
static bool FirmwareOlderThan(const USGDeviceModel* DeviceModel,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive);
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 command for five fingers that can be sent to a Sense Glove device.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGFingerCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGFingerCommand;
|
||||
|
||||
/**
|
||||
* A command that contains values (levels) for five fingers.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveFingerCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGFingerCommandKismetLibrary : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Finger Command")
|
||||
static TArray<int32> GetLevels(const USGFingerCommand* FingerCommand);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Finger Command")
|
||||
static int32 GetLevel(const USGFingerCommand* FingerCommand, int32 Finger);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Finger Command")
|
||||
static void SetLevel(USGFingerCommand* FingerCommand, int32 Finger, int32 Value);
|
||||
|
||||
/**
|
||||
* Check if this command contains the same values as another.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Finger Command")
|
||||
static bool Equals(const USGFingerCommand* A, const USGFingerCommand* B);
|
||||
|
||||
/**
|
||||
* Create a string representation of this finger command.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Finger Command")
|
||||
static FString ToString(const USGFingerCommand* FingerCommand);
|
||||
};
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 command for five fingers that can be sent to a Sense Glove device.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGForceFeedbackCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGForceFeedbackCommand;
|
||||
|
||||
/**
|
||||
* A Force-Feedback command for the Sense Glove, with levels for each finger.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveForceFeedbackCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGForceFeedbackCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for internal initialization.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* MakeForceFeedbackCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger stored in an int[5] array.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Force Feedback Command",
|
||||
Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* MakeForceFeedbackCommand_FFL(
|
||||
UObject* WorldContextObject, const TArray<int32>& ForceFeedbackLevels);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback Command, with levels for each finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Force Feedback Command",
|
||||
Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* MakeForceFeedbackCommand_T_I_M_R_P(
|
||||
UObject* WorldContextObject, int32 Thumb, int32 Index, int32 Middle, int32 Ring, int32 Pinky);
|
||||
|
||||
/**
|
||||
* Create a new Force-Feedback command, with only one finger being activated.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Force Feedback Command",
|
||||
Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* MakeForceFeedbackCommand_F_BL(
|
||||
UObject* WorldContextObject, ESGFinger Finger, int32 BuzzLevel);
|
||||
|
||||
/**
|
||||
* A command that turns off all force feedback on the Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* Off(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Copy this ForceFeedback Command into a new object.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* Copy(UObject* WorldContextObject,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Merge this finger command with another, taking the maximum value between the two.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Force Feedback Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* Merge(UObject* WorldContextObject,
|
||||
const USGForceFeedbackCommand* A, const USGForceFeedbackCommand* B);
|
||||
};
|
||||
+18
-126
@@ -36,9 +36,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGCore/SGInterpolationSetArray.h"
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGFloatArray.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGHandInterpolatorKismetLibrary.generated.h"
|
||||
@@ -57,159 +57,51 @@ public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* MakeHandInterpolator(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator without a starting rotation.
|
||||
* Create a new basic HandInterpolator.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* MakeHandInterpolator_JI(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* MakeHandInterpolator_JI_FQuat_CSR(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a new basic HandInterpolator with a starting rotation.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* MakeHandInterpolator_JI_FRotator_CSR(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation);
|
||||
|
||||
/**
|
||||
* Create a default instance of a left- or right handed interpolator.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* Default(UObject* WorldContextObject, bool bRightHanded);
|
||||
static USGHandInterpolator* MakeHandInterpolator_bRH(UObject* WorldContextObject, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a serialized HandInterpolator back into a class representation.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Calculate all angles of a specific finger based on an Interpolator and input angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static TArray<FVector> InterpolateFingerAngles(ESGFinger Finger, const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles);
|
||||
|
||||
/**
|
||||
* Calculate all angles of the Thumb based on an Interpolator and input angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static TArray<FVector> InterpolateThumbAngles(const USGHandInterpolator* Interpolator,
|
||||
const FVector& TotalGloveAngles);
|
||||
|
||||
/**
|
||||
* Calculate all hand angles based on an interpolator and total xyz angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static TArray<FSGVectorArray> InterpolateHandAngles(const USGHandInterpolator* Interpolator,
|
||||
const TArray<FVector>& TotalAngles);
|
||||
|
||||
/**
|
||||
* Interpolation sets for each finger. First index indicates which finger, Second index indicates the joint movement.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
TArray<FSGInterpolationSetArray> GetJointInterpolations(
|
||||
UObject* WorldContextObject, const USGHandInterpolator* HandInterpolator) const;
|
||||
|
||||
/**
|
||||
* Starting rotation of the thumb cmc joint.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Cmc Start Rotation",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
FQuat GetCmcStartRotation_FQuat(const USGHandInterpolator* HandInterpolator) const;
|
||||
|
||||
/**
|
||||
* Starting rotation of the thumb cmc joint.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Cmc Start Rotation",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
FRotator GetCmcStartRotation_FRotator(const USGHandInterpolator* HandInterpolator) const;
|
||||
|
||||
/**
|
||||
* Calculate any finger's movement rotation, using an input value.
|
||||
*
|
||||
* WARNING: This method is for internal use only. Avoid using it!
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="CalculateAngle",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static float CalculateAngle_F_int32_M_V(const USGHandInterpolator* HandInterpolator,
|
||||
ESGFinger Finger, int32 Movement, float Value);
|
||||
static USGHandInterpolator* Deserialize(UObject* WorldContextObject,
|
||||
const FString& SerializedString, bool bRightHanded = true);
|
||||
|
||||
/**
|
||||
* Calculate a finger movement's rotation, using an input value.
|
||||
*
|
||||
* WARNING: This method is for internal use only. Avoid using it!
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="CalculateAngle",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static float CalculateAngle_F_ESGFingerMovement_M_V(const USGHandInterpolator* HandInterpolator,
|
||||
ESGFinger Finger, ESGFingerMovement Movement, float Value);
|
||||
static float CalculateAngle_M_ESGFingerMovement_V_bAL(const USGHandInterpolator* HandInterpolator,
|
||||
ESGFingerMovement Movement, float Value,
|
||||
bool bApplyLimits = true);
|
||||
|
||||
/**
|
||||
* Calculate a thumb movement's rotation, using an input value.
|
||||
*
|
||||
* WARNING: This method is for internal use only. Avoid using it!
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="CalculateAngle",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static float CalculateAngle_F_ESGThumbMovement_M_V(const USGHandInterpolator* HandInterpolator,
|
||||
ESGFinger Finger, ESGThumbMovement Movement, float Value);
|
||||
static float CalculateAngle_M_ESGFingerMovement_V_bAL(const USGHandInterpolator* HandInterpolator,
|
||||
ESGThumbMovement Movement, float Value,
|
||||
bool bApplyLimits = true);
|
||||
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="SetInterpolation",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static void SetInterpolation_int32_F_int32_M_IA0_IA1_AA0_AA1(
|
||||
UPARAM(ref) USGHandInterpolator* HandInterpolator, int32 Finger, int32 Movement,
|
||||
float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="SetInterpolation",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static void SetInterpolation_ESGFinger_F_ESGFingerMovement_M_IA0_IA1_AA0_AA1(
|
||||
UPARAM(ref) USGHandInterpolator* HandInterpolator, ESGFinger Finger, ESGFingerMovement Movement,
|
||||
float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Updates a particular joint movement interpolation, without changing its limits.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="SetInterpolation",
|
||||
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static void SetInterpolation_M_IA0_IA1_AA0_AA1(
|
||||
UPARAM(ref) USGHandInterpolator* HandInterpolator, ESGThumbMovement Movement,
|
||||
float InputAt0, float InputAt1, float AngleAt0, float AngleAt1);
|
||||
|
||||
/**
|
||||
* Returns an interpolationSet
|
||||
* Calculate all hand angles based on an interpolator and normalized input.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGInterpolationSet* GetInterpolation(
|
||||
UObject* WorldContextObject,
|
||||
const USGHandInterpolator* HandInterpolator, int32 Finger, int32 Movement);
|
||||
TArray<FSGVectorArray> InterpolateHandAngles(const USGHandInterpolator* HandInterpolator,
|
||||
const TArray<FSGFloatArray>& Flexions, const TArray<float>& Abductions,
|
||||
float CmcTwist) const;
|
||||
|
||||
/**
|
||||
* Check if this handInterpolator matches another.
|
||||
@@ -222,4 +114,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Kinematics | Hand Interpolator")
|
||||
static FString SGSerialize(const USGHandInterpolator* HandInterpolator);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,213 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 way to access all sorts of Hand Tracking and -Haptics without needing to
|
||||
* cache any device instances.
|
||||
* Use this layer if you don't care where a HandPose is coming from, and are
|
||||
* fine with calling generic haptic functions.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHandLayerKismetLibrary.generated.h"
|
||||
|
||||
class USGCustomWaveform;
|
||||
class USGHandPose;
|
||||
|
||||
/**
|
||||
* A way to access all sorts of Hand Tracking and -Haptics without needing to cache any device instances.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHandLayerKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHandLayerKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns true if there is a HapticGlove Device connected that corresponds to the chosen hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool DeviceConnected(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Returns the Device Type of the right / left hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static ESGDeviceType GetDeviceType(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Returns the handedness of the first device you can find; true for right, false for left. Use this for testing a
|
||||
* single glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool GetFirstGloveHandedness();
|
||||
|
||||
/**
|
||||
* Returns the number of Haptic Gloves connected to the system.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static int32 GlovesConnected();
|
||||
|
||||
/**
|
||||
* Retrieve a Glove Instance for the right- or left hand to do more complicated, device-specific stuff.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetGloveInstance(UObject* WorldContextObject, bool bRightHanded, USGHapticGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Returns the calibration state of the chosen hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static ESGHapticGloveCalibrationState GetCalibrationState(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Returns the Calibration Instructions for the chosen hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static FString GetCalibrationInstructions(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Reset the calibration of the left/right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static void ResetCalibration(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Reset the calibration of the left/right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static void EndCalibration(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Attempt to get the HandPose through any of our gloves. You don't care which one is on the other side, as long as
|
||||
* you get one.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose(UObject* WorldContextObject, bool bRightHanded, USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Calculate the Wrist Location of the chosen hand, based on a reference location and tracking hardware.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static void GetWristLocation(
|
||||
bool bRightHanded,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Sends all haptics in the queue for the Left / Right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool SendHaptics(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Stop all haptics on the chosen hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static void StopAllHaptics(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Tell a specific hand to hold the force-feedback at a certain level.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_ForceFeedbackLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Queue Force Feedback for multiple fingers. Up to 5. Make sure the value is not NULL.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_ForceFeedbackLevels(
|
||||
bool bRightHanded, const TArray<float>& Levels01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and
|
||||
* DK1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_SetVibroLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and
|
||||
* DK1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_SetVibroLevels(bool bRightHanded, const TArray<float>& Levels01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Returns true if the glove for this hand supports a custom waveform vibration on said location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool SupportsCustomWaveform(bool bRightHanded, ESGHapticLocation AtLocation);
|
||||
|
||||
/**
|
||||
* Send a Custom Waveform to a glove at a specific location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool SendCustomWaveform(bool bRightHanded, USGCustomWaveform*& OutWaveform, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Returns true if the chosen glove supports active contact feedback on the Wrist.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool SupportsWristSqueeze(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Queue a command to set a squeeze level on the wrist, and optionally send it right away.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_WristSqueeze(bool bRightHanded, float SqueezeLevel01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Returns true is the chosen hand supports flexion locking; automatic locking of FFB when flexed beyond a specific
|
||||
* point.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool SupportsFlexionLocks(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* If the flexion exceeds a particular value, turn on the Force-Feedback.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_FlexionLock(bool bRightHanded, int32 Finger, float Flexion01, bool bSendImmediate);
|
||||
|
||||
/**
|
||||
* Stop any Flexion Threshold active on the chosen finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer")
|
||||
static bool QueueCommand_ClearFlexionLock(bool bRightHanded, int32 Finger, bool bSendImmediate);
|
||||
};
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGQuatArray.h"
|
||||
#include "SGTypes//SGRotatorArray.h"
|
||||
#include "SGTypes//SGVectorArray.h"
|
||||
#include "SGTypes/SGRotatorArray.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGHandPoseKismetLibrary.generated.h"
|
||||
|
||||
@@ -228,4 +228,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Hand Pose")
|
||||
static FString SGSerialize(const USGHandPose* HandPose);
|
||||
};
|
||||
};
|
||||
@@ -1,173 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 profile containing all the information required for HapticGloves.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGHandProfileKismetLibrary.generated.h"
|
||||
|
||||
class USGHandProfile;
|
||||
class USGNovaGloveHandProfile;
|
||||
class USGSenseGloveHandProfile;
|
||||
|
||||
/**
|
||||
* Interpolation profiles for a user's hand, compatible with all HapticGloves.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHandProfileKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHandProfileKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandProfile* MakeHandProfile(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a HandProfile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Make Hand Profile", Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandProfile* MakeHandProfile_bRH_SGHP_NGHP(
|
||||
UObject* WorldContextObject,
|
||||
bool bRightHanded,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Generate a new handProfile for either a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandProfile* Default(UObject* WorldContextObject, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a string notation of a NovaGloveHandProfile into a new instance.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandProfile* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Returns the directory where HandProfiles are being stored. Does not include a '\\' at the end.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static FString GetProfileDirectory();
|
||||
|
||||
/**
|
||||
* Filename for the left hand profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static FString GetLeftHandFileName();
|
||||
|
||||
/**
|
||||
* Filename for the right hand profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static FString GetRightHandFileName();
|
||||
|
||||
/**
|
||||
* Returns the fileName of the left or right-handed profiles.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static FString GetProfileFileName(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Retrieves the latest HandProfile from disk. If this function returns false, latestProfils is equal to SGCOre::HandProfile::Default(rightHand).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetLatestProfile(
|
||||
UObject* WorldContextObject,
|
||||
bool bRightHanded, USGHandProfile*& OutLatestProfile);
|
||||
|
||||
/**
|
||||
* Stores a HandProfile on disk for other programs to access. Call this function only if your software handles calibration functions.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static bool StoreProfile(const USGHandProfile* ProfileToStore);
|
||||
|
||||
/**
|
||||
* Resets the Calibration of a specific back to default values.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static bool ResetCalibration_bRightHanded_bOnDisk(bool bRightHanded, bool bOnDisk = true);
|
||||
|
||||
/**
|
||||
* Resets the Calibration of both hands back to default values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Profile")
|
||||
static void ResetCalibration_bObDisk(bool bOnDisk = true);
|
||||
|
||||
/**
|
||||
* Whether this profile was created for a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static bool IsRight(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Profile for SenseGloves.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveHandProfile* GetSenseGloveHandProfile(UObject* WorldContextObject,
|
||||
const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* User profile for Nova.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveHandProfile* GetNovaGloveHandProfile(UObject* WorldContextObject,
|
||||
const USGHandProfile* HandProfile);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Profile")
|
||||
static bool Equals(const USGHandProfile* A, const USGHandProfile* B);
|
||||
|
||||
/**
|
||||
* Reset this profile back to its default values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Profile")
|
||||
static void Reset(UPARAM(ref) USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Hand Profile")
|
||||
static FString SGSerialize(const USGHandProfile* HandProfile);
|
||||
};
|
||||
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Contains information on Haptic channels available to this device for IPC.
|
||||
* Some devices have different "Haptic Channels". This info is exposed via IPC
|
||||
* to SGCore.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Containers/Array.h"
|
||||
#include "Containers/UnrealString.h"
|
||||
#include "HAL/Platform.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHapticChannelInfoKismetLibrary.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class USGHapticChannelInfo;
|
||||
|
||||
/**
|
||||
* Contains information on Haptic channels available to this device for IPC.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticChannelInfoKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticChannelInfoKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a default HapticChannelInfo, with solely a single streaming haptic Channel.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticChannelInfo* MakeHapticChannelInfo(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of HapticChannelInfo.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Haptic Channel Info",
|
||||
Category="SenseGlove | Core | Haptic Channel Info", meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticChannelInfo* MakeHapticChannelInfo_SI_FAFI(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<int32>& StreamIndex, const TArray<int32>& FireAndForgetIndex);
|
||||
|
||||
/**
|
||||
* Generate a single IPCAddress for an address.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static FString GenerateAddress(int32 DeviceIndex, int32 ChannelIndex);
|
||||
|
||||
/**
|
||||
* Parse HapticChannelInfo received through IPC into usable data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticChannelInfo* Parse(UObject* WorldContextObject, const FString& IpcString);
|
||||
|
||||
/**
|
||||
* Byte used to identify streaming channels.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static int32 GetStreamingType();
|
||||
|
||||
/**
|
||||
* Byte used to indicate fire-and-forget channels.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static int32 GetFireAndForgetType();
|
||||
|
||||
/**
|
||||
* Returns the amount of streaming channels available for haptics. Will indicate if a device can support the
|
||||
* haptics you're trying to send through it.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static int32 GetStreamChannelCount(const USGHapticChannelInfo* HapticChannelInfo);
|
||||
|
||||
/**
|
||||
* Returns the amount of fire-and-forget channels available for haptics. Will indicate if a device can support the
|
||||
* haptics you're trying to send through it.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static int32 GetFireAndForgetChannelCount(const USGHapticChannelInfo* HapticChannelInfo);
|
||||
|
||||
/**
|
||||
* Retrieve the total amount of channels for this device.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static int32 GetTotalChannelCount(const USGHapticChannelInfo* HapticChannelInfo);
|
||||
|
||||
/**
|
||||
* Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't
|
||||
* check the validity of index - could result in an exception. Optimized piece of code for for loops.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static FString GetAddress_Unguarded(const USGHapticChannelInfo* HapticChannelInfo,
|
||||
ESGHapticChannelType Type, int32 TypeIndex);
|
||||
|
||||
/**
|
||||
* Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't
|
||||
* check the validity of index - could result in an exception. Optimized piece of code for for loops.
|
||||
* Used for Internals.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static void GetIpcParams_Unguarded(UPARAM(ref) USGHapticChannelInfo* HapticChannelInfo,
|
||||
ESGHapticChannelType Type, int32 TypeIndex,
|
||||
int32& OutIndex, FString& OutAddressString);
|
||||
|
||||
/**
|
||||
* Regenerate the channel names for a specific device Index in shared memory.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static void RegenerateAddresses(USGHapticChannelInfo* HapticChannelInfo, int32 ForDeviceIndex);
|
||||
|
||||
/**
|
||||
* Returns an array of all the haptic addresses stored for this info channel.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info")
|
||||
static TArray<FString> GetAllAddresses(const USGHapticChannelInfo* HapticChannelInfo);
|
||||
};
|
||||
-158
@@ -1,158 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHapticGloveCalibrationCheckKismetLibrary.generated.h"
|
||||
|
||||
class USGHapticGlove;
|
||||
class USGHapticGloveCalibrationCheck;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* An algorithm that checks whether or not our current user is running in the same calibration range as last time.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticGloveCalibrationCheckKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticGloveCalibrationCheckKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveCalibrationCheck* MakeHapticGloveCalibrationCheck(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* The last calibration range can be null, at which point you definitely need calibration.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Haptic Glove Calibration Check",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveCalibrationCheck* MakeHapticGloveCalibrationCheck_LCR(
|
||||
UObject* WorldContextObject, const USGSensorRange* LastCalibrationRange);
|
||||
|
||||
/**
|
||||
* SenseGlove: How far from the threshold one can be where we would still call it 'the same as before'.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetSenseGloveThreshold();
|
||||
|
||||
/**
|
||||
* Nova: How far from the threshold one can be where we would still call it 'the same as before'.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetNovaGloveThreshold();
|
||||
|
||||
/**
|
||||
* SenseGlove: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetSenseGloveMinFlexion();
|
||||
|
||||
/**
|
||||
* Nova: The minimum amount of sensor flexion movement before we start testing for a smaller hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetNovaGloveMinFlexion();
|
||||
|
||||
/**
|
||||
* SenseGlove: The minimum amount of sensor movement on the thumb abduction before we start testing for a smaller hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetSenseGloveMinAbduction();
|
||||
|
||||
/**
|
||||
* Nova: The minimum amount of sensor movement on the thumb abduction before we start testing for a smaller hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static float GetNovaGloveMinAbduction();
|
||||
|
||||
/**
|
||||
* Returns true if this DeviceType requires a calibration check.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static bool NeedsCheck(ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Checks if current values are operating out of the previous range. Returns -1 if all is fine. 0...4 to indicate which finger is out of bounds.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static int32 OutOfBounds(const USGSensorRange* PreviousRange, const TArray<FVector>& CurrentValues,
|
||||
ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Returns true if the user has moved enough in both flexion and thumb abduction movement to be considered 'active'
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static bool MovedMinimum(const TArray<FVector>& CurrentRange, ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
* Returns true if the current sensor values have moved roughly as much as last time.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static bool MatchesLast(const TArray<FVector>& CurrentRange, const TArray<FVector>& LastRange,
|
||||
ESGDeviceType DeviceType);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static ESGCalibrationStage GetCalibrationStage(const USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck);
|
||||
|
||||
/**
|
||||
* Whether this algorithm has determined if calibration is required, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static bool ReachedConclusion(const USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck);
|
||||
|
||||
/**
|
||||
* Reset the calibration check. so it may be used again. This does not reset the last range.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static void Reset(UPARAM(ref) USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck);
|
||||
|
||||
/**
|
||||
* Using the currently received Sensor Values, check if calibration is required. This function will have to be called until a conclusion can be reached.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Check")
|
||||
static void CheckRange(USGHapticGloveCalibrationCheck* HapticGloveCalibrationCheck,
|
||||
const TArray<FVector>& CurrentValues, float DeltaSeconds, ESGDeviceType DeviceType);
|
||||
};
|
||||
-220
@@ -1,220 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGHapticGloveCalibrationSequenceKismetLibrary.generated.h"
|
||||
|
||||
class USGCalibrationDataPoint;
|
||||
class USGHandPose;
|
||||
class USGHandProfile;
|
||||
class USGHapticGlove;
|
||||
class USGHapticGloveCalibrationSequence;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* A sequence which collects data points until specific criteria have been met. It must be 'fed' an Update command from your program in order to work.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticGloveCalibrationSequenceKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticGloveCalibrationSequenceKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a base HapitcGlove Calibration Sequence.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Haptic Glove Calibration Sequence",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveCalibrationSequence* MakeHapticGloveCalibrationSequence_GTC(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGlove* GloveToCalibrate);
|
||||
|
||||
/**
|
||||
* The maximum buffer size for calibration points. Once calibrationPoints exceeds this value, the
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static int32 GetMaxDataPoints();
|
||||
|
||||
/**
|
||||
* Converts a calibration range taken from a Calibration sequence, and converts it into a profile. Use this if you're not actually using the sequence.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="CompileProfile",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool CompileProfile_SR_FD_bRH_OutP(
|
||||
UObject* WorldContextObject,
|
||||
const USGSensorRange* SensorRange, ESGDeviceType ForDevice, bool bRightHanded, USGHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Glove linked to this calibration sequence. Will attempt to grab data from this glove evey time Update() is called.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGlove* GetLinkedGlove(UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static void SetLinkedGlove(USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
const USGHapticGlove* LinkedGlove);
|
||||
|
||||
/**
|
||||
* Calibration points collected during this calibration process. One is added every time the "Update()" function is called.
|
||||
* Used to create a profile after the calibration finishes.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGCalibrationDataPoint*> GetCalibrationPoints(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static float GetElapsedTime(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Used to determine if the user has manually ended the sequence, to prevent us from adding any more calibration points.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static bool IsManuallyCompleted(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* If a sequence consists of multiple stages, this integer will show you which one is currently active.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static int32 GetCurrentStage(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Returns the amount of calibration points collected so far.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static int64 GetCalibrationPointsCount(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Whether or not this sequence was completed as per its own rules.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static bool AutoCompleted(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Returns true if this sequence is marked as 'complete' and can begin compiling a profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static bool Completed(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Resets this calibration sequence's data, but not it's LinkedGlove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static void Reset(USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static void AddDataPoint(USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
const TArray<FVector>& CalibrationData);
|
||||
|
||||
/**
|
||||
* Update this calibration sequence with new data. We use deltaSeconds to check for things like stability.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static void Update(USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
float DeltaSeconds);
|
||||
|
||||
/**
|
||||
* Manual confirmation of whatever step we're supposed to making at the moment.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static void ConfirmCurrentStep(USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence);
|
||||
|
||||
/**
|
||||
* Compile a min/max range from the data points collected by this sequence. Returns true if it's actually possible.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool CompileRange(UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
USGSensorRange*& OutSensorRange);
|
||||
|
||||
/**
|
||||
* Compile a profile from the data points collected by this sequence. Returns true if it's actually possible.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="CompileProfile",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool CompileProfile_FD_bRH_OutP(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
ESGDeviceType ForDevice, bool bRightHanded, USGHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Returns the current HandPose; either the one we should be making, or what it would look like at the moment.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_OutCHP(UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
USGHandPose*& OutCurrentHandPose);
|
||||
|
||||
/**
|
||||
* Returns the current HandPose; either the one we should be making, or what it would look like at the moment.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_bRH_OutCHP(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
bool bRightHanded,
|
||||
USGHandPose*& OutCurrentHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve instructions on what to do during the current step.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Calibration Sequence")
|
||||
static FString GetCurrentInstruction(const USGHapticGloveCalibrationSequence* HapticGloveCalibrationSequence,
|
||||
const FString& NextStepKey = "");
|
||||
};
|
||||
-222
@@ -1,222 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGHapticGloveCommandBufferKismetLibrary.generated.h"
|
||||
|
||||
class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGHapticGlove;
|
||||
class USGHapticGloveCommandBuffer;
|
||||
class USGThumperCommand;
|
||||
class USGTimedBuzzCommand;
|
||||
class USGTimedThumpCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticGloveCommandBufferKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticGloveCommandBufferKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new HapticsStream for a Haptic Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveCommandBuffer* MakeHapticGloveCommandBuffer(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* The base maximum amount of Force-Feedback Commands that can be in a queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static int32 GetMaxForceFeedbackCommands();
|
||||
|
||||
/**
|
||||
* The base maximum amount of Vibrotactile Commands that can be in a queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static int32 GetMaxBuzzCommands();
|
||||
|
||||
/**
|
||||
* The base maximum amount of Thumper Commands that can be in a queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static int32 GetMaxThumpCommands();
|
||||
|
||||
/**
|
||||
* All Force Feedback Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGForceFeedbackCommand*> GetForceFeedbackCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* All Timed Buzz Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGTimedBuzzCommand*> GetBuzzCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* All Timed Thump Commands that have been received this 'frame'. Will be flattened into a single command during FlushHapitcs.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGTimedThumpCommand*> GetThumperCommandsQueue(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Clears only the Force-Feedback Queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void ClearForceFeedbackCommandsQueue(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Clears all vibrations in the queue(s).
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void ClearVibrations(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Clear all ongoing effects to this stream.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void Clear(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Add a new Force-Feedback command to the queue. Does not actually send it.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Add Command",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void AddCommand_ForceFeedbackCommand(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Add a new vibrotactile command to the queue. Does not actually send it.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Add Command",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void AddCommand_BuzzCommand(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGTimedBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Add a new Thumper command to the queue. Does not actually send it. Does not work with SenseGlove, only for Nova's
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Add Command",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void AddCommand_ThumpCommand(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGTimedThumpCommand* ThumpCommand);
|
||||
|
||||
/**
|
||||
* Update the active commands, using a deltaSeconds since last update, in seconds. Any timedCommands that are elapsed will be removed from the list.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer")
|
||||
static void UpdateTimedCommands(UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
float DeltaSeconds);
|
||||
|
||||
/**
|
||||
* Compiles all ForceFeedback Levels in the queue into a single one. Does not clear the queue. Returns lastForceFeedbackCommand if no ForceFeedback commands are given.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Total Force Feedback Levels",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer", meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* GetTotalForceFeedbackLevels_LastForceFeedbackCommand(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* LastForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Compiles all ForceFeedback Levels in the queue into a single one. Does not clear the queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGForceFeedbackCommand* GetTotalForceFeedbackLevels(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Compiles all active vibrotactile in the queue into a single list of levels. Does not clear the queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* GetTotalBuzzLevels(UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Compiles all active vibrotactile in the queue into a single list of levels. Does not clear the queue.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* GetTotalThumperLevels(UObject* WorldContextObject,
|
||||
const USGHapticGloveCommandBuffer* HapticGloveCommandBuffer);
|
||||
|
||||
/**
|
||||
* Compile all commands in the queue(s) into a single set of commands that can be sent to the glove. Only clears the ForceFeedback queue, and only if you want it to.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Flush Haptics",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer", meta=(WorldContext="WorldContextObject"))
|
||||
static void FlushHaptics_LBL_OutFFC_OutBC_OutTC_bCFFQ(
|
||||
UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||
USGBuzzCommand*& OutBuzzCommand,
|
||||
USGThumperCommand*& OutThumperCommand,
|
||||
bool bClearForceFeedbackQueue = true);
|
||||
|
||||
/**
|
||||
* Compile all commands in the queue(s) into a single set of commands that can be sent to the glove. Also updates & clears all queues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Flush Haptics",
|
||||
Category="SenseGlove | Core | Haptics | Haptic Glove Command Buffer", meta=(WorldContext="WorldContextObject"))
|
||||
static void FlushHaptics_DS_LBL_OutFFC_OutBuzzCommand_OutTC(
|
||||
UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGloveCommandBuffer* HapticGloveCommandBuffer,
|
||||
float DeltaSeconds,
|
||||
const USGForceFeedbackCommand* LastBrakeLevel,
|
||||
USGForceFeedbackCommand*& OutForceFeedbackCommand,
|
||||
USGBuzzCommand*& OutBuzzCommand,
|
||||
USGThumperCommand*& OutThumperCommand);
|
||||
};
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* An interface to get calibration to / from disk.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGHapticGloveHandProfilesKismetLibrary.generated.h"
|
||||
|
||||
class USGHandProfile;
|
||||
class USGHapticGlove;
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticGloveHandProfilesKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticGloveHandProfilesKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns the directory where our HandProfiles are stored.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static FString GetProfileDirectory();
|
||||
|
||||
/**
|
||||
* Set the directory where our HandProfiles are stored.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void SetProfileDirectory(const FString& Directory);
|
||||
|
||||
/**
|
||||
* Access the latest Left Hand Profile from disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void GetLeftHandProfile(UObject* WorldContextObject, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Sets the newest Left Hand Profile - also stores it on disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void SetLeftHandProfile(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Access the latest Right Hand Profile from disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void GetRightHandProfile(UObject* WorldContextObject, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Sets the newest Right Hand Profile - also stores it on disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void SetRightHandProfile(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Retrieve a left- or right handed profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void GetProfile(UObject* WorldContextObject, bool bRightHanded, USGHandProfile*& OutHandProfile);
|
||||
|
||||
/**
|
||||
* Store a profile in the global variables and on disk. The profile determines if this is a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Set Profile", Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void SetProfile_HP(const USGHandProfile* HandProfile);
|
||||
|
||||
/**
|
||||
* Store a profile in the global variables and on disk. You determine if this is a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Set Profile", Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void SetProfile_HP_bRH(const USGHandProfile* HandProfile, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Restore both profiles back to their default values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void RestoreDefaults();
|
||||
|
||||
/**
|
||||
* Restore the left- or right hand profiles back to their default values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Restore Defaults",
|
||||
Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void RestoreDefaults_bRH(bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Load the latest profiles from disk. Automatically called when you first try to access a profile.
|
||||
* Exposed so you can force-reload profiles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static void TryLoadingFromDisk();
|
||||
|
||||
/**
|
||||
* Stores the last sensor range of a glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles")
|
||||
static bool SaveLastRange(const USGSensorRange* CurrentRange, const USGHapticGlove* ForGlove);
|
||||
|
||||
/**
|
||||
* Loads the last sensor range of a glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove Hand Profiles",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool LoadLastRange(UObject* WorldContextObject,
|
||||
const USGHapticGlove* ForGlove, USGSensorRange*& OutLastRange);
|
||||
};
|
||||
@@ -38,16 +38,14 @@
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGHapticGloveKismetLibrary.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class USGBuzzCommand;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGHandPose;
|
||||
class USGHandProfile;
|
||||
class USGHapticGlove;
|
||||
class USGThumperCommand;
|
||||
|
||||
/**
|
||||
* A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality.
|
||||
@@ -61,8 +59,8 @@ public:
|
||||
/**
|
||||
* Get all Haptic Gloves detected on this system.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGHapticGlove*> GetHapticGloves(UObject* WorldContextObject);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGHapticGlove*> GetHapticGloves(UObject* WorldContextObject, bool bConnectedOnly = true);
|
||||
|
||||
/**
|
||||
* Get the first Haptic Glove detected on this system.
|
||||
@@ -79,6 +77,19 @@ public:
|
||||
static bool GetGlove_bRH_OutG(UObject* WorldContextObject, bool bRightHanded,
|
||||
USGHapticGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | Haptic Glove")
|
||||
static FString ToString_S(ESGHapticGloveCalibrationState State);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | Haptic Glove")
|
||||
static FString ToString_L(ESGHapticLocation Location);
|
||||
|
||||
|
||||
/**
|
||||
* Get the DeviceType enumerator of this device; used to check if its a SenseGlove/Nova/etc.
|
||||
*/
|
||||
@@ -127,34 +138,13 @@ public:
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGHapticGlove* HapticGlove, FRotator& OutImu);
|
||||
|
||||
/**
|
||||
* Calculate the Hand Pose of this device, provided it has Hand Tracking available
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HG_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGBasicHandModel* HandGeometry,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve a HandPose based on the latest profile, but with a specific hand geometry.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HG_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGHapticGlove* HapticGlove,
|
||||
const USGBasicHandModel* HandGeometry,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
@@ -168,15 +158,47 @@ public:
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* [ Android Only! Asserts on other platforms! ]
|
||||
* Retrieve a HandPose based on the latest profile and default hand Geometry.
|
||||
* Returns the Hand Angles calculated by this Nova 2 Glove. Used for input for HandPoses, but can be used in and of
|
||||
* itself.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_OutHTP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
float DeltaTime,
|
||||
USGHandPose*& OutHandPose);
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static bool GetHandAngles(const USGHapticGlove* HapticGlove, TArray<FSGVectorArray>& OutHandAngles);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static USGBasicHandModel* GetHandGeometry(UObject* WorldContextObject, const USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SetHandGeometry(UPARAM(ref) USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry);
|
||||
|
||||
/**
|
||||
* Returns the HapticGlove's state of calibration for its on-board sensors.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static ESGHapticGloveCalibrationState GetCalibrationState(const USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Resets internal calibration of the Haptic Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void EndCalibration(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Force-End any form of calibration manually, if any is still running.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void ResetCalibration(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Retrieve the current calibration instruction.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
|
||||
static FString GetCalibrationInstruction(const USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting.
|
||||
@@ -185,94 +207,46 @@ public:
|
||||
static void StopHaptics(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
*
|
||||
* Stops only vibrations.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
|
||||
static void StopVibrations(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SendHaptics_FFC(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SendHaptics_BC(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SendHaptics_TC(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SendHaptics_FFC_BC(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void SendHaptics_FFC_BC_TC(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
* Take all active commands in the device queue, compile them into one and send them to the device.
|
||||
*
|
||||
* @return Returns true if the message was successfully sent to SenseCom.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
|
||||
static bool GetCalibrationValues(UPARAM(ref) USGHapticGlove* HapticGlove, TArray<FVector>& OutValues);
|
||||
static bool SendHaptics(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
|
||||
/**
|
||||
* Reset Calibration range for this Device.
|
||||
* Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky.
|
||||
*
|
||||
* @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
|
||||
static void ResetCalibrationRange(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
static bool QueueForceFeedbackLevels(UPARAM(ref) USGHapticGlove* HapticGlove, const TArray<float>& Levels01);
|
||||
|
||||
/**
|
||||
* Updates calibration values only.
|
||||
* Set the Force-Feedback value of a particular finger to a specific level.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
|
||||
static void UpdateCalibrationRange(UPARAM(ref) USGHapticGlove* HapticGlove);
|
||||
static bool QueueForceFeedbackLevel(UPARAM(ref) USGHapticGlove* HapticGlove, int32 Finger, float Level01);
|
||||
|
||||
/**
|
||||
* Updates calibration values only.
|
||||
* Returns true if the HapticGlove supports vibration feedback on the specified location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Update Calibration", Category="SenseGlove | Core | Haptic Glove")
|
||||
static void UpdateCalibrationRange_CV(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
const TArray<FVector>& CalibrationValues);
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove")
|
||||
static bool SupportsCustomWaveform(const USGHapticGlove* HapticGlove, ESGHapticLocation AtLocation);
|
||||
|
||||
/**
|
||||
* Access the minimum- and maximum sensor values measured by this Haptic Glove, in this session.
|
||||
* Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
|
||||
* custom waveforms.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
|
||||
static void GetCalibrationRange(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
TArray<FVector>& OutMinValues, TArray<FVector>& OutMaxValues);
|
||||
|
||||
/**
|
||||
* Updates Calibration values and applies it to the Profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static void UpdateCalibration(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGHapticGlove* HapticGlove, USGHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a handProfile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static void ApplyCalibration(UObject* WorldContextObject,
|
||||
const USGHapticGlove* HapticGlove, USGHandProfile*& OutProfile);
|
||||
static bool SendCustomWaveform(UPARAM(ref) USGHapticGlove* HapticGlove,
|
||||
USGCustomWaveform* OutWaveform, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
@@ -317,4 +291,10 @@ public:
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a String Representation of this Haptic Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove")
|
||||
static FString ToString(const USGHapticGlove* HapticGlove);
|
||||
};
|
||||
-166
@@ -1,166 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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/SGHapticGloveQuickCalibration.h"
|
||||
#include "SGCore/SGSensorRange.h"
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGHapticGloveQuickCalibrationKismetLibrary.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHapticGloveQuickCalibrationKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGHapticGloveQuickCalibrationKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveQuickCalibration* MakeHapticGloveQuickCalibration(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of a QuickCalibration for Haptic Gloves.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Haptic Glove Quick Calibration",
|
||||
Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHapticGloveQuickCalibration* MakeHapticGloveQuickCalibration_GTC_AET(
|
||||
UObject* WorldContextObject,
|
||||
const USGHapticGlove* GloveToCalibrate,
|
||||
float AutoEndTimeout);
|
||||
|
||||
/**
|
||||
* Default time in seconds, to end this sequence. 15 seconds is very quick for some people.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static float GetDefaultAutoEndTimeout();
|
||||
|
||||
/**
|
||||
* Time, in seconds, after which this sequence stops gathering data. Based on the deltaSeconds variable passed in the Update() function.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static float GetAutoEndTimeout(const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* When compiling the final profile, we use a Weighted Moving Average filter with this period to filer out some outliers.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static int32 GetSmoothingSamples(const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* The min/max values recorded during this calibration sequence.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorRange* GetSensorRange(UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* A temporary profile to apply the sensorRange to. Used to generate a 'preview' HandPose.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandProfile* GetTemporaryProfile(UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* Determines if the user has moved enough so that we can animate.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static bool CanAnimate(const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* This sequence autocompletes after its autoEndTime has elapsed.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static bool AutoCompleted(const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* Resets data points, min/max ranges and profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static void Reset(USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* Update this calibration sequence with new data. We use deltaSeconds to check for things like stability.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static void Update(USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, float DeltaSeconds);
|
||||
|
||||
/**
|
||||
* Add a new datapoint to this sequence's collection. Updates the range and profile used to generate a preview.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static void AddDataPoint(USGHapticGloveQuickCalibration* HapticGloveQuickCalibration,
|
||||
const TArray<FVector>& CalibrationData);
|
||||
|
||||
/**
|
||||
* After we confirm the current step, we're basically done.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static void ConfirmCurrentStep(USGHapticGloveQuickCalibration* HapticGloveQuickCalibration);
|
||||
|
||||
/**
|
||||
* Compile a sensor range from the data points collected while the sequence was running. Smoothed by a Moving Average Filter.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool CompileRange(UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration,
|
||||
USGSensorRange*& OutSensorRange);
|
||||
|
||||
/**
|
||||
* Returns a 'preview' of what a HandPose with this sequence's current settings would look like.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose(UObject* WorldContextObject,
|
||||
const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration, bool bRightHanded,
|
||||
USGHandPose*& OutCurrentHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve instructions on what to do during the current step.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Haptic Glove Quick Calibration")
|
||||
static FString GetCurrentInstruction(const USGHapticGloveQuickCalibration* HapticGloveQuickCalibration,
|
||||
const FString& NextStepKey = "");
|
||||
};
|
||||
@@ -57,12 +57,6 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Library")
|
||||
static FString GetVersion();
|
||||
|
||||
/**
|
||||
* Check what back-end connections are used for this version of SGConnect.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Library")
|
||||
static ESGBackendType GetBackendType();
|
||||
|
||||
/**
|
||||
* Back-End version in string notation.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback
|
||||
* and sensor module, and active contact feedback in the front strap.
|
||||
* Since the Nova 2.0 is significantly different from the Nova 1 Glove, it gets
|
||||
* its own separate device interface.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGNova2GloveKismetLibrary.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class USGDevice;
|
||||
class USGHandPose;
|
||||
class USGHandProfile;
|
||||
class USGNova2Glove;
|
||||
class USGNova2GloveHandProfile;
|
||||
class USGNova2GloveSensorData;
|
||||
|
||||
/**
|
||||
* Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact
|
||||
* feedback in the front strap.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveNova2GloveKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGNova2GloveKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Deserializes a Nova 2.0 from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGDevice* Parse(UObject* WorldContextObject, const FString& ConstantsString);
|
||||
|
||||
/**
|
||||
* Retrieve all Nova 2.0's.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<USGNova2Glove*> GetNova2Gloves(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Retrieve the first connected Nova 2.0 there is.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova2 Glove", Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetNova2Glove_OutG(UObject* WorldContextObject, USGNova2Glove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Retrieve the first (connected) right or left handed Nova 2.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova2 Glove", Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetNova2Glove_bRH_OutG(UObject* WorldContextObject,
|
||||
bool bRightHanded, USGNova2Glove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void CalculateGloveLocation_RP_FQuat_RR_TH_bRH_HW_OutGP_OutGR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void CalculateGloveLocation_RP_FRotator_RR_TH_bRH_HW_OutGP_OutGR(
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without
|
||||
* needing an object reference.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void CalculateWristLocation_RP_FQuat_RR_TH_bRH_HW_OutWP_OutWR(
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without
|
||||
* needing an object reference.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void CalculateWristLocation_RP_FRotator_RR_TH_bRH_HW_OutWP_OutWR(
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Special Byte to identify the command as a Streaming Byte.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static FString GetStreamByte();
|
||||
|
||||
/**
|
||||
* Ranges before a Nova 2.0 Sensor is allowed to move.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static TArray<float> GetNova2SensorRanges();
|
||||
|
||||
/**
|
||||
* Converts Nova 2.0 Sensor Data into floating point inputs for normalization.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static TArray<float> ToNormalizedValues_SD(const USGNova2GloveSensorData* SensorData);
|
||||
|
||||
/**
|
||||
* Convert Sensor Data into a series of normalized values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<float> ToNormalizedValues_SD_OutSN(
|
||||
UObject* WorldContextObject,
|
||||
const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer);
|
||||
|
||||
/**
|
||||
* Calculate Hand Angles for a Nova 2.0 Glove, based on normalized input.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static TArray<FSGVectorArray> CalculateHandAngles(
|
||||
const TArray<float>& NormalizedValues, const USGHandInterpolator* Interpolator, bool bInfluenceIndex);
|
||||
|
||||
/**
|
||||
* Convert normalized inputs (5-6 sensors) to input for an Interpolator.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static TArray<FSGVectorArray> ToNormalizedAngles(
|
||||
const TArray<float>& NormalizedData, const USGNovaGloveInfo* GloveInfo);
|
||||
|
||||
/**
|
||||
* Return the DeviceType of this Nova.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static ESGDeviceType GetDeviceType(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Returns this device's unique identifier.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static FString GetDeviceId(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Access this device's hardware designation.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static FString GetHardwareVersion(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Access this device's main firmware version. (ex: v3.2 -> 3).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static int32 GetFirmwareVersion(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Access this device's sub-firmware version. (ex: v3.2 -> 2).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static int32 GetSubFirmwareVersion(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Returns true if this device operates on a battery.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool HasBattery(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Returns true if this device is currently charging.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool IsCharging(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Returns the device's battery level, as a value between 0 (empty) and 1 (full).
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool GetBatteryLevel(UPARAM(ref) USGNova2Glove* Nova2Glove, float& OutBatteryLevel);
|
||||
|
||||
/**
|
||||
* Returns true if this glove is meant for right hands.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool IsRight(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Retrieve this glove's latest IMU rotation, if one is present.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGNova2Glove* Nova2Glove, FQuat& OutImu);
|
||||
|
||||
/**
|
||||
* Retrieve this glove's latest IMU rotation, if one is present.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGNova2Glove* Nova2Glove, FRotator& OutImu);
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove, based on (calibrated) user data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNova2Glove* Nova2Glove,
|
||||
const USGBasicHandModel* HandModel,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Returns the Hand Angles calculated by this Nova2 Glove. Used for input for HandPoses, but can be used in and of
|
||||
* itself.
|
||||
*
|
||||
* @param OutHandAngles
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandAngles(const USGNova2Glove* Nova2Glove, TArray<FSGVectorArray>& OutHandAngles);
|
||||
|
||||
/*
|
||||
* Retrieve the calibration status of this Nova 2.0 Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static ESGHapticGloveCalibrationState GetCalibrationState(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/*
|
||||
* Completes sensor Normalization on the Nova 2.0's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static void EndCalibration(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/*
|
||||
* Completes sensor Normalization on the Nova 2.0's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static void ResetCalibration(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
public:
|
||||
/*
|
||||
* Stop all haptic feedback effects playing on this device.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static void StopHaptics(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Stop only all vibrotactile feedback.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static void StopVibrations(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Flush all streaming haptic effects on the different fingers to the Nova 2.0 Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | SG | Nova 2 Glove")
|
||||
static bool SendHaptics(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Returns true if this Glove supports the chosen haptic location.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static bool SupportsCustomWaveform(const USGNova2Glove* Nova2Glove, ESGHapticLocation AtLocation);
|
||||
|
||||
/**
|
||||
* Send a custom waveform to the Nova 2.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static bool SendCustomWaveform(UPARAM(ref) USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky.
|
||||
*
|
||||
* @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static bool QueueForceFeedbackLevels(USGNova2Glove* Nova2Glove, const TArray<float>& Levels01);
|
||||
|
||||
/**
|
||||
* Set the Force-Feedback value of a particular finger to a specific level.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove")
|
||||
static bool QueueForceFeedbackLevel(USGNova2Glove* Nova2Glove, int32 Finger, float Level01);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FQuat& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR(
|
||||
const USGNova2Glove* Nova2Glove,
|
||||
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Access DeviceInfo of this Nova.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* If true, the Index Finger sensors will influence the tracking of the other fingers.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool DoesIndexInfluenceOthers(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void SetIndexInfluencesOthers(UPARAM(ref) USGNova2Glove* Nova2Glove, bool bInfluenceOthers);
|
||||
|
||||
/**
|
||||
* If true, this glove's sensor calibration runs on board the device.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool SupportsOnBoardNormalization(const USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Get the latest Sensor Data from this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSensorData(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNova2Glove* Nova2Glove, USGNova2GloveSensorData*& OutSensorData);
|
||||
|
||||
/**
|
||||
* Returns the normalized Sensor Data of this Nova2 Glove. If no normalization is running on the glove(s), then
|
||||
* it's done on the PC side.
|
||||
*
|
||||
* @param OutNormalizedValues
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool GetNormalizedInput(const USGNova2Glove* Nova2Glove, TArray<float>& OutNormalizedValues);
|
||||
|
||||
/**
|
||||
* Tell the Nova Glove to send Raw Data instead of normalized data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool SendRawData(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Tell the Nova Glove to send normalized data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool SendNormalizedData(UPARAM(ref) USGNova2Glove* Nova2Glove);
|
||||
|
||||
/**
|
||||
* Convert a HapticLocation into a Nova 2.0 Motor location.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static ESGNova2VibroMotor ToNovaMotor(const USGNova2Glove* Nova2Glove, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Returns the channel index for a particular motor. Can make this as complex as I want for the Nova2 GLove(s).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static int32 ChannelIndex(const USGNova2Glove* Nova2Glove, ESGNova2VibroMotor Motor);
|
||||
|
||||
/**
|
||||
* Ensures the waveform that is to be sent to this Nova2 Glove has the appropriate parameters.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static void ValidateWaveform(const USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor);
|
||||
|
||||
/**
|
||||
* Directly sends a custom waveform to the Nova 2.0 Glove motors, as opposed to specifying a Haptic Location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static bool SendCustomWaveform_Nova2(
|
||||
UPARAM(ref) USGNova2Glove* Nova2Glove,
|
||||
USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor, bool bValidateWaveform = true);
|
||||
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove")
|
||||
static FString ToString(const USGNova2Glove* Nova2Glove);
|
||||
};
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Sensor Data coming off the Nova2 2.0 Glove.
|
||||
* Has certain features the Nova2 1.0 Glove does not have, such as multiple
|
||||
* flexion sensors, normalization states and Active Strap info.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGNova2GloveSensorDataKismetLibrary.generated.h"
|
||||
|
||||
class USGNovaGloveInfo;
|
||||
class USGNova2GloveSensorData;
|
||||
|
||||
/**
|
||||
* Nova Glove 2.0 Sensor data, which had additional feedback and calibration parameters.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveNova2GloveSensorDataKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGNova2GloveSensorDataKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Default constructor for Nova2GloveSensorData.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNova2GloveSensorData* MakeNova2GloveSensorData(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Nova2GloveSensorData.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Nova2 Glove Sensor Data",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
|
||||
static USGNova2GloveSensorData* MakeNova2GloveSensorData_NS_V_PV_FQuat_IR_bIP_BL_bC(
|
||||
UObject* WorldContextObject, ESGNormalizationState NormalizationState,
|
||||
const TArray<FSGVectorArray>& Values, int32 ParsedValues,
|
||||
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Nova2GloveSensorData.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Nova2 Glove Sensor Data",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
|
||||
static USGNova2GloveSensorData* MakeNova2GloveSensorData_NS_V_PV_FRotator_IR_bIP_BL_b(
|
||||
UObject* WorldContextObject, ESGNormalizationState NormalizationState,
|
||||
const TArray<FSGVectorArray>& Values, int32 ParsedValues,
|
||||
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
|
||||
|
||||
/**
|
||||
* Parse the bytes as they come in from the device into usable values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNova2GloveSensorData* Parse(UObject* WorldContextObject,
|
||||
const FString& RawData, const USGNovaGloveInfo* GloveInfo);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static ESGNormalizationState GetSensorState(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static TArray<FSGVectorArray> GetSensorValues(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns the sensor movement of a specific finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static float GetSensorValue(const USGNova2GloveSensorData* Nova2GloveSensorData,
|
||||
ESGFinger Finger, ESGNova2SensorLocation Location);
|
||||
|
||||
/**
|
||||
* The number of values that were parsed from the sensor string.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static int32 GetParsedValues(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Quaternion rotation relative to magnetic north.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static FQuat GetImuRotation_FQuat(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Rotation relative to magnetic north.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
|
||||
Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static FRotator GetImuRotation_FRotator(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Whether the IMU values were all successfully parsed, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static bool IsImuParsed(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* A value between 0..1 that represents the battery level of this Nova2 Glove (0 .. 100%). Returns -1 if the value
|
||||
* wasn't received.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static float GetBatteryLevel(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns true if this NovaGlove is connected to a power source.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static bool IsCharging(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns true if this sensor data contains the same values as another.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static bool Equals(const USGNova2GloveSensorData* A, const USGNova2GloveSensorData* B);
|
||||
|
||||
/**
|
||||
* Create a readable string representation of this Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data")
|
||||
static FString ToString(const USGNova2GloveSensorData* Nova2GloveSensorData);
|
||||
};
|
||||
@@ -1,76 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "Containers/Array.h"
|
||||
#include "Math/Vector.h"
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGNovaGloveCalibrationKismetLibrary.generated.h"
|
||||
|
||||
class USGNovaGloveHandProfile;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveNovaGloveCalibrationKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGNovaGloveCalibrationKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Apply a glove's default interpolation values to a profile, using the 'default' hand angles from calibration.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Nova Glove Calibration")
|
||||
static void ApplyDefaultCalibrationInterpolationValues(
|
||||
const TArray<FVector>& RetractedValues,
|
||||
const TArray<FVector>& ExtendedValues,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
|
||||
/**
|
||||
* Apply a set of sensor-to-joint-angle interpolations to a nova profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Nova Glove Calibration")
|
||||
static void ApplyInterpolationValues(
|
||||
const TArray<FVector>& RetractedValues,
|
||||
const TArray<FVector>& ExtendedValues,
|
||||
const TArray<FSGVectorArray>& RetractedAngles,
|
||||
const TArray<FSGVectorArray>& ExtendedAngles,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
};
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Input for Nova kinematics to calculate a HandPose.
|
||||
* Output of calibration algorithms.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGNovaGloveHandProfileKismetLibrary.generated.h"
|
||||
|
||||
class USGHandInterpolator;
|
||||
class USGNovaGloveHandProfile;
|
||||
|
||||
/**
|
||||
* Contains user-specific data for the Nova to convert sensor data into a hand pose.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveNovaGloveHandProfileKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGNovaGloveHandProfileKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveHandProfile* MakeNovaGloveHandProfile(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of a Nova-Profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Hand Profile",
|
||||
Category="SenseGlove | Core | Nova | Nova Glove Hand Profile", meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveHandProfile* MakeNovaGloveHandProfile_bRH_I(
|
||||
UObject* WorldContextObject, bool bRightHanded, const USGHandInterpolator* Interpolator);
|
||||
|
||||
/**
|
||||
* Creates a default Nova Profile for a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveHandProfile* Default(UObject* WorldContextObject, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Convert a string notation of a NovaGloveHandProfile into a new instance.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveHandProfile* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Whether this profile was created for a right- or left hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
|
||||
static bool IsRight(const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Interpolation sets to convert sensor data into a hand pose.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* GetInterpolationSet(UObject* WorldContextObject,
|
||||
const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
|
||||
static bool Equals(const USGNovaGloveHandProfile* A, const USGNovaGloveHandProfile* B);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
|
||||
static void Reset(UPARAM(ref) USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Convert this NovaGloveHandProfile into a string notation so it can be stored on disk.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Hand Profile")
|
||||
static FString SGSerialize(const USGNovaGloveHandProfile* NovaGloveHandProfile);
|
||||
};
|
||||
@@ -129,6 +129,20 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info")
|
||||
static int32 GetNumberOfSensors(const USGNovaGloveInfo* NovaGloveInfo);
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is newer than certain version.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info")
|
||||
bool FirmwareNewerThan(const USGNovaGloveInfo* NovaGloveInfo,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const;
|
||||
|
||||
/**
|
||||
* Returns true if this glove's firmware is older than certain version.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info")
|
||||
bool FirmwareOlderThan(const USGNovaGloveInfo* NovaGloveInfo,
|
||||
int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const;
|
||||
|
||||
/**
|
||||
* Returns true if this GloveInfo contains the same information as another.
|
||||
*/
|
||||
@@ -146,4 +160,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Info")
|
||||
static FString SGSerialize(const USGNovaGloveInfo* NovaGloveInfo);
|
||||
};
|
||||
};
|
||||
@@ -38,19 +38,17 @@
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
#include "SGTypes/SGVectorArray.h"
|
||||
|
||||
#include "SGNovaGloveKismetLibrary.generated.h"
|
||||
|
||||
class USGBasicHandModel;
|
||||
class USGBuzzCommand;
|
||||
class USGDevice;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGHandPose;
|
||||
class USGHandProfile;
|
||||
class USGNovaGlove;
|
||||
class USGNovaGloveHandProfile;
|
||||
class USGNovaGloveSensorData;
|
||||
class USGThumperCommand;
|
||||
|
||||
/**
|
||||
* A soft glove with Force- and Vibrotactile Feedback and limited tracking.
|
||||
@@ -61,28 +59,6 @@ class SENSEGLOVECOREKISMET_API USGNovaGloveKismetLibrary final : public USGBluep
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Byte indicating a new Nova haptic command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Minimum calibration value distance until we apply the range.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FVector GetMinCalibrationRange();
|
||||
|
||||
/**
|
||||
* Calculate a Hand Pose based on a HandMode; sensor data from a Nova, and a UserProfile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandPose* CalculateHandPose(UObject* WorldContextObject,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGNovaGloveSensorData* NovaData,
|
||||
const USGNovaGloveHandProfile* Profile);
|
||||
|
||||
/**
|
||||
* Deserializes a Nova from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||
*/
|
||||
@@ -112,21 +88,6 @@ public:
|
||||
static bool GetNovaGlove_bRH_OutG(UObject* WorldContextObject,
|
||||
bool bRightHanded, USGNovaGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static TArray<FVector> GetCalibrationValues_SD(const USGNovaGloveSensorData* SensorData);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void CalibrateInterpolation(UObject* WorldContextObject,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||
USGNovaGloveHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
@@ -148,7 +109,10 @@ public:
|
||||
FVector& OutGlovePosition, FRotator& OutGloveRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without needing an object reference.
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without
|
||||
* needing an object reference.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
|
||||
Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
@@ -158,7 +122,10 @@ public:
|
||||
FVector& OutWristPosition, FQuat& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without needing an object reference.
|
||||
* Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without
|
||||
* needing an object reference.
|
||||
*
|
||||
* @remarks The simplest interface, using default offsets.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
|
||||
Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
@@ -168,22 +135,63 @@ public:
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Converts a thumper command into bytes that the Nova can understand.
|
||||
* Byte indicating a new Nova haptic command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Bytes", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToBytes_TC(const USGThumperCommand* ThumperCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Converts a force-feedback command into bytes that the Nova can understand.
|
||||
* Byte indicating a new Nova thresholds command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Bytes", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToBytes_FFC(const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString GetThresholdsByte();
|
||||
|
||||
/**
|
||||
* Converts a buzz-motor command into bytes that the Nova can understand.
|
||||
* Byte to ignore Thresholds.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Bytes", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToBytes_BC(const USGBuzzCommand* BuzzCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString GetIgnoreThresholdsByte();
|
||||
|
||||
/**
|
||||
* Ranges before a Nova 1.0 Sensor is allowed to move.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static TArray<float> GetNovaSensorRanges();
|
||||
|
||||
/**
|
||||
* Converts Nova Sensor Data into floating point inputs for normalization.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static TArray<float> ToNormalizedValues_SD(const USGNovaGloveSensorData* SensorData);
|
||||
|
||||
/**
|
||||
* Convert Sensor Data into a series of normalized values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<float> ToNormalizedValues_SD_OutSN(
|
||||
UObject* WorldContextObject,
|
||||
const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer);
|
||||
|
||||
/**
|
||||
* Calculate Hand Angles for a Nova Glove, based on normalized input.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static TArray<FSGVectorArray> CalculateHandAngles(
|
||||
const TArray<float>& NormalizedValues, const USGHandInterpolator* Interpolator);
|
||||
|
||||
/**
|
||||
* Converts a Threshold command into a Nova Glove command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds);
|
||||
|
||||
/**
|
||||
* Converts a Threshold command into a Nova Glove command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToNovaCommandAsRaw(
|
||||
const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator);
|
||||
|
||||
/**
|
||||
* Return the DeviceType of this Nova.
|
||||
@@ -215,6 +223,12 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static int32 GetSubFirmwareVersion(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Change this device's index within the SenseCom. Warning: Can cause errors.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void SetDeviceIndex(UPARAM(ref) USGNovaGlove* NovaGlove, int32 NewIndex);
|
||||
|
||||
/**
|
||||
* Returns true if this device operates on a battery.
|
||||
*/
|
||||
@@ -234,12 +248,10 @@ public:
|
||||
static bool GetBatteryLevel(UPARAM(ref) USGNovaGlove* NovaGlove, float& OutBatteryLevel);
|
||||
|
||||
/**
|
||||
* Get the latest Sensor Data from this Sense Glove.
|
||||
* Returns true if this glove is meant for right hands.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSensorData(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData);
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool IsRight(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Retrieve Nova rotation.
|
||||
@@ -258,85 +270,89 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HM_P_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGNovaGloveHandProfile* Profile,
|
||||
USGHandPose*& OutHandPose);
|
||||
static bool GetHandPose(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGBasicHandModel* HandModel,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove, based on (calibrated) user data.
|
||||
* Returns the Hand Angles calculated by this Nova Glove. Used for input for HandPoses, but can be used in and of
|
||||
* itself.
|
||||
*
|
||||
* @param OutHandAngles
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HG_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGBasicHandModel* HandGeometry,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
static bool GetHandAngles(const USGNovaGlove* NovaGlove, TArray<FSGVectorArray>& OutHandAngles);
|
||||
|
||||
/*
|
||||
* Retrieve the calibration status of this Nova Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static ESGHapticGloveCalibrationState GetCalibrationState(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/*
|
||||
* Completes sensor Normalization on the Nova's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static void EndCalibration(UPARAM(ref) USGNovaGlove* NovaGlove);
|
||||
|
||||
/*
|
||||
* Completes sensor Normalization on the Nova's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static void ResetCalibration(UPARAM(ref) USGNovaGlove* NovaGlove);
|
||||
|
||||
public:
|
||||
/*
|
||||
* Stop all haptic feedback effects playing on this device.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static void StopHaptics(UPARAM(ref) USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
* Stop only all vibrotactile feedback.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static void StopVibrations(UPARAM(ref) USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Send all available haptics to a Nova.
|
||||
* Take all active commands in the device queue, compile them into one and send them to the device.
|
||||
*
|
||||
* @returns Returns true if the message was successfully sent to SenseCom. Returns false if no changes to commands
|
||||
* were detected.
|
||||
*
|
||||
* @remarks Generic function across any Haptic Interface in SGCore.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void SendHaptics_FFC(UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | SG | Nova Glove")
|
||||
static bool SendHaptics(UPARAM(ref) USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
* Returns true if this Glove supports the chosen haptic location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void SendHaptics_BC(UPARAM(ref) USGNovaGlove* NovaGlove, const USGBuzzCommand* BuzzCommand);
|
||||
UFUNCTION(BlueprintPure, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static bool SupportsCustomWaveform(const USGNovaGlove* NovaGlove, ESGHapticLocation AtLocation);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
* Send a custom waveform to the Nova.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void SendHaptics_TC(UPARAM(ref) USGNovaGlove* NovaGlove, const USGThumperCommand* ThumperCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static bool SendCustomWaveform(UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
* Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky.
|
||||
*
|
||||
* @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void SendHaptics_FFC_BC_TC(
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand);
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueForceFeedbackLevels(USGNovaGlove* NovaGlove, const TArray<float>& Levels01);
|
||||
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
* Set the Force-Feedback value of a particular finger to a specific level.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool GetCalibrationValues_OutV(UPARAM(ref) USGNovaGlove* NovaGlove, TArray<FVector>& OutValues);
|
||||
|
||||
/**
|
||||
* Applies the calibration range of this Nova a HandProfile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void ApplyCalibration_USGHandProfile_OutP(UObject* WorldContextObject,
|
||||
const USGNovaGlove* NovaGlove,
|
||||
USGHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Applies the calibration range of this SenseGlove to a NovaGloveHandProfile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void ApplyCalibration_USGNovaGloveHandProfile_OutP(UObject* WorldContextObject,
|
||||
const USGNovaGlove* NovaGlove,
|
||||
USGNovaGloveHandProfile*& OutProfile);
|
||||
UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueForceFeedbackLevel(USGNovaGlove* NovaGlove, int32 Finger, float Level01);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
@@ -378,9 +394,115 @@ public:
|
||||
ESGPositionalTrackingHardware TrackingHardware,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Access all sorts of device info specific to this Nova.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static USGNovaGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* If true, this Nova Glove supports sending special firmware commands to lock brakes at specific sensor values.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool SupportsThresholds(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* If true, this Nova Glove supports sending custom 'fire-and-forget' waveforms.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool SupportsCustomWaveforms(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* If true, this glove's sensor calibration runs on board the device.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool SupportsOnBoardNormalization(const USGNovaGlove* NovaGlove);
|
||||
|
||||
/**
|
||||
* Get the latest Sensor Data from this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSensorData(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData);
|
||||
|
||||
/**
|
||||
* Converts a set of commands into a series of bytes (string) this glove can understand.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToNovaCommand(
|
||||
const USGNovaGlove* NovaGlove,
|
||||
const TArray<float>& ForceFeedbackLevels, const TArray<float>& BuzzLevels, float WristLevel);
|
||||
|
||||
/**
|
||||
* Queue a vibrotactile level for each finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueVibroLevels(UPARAM(ref) USGNovaGlove* NovaGlove, const TArray<float>& Amplitudes);
|
||||
|
||||
/**
|
||||
* Queue a vibrotactle level for a specific finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueVibroLevel(UPARAM(ref) USGNovaGlove* NovaGlove, int32 Finger, float Amplitude);
|
||||
|
||||
/**
|
||||
* Queue a command to the vibration amplitude of a general wrist actuator to a set level.
|
||||
*
|
||||
* @returns Returns true if the wrist command has been successfully queued. If false, the device might not support
|
||||
* direct wrist control or have the appropriate firmware.
|
||||
*
|
||||
* @remarks This one isn't contained in an interface as it's not used outside of the NovaGlove class.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueWristLevel(UPARAM(ref) USGNovaGlove* NovaGlove, float Amplitude);
|
||||
|
||||
/**
|
||||
* Convert a HapticLocation into a Nova Motor location.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static ESGNovaVibroMotor ToNovaMotor(const USGNovaGlove* NovaGlove, ESGHapticLocation Location);
|
||||
|
||||
/**
|
||||
* Returns the channel index for a particular motor. Can make this as complex as I want for the Nova GLove(s).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static int32 ChannelIndex(const USGNovaGlove* NovaGlove, ESGNovaVibroMotor Motor);
|
||||
|
||||
/**
|
||||
* Ensures the waveform that is to be sent to this Nova Glove has the appropriate parameters.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static void ValidateWaveform(const USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor);
|
||||
|
||||
/**
|
||||
* Directly sends a custom waveform to the Nova Glove motors, as opposed to specifying a Haptic Location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool SendCustomWaveform_Nova(
|
||||
UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor, bool bValidateWaveform = true);
|
||||
|
||||
/**
|
||||
* Stops the glove when flexing pas this point.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueThresholdCommand_Flexion(UPARAM(ref) USGNovaGlove* NovaGlove,
|
||||
int32 Finger, float FlexionThreshold);
|
||||
|
||||
/**
|
||||
* Queue a command to clear the threshold for a specific finger.
|
||||
*
|
||||
* @returns Returns true if the command was queued. If false, the device does not have the required firmware for
|
||||
* these commands.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static bool QueueClearThreshold(UPARAM(ref) USGNovaGlove* NovaGlove, int32 Finger);
|
||||
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
|
||||
static FString ToString(const USGNovaGlove* NovaGlove);
|
||||
};
|
||||
};
|
||||
+20
-11
@@ -36,6 +36,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGNovaGloveSensorDataKismetLibrary.generated.h"
|
||||
|
||||
@@ -84,7 +85,7 @@ public:
|
||||
static USGNovaGloveSensorData* Empty(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Parse the bytes as they come in from the device into useable values.
|
||||
* Parse the bytes as they come in from the device into usable values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
@@ -104,6 +105,19 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static TArray<FVector> GetSensorValues(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns the sensor movement of a specific finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static float GetSensorValue(const USGNovaGloveSensorData* NovaGloveSensorData,
|
||||
ESGFinger Finger, ESGNovaSensorLocation Location);
|
||||
|
||||
/**
|
||||
* The number of values that were parsed from the sensor string.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static int32 GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* Quaternion rotation relative to magnetic north.
|
||||
*/
|
||||
@@ -118,12 +132,6 @@ public:
|
||||
Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static FRotator GetImuRotation_FRotator(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* The number of values that were parsed from the sensor string.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static int32 GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* Whether the IMU values were all successfully parsed, or not.
|
||||
*/
|
||||
@@ -131,13 +139,14 @@ public:
|
||||
static bool IsImuParsed(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* A value between 0..1 that represents the battery level of this Nova Glove (0 .. 100%). Returns -1 if the value wasn't received.
|
||||
* A value between 0..1 that represents the battery level of this Nova Glove (0 .. 100%). Returns -1 if the value
|
||||
* wasn't received.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static float GetBatteryLevel(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns true if this NovaGlove is connected to a power source
|
||||
* Returns true if this NovaGlove is connected to a power source.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static bool IsCharging(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
@@ -149,7 +158,7 @@ public:
|
||||
static bool Equals(const USGNovaGloveSensorData* A, const USGNovaGloveSensorData* B);
|
||||
|
||||
/**
|
||||
* Create a readable string representation of this Sensor Data
|
||||
* Create a readable string representation of this Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static FString ToString(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
@@ -159,4 +168,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
|
||||
static FString SGSerialize(const USGNovaGloveSensorData* NovaGloveSensorData);
|
||||
};
|
||||
};
|
||||
-141
@@ -1,141 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Input for Sense Glove kinematics to calculate a HandPose.
|
||||
* Output of calibration algorithms.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGSenseGloveHandProfileKismetLibrary.generated.h"
|
||||
|
||||
class USGHandInterpolator;
|
||||
class USGSenseGloveHandProfile;
|
||||
|
||||
/**
|
||||
* Contains everything a Sense Glove needs to calculate a HandPose.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveSenseGloveHandProfileKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGSenseGloveHandProfileKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The basic constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveHandProfile* MakeSenseGloveHandProfile(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new Hand Profile for the Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Hand Profile",
|
||||
Category="SenseGlove | Core | SG | Sense Glove Hand Profile", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveHandProfile* MakeSenseGloveHandProfile_bRH_I_TS_FS_FTO(
|
||||
UObject* WorldContextObject, bool bRightHanded, const USGHandInterpolator* Interpolator,
|
||||
ESGThumbSolver ThumbSolver, ESGFingerSolver FingerSolver, const TArray<FVector>& FingerThimbleOffset);
|
||||
|
||||
/**
|
||||
* Retrieve a 'new' profile, for either a left or right hand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveHandProfile* Default(UObject* WorldContextObject, bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Deserialize a HandProfile back into usable values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveHandProfile* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Default offset from thimble to fingertip.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static FVector GetDefaultThimbleOffset();
|
||||
|
||||
/**
|
||||
* Check whether this profile has been created for a right hand (true) or left hand (false).
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static bool IsRight(const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Interpolation set to estimate joint angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandInterpolator* GetInterpolationSet(UObject* WorldContextObject,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Solver property that determines _how_ HandPoses are calculated.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static ESGThumbSolver GetThumbSolver(const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Solver property that determines _how_ finger poses are calculated.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static ESGFingerSolver GetFingerSolver(const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Offset from thimble to fingertip, used for Inverse Kinematics.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static TArray<FVector> GetFingerThimbleOffset(const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static bool Equals(const USGSenseGloveHandProfile* A, const USGSenseGloveHandProfile* B);
|
||||
|
||||
/**
|
||||
* Reset calibration on this profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static void Reset(UPARAM(ref) USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Serialize this HandProfile into a string representation.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Hand Profile")
|
||||
static FString SGSerialize(const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
};
|
||||
@@ -215,18 +215,18 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
|
||||
static bool Equals(const USGSenseGloveInfo* A, const USGSenseGloveInfo* B);
|
||||
|
||||
/**
|
||||
* Create a string representation for logging. If shortNotation is false, all values are reported.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
|
||||
static FString ToString(const USGSenseGloveInfo* SenseGloveInfo);
|
||||
|
||||
/**
|
||||
* Create a string representation for fast logging.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="To String", Category="SenseGlove | Core | SG | Sense Glove Info")
|
||||
static FString ToString_bSN(const USGSenseGloveInfo* SenseGloveInfo, bool bShortNotation);
|
||||
|
||||
/**
|
||||
* Create a string representation for logging. If shortNotation is false, all values are reported.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
|
||||
static FString ToString(const USGSenseGloveInfo* SenseGloveInfo);
|
||||
|
||||
/**
|
||||
* Serialize this HandProfile into a string representation.
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "SGCore/SGHandPose.h"
|
||||
#include "SGCore/SGHandProfile.h"
|
||||
#include "SGCore/SGSenseGlove.h"
|
||||
#include "SGCore/SGSenseGlovePose.h"
|
||||
#include "SGCore/SGSenseGloveSensorData.h"
|
||||
@@ -46,10 +45,11 @@
|
||||
|
||||
#include "SGSenseGloveKismetLibrary.generated.h"
|
||||
|
||||
class USGBuzzCommand;
|
||||
class USGDevice;
|
||||
class USGForceFeedbackCommand;
|
||||
class USGHandInterpolator;
|
||||
class USGHandPose;
|
||||
class USGSenseGlove;
|
||||
class USGSenseGloveSensorNormalizer;
|
||||
|
||||
/**
|
||||
* Interface for the Sense Glove; and exoskeleton Force-Feedback glove.
|
||||
@@ -60,50 +60,6 @@ class SENSEGLOVECOREKISMET_API USGSenseGloveKismetLibrary final : public USGBlue
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Byte indicating a new Sense Glove haptic command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static FString GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Byte indicating a new Thumper command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static FString GetThumperByte();
|
||||
|
||||
/**
|
||||
* Calculates a GlovePose based on sensor angles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGlovePose* CalculateGlovePose_SD_GM(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* Calculates a GlovePose based on gloveAngles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGlovePose* CalculateGlovePose_GA_GM(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGVectorArray>& GloveAngles, const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* @remarks Use this when you already have a GlovePose.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGHandPose* CalculateHandPose(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel,
|
||||
const USGSenseGloveHandProfile* Profile);
|
||||
|
||||
/**
|
||||
* Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful.
|
||||
*/
|
||||
@@ -132,21 +88,6 @@ public:
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSenseGlove_bRH_OutG(UObject* WorldContextObject, bool bRightHanded, USGSenseGlove*& OutGlove);
|
||||
|
||||
/**
|
||||
* Convert a SenseGlove GlovePose into calibrationValues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static TArray<FVector> GetCalibrationValues_GlovePose(const USGSenseGlovePose* GlovePose);
|
||||
|
||||
/**
|
||||
* Apply interpolation values to the correct fields in the SenseGlove Profile, based on min/max sensor values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void CalibrateInterpolation(UObject* WorldContextObject,
|
||||
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
|
||||
bool bRightHanded, USGSenseGloveHandProfile*& OutProfile);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location without requiring an object reference.
|
||||
*/
|
||||
@@ -190,18 +131,74 @@ public:
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve this glove's hardware model, which contains its hardware data.
|
||||
* Byte indicating a new Sense Glove haptic command.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveInfo* GetGloveModel(UObject* WorldContextObject, const USGSenseGlove* SenseGlove);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static FString GetHapticsByte();
|
||||
|
||||
/**
|
||||
* Check if this Sense Glove is right handed.
|
||||
*
|
||||
* @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used.
|
||||
* Byte indicating a new Thumper command.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool IsRight(const USGSenseGlove* SenseGlove);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static FString GetThumperByte();
|
||||
|
||||
/**
|
||||
* Default offset from thimble to fingertip.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static FVector GetDefaultThimbleOffset();
|
||||
|
||||
/**
|
||||
* Calculates a GlovePose based on sensor angles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGlovePose* CalculateGlovePose_SD_GM(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* Calculates a GlovePose based on gloveAngles and a glove model.
|
||||
*
|
||||
* @remarks Use this when you already have gloveAngles collected.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGlovePose* CalculateGlovePose_GA_GM(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<FSGVectorArray>& GloveAngles, const USGSenseGloveInfo* GloveModel);
|
||||
|
||||
/**
|
||||
* Returns normalized flexions and abductions.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void NormalizeValues(const TArray<FVector>& SumAngles,
|
||||
const USGSenseGloveSensorNormalizer* Normalizer,
|
||||
TArray<float>& OutFlexions, TArray<float>& OutAbductions);
|
||||
|
||||
/**
|
||||
* Calculate Hand Angles from a GlovePose and relevant normalizers.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void CalculateHandAngles(
|
||||
const USGSenseGlovePose* GlovePose,
|
||||
const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles,
|
||||
TArray<FSGVectorArray>& OutHandAngles);
|
||||
|
||||
/**
|
||||
* Calculate a HandPose based on a glovePose and a solver.
|
||||
*
|
||||
* @remarks Use this when you already have a GlovePose.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void CalculateHandPose(
|
||||
UObject* WorldContextObject,
|
||||
const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel,
|
||||
const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration.
|
||||
@@ -234,11 +231,12 @@ public:
|
||||
static int32 GetSubFirmwareVersion(const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Get the latest Sensor Data from this Sense Glove.
|
||||
* Check if this Sense Glove is right handed.
|
||||
*
|
||||
* @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSensorData(UObject* WorldContextObject,
|
||||
const USGSenseGlove* SenseGlove, USGSenseGloveSensorData*& OutSensorData);
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool IsRight(const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -252,124 +250,73 @@ public:
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGSenseGlove* SenseGlove, FRotator& OutImu);
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware, based on its latest Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetGlovePose_OutGP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware based on a set of Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetGlovePose_SD_OutGP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGSenseGloveSensorData* SensorData,
|
||||
USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/**
|
||||
* Retrieve a new hand pose using this glove's data, based on (calibrated) user data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HM_P_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGBasicHandModel* HandModel,
|
||||
const USGSenseGloveHandProfile* Profile,
|
||||
USGHandPose*& OutHandPose);
|
||||
static bool GetHandPose(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGBasicHandModel* HandModel,
|
||||
USGHandPose*& OutHandPose);
|
||||
|
||||
/**
|
||||
* Calculate the Hand Pose of this device, provided it has Hand Tracking available.
|
||||
* Returns the Hand Angles calculated by this Sense Glove. Used for input for HandPoses, but can be used in and of
|
||||
* itself.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HG_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGBasicHandModel* HandGeometry,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool GetHandAngles(const USGSenseGlove* SenseGlove, TArray<FSGVectorArray>& OutHandAngles);
|
||||
|
||||
/**
|
||||
* Calculate the HandPose of this Device, taking into account user values, but not hand geometry.
|
||||
/*
|
||||
* Retrieve the calibration status of this Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetHandPose_HP_OutHP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGHandProfile* HandProfile,
|
||||
USGHandPose*& OutHandPose);
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static ESGHapticGloveCalibrationState GetCalibrationState(const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Set the level(s) of Force and Vibrotactile feedback, with an optional thumper command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool SendHaptics_FFC_BC_ESGSenseGloveThumperCommand_TC(
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand, const USGBuzzCommand* BuzzCommand,
|
||||
ESGSenseGloveThumperCommand ThumperCommand = ESGSenseGloveThumperCommand::None);
|
||||
|
||||
/**
|
||||
* Send a thumper command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool SendHaptics_TC(UPARAM(ref) USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand ThumperCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void SendHaptics_FFC(UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand);
|
||||
|
||||
/**
|
||||
* Send Haptic Commands to this Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void SendHaptics_BC(UPARAM(ref) USGSenseGlove* SenseGlove, const USGBuzzCommand* BuzzCommand);
|
||||
|
||||
/**
|
||||
* Retrieve this device's firmware version.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Send Haptics", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void SendHaptics_FFC_BC_TC(
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGForceFeedbackCommand* ForceFeedbackCommand,
|
||||
const USGBuzzCommand* BuzzCommand,
|
||||
const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Retrieve calibration values of this glove, as an array of size 5, containing x (roll), y (flexion), z (abduction) values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Calibration Values", Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool GetCalibrationValues_OutV(UPARAM(ref) USGSenseGlove* SenseGlove, TArray<FVector>& OutValues);
|
||||
|
||||
/**
|
||||
* Reset the glove's calibration range.
|
||||
/*
|
||||
* Completes sensor Normalization on the Glove's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void ResetCalibrationRange(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
static void EndCalibration(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
|
||||
/*
|
||||
* Completes sensor Normalization on the Glove's end.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void ResetCalibration(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
|
||||
public:
|
||||
/*
|
||||
* Stop all haptic feedback effects playing on this device.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void StopHaptics(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a handProfile.
|
||||
* Stop only all vibrotactile feedback.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void ApplyCalibration_USGHandProfile_OutP(UObject* WorldContextObject,
|
||||
const USGSenseGlove* SenseGlove,
|
||||
USGHandProfile*& OutProfile);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void StopVibrations(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Apply this glove's calibration range to a SenseGloveHandProfile.
|
||||
* Flush all streaming haptic effects on the different fingers to the Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Apply Calibration", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static void ApplyCalibration_USGSenseGloveHandProfile_OutP(UObject* WorldContextObject,
|
||||
const USGSenseGlove* SenseGlove,
|
||||
USGSenseGloveHandProfile*& OutProfile);
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool SendHaptics(UPARAM(ref) USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Set the Force-Feedback value of a particular finger to a specific level.
|
||||
*
|
||||
* @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool QueueForceFeedbackLevels(UPARAM(ref) USGSenseGlove* SenseGlove, const TArray<float>& Levels01);
|
||||
|
||||
/**
|
||||
* Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool QueueForceFeedbackLevel(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, float Level01);
|
||||
|
||||
/**
|
||||
* Retrieve the location of the glove origin, based on a reference location.
|
||||
@@ -455,6 +402,74 @@ public:
|
||||
const FRotator& GloveWristRotationOffset,
|
||||
FVector& OutWristPosition, FRotator& OutWristRotation);
|
||||
|
||||
/**
|
||||
* Retrieve this glove's hardware model, which contains its hardware data.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Offset from thimble to fingertip, used for Inverse Kinematics.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static TArray<FVector> GetFingerThimbleOffsets(const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static void SetFingerThimbleOffset(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, const FVector& Offset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool SupportsWristActuator(const USGSenseGlove* SenseGlove);
|
||||
|
||||
/**
|
||||
* Get the latest Sensor Data from this Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetSensorData(UObject* WorldContextObject,
|
||||
const USGSenseGlove* SenseGlove, USGSenseGloveSensorData*& OutSensorData);
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware, based on its latest Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetGlovePose_OutGP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/**
|
||||
* Get the pose of this Sense Glove's hardware based on a set of Sensor Data.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetGlovePose_SD_OutGP(UObject* WorldContextObject,
|
||||
UPARAM(ref) USGSenseGlove* SenseGlove,
|
||||
const USGSenseGloveSensorData* SensorData,
|
||||
USGSenseGlovePose*& OutGlovePose);
|
||||
|
||||
/**
|
||||
* Queue a vibrotactile level for each finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool QueueVibroLevels(UPARAM(ref) USGSenseGlove* SenseGlove, const TArray<float>& Amplitudes);
|
||||
|
||||
/**
|
||||
* Queue a vibrotactle level for a specific finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool QueueVibroLevel(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, float Amplitude);
|
||||
|
||||
/**
|
||||
* Queue a command for the SenseGlove Thumper actuator.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
|
||||
static bool QueueThumperCommand(UPARAM(ref) USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand Command);
|
||||
|
||||
/**
|
||||
* Create a string representation of this device for reporting purposes.
|
||||
*/
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
#include "SGSenseGlovePoseKismetLibrary.generated.h"
|
||||
|
||||
class USGSenseGloveHandProfile;
|
||||
class USGSenseGloveInfo;
|
||||
class USGSenseGlovePose;
|
||||
|
||||
@@ -155,20 +154,12 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
|
||||
static TArray<FVector> GetTotalGloveAngles(const USGSenseGlovePose* SenseGlovePose);
|
||||
|
||||
/**
|
||||
* Calculate fingertip positions based on a user profile.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
|
||||
static TArray<FVector> CalculateFingerTips_SenseGloveHandProfileImpl(
|
||||
const USGSenseGlovePose* SenseGlovePose,
|
||||
const USGSenseGloveHandProfile* SenseGloveHandProfile);
|
||||
|
||||
/**
|
||||
* Calculate fingertip positions, knowing the offset between thimble and fingertips.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
|
||||
static TArray<FVector> CalculateFingerTips_FingerOffsets(const USGSenseGlovePose* SenseGlovePose,
|
||||
const TArray<FVector>& FingerOffsets);
|
||||
static TArray<FVector> CalculateFingertips(const USGSenseGlovePose* SenseGlovePose,
|
||||
const TArray<FVector>& FingerOffsets);
|
||||
|
||||
/**
|
||||
* Returns true if this glove pose equals another.
|
||||
@@ -187,4 +178,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Pose")
|
||||
static FString SGSerialize(const USGSenseGlovePose* SenseGlovePose);
|
||||
};
|
||||
};
|
||||
+14
-14
@@ -106,6 +106,19 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static TArray<FSGFloatArray> GetSensorAngles(const USGSenseGloveSensorData* SenseGloveSensorData);
|
||||
|
||||
/**
|
||||
* Get the glove angles of a specific finger segment.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Sensor Angles",
|
||||
Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static TArray<float> GetSensorAngles_F(const USGSenseGloveSensorData* SenseGloveSensorData, ESGFinger Finger);
|
||||
|
||||
/**
|
||||
* Returns all glove angles in a sequence, without splitting them per finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static TArray<float> GetAngleSequence(const USGSenseGloveSensorData* SenseGloveSensorData);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -132,19 +145,6 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static bool IsImuParsed(const USGSenseGloveSensorData* SenseGloveSensorData);
|
||||
|
||||
/**
|
||||
* Get the glove angles of a specific finger segment.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Get Sensor Angles",
|
||||
Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static TArray<float> GetSensorAngles_F(const USGSenseGloveSensorData* SenseGloveSensorData, ESGFinger Finger);
|
||||
|
||||
/**
|
||||
* Returns all glove angles in a sequence, without splitting them per finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static TArray<float> GetAngleSequence(const USGSenseGloveSensorData* SenseGloveSensorData);
|
||||
|
||||
/**
|
||||
* Returns true if the values of both data are equal.
|
||||
*/
|
||||
@@ -162,4 +162,4 @@ public:
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
|
||||
static FString SGSerialize(const USGSenseGloveSensorData* SenseGloveSensorData);
|
||||
};
|
||||
};
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Internal class that acts as a sort of 'in between' handProfile. This class
|
||||
* converts SG Dk1 Angles into 'normalized data' - between 0 .. 1.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGSenseGloveSensorNormalizerKismetLibrary.generated.h"
|
||||
|
||||
class USGSenseGloveSensorNormalizer;
|
||||
|
||||
/**
|
||||
* Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact
|
||||
* feedback in the front strap.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveSenseGloveSensorNormalizerKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGSenseGloveSensorNormalizerKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveSensorNormalizer* MakeSenseGloveSensorNormalizer(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Creates a new SenseGlove Sensor Normalizer based off the device's sensor angles.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Normalizer",
|
||||
Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSenseGloveSensorNormalizer* MakeSenseGloveSensorNormalizer_bRH(
|
||||
UObject* WorldContextObject,
|
||||
bool bRightHanded);
|
||||
|
||||
/**
|
||||
* Normalize a finger's flexion, based on the total flexion of the exoskeleton.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer")
|
||||
static float NormalizeFlexion(const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer,
|
||||
int32 Finger, float SumFlexionAngles);
|
||||
|
||||
/**
|
||||
* Normalize a finger's abduction, based on the total abduction of the exoskeleton.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer")
|
||||
static float NormalizeAbduction(const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer,
|
||||
int32 Finger, float SumAbductionAngles);
|
||||
};
|
||||
@@ -141,4 +141,4 @@ public:
|
||||
UObject* WorldContextObject,
|
||||
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, bool bRightHanded,
|
||||
const FString& CustomId);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,141 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 script to normalize any set of floating point values by looking at their
|
||||
* minimum and maximum values. Used for automagical calibration.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGSensorNormalizationKismetLibrary.generated.h"
|
||||
|
||||
class USGSensorNormalization;
|
||||
|
||||
/**
|
||||
* Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact
|
||||
* feedback in the front strap.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveSensorNormalizationKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGSensorNormalizationKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorNormalization* MakeSensorNormalization(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of SensorNormalization.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Sensor Normalization",
|
||||
Category="SenseGlove | Core | Util | Sensor Normalization", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorNormalization* MakeSensorNormalization_MR(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<float>& MovementRanges);
|
||||
|
||||
/**
|
||||
* If true, the normalization collection is active. If false, we're no longer collecting min / max values.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static bool CollectsNormalization(const USGSensorNormalization* SensorNormalization);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static void SetCollectNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization,
|
||||
bool bCollectNormalization);
|
||||
|
||||
/**
|
||||
* The amount of items in this collector Useful for FOR loops.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static int32 GetLength(const USGSensorNormalization* SensorNormalization);
|
||||
|
||||
/**
|
||||
* The amount of values that have moved the appropriate amount.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static int32 GetMoveCount(const USGSensorNormalization* SensorNormalization);
|
||||
|
||||
/**
|
||||
* Returns true if all sensors are allowed to move.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static bool AllSensorsMoving(const USGSensorNormalization* SensorNormalization);
|
||||
|
||||
/**
|
||||
* Reset the normalization of values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static void ResetNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static void UpdateNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization,
|
||||
float Value, int32 Index);
|
||||
|
||||
/**
|
||||
* Normalize a value on a specific index, and update Normalization while you're at it.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static float NormalizeValue(UPARAM(ref) USGSensorNormalization* SensorNormalization,
|
||||
float Value, int32 Index);
|
||||
|
||||
/**
|
||||
* Update and Normalize a set of values, provided this is the same length.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static TArray<float> NormalizeValues(UPARAM(ref) USGSensorNormalization* SensorNormalization,
|
||||
const TArray<float>& Values);
|
||||
|
||||
/**
|
||||
* Returns true if a sensor on this index has moved enough.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static bool MovedEnough(const USGSensorNormalization* SensorNormalization, int32 Index);
|
||||
|
||||
/**
|
||||
* Turn a value from 0 .. 1 back into [minValue ... maxValue] range for the Nova Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization")
|
||||
static float Denormalize(const USGSensorNormalization* SensorNormalization,
|
||||
float Value01, int32 Index, float FallbackValue = 1.0f);
|
||||
};
|
||||
@@ -1,153 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGSensorRangeKismetLibrary.generated.h"
|
||||
|
||||
class USGSensorRange;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveSensorRangeKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGSensorRangeKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a new instance of a SensorRange with values at 0, 0.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorRange* MakeSensorRange(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new SensorRange with predefined Min/Max values.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Sensor Range",
|
||||
Category="SenseGlove | Core | Calibration | Sensor Range", meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorRange* MakeSensorRange_MV_MV(
|
||||
UObject* WorldContextObject, const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues);
|
||||
|
||||
/**
|
||||
* Generates a Sensor Range where minimum values are float.MaxValue and maximum values are float.MinValue.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorRange* ForCalibration(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Convert a serialized SensorRange back into the appropriate class.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGSensorRange* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
|
||||
|
||||
/**
|
||||
* Evaluate maxValues so that it contains the highest x, y, and z values between currentValues and maxValues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void CheckMax(const FVector CurrentValues, FVector& OutMaxValues);
|
||||
|
||||
/**
|
||||
* Evaluate minValues so that it contains the lowest x, y, and z values between currentValues and minValues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void CheckMin(const FVector& CurrentValues, FVector& OutMinValues);
|
||||
|
||||
/**
|
||||
* Access the lowest values values of this range.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static TArray<FVector> GetMinValues(const USGSensorRange* SensorRange);
|
||||
|
||||
/**
|
||||
* Set the lowest values values of this range.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void SetMinValues(UPARAM(ref) USGSensorRange* SensorRange, const TArray<FVector>& Values);
|
||||
|
||||
/**
|
||||
* Access the highest values values of this range.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static TArray<FVector> GetMaxValues(const USGSensorRange* SensorRange);
|
||||
|
||||
/**
|
||||
* Set the highest values values of this range.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void SetMaxValues(UPARAM(ref) USGSensorRange* SensorRange, const TArray<FVector>& Values);
|
||||
|
||||
/**
|
||||
* Access the difference between min and max values.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static TArray<FVector> GetRange(const USGSensorRange* SensorRange);
|
||||
|
||||
/**
|
||||
* Update the Range based on the current MinValues and MaxValues.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void UpdateRange(UPARAM(ref) USGSensorRange* SensorRange);
|
||||
|
||||
/**
|
||||
* In otherValues are greater/smaller than this current range, update them.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static void CheckForExtremes(UPARAM(ref) USGSensorRange* SensorRange, const TArray<FVector>& OtherValues);
|
||||
|
||||
/**
|
||||
* Report the Range value of this SensorRange, separated by a comma.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static FString RangeString(const USGSensorRange* SensorRange, bool bYOnly = true);
|
||||
|
||||
/**
|
||||
* Convert this SensorRange into a string rotation [min ... max].
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static FString ToString(const USGSensorRange* SensorRange, bool bYOnly = true);
|
||||
|
||||
/**
|
||||
* Serialize this SensorRange into a string representation, that can be deserialized later.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Calibration | Sensor Range")
|
||||
static FString SGSerialize(const USGSensorRange* SensorRange);
|
||||
};
|
||||
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Internal class to hold 'Threshold Commands' for specific fingers. Can be sent
|
||||
* to a Device, or used internally.
|
||||
* Threshold Commands tell our device "When your sensor data is higher than this
|
||||
* threshold, lock FFB. Otherwise, turn it back off".
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGThresholdCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGThresholdCommand;
|
||||
|
||||
/**
|
||||
* Internal class to hold 'Threshold Commands' for specific fingers. Can be sent to a Device, or used internally.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveThresholdCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGThresholdCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* The default constructor.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThresholdCommand* MakeThresholdCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new instance of ThresholdCommand.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Threshold Command",
|
||||
Category="SenseGlove | Core | Haptics | Threshold Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGThresholdCommand* MakeThresholdCommand_AF_TV(
|
||||
UObject* WorldContextObject,
|
||||
const TArray<bool>& AffectedFingers, const TArray<float>& ThresholdValues);
|
||||
|
||||
/**
|
||||
* Retrieve the threshold of a particular finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static float GetThreshold(const USGThresholdCommand* ThresholdCommand, int32 Finger);
|
||||
|
||||
/**
|
||||
* Activates the threshold for a finger at a particular value.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static void SetThreshold(UPARAM(ref) USGThresholdCommand* ThresholdCommand, int32 Finger, float ThresholdValue);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static TArray<float> GetThresholds(const USGThresholdCommand* ThresholdCommand);
|
||||
|
||||
/**
|
||||
* Activates the threshold for a finger at a particular value.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static void SetThresholds(UPARAM(ref) USGThresholdCommand* ThresholdCommand,
|
||||
const TArray<bool>& AffectedFingers, const TArray<float>& ThresholdValues);
|
||||
|
||||
/**
|
||||
* If true, the threshold on a finger should be active.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static bool GetFingerActive(const USGThresholdCommand* ThresholdCommand, int32 Finger);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static TArray<bool> GetActiveFingers(const USGThresholdCommand* ThresholdCommand);
|
||||
|
||||
/**
|
||||
* Deactivates Threshold Mode for a particular finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static void ClearThreshold(UPARAM(ref) USGThresholdCommand* ThresholdCommand, int32 Finger);
|
||||
|
||||
/**
|
||||
* Disables Threshold mode for all fingers. Clears the ActiveFingers, but keeps the Thresholds value for now, in
|
||||
* case you want to re-apply them later.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static void ClearThresholds(UPARAM(ref) USGThresholdCommand* ThresholdCommand);
|
||||
|
||||
/**
|
||||
* Returns true if both values are exactly equal.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static bool Equals(const USGThresholdCommand* A, const USGThresholdCommand* B);
|
||||
|
||||
/**
|
||||
* Print the contents of this Threshold Command. If inactive, a '-' is shown.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command")
|
||||
static FString ToString(const USGThresholdCommand* ThresholdCommand);
|
||||
};
|
||||
@@ -1,106 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Thumper command.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGThumperCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGThumperCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveThumperCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGThumperCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Thumper Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* MakeThumperCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new Thumper Command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Thumper Command",
|
||||
Category="SenseGlove | Core | Haptics | Thumper Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* MakeThumperCommand_M(UObject* WorldContextObject, int32 Magnitude);
|
||||
|
||||
/**
|
||||
* A command that turns off all force feedback on the Sense Glove.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Thumper Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* Off(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Thumper intensity, a level between 0 and 100.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Thumper Command")
|
||||
static int32 GetMagnitude(const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Thumper Command")
|
||||
static void SetMagnitude(USGThumperCommand* ThumperCommand, int32 Magnitude);
|
||||
|
||||
/**
|
||||
* Duplicate the Thumper command.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Thumper Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* Copy(UObject* WorldContextObject, const USGThumperCommand* ThumperCommand);
|
||||
|
||||
/**
|
||||
* Merge two ThumperCommands into one.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Thumper Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGThumperCommand* Merge(UObject* WorldContextObject,
|
||||
const USGThumperCommand* A, const USGThumperCommand* B);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Thumper Command")
|
||||
static bool Equals(const USGThumperCommand* A, const USGThumperCommand* B);
|
||||
};
|
||||
@@ -1,147 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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
|
||||
*
|
||||
* Buzz Motor with timing parameters.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGTimedBuzzCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGBuzzCommand;
|
||||
class USGTimedBuzzCommand;
|
||||
|
||||
/**
|
||||
* Buzz motor commands that is meant to stop after a few milliseconds.
|
||||
*
|
||||
* @remarks Intended use; this.levels indicates the actual command.
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveTimedBuzzCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGTimedBuzzCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Empty constructor for inheritance.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedBuzzCommand* MakeTimedBuzzCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new TimeBuzzCommand for a single finger.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Make Timed Buzz Command",
|
||||
Category="SenseGlove | Core | Haptics | Timed Buzz Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedBuzzCommand* MakeTimedBuzzCommand_F_M_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
ESGFinger Finger, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new buzz motor command that expires after timing_ms.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, DisplayName="Make Timed Buzz Command",
|
||||
Category="SenseGlove | Core | Haptics | Timed Buzz Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedBuzzCommand* MakeTimedBuzzCommand_BC_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
const USGBuzzCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Copy this Buzz Command's values into a new object.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* Copy(UObject* WorldContextObject, const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* Merges this base command with another command.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* Merge(UObject* WorldContextObject, const USGTimedBuzzCommand* A, const USGBuzzCommand* B);
|
||||
|
||||
/**
|
||||
* Access the base command, which indicates the buzz levels to keep untill time elapses.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGBuzzCommand* GetBaseCommand(UObject* WorldContextObject,
|
||||
const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* The total time [milliseconds] each buzz motor should be vibrating for.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static float GetDuration(const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* The time elapsed since the command was sent [milliseconds].
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static float GetElapsedTime(const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* Check if this timed command's timing has elapsed.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static bool HasTimeElapsed(const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* Represents how far this effect is in its playtime; [0...1], where 0 means at the start, and 1 means at the end.
|
||||
*
|
||||
* @param bClamp01 Optional parameter; ensures this value is always between 0 and 1.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static float NormalizedTime(const USGTimedBuzzCommand* TimedBuzzCommand, bool bClamp01 = true);
|
||||
|
||||
/**
|
||||
* Reset the timings of this BuzzCommand, allowing us to re-use it.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static void ResetTiming(UPARAM(ref) USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
|
||||
/**
|
||||
* Update the elapsed time to check if the buzz motors should stop.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static void UpdateTiming(UPARAM(ref) USGTimedBuzzCommand* TimedBuzzCommand, float DeltaSeconds);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Buzz Command")
|
||||
static FString ToString(const USGTimedBuzzCommand* TimedBuzzCommand);
|
||||
};
|
||||
@@ -1,127 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
|
||||
#include "SGTimedThumpCommandKismetLibrary.generated.h"
|
||||
|
||||
class USGThumperCommand;
|
||||
class USGTimedThumpCommand;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(meta=(ScriptName = "SesneGloveTimedThumpCommandKismetLibrary"))
|
||||
class SENSEGLOVECOREKISMET_API USGTimedThumpCommandKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Internal, empty, for extended classes.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Timed Thump Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedThumpCommand* MakeTimedThumpCommand(UObject* WorldContextObject);
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Timed Thump Command",
|
||||
Category="SenseGlove | Core | Haptics | Timed Thump Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedThumpCommand* MakeTimedThumpCommand_M_DS_STS(
|
||||
UObject* WorldContextObject, int32 Magnitude, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Create a new Timed Thumper Command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Make Timed Thump Command",
|
||||
Category="SenseGlove | Core | Haptics | Timed Thump Command", meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedThumpCommand* MakeTimedThumpCommand_BC_DS_STS(
|
||||
UObject* WorldContextObject,
|
||||
const USGThumperCommand* BaseCommand, float DurationSeconds, float StartTimeSeconds = 0.0f);
|
||||
|
||||
/**
|
||||
* Magnitude in %.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static int32 GetMagnitude(const USGTimedThumpCommand* TimedThumpCommand);
|
||||
|
||||
/**
|
||||
* Duration in seconds.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static float GetDuration(const USGTimedThumpCommand* TimedThumpCommand);
|
||||
|
||||
/**
|
||||
* The elapsed time so far.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static float GetElapsedTime(const USGTimedThumpCommand* TimedThumpCommand);
|
||||
|
||||
/**
|
||||
* Returns true if the timed command has elapsed.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static bool HasTimeElapsed(const USGTimedThumpCommand* TimedThumpCommand);
|
||||
|
||||
/**
|
||||
* Copy the parameters of this ThumperCommand into another instance.
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command",
|
||||
meta=(WorldContext="WorldContextObject"))
|
||||
static USGTimedThumpCommand* Copy(
|
||||
UObject* WorldContextObject, const USGTimedThumpCommand* TimedThumpCommand, bool bCopyElapsed = false);
|
||||
|
||||
/**
|
||||
* Update the timing on this Thumper Command.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static void Update(UPARAM(ref) USGTimedThumpCommand* TimedThumpCommand, float DeltaSeconds);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static bool Equals(const USGTimedThumpCommand* A, const USGTimedThumpCommand* B);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Timed Thump Command")
|
||||
static FString ToString(const USGTimedThumpCommand* TimedThumpCommand);
|
||||
};
|
||||
@@ -129,7 +129,8 @@ public:
|
||||
bool bRightHanded, ESGFinger ToFinger, FVector& OutIPosition, FRotator& OutIRotation);
|
||||
|
||||
/**
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount offset to get the glove location.
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount
|
||||
* offset to get the glove location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
@@ -138,7 +139,8 @@ public:
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount offset to get the glove location.
|
||||
* Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount
|
||||
* offset to get the glove location.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
@@ -206,20 +208,6 @@ public:
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetNovaToWristRotationOffset_FRotator();
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO(
|
||||
bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO(
|
||||
bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -334,6 +322,104 @@ public:
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNovaPico2ToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNovaQuestProToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNovaQuestProToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNovaQuestProToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNovaQuestProToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNovaQuestProToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNovaQuestProToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNovaViveFocus3ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNovaViveFocus3ToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNovaViveFocus3ToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNovaViveFocus3ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNovaViveFocus3ToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get To Attach ",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNovaViveFocus3ToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO(
|
||||
bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO(
|
||||
bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Retrieves Offsets for a particular device.
|
||||
*/
|
||||
@@ -350,9 +436,242 @@ public:
|
||||
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNova2ToWristPositionOffset();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 To Wrist Rotation Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNova2ToWristRotationOffset_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 To Wrist Rotation Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNova2ToWristRotationOffset_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNova2ToWristPositionOffset();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 To Wrist Rotation Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNova2ToWristRotationOffset_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 To Wrist Rotation Offset",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNova2ToWristRotationOffset_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNova2Quest2ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 2 To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNova2Quest2ToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 2 To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNova2Quest2ToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNova2Quest2ToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 2 To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNova2Quest2ToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 2 To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNova2Quest2ToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNova2QuestProToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest Pro To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNova2QuestProToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest Pro To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNova2QuestProToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNova2QuestProToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest Pro To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNova2QuestProToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest Pro To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNova2QuestProToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNova2ViveTrackerToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 VIVE Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNova2ViveTrackerToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 VIVE Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNova2ViveTrackerToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNova2ViveTrackerToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 VIVE Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNova2ViveTrackerToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 VIVE Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNova2ViveTrackerToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetRightNova2ViveWristTrackerToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 VIVE Wrist Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetRightNova2ViveWristTrackerToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 VIVE Wrist Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetRightNova2ViveWristTrackerToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FVector GetLeftNova2ViveWristTrackerToAttachPosition();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 VIVE Wrist Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FQuat GetLeftNova2ViveWristTrackerToAttachRotation_FQuat();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 VIVE Wrist Tracker To Attach Rotation",
|
||||
Category="SenseGlove | Core | Tracking")
|
||||
static FRotator GetLeftNova2ViveWristTrackerToAttachRotation_FRotator();
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNova2GloveWristOffset_bRH_HW_OutPO_FQuat_OutRO(
|
||||
bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Returns the Offsets that will bring us from the Nova origin to the wrist position.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNova2GloveWristOffset_bRH_HW_OutPO_FRotator_OutRO(
|
||||
bool bRightHanded, const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
* Retrieves Offsets for a particular device.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Tracker Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FQuat_OutRO(
|
||||
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FQuat& OutRotationOffset);
|
||||
/**
|
||||
* Retrieves Offsets for a particular device.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Tracker Offset", Category="SenseGlove | Core | Tracking")
|
||||
static void GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FRotator_OutRO(
|
||||
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
|
||||
const FString& HardwareVersion,
|
||||
FVector& OutPositionOffset, FRotator& OutRotationOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
|
||||
static FString ToString(ESGPositionalTrackingHardware Hardware);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user