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

278 lines
9.4 KiB
C++

/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2022 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCoreKismet/SGTrackingKismetLibrary.h"
#include "SGCore/SGTracking.h"
void USGTrackingKismetLibrary::CalculateLocation_TP_FQuat_TR_PO_FQuat_RO_OutNP_FQuat_OutNR(
const FVector& TrackedPosition, const FQuat& TrackedRotation,
const FVector& PositionOffset, const FQuat& RotationOffset,
FVector& OutNewPosition, FQuat& OutNewRotation)
{
return FSGTracking::CalculateLocation(TrackedPosition, TrackedRotation, PositionOffset, RotationOffset,
OutNewPosition, OutNewRotation);
}
void USGTrackingKismetLibrary::CalculateLocation_TP_FRotator_TR_PO_FRotator_RO_OutNP_FRotator_OutNR(
const FVector& TrackedPosition, const FRotator& TrackedRotation,
const FVector& PositionOffset, const FRotator& RotationOffset,
FVector& OutNewPosition, FRotator& OutNewRotation)
{
return FSGTracking::CalculateLocation(TrackedPosition, TrackedRotation, PositionOffset, RotationOffset,
OutNewPosition, OutNewRotation);
}
TArray<FVector> USGTrackingKismetLibrary::GetSenseGloveFingerToGlovePositionOrigin()
{
return FSGTracking::GetSenseGloveFingerToGlovePositionOrigin();
}
TArray<FQuat> USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFQuat()
{
return FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ();
}
TArray<FRotator> USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFRotator()
{
return FSGTracking::GetSenseGloveFingerToGloveRotationOrigin();
}
FVector USGTrackingKismetLibrary::GetSenseGloveWristPositionOffset()
{
return FSGTracking::GetSenseGloveWristPositionOffset();
}
FQuat USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FQuat()
{
return FSGTracking::GetSenseGloveWristRotationOffsetQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FRotator()
{
return FSGTracking::GetSenseGloveWristRotationOffset();
}
void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRH_TF_OutIP_FQuat_OutIR(
const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation)
{
return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation);
}
void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRH_TF_OutIP_FRotator_OutIR(
const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FRotator& OutIRotation)
{
return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation);
}
void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FQuat_OutRO(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
return FSGTracking::GetSenseGloveTrackerMountOffset(Hardware, bRightHanded,
OutPositionOffset, OutRotationOffset);
}
void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FRotator_OutRO(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
return FSGTracking::GetSenseGloveTrackerMountOffset(Hardware, bRightHanded,
OutPositionOffset, OutRotationOffset);
}
FVector USGTrackingKismetLibrary::GetSenseGloveViveToAttachPosition()
{
return FSGTracking::GetSenseGloveViveToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FQuat()
{
return FSGTracking::GetSenseGloveViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FRotator()
{
return FSGTracking::GetSenseGloveViveToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachPosition()
{
return FSGTracking::GetSenseGloveOculusTouchToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FQuat()
{
return FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FRotator()
{
return FSGTracking::GetSenseGloveOculusTouchToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetNovaToWristPositionOffset()
{
return FSGTracking::GetNovaToWristPositionOffset();
}
FQuat USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FQuat()
{
return FSGTracking::GetNovaToWristRotationOffsetQ();
}
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();
}
FQuat USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaViveToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetLeftNovaViveToAttachPosition()
{
return FSGTracking::GetLeftNovaViveToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaViveToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachPosition()
{
return FSGTracking::GetRightNovaQuest2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaQuest2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaQuest2ToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachPosition()
{
return FSGTracking::GetLeftNovaQuest2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaQuest2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaQuest2ToAttachRotation();
}
FVector USGTrackingKismetLibrary::GetRightNovaPico2ToAttachPosition()
{
return FSGTracking::GetRightNovaPico2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaPico2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaPico2ToAttachRotation();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaPico2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaPico2ToAttachRotation();
}
void USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FQuat_OutRO(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset);
}
void
USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FRotator_OutRO(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset);
}
FString USGTrackingKismetLibrary::ToString(const ESGPositionalTrackingHardware Hardware)
{
return FSGTracking::ToString(Hardware);
}