2023-03-21 13:47:11 +01:00
|
|
|
/**
|
|
|
|
|
* @file
|
|
|
|
|
*
|
|
|
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
|
|
|
*
|
|
|
|
|
* @section LICENSE
|
|
|
|
|
*
|
|
|
|
|
* (The MIT License)
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2020 - 2023 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 "SGSettingsKismet/SGSettingsKismetLibrary.h"
|
|
|
|
|
|
|
|
|
|
#include "SGSettings/SGSettings.h"
|
|
|
|
|
|
2023-03-21 14:22:06 +01:00
|
|
|
USGSettings* USGSettingsKismetLibrary::GetInstance()
|
|
|
|
|
{
|
|
|
|
|
return USGSettings::GetInstance();
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
ESGPositionalTrackingHardware USGSettingsKismetLibrary::GetTrackingHardware(const USGSettings* Settings)
|
2023-03-21 13:47:11 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
return Settings->GetTrackingHardware();
|
2023-03-21 13:47:11 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
void USGSettingsKismetLibrary::SetTrackingHardware(
|
|
|
|
|
USGSettings* Settings, const ESGPositionalTrackingHardware InTrackingHardware)
|
2023-03-21 13:47:11 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
Settings->SetTrackingHardware(InTrackingHardware);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
const FVector& USGSettingsKismetLibrary::GetTrackingHardwareLocationOffsetLeftHand(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
return Settings->GetTrackingHardwareLocationOffsetLeftHand();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
void USGSettingsKismetLibrary::SetTrackingHardwareLocationOffsetLeftHand(
|
|
|
|
|
USGSettings* Settings, const FVector& InTrackingHardwareLocationOffsetLeftHand)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
Settings->SetTrackingHardwareLocationOffsetLeftHand(InTrackingHardwareLocationOffsetLeftHand);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
const FVector& USGSettingsKismetLibrary::GetTrackingHardwareLocationOffsetRightHand(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
return Settings->GetTrackingHardwareLocationOffsetRightHand();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
void USGSettingsKismetLibrary::SetTrackingHardwareLocationOffsetRightHand(
|
|
|
|
|
USGSettings* Settings, const FVector& InTrackingHardwareLocationOffsetRightHand)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
Settings->SetTrackingHardwareLocationOffsetRightHand(InTrackingHardwareLocationOffsetRightHand);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
const FRotator& USGSettingsKismetLibrary::GetTrackingHardwareRotationOffsetLeftHand(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
return Settings->GetTrackingHardwareRotationOffsetLeftHand();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
void USGSettingsKismetLibrary::SetTrackingHardwareRotationOffsetLeftHand(
|
|
|
|
|
USGSettings* Settings, const FRotator& InTrackingHardwareRotationOffsetLeftHand)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
Settings->SetTrackingHardwareRotationOffsetLeftHand(InTrackingHardwareRotationOffsetLeftHand);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
const FRotator& USGSettingsKismetLibrary::GetTrackingHardwareRotationOffsetRightHand(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
return Settings->GetTrackingHardwareRotationOffsetRightHand();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-23 16:48:22 +01:00
|
|
|
void USGSettingsKismetLibrary::SetTrackingHardwareRotationOffsetRightHand(
|
|
|
|
|
USGSettings* Settings, const FRotator& InTrackingHardwareRotationOffsetRightHand)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-03-23 16:48:22 +01:00
|
|
|
Settings->SetTrackingHardwareRotationOffsetRightHand(InTrackingHardwareRotationOffsetRightHand);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-04-25 10:25:30 +02:00
|
|
|
bool USGSettingsKismetLibrary::GetDrawWristTrackerDebugGizmo(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-04-25 10:25:30 +02:00
|
|
|
return Settings->GetDrawWristTrackerDebugGizmo();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-04-25 10:25:30 +02:00
|
|
|
void USGSettingsKismetLibrary::SetDrawWristTrackerDebugGizmo(
|
|
|
|
|
USGSettings* Settings, const bool bInDrawWristTrackerDebugGizmo)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-04-25 10:25:30 +02:00
|
|
|
Settings->SetDrawWristTrackerDebugGizmo(bInDrawWristTrackerDebugGizmo);
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-04-25 10:25:30 +02:00
|
|
|
const FSGDebugGizmoSettings& USGSettingsKismetLibrary::GetWristTrackerDebugGizmoSettings(const USGSettings* Settings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-04-25 10:25:30 +02:00
|
|
|
return Settings->GetWristTrackerDebugGizmoSettings();
|
2023-03-21 18:31:55 +01:00
|
|
|
}
|
|
|
|
|
|
2023-04-25 10:25:30 +02:00
|
|
|
void USGSettingsKismetLibrary::SetWristTrackerDebugGizmoSettings(USGSettings* Settings,
|
|
|
|
|
const FSGDebugGizmoSettings& InWristTrackerDebugGizmoSettings)
|
2023-03-21 18:31:55 +01:00
|
|
|
{
|
2023-04-25 10:25:30 +02:00
|
|
|
Settings->SetWristTrackerDebugGizmoSettings(InWristTrackerDebugGizmoSettings);
|
2023-03-21 13:47:11 +01:00
|
|
|
}
|