add FRotator overloads for every method that accepts or returns FQuat and some other bug fixes

This commit is contained in:
Mamadou Babaei
2022-11-11 11:41:02 +01:00
parent fc84dd2b0c
commit 1db49d10e5
56 changed files with 2744 additions and 269 deletions
@@ -143,6 +143,22 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
}
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions,
const TArray<FRotator>& StartRotations)
{
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
&StartPositionsContainer, &StartRotationsContainer);
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
}
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions,
@@ -161,6 +177,24 @@ USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bo
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
}
USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded,
const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions,
const TArray<FRotator>& StartRotations)
{
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
FSGIC_TArray_TArray_float LengthsContainer{
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
&StartPositionsContainer, &StartRotationsContainer);
return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl));
}
USGBasicHandModel* USGBasicHandModel::Default(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
@@ -273,7 +307,28 @@ USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArra
Pimpl->SyncUProperties();
}
USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
FSGIC_TArray_TArray_float LengthsContainer{Lengths};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
&StartPositionsContainer, &StartRotationsContainer);
Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl);
Pimpl->SyncUProperties();
}
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -296,6 +351,29 @@ USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArr
Pimpl->SyncUProperties();
}
USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer;
FSGIC_TArray_TArray_float LengthsContainer{
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(Lengths)
};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations(
&OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer,
&StartPositionsContainer, &StartRotationsContainer);
Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl);
Pimpl->SyncUProperties();
}
USGBasicHandModel::USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -432,7 +510,7 @@ void USGBasicHandModel::SetStartJointPosition(const uint8 Finger, const FVector&
Pimpl->SyncUProperties();
}
TArray<FQuat> USGBasicHandModel::GetStartJointRotations() const
TArray<FQuat> USGBasicHandModel::GetStartJointRotationsQ() const
{
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
@@ -440,6 +518,14 @@ TArray<FQuat> USGBasicHandModel::GetStartJointRotations() const
return MoveTemp(OutRotationsContainer.Array);
}
TArray<FRotator> USGBasicHandModel::GetStartJointRotations() const
{
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
@@ -464,7 +550,7 @@ void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFi
Pimpl->SyncUProperties();
}
FQuat USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
@@ -476,6 +562,18 @@ FQuat USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FQuat OutRotationContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
return OutRotationContainer.Quat.Rotator();
}
void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFinger Finger)
{
Pimpl->SyncImplObject();
@@ -488,6 +586,18 @@ void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFing
Pimpl->SyncUProperties();
}
void USGBasicHandModel::SetJointRotation(const FRotator& NewRotation, const ESGFinger Finger)
{
Pimpl->SyncImplObject();
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
FSGIC_FQuat NewRotationContainer{NewRotation.Quaternion()};
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation(&InstanceContainer, &NewRotationContainer, &FingerContainer);
Pimpl->SyncUProperties();
}
TArray<float> USGBasicHandModel::GetTotalLengths() const
{
FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()};
@@ -151,6 +151,21 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
@@ -169,6 +184,24 @@ USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl));
}
USGHandInterpolator* USGHandInterpolator::Default(UObject* Outer, const bool bRightHanded)
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
@@ -298,6 +331,27 @@ USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet
Pimpl->SyncUProperties();
}
USGHandInterpolator::USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
const FRotator& CmcStartRotation)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl>(JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
Pimpl->SyncUProperties();
}
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FQuat& CmcStartRotation)
:
@@ -322,6 +376,30 @@ USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>&
Pimpl->SyncUProperties();
}
USGHandInterpolator::USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FRotator& CmcStartRotation)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer;
FSGIC_TArray_TArray_FSGInterpolationSetImpl JointInterpolationsContainer{
FSGArrayUtils::ToImplType<
USGInterpolationSet, FSGInterpolationSetImpl,
&USGInterpolationSet::ToInterpolationSetImpl,
FSGInterpolationSetArray, &FSGInterpolationSetArray::InterpolationSetArray>(
JointInterpolations)};
FSGIC_FQuat CmcStartRotationContainer{CmcStartRotation.Quaternion()};
SGCoreImpl_FSGHandInterpolatorImpl_ctor_JointInterpolations_CmcStartRotation(
&OutHandInterpolatorImplContainer, &JointInterpolationsContainer, &CmcStartRotationContainer);
Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl);
Pimpl->SyncUProperties();
}
USGHandInterpolator::USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -365,7 +443,7 @@ TArray<TArray<USGInterpolationSet*>> USGHandInterpolator::GetJointInterpolations
return JointInterpolations;
}
FQuat USGHandInterpolator::GetCmcStartRotation() const
FQuat USGHandInterpolator::GetCmcStartRotationQ() const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FQuat OutRotationContainer;
@@ -373,6 +451,14 @@ FQuat USGHandInterpolator::GetCmcStartRotation() const
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGHandInterpolator::GetCmcStartRotation() const
{
FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()};
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGHandInterpolatorImpl_GetCmcStartRotation(&InstanceContainer, &OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
float USGHandInterpolator::CalculateAngle(const ESGFinger Finger, const int32 Movement, const float Value) const
{
Pimpl->SyncImplObject();
@@ -36,6 +36,7 @@
#include "SGCore/SGHandPose.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGCoreImpl/SGHandPoseImpl.h"
@@ -114,6 +115,23 @@ USGHandPose* USGHandPose::NewHandPose(
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
USGHandPose* USGHandPose::NewHandPose(
UObject* Outer,
const bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles)
{
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &HandAnglesContainer);
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
USGHandPose* USGHandPose::NewHandPose(
UObject* Outer,
const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
@@ -136,6 +154,29 @@ USGHandPose* USGHandPose::NewHandPose(
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
USGHandPose* USGHandPose::NewHandPose(
UObject* Outer,
const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles)
{
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
};
FSGIC_TArray_TArray_FVector HandAnglesContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
};
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &HandAnglesContainer);
return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl));
}
USGHandPose* USGHandPose::Deserialize(UObject* Outer, const FString& SerializedString)
{
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
@@ -256,8 +297,9 @@ USGHandPose::USGHandPose()
Pimpl->SyncUProperties();
}
USGHandPose::USGHandPose(const bool bRightHanded, const TArray<TArray<FVector>>& JointPositions,
const TArray<TArray<FQuat>>& JointRotations, const TArray<TArray<FVector>>& HandAngles)
USGHandPose::USGHandPose(const bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
@@ -277,8 +319,31 @@ USGHandPose::USGHandPose(const bool bRightHanded, const TArray<TArray<FVector>>&
Pimpl->SyncUProperties();
}
USGHandPose::USGHandPose(const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations, const TArray<FSGVectorArray>& HandAngles)
USGHandPose::USGHandPose(const bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles};
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &HandAnglesContainer);
Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl);
Pimpl->SyncUProperties();
}
USGHandPose::USGHandPose(const bool bRightHanded, const
TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
@@ -304,6 +369,34 @@ USGHandPose::USGHandPose(const bool bRightHanded, const TArray<FSGVectorArray>&
Pimpl->SyncUProperties();
}
USGHandPose::USGHandPose(const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGHandPoseImpl OutHandPoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
};
FSGIC_TArray_TArray_FVector HandAnglesContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(HandAngles)
};
SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles(
&OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &HandAnglesContainer);
Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl);
Pimpl->SyncUProperties();
}
USGHandPose::USGHandPose(const FSGHandPoseImpl& HandPoseImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -346,7 +439,7 @@ TArray<TArray<FVector>> USGHandPose::GetJointPositions() const
return MoveTemp(OutPositionsContainer.Array);
}
TArray<TArray<FQuat>> USGHandPose::GetJointRotations() const
TArray<TArray<FQuat>> USGHandPose::GetJointRotationsQ() const
{
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
@@ -354,6 +447,14 @@ TArray<TArray<FQuat>> USGHandPose::GetJointRotations() const
return MoveTemp(OutRotationsContainer.Array);
}
TArray<TArray<FRotator>> USGHandPose::GetJointRotations() const
{
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
TArray<TArray<FVector>> USGHandPose::GetHandAngles() const
{
FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()};
@@ -349,6 +349,24 @@ bool USGHapticGlove::GetImuRotation(FQuat& OutImu)
return bResult;
}
bool USGHapticGlove::GetImuRotation(FRotator& OutImu)
{
SyncImplObject();
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FQuat OutImuContainer;
const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
SyncUProperties();
if (bResult)
{
OutImu = OutImuContainer.Quat.Rotator();
}
return bResult;
}
bool USGHapticGlove::GetHandPose(
UObject* Outer,
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose)
@@ -628,6 +646,28 @@ void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQ
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGHapticGloveImpl_GetWristLocation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
@@ -651,6 +691,29 @@ void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQ
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
USGHapticGlove::FImpl::FImpl(USGHapticGlove* InOwner)
: Owner(InOwner)
{
@@ -54,14 +54,42 @@ bool FSGJointKinematics::ForwardKinematics(
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
FSGIC_TArray_FVector OutNewPositionsContainer;
FSGIC_TArray_FQuat OutNewRotationsContainer;
return
const bool bResult =
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
&StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer,
&OutNewPositionsContainer, &OutNewRotationsContainer);
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
OutNewRotations = MoveTemp(OutNewRotationsContainer.Array);
return bResult;
}
bool FSGJointKinematics::ForwardKinematics(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
const FVector& StartPosition, const FRotator& StartRotation, const TArray<FVector>& JointLengths,
const TArray<FVector>& JointAngles, TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
{
FSGIC_FVector StartPositionContainer{StartPosition};
FSGIC_FQuat StartRotationContainer{StartRotation.Quaternion()};
FSGIC_TArray_FVector JointLengthsContainer{JointLengths};
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
FSGIC_TArray_FVector OutNewPositionsContainer;
FSGIC_TArray_FQuat OutNewRotationsContainer;
const bool bResult =
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
&StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer,
&OutNewPositionsContainer, &OutNewRotationsContainer);
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array);
return bResult;
}
bool FSGJointKinematics::ForwardKinematics(
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations)
{
FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()};
@@ -69,7 +97,35 @@ bool FSGJointKinematics::ForwardKinematics(
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
FSGIC_TArray_FVector OutNewPositionsContainer;
FSGIC_TArray_FQuat OutNewRotationsContainer;
return
const bool bResult =
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
&ProfileContainer, &FingerContainer, &JointAnglesContainer, &OutNewPositions, &OutNewRotations);
&ProfileContainer, &FingerContainer, &JointAnglesContainer,
&OutNewPositionsContainer, &OutNewRotationsContainer);
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
OutNewRotations = MoveTemp(OutNewRotationsContainer.Array);
return bResult;
}
bool FSGJointKinematics::ForwardKinematics(
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
{
FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()};
FSGIC_ESGFinger FingerContainer{Finger};
FSGIC_TArray_FVector JointAnglesContainer{JointAngles};
FSGIC_TArray_FVector OutNewPositionsContainer;
FSGIC_TArray_FQuat OutNewRotationsContainer;
const bool bResult =
SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
&ProfileContainer, &FingerContainer, &JointAnglesContainer,
&OutNewPositionsContainer, &OutNewRotationsContainer);
OutNewPositions = MoveTemp(OutNewPositionsContainer.Array);
OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array);
return bResult;
}
@@ -247,6 +247,25 @@ void USGNovaGlove::CalculateGloveLocation(const FVector& ReferencePosition, cons
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGNovaGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation(
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer, bRightHanded,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation)
@@ -266,6 +285,25 @@ void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, cons
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGNovaGlove::CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation(
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer, bRightHanded,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
FString USGNovaGlove::ToBytes(const USGThumperCommand* ThumperCommand)
{
FSGIC_FSGThumperCommandImpl ThumperCommandContainer{ThumperCommand->ToThumperCommandImpl()};
@@ -521,6 +559,24 @@ bool USGNovaGlove::GetImuRotation(FQuat& OutImu)
return bResult;
}
bool USGNovaGlove::GetImuRotation(FRotator& OutImu)
{
SyncImplObject();
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
FSGIC_FQuat OutImuContainer;
const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
SyncUProperties();
if (bResult)
{
OutImu = OutImuContainer.Quat.Rotator();
}
return bResult;
}
bool USGNovaGlove::GetHandPose(
UObject* Outer, const USGBasicHandModel* HandModel, const USGNovaGloveHandProfile* Profile,
USGHandPose*& OutHandPose)
@@ -700,6 +756,29 @@ void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FQua
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation) const
@@ -722,6 +801,28 @@ void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQua
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGNovaGloveImpl_GetWristLocation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
FString USGNovaGlove::ToString() const
{
SyncImplObject();
@@ -111,6 +111,20 @@ USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData(
return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl));
}
USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData(
UObject* Outer, const TArray<FVector>& Values, const int32 ParsedValues,
const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
{
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
FSGIC_TArray_FVector ValuesContainer{Values};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
&OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues,
&ImuRotationContainer, bImuParsed, BatteryLevel, bCharging);
return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl));
}
USGNovaGloveSensorData* USGNovaGloveSensorData::Empty(UObject* Outer)
{
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
@@ -176,6 +190,27 @@ USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, co
Pimpl->SyncUProperties();
}
USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray<FVector>& Values, const int32 ParsedValues,
const FRotator& ImuRotation, const bool bImuParsed,
const float BatteryLevel, const bool bCharging)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer;
FSGIC_TArray_FVector ValuesContainer{Values};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
&OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues,
&ImuRotationContainer, bImuParsed, BatteryLevel, bCharging);
Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl);
Pimpl->SyncUProperties();
}
USGNovaGloveSensorData::USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -212,7 +247,7 @@ TArray<FVector> USGNovaGloveSensorData::GetSensorValues() const
return MoveTemp(OutValuesContainer.Array);
}
FQuat USGNovaGloveSensorData::GetImuRotation() const
FQuat USGNovaGloveSensorData::GetImuRotationQ() const
{
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
FSGIC_FQuat OutRotationContainer;
@@ -220,6 +255,14 @@ FQuat USGNovaGloveSensorData::GetImuRotation() const
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGNovaGloveSensorData::GetImuRotation() const
{
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
int32 USGNovaGloveSensorData::GetParsedValues() const
{
FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()};
@@ -0,0 +1,36 @@
/**
* @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 "SGCore/SGRotatorArray.h"
@@ -276,6 +276,28 @@ void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, con
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const bool bRightHanded, const ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_ESGFinger MountedOnContainer{MountedOn};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation(
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
bRightHanded, &MountedOnContainer,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const bool bRightHanded, const ESGFinger MountedOn,
@@ -303,6 +325,33 @@ void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, con
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const bool bRightHanded, const ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_ESGFinger MountedOnContainer{MountedOn};
FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset};
FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation(
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
bRightHanded, &MountedOnContainer,
&GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
USGSenseGlove::USGSenseGlove()
: USGHapticGlove(),
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -520,6 +569,24 @@ bool USGSenseGlove::GetImuRotation(FQuat& OutImu)
return bResult;
}
bool USGSenseGlove::GetImuRotation(FRotator& OutImu)
{
SyncImplObject();
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
FSGIC_FQuat OutImuContainer;
const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer);
SyncUProperties();
if (bResult)
{
OutImu = OutImuContainer.Quat.Rotator();
}
return bResult;
}
bool USGSenseGlove::GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose)
{
SyncImplObject();
@@ -738,6 +805,29 @@ void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQu
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const
@@ -762,6 +852,30 @@ void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQu
OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat);
}
void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_ESGFinger MountedOnContainer{MountedOn};
FSGIC_FVector OutGlovePositionContainer;
FSGIC_FQuat OutGloveRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer, &MountedOnContainer,
&OutGlovePositionContainer, &OutGloveRotationContainer);
OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector);
OutGloveRotation = OutGloveRotationContainer.Quat.Rotator();
}
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation) const
@@ -784,6 +898,28 @@ void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQu
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const FVector& GloveWristPositionOffset,
@@ -811,6 +947,33 @@ void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQu
OutWristRotation = MoveTemp(OutWristRotationContainer.Quat);
}
void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation) const
{
SyncImplObject();
FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()};
FSGIC_FVector ReferencePositionContainer{ReferencePosition};
FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()};
FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware};
FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset};
FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()};
FSGIC_FVector OutWristPositionContainer;
FSGIC_FQuat OutWristRotationContainer;
SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation(
&InstanceContainer,
&ReferencePositionContainer, &ReferenceRotationContainer,
&TrackingHardwareContainer,
&GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer,
&OutWristPositionContainer, &OutWristRotationContainer);
OutWristPosition = MoveTemp(OutWristPositionContainer.Vector);
OutWristRotation = OutWristRotationContainer.Quat.Rotator();
}
FString USGSenseGlove::ToString() const
{
SyncImplObject();
@@ -101,9 +101,9 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer)
}
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion,
int32 SubFirmwareVersion, bool bRightHanded,
int32 NumberOfSensors, const FQuat& ImuCorrection,
const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion, const bool bRightHanded,
const int32 NumberOfSensors, const FQuat& ImuCorrection,
const TArray<FVector>& StartPositions,
const TArray<FQuat>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths,
@@ -128,9 +128,36 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
}
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion,
int32 SubFirmwareVersion, bool bRightHanded,
int32 NumberOfSensors, const FQuat& ImuCorrection,
const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion, const bool bRightHanded,
const int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions,
const TArray<FRotator>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths,
const TArray<bool>& Functions)
{
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
FSGIC_FString DeviceIdContainer{DeviceId};
FSGIC_FString HardwareVersionContainer{HardwareVersion};
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths};
FSGIC_TArray_bool FunctionsContainer{Functions};
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
&OutSenseGloveInfoImplContainer,
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
&StartPositionsContainer, &StartRotationsContainer,
&GloveLengthsContainer, &FunctionsContainer);
return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl));
}
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion, const bool bRightHanded,
const int32 NumberOfSensors, const FQuat& ImuCorrection,
const TArray<FVector>& StartPositions,
const TArray<FQuat>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths,
@@ -156,6 +183,35 @@ USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FS
return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl));
}
USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion, const bool bRightHanded,
const int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions,
const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths,
const TArray<bool>& Functions)
{
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
FSGIC_FString DeviceIdContainer{DeviceId};
FSGIC_FString HardwareVersionContainer{HardwareVersion};
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
};
FSGIC_TArray_bool FunctionsContainer{Functions};
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
&OutSenseGloveInfoImplContainer,
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
&StartPositionsContainer, &StartRotationsContainer,
&GloveLengthsContainer, &FunctionsContainer);
return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl));
}
bool USGSenseGloveInfo::Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
const bool bUpdateOldModels)
{
@@ -228,6 +284,38 @@ USGSenseGloveInfo::USGSenseGloveInfo(
Pimpl->SyncUProperties();
}
USGSenseGloveInfo::USGSenseGloveInfo(
const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
FSGIC_FString DeviceIdContainer{DeviceId};
FSGIC_FString HardwareVersionContainer{HardwareVersion};
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths};
FSGIC_TArray_bool FunctionsContainer{Functions};
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
&OutSenseGloveInfoImplContainer,
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
&StartPositionsContainer, &StartRotationsContainer,
&GloveLengthsContainer, &FunctionsContainer);
Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl);
Pimpl->SyncUProperties();
}
USGSenseGloveInfo::USGSenseGloveInfo(
const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
@@ -256,6 +344,34 @@ USGSenseGloveInfo::USGSenseGloveInfo(
Pimpl->SyncUProperties();
}
USGSenseGloveInfo::USGSenseGloveInfo(
const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions)
{
FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer;
FSGIC_FString DeviceIdContainer{DeviceId};
FSGIC_FString HardwareVersionContainer{HardwareVersion};
FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()};
FSGIC_TArray_FVector StartPositionsContainer{StartPositions};
FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)};
FSGIC_TArray_TArray_FVector GloveLengthsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveLengths)
};
FSGIC_TArray_bool FunctionsContainer{Functions};
SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions(
&OutSenseGloveInfoImplContainer,
&DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion,
bRightHanded, NumberOfSensors, &ImuCorrectionContainer,
&StartPositionsContainer, &StartRotationsContainer,
&GloveLengthsContainer, &FunctionsContainer);
Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl);
Pimpl->SyncUProperties();
}
USGSenseGloveInfo::USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -330,7 +446,7 @@ int32 USGSenseGloveInfo::GetNumberOfSensors() const
return SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors(&InstanceContainer);
}
FQuat USGSenseGloveInfo::GetImuCorrection() const
FQuat USGSenseGloveInfo::GetImuCorrectionQ() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
FSGIC_FQuat OutCorrectionContainer;
@@ -338,6 +454,14 @@ FQuat USGSenseGloveInfo::GetImuCorrection() const
return MoveTemp(OutCorrectionContainer.Quat);
}
FRotator USGSenseGloveInfo::GetImuCorrection() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
FSGIC_FQuat OutCorrectionContainer;
SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer);
return OutCorrectionContainer.Quat.Rotator();
}
TArray<FVector> USGSenseGloveInfo::GetStartPositions() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
@@ -346,7 +470,7 @@ TArray<FVector> USGSenseGloveInfo::GetStartPositions() const
return MoveTemp(OutPositionsContainer.Array);
}
TArray<FQuat> USGSenseGloveInfo::GetStartRotations() const
TArray<FQuat> USGSenseGloveInfo::GetStartRotationsQ() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
@@ -354,6 +478,14 @@ TArray<FQuat> USGSenseGloveInfo::GetStartRotations() const
return MoveTemp(OutRotationsContainer.Array);
}
TArray<FRotator> USGSenseGloveInfo::GetStartRotations() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
TArray<TArray<FVector>> USGSenseGloveInfo::GetGloveLengths() const
{
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
@@ -381,7 +513,7 @@ FVector USGSenseGloveInfo::GetStartPosition(const ESGFinger Finger) const
return MoveTemp(OutPositionContainer.Vector);
}
FQuat USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
FQuat USGSenseGloveInfo::GetStartRotationQ(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
@@ -392,6 +524,17 @@ FQuat USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()};
FSGIC_FQuat OutRotationContainer;
FSGIC_ESGFinger FingerContainer{Finger};
SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer);
return OutRotationContainer.Quat.Rotator();
}
TArray<FVector> USGSenseGloveInfo::GetGloveLengths(const ESGFinger Finger) const
{
Pimpl->SyncImplObject();
@@ -115,6 +115,22 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
}
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions,
const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles)
{
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles};
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &GloveAnglesContainer);
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
}
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
@@ -137,6 +153,28 @@ USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bo
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
}
USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles)
{
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
};
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
};
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &GloveAnglesContainer);
return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl));
}
USGSenseGlovePose* USGSenseGlovePose::IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo)
{
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
@@ -193,6 +231,29 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
Pimpl->SyncUProperties();
}
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions,
const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)};
FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles};
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &GloveAnglesContainer);
Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl);
Pimpl->SyncUProperties();
}
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
@@ -216,6 +277,29 @@ USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
Pimpl->SyncUProperties();
}
USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles)
{
FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer;
FSGIC_TArray_TArray_FVector JointPositionsContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(JointPositions)
};
FSGIC_TArray_TArray_FQuat JointRotationsContainer{
FSGArrayUtils::RotatorsToQuats<FSGRotatorArray, &FSGRotatorArray::RotatorArray>(JointRotations)
};
FSGIC_TArray_TArray_FVector GloveAnglesContainer{
FSGArrayUtils::FromBPNestedArray<FVector, FSGVectorArray, &FSGVectorArray::VectorArray>(GloveAngles)
};
SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles(
&OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer,
&JointRotationsContainer, &GloveAnglesContainer);
Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl);
Pimpl->SyncUProperties();
}
USGSenseGlovePose::USGSenseGlovePose(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -258,7 +342,7 @@ TArray<TArray<FVector>> USGSenseGlovePose::GetJointPositions() const
return MoveTemp(OutPositionsContainer.Array);
}
TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotations() const
TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotationsQ() const
{
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
@@ -266,6 +350,14 @@ TArray<TArray<FQuat>> USGSenseGlovePose::GetJointRotations() const
return MoveTemp(OutRotationsContainer.Array);
}
TArray<TArray<FRotator>> USGSenseGlovePose::GetJointRotations() const
{
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
FSGIC_TArray_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
TArray<TArray<FVector>> USGSenseGlovePose::GetGloveAngles() const
{
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
@@ -284,7 +376,7 @@ TArray<FVector> USGSenseGlovePose::GetThimblePositions() const
return MoveTemp(OutPositionsContainer.Array);
}
TArray<FQuat> USGSenseGlovePose::GetThimbleRotations() const
TArray<FQuat> USGSenseGlovePose::GetThimbleRotationsQ() const
{
Pimpl->SyncImplObject();
@@ -294,6 +386,16 @@ TArray<FQuat> USGSenseGlovePose::GetThimbleRotations() const
return MoveTemp(OutRotationsContainer.Array);
}
TArray<FRotator> USGSenseGlovePose::GetThimbleRotations() const
{
Pimpl->SyncImplObject();
FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()};
FSGIC_TArray_FQuat OutRotationsContainer;
SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations(&InstanceContainer, &OutRotationsContainer);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
TArray<FVector> USGSenseGlovePose::GetTotalGloveAngles() const
{
Pimpl->SyncImplObject();
@@ -112,6 +112,19 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
}
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
{
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
}
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
@@ -127,6 +140,21 @@ USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
}
USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
{
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
FSGIC_TArray_TArray_float SensorAnglesContainer{
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl));
}
USGSenseGloveSensorData* USGSenseGloveSensorData::Empty(UObject* Outer)
{
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
@@ -191,6 +219,25 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& Se
Pimpl->SyncUProperties();
}
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles, const FRotator& ImuRotation,
const int32 ParsedValues, const bool bImuParsed)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
#else
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}))
#endif /* ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 ) */
{
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl);
Pimpl->SyncUProperties();
}
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles, const FQuat& ImuRotation,
const int32 ParsedValues, const bool bImuParsed)
{
@@ -206,6 +253,21 @@ USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& Se
Pimpl->SyncUProperties();
}
USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles, const FRotator& ImuRotation,
const int32 ParsedValues, const bool bImuParsed)
{
FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer;
FSGIC_TArray_TArray_float SensorAnglesContainer{
FSGArrayUtils::FromBPNestedArray<float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles)
};
FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()};
SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
&OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed);
Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl);
Pimpl->SyncUProperties();
}
USGSenseGloveSensorData::USGSenseGloveSensorData(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl)
:
#if ENGINE_MAJOR_VERSION == 5 || ( ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION > 22 )
@@ -242,7 +304,7 @@ TArray<TArray<float>> USGSenseGloveSensorData::GetSensorAngles() const
return MoveTemp(OutAnglesContainer.Array);
}
FQuat USGSenseGloveSensorData::GetImuRotation() const
FQuat USGSenseGloveSensorData::GetImuRotationQ() const
{
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
FSGIC_FQuat OutRotationContainer;
@@ -250,6 +312,14 @@ FQuat USGSenseGloveSensorData::GetImuRotation() const
return MoveTemp(OutRotationContainer.Quat);
}
FRotator USGSenseGloveSensorData::GetImuRotation() const
{
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
int32 USGSenseGloveSensorData::GetParsedValues() const
{
FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()};
@@ -72,7 +72,7 @@ TArray<FVector> FSGSenseGloveVars::GetStartPositions(const FString& HardwareVers
return MoveTemp(OutPositionsContainer.Array);
}
TArray<FQuat> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded)
TArray<FQuat> FSGSenseGloveVars::GetStartRotationsQ(const FString& HardwareVersion, const bool bRightHanded)
{
FSGIC_TArray_FQuat OutRotationsContainer;
FSGIC_FString HardwareVersionContainer{HardwareVersion};
@@ -80,6 +80,14 @@ TArray<FQuat> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersio
return MoveTemp(OutRotationsContainer.Array);
}
TArray<FRotator> FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded)
{
FSGIC_TArray_FQuat OutRotationsContainer;
FSGIC_FString HardwareVersionContainer{HardwareVersion};
SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations(&OutRotationsContainer, &HardwareVersionContainer, bRightHanded);
return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array);
}
TArray<TArray<FVector>> FSGSenseGloveVars::GetGloveLengths(const FString& HardwareVersion)
{
FSGIC_TArray_TArray_FVector OutLengthsContainer;
@@ -100,8 +108,8 @@ int32 FSGSenseGloveVars::GetSensors(const FString& HardwareVersion)
return SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors(&HardwareVersionContainer);
}
FQuat FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion)
FQuat FSGSenseGloveVars::GetImuCorrectionQ(const FString& HardwareVersion,
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
{
FSGIC_FQuat OutCorrectionContainer;
FSGIC_FString HardwareVersionContainer{HardwareVersion};
@@ -110,8 +118,18 @@ FQuat FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion, const
return MoveTemp(OutCorrectionContainer.Quat);
}
TArray<bool> FSGSenseGloveVars::GetFunctions(const FString& HardwareVersion, const int32 FirmwareVersion,
const int32 SubFirmwareVersion)
FRotator FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion,
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
{
FSGIC_FQuat OutCorrectionContainer;
FSGIC_FString HardwareVersionContainer{HardwareVersion};
SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection(&OutCorrectionContainer,
&HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion);
return OutCorrectionContainer.Quat.Rotator();
}
TArray<bool> FSGSenseGloveVars::GetFunctions(const FString& HardwareVersion,
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
{
FSGIC_TArray_bool OutFunctionsContainer;
FSGIC_FString HardwareVersionContainer{HardwareVersion};
@@ -43,6 +43,7 @@
#include "SGInterop/SGIC_FVector.h"
#include "SGInterop/SGIC_TArray_FQuat.h"
#include "SGInterop/SGIC_TArray_FVector.h"
#include "SGUtils/SGArrayUtils.h"
void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation,
const FVector& PositionOffset, const FQuat& RotationOffset,
@@ -64,6 +65,26 @@ void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat&
OutNewRotation = MoveTemp(OutNewRotationContainer.Quat);
}
void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FRotator& TrackedRotation,
const FVector& PositionOffset, const FRotator& RotationOffset,
FVector& OutNewPosition, FRotator& OutNewRotation)
{
FSGIC_FVector TrackedPositionContainer{TrackedPosition};
FSGIC_FQuat TrackedRotationContainer{TrackedRotation.Quaternion()};
FSGIC_FVector PositionOffsetContainer{PositionOffset};
FSGIC_FQuat RotationOffsetContainer{RotationOffset.Quaternion()};
FSGIC_FVector OutNewPositionContainer;
FSGIC_FQuat OutNewRotationContainer;
SGCoreImpl_FSGTrackingImpl_CalculateLocation(
&TrackedPositionContainer, &TrackedRotationContainer,
&PositionOffsetContainer, &RotationOffsetContainer,
&OutNewPositionContainer, &OutNewRotationContainer);
OutNewPosition = MoveTemp(OutNewPositionContainer.Vector);
OutNewRotation = OutNewRotationContainer.Quat.Rotator();
}
TArray<FVector> FSGTracking::GetSenseGloveFingerToGlovePositionOrigin()
{
FSGIC_TArray_FVector OutOriginContainer;
@@ -71,13 +92,20 @@ TArray<FVector> FSGTracking::GetSenseGloveFingerToGlovePositionOrigin()
return MoveTemp(OutOriginContainer.Array);
}
TArray<FQuat> FSGTracking::GetSenseGloveFingerToGloveRotationOrigin()
TArray<FQuat> FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ()
{
FSGIC_TArray_FQuat OutOriginContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer);
return MoveTemp(OutOriginContainer.Array);
}
TArray<FRotator> FSGTracking::GetSenseGloveFingerToGloveRotationOrigin()
{
FSGIC_TArray_FQuat OutOriginContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer);
return FSGArrayUtils::QuatsToRotators(OutOriginContainer.Array);
}
FVector FSGTracking::GetSenseGloveWristPositionOffset()
{
FSGIC_FVector OutOffsetContainer;
@@ -85,13 +113,20 @@ FVector FSGTracking::GetSenseGloveWristPositionOffset()
return MoveTemp(OutOffsetContainer.Vector);
}
FQuat FSGTracking::GetSenseGloveWristRotationOffset()
FQuat FSGTracking::GetSenseGloveWristRotationOffsetQ()
{
FSGIC_FQuat OutOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer);
return MoveTemp(OutOffsetContainer.Quat);
}
FRotator FSGTracking::GetSenseGloveWristRotationOffset()
{
FSGIC_FQuat OutOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer);
return OutOffsetContainer.Quat.Rotator();
}
void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation)
{
@@ -106,6 +141,20 @@ void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFin
OutIRotation = MoveTemp(OutIRotationContainer.Quat);
}
void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FRotator& OutIRotation)
{
FSGIC_ESGFinger ToFingerContainer{ToFinger};
FSGIC_FVector OutIPositionContainer;
FSGIC_FQuat OutIRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset(bRightHanded, &ToFingerContainer,
&OutIPositionContainer, &OutIRotationContainer);
OutIPosition = MoveTemp(OutIPositionContainer.Vector);
OutIRotation = OutIRotationContainer.Quat.Rotator();
}
void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
@@ -121,6 +170,21 @@ void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHar
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
}
void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
FSGIC_ESGPositionalTrackingHardware HardwareContainer;
FSGIC_FVector OutPositionOffsetContainer;
FSGIC_FQuat OutRotationOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset(&HardwareContainer, bRightHanded,
&OutPositionOffsetContainer,
&OutRotationOffsetContainer);
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
}
FVector FSGTracking::GetSenseGloveViveToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -128,13 +192,20 @@ FVector FSGTracking::GetSenseGloveViveToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetSenseGloveViveToAttachRotation()
FQuat FSGTracking::GetSenseGloveViveToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetSenseGloveViveToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -142,13 +213,20 @@ FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetSenseGloveOculusTouchToAttachRotation()
FQuat FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetSenseGloveOculusTouchToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetNovaToWristPositionOffset()
{
FSGIC_FVector OutOffsetContainer;
@@ -156,13 +234,20 @@ FVector FSGTracking::GetNovaToWristPositionOffset()
return MoveTemp(OutOffsetContainer.Vector);
}
FQuat FSGTracking::GetNovaToWristRotationOffset()
FQuat FSGTracking::GetNovaToWristRotationOffsetQ()
{
FSGIC_FQuat OutOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer);
return MoveTemp(OutOffsetContainer.Quat);
}
FRotator FSGTracking::GetNovaToWristRotationOffset()
{
FSGIC_FQuat OutOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer);
return OutOffsetContainer.Quat.Rotator();
}
void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
FSGIC_FVector OutPositionOffsetContainer;
@@ -175,6 +260,19 @@ void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutP
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
}
void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
FSGIC_FVector OutPositionOffsetContainer;
FSGIC_FQuat OutRotationOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset(bRightHanded,
&OutPositionOffsetContainer, &OutRotationOffsetContainer);
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
}
FVector FSGTracking::GetRightNovaViveToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -182,13 +280,20 @@ FVector FSGTracking::GetRightNovaViveToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetRightNovaViveToAttachRotation()
FQuat FSGTracking::GetRightNovaViveToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetRightNovaViveToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetLeftNovaViveToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -196,13 +301,20 @@ FVector FSGTracking::GetLeftNovaViveToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetLeftNovaViveToAttachRotation()
FQuat FSGTracking::GetLeftNovaViveToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetLeftNovaViveToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetRightNovaQuest2ToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -210,13 +322,20 @@ FVector FSGTracking::GetRightNovaQuest2ToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetRightNovaQuest2ToAttachRotation()
FQuat FSGTracking::GetRightNovaQuest2ToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetRightNovaQuest2ToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -224,13 +343,20 @@ FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetLeftNovaQuest2ToAttachRotation()
FQuat FSGTracking::GetLeftNovaQuest2ToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetLeftNovaQuest2ToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FVector FSGTracking::GetRightNovaPico2ToAttachPosition()
{
FSGIC_FVector OutPositionContainer;
@@ -238,20 +364,34 @@ FVector FSGTracking::GetRightNovaPico2ToAttachPosition()
return MoveTemp(OutPositionContainer.Vector);
}
FQuat FSGTracking::GetRightNovaPico2ToAttachRotation()
FQuat FSGTracking::GetRightNovaPico2ToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FQuat FSGTracking::GetLeftNovaPico2ToAttachRotation()
FRotator FSGTracking::GetRightNovaPico2ToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
FQuat FSGTracking::GetLeftNovaPico2ToAttachRotationQ()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer);
return MoveTemp(OutRotationContainer.Quat);
}
FRotator FSGTracking::GetLeftNovaPico2ToAttachRotation()
{
FSGIC_FQuat OutRotationContainer;
SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer);
return OutRotationContainer.Quat.Rotator();
}
void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
@@ -266,6 +406,20 @@ void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware
OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat);
}
void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware};
FSGIC_FVector OutPositionOffsetContainer;
FSGIC_FQuat OutRotationOffsetContainer;
SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset(&HardwareContainer, bRightHanded,
&OutPositionOffsetContainer, &OutRotationOffsetContainer);
OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector);
OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator();
}
FString FSGTracking::ToString(const ESGPositionalTrackingHardware Hardware)
{
FSGIC_FString OutStringContainer;
@@ -77,11 +77,21 @@ public:
bool bRightHanded, const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
static USGBasicHandModel* NewBasicHandModel(
UObject* Outer,
bool bRightHanded, const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
static USGBasicHandModel* NewBasicHandModel(
UObject* Outer,
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
static USGBasicHandModel* NewBasicHandModel(
UObject* Outer,
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
public:
static USGBasicHandModel* Default(UObject* Outer, bool bRightHanded);
@@ -117,9 +127,15 @@ public:
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
USGBasicHandModel(bool bRightHanded, const TArray<TArray<float>>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
USGBasicHandModel(bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
public:
/**
* The cast from underlying type constructor.
@@ -169,16 +185,22 @@ public:
void SetStartJointPosition(ESGFinger Finger, const FVector& Position);
void SetStartJointPosition(uint8 Finger, const FVector& Position);
TArray<FQuat> GetStartJointRotations() const;
TArray<FQuat> GetStartJointRotationsQ() const;
TArray<FRotator> GetStartJointRotations() const;
FVector GetJointPosition(ESGFinger Finger) const;
void SetJointPosition(const FVector& NewPosition, ESGFinger Finger);
FQuat GetJointRotation(ESGFinger Finger) const;
FQuat GetJointRotationQ(ESGFinger Finger) const;
FRotator GetJointRotation(ESGFinger Finger) const;
void SetJointRotation(const FQuat& NewRotation, ESGFinger Finger);
void SetJointRotation(const FRotator& NewRotation, ESGFinger Finger);
TArray<float> GetTotalLengths() const;
float GetTotalLength(ESGFinger Finger) const;
@@ -76,10 +76,18 @@ public:
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FQuat& CmcStartRotation);
static USGHandInterpolator* NewHandInterpolator(
UObject* Outer,
const TArray<TArray<USGInterpolationSet*>>& JointInterpolations, const FRotator& CmcStartRotation);
static USGHandInterpolator* NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation);
static USGHandInterpolator* NewHandInterpolator(
UObject* Outer,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation);
public:
static USGHandInterpolator* Default(UObject* Outer, const bool bRightHanded);
@@ -116,9 +124,15 @@ public:
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
const FQuat& CmcStartRotation);
USGHandInterpolator(const TArray<TArray<USGInterpolationSet*>>& JointInterpolations,
const FRotator& CmcStartRotation);
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FQuat& CmcStartRotation);
USGHandInterpolator(const TArray<FSGInterpolationSetArray>& JointInterpolations,
const FRotator& CmcStartRotation);
public:
/**
* The cast from underlying type constructor.
@@ -146,7 +160,9 @@ public:
public:
TArray<TArray<USGInterpolationSet*>> GetJointInterpolations(UObject* Outer) const;
FQuat GetCmcStartRotation() const;
FQuat GetCmcStartRotationQ() const;
FRotator GetCmcStartRotation() const;
public:
float CalculateAngle(ESGFinger Finger, int32 Movement, float Value) const;
@@ -45,6 +45,7 @@
#include "SGCore/SGBasicHandModel.h"
#include "SGCore/SGQuatArray.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGUtils/SGArrayUtils.h"
@@ -69,11 +70,22 @@ public:
bool bRightHanded, const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles);
static USGHandPose* NewHandPose(
UObject* Outer,
bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles);
static USGHandPose* NewHandPose(
UObject* Outer,
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
static USGHandPose* NewHandPose(
UObject* Outer,
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
public:
static USGHandPose* Deserialize(UObject* Outer, const FString& SerializedString);
@@ -117,10 +129,18 @@ public:
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FQuat>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles);
USGHandPose(bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions, const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& HandAngles);
USGHandPose(bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
USGHandPose(bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
public:
/**
* The cast from underlying type constructor.
@@ -150,7 +170,9 @@ public:
TArray<TArray<FVector>> GetJointPositions() const;
TArray<TArray<FQuat>> GetJointRotations() const;
TArray<TArray<FQuat>> GetJointRotationsQ() const;
TArray<TArray<FRotator>> GetJointRotations() const;
TArray<TArray<FVector>> GetHandAngles() const;
@@ -169,9 +169,11 @@ public:
virtual bool GetImuRotation(FQuat& OutImu);
virtual bool GetImuRotation(FRotator& OutImu);
virtual bool GetHandPose(
UObject* Outer,
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile,USGHandPose*& OutHandPose);
const USGBasicHandModel* HandGeometry, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose);
virtual bool GetHandPose(UObject* Outer, const USGHandProfile* HandProfile, USGHandPose*& OutHandPose);
@@ -218,7 +220,15 @@ public:
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation) const;
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const;
virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const;
};
@@ -55,7 +55,16 @@ public:
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
static bool ForwardKinematics(
const FVector& StartPosition, const FRotator& StartRotation,
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
static bool ForwardKinematics(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
static bool ForwardKinematics(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
};
@@ -102,10 +102,18 @@ public:
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation);
static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutWristPosition, FRotator& OutWristRotation);
public:
static FString ToBytes(const USGThumperCommand* ThumperCommand);
@@ -207,6 +215,8 @@ public:
virtual bool GetImuRotation(FQuat& OutImu) override;
virtual bool GetImuRotation(FRotator& OutImu) override;
/// HACK
/// 'FSGNovaGlove::GetHandPose' hides overloaded virtual functions [-Werror,-Woverloaded-virtual]
/// tell the compiler we want both the GetHandPose from FSGHapticGlove and FSGNovaGlove
@@ -243,10 +253,18 @@ public:
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const override;
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const override;
public:
virtual FString ToString() const override;
};
@@ -65,6 +65,10 @@ public:
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
static USGNovaGloveSensorData* NewNovaGloveSensorData(
UObject* Outer, const TArray<FVector>& Values, int32 ParsedValues,
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
public:
static USGNovaGloveSensorData* Empty(UObject* Outer);
@@ -89,6 +93,9 @@ public:
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
USGNovaGloveSensorData(const TArray<FVector>& Values, int32 ParsedValues,
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
public:
/**
* The cast from underlying type constructor.
@@ -116,7 +123,9 @@ public:
public:
TArray<FVector> GetSensorValues() const;
FQuat GetImuRotation() const;
FQuat GetImuRotationQ() const;
FRotator GetImuRotation() const;
int32 GetParsedValues() const;
@@ -0,0 +1,50 @@
/**
* @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
*
*
*/
#pragma once
#include "Math/Rotator.h"
#include "SGRotatorArray.generated.h"
USTRUCT(BlueprintType)
struct SENSEGLOVECORE_API FSGRotatorArray
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FRotator> RotatorArray;
};
@@ -112,6 +112,11 @@ public:
bool bRightHanded, ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
@@ -119,6 +124,13 @@ public:
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation);
static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation);
private:
struct FImpl;
@@ -211,6 +223,8 @@ public:
virtual bool GetImuRotation(FQuat& OutImu) override;
virtual bool GetImuRotation(FRotator& OutImu) override;
bool GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose);
bool GetGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose);
@@ -251,20 +265,38 @@ public:
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const override;
virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const override;
void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation) const;
void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation) const;
virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation) const override;
virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation) const override;
void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
const FVector& GloveWristPositionOffset,
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation) const;
void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation) const;
public:
virtual FString ToString() const override;
};
@@ -68,6 +68,13 @@ public:
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
static USGSenseGloveInfo* NewSenseGloveInfo(
UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
static USGSenseGloveInfo* NewSenseGloveInfo(
UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
@@ -75,6 +82,13 @@ public:
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
static USGSenseGloveInfo* NewSenseGloveInfo(
UObject* Outer, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
public:
static bool Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
bool bUpdateOldModels = true);
@@ -101,12 +115,24 @@ public:
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
USGSenseGloveInfo(const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<TArray<FVector>>& GloveLengths, const TArray<bool>& Functions);
USGSenseGloveInfo(const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
USGSenseGloveInfo(const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
public:
/**
* The cast from underlying type constructor.
@@ -150,11 +176,15 @@ public:
int32 GetNumberOfSensors() const;
FQuat GetImuCorrection() const;
FQuat GetImuCorrectionQ() const;
FRotator GetImuCorrection() const;
TArray<FVector> GetStartPositions() const;
TArray<FQuat> GetStartRotations() const;
TArray<FQuat> GetStartRotationsQ() const;
TArray<FRotator> GetStartRotations() const;
TArray<TArray<FVector>> GetGloveLengths() const;
@@ -163,7 +193,9 @@ public:
public:
FVector GetStartPosition(ESGFinger Finger) const;
FQuat GetStartRotation(ESGFinger Finger) const;
FQuat GetStartRotationQ(ESGFinger Finger) const;
FRotator GetStartRotation(ESGFinger Finger) const;
TArray<FVector> GetGloveLengths(ESGFinger Finger) const;
@@ -47,6 +47,7 @@
#include "SGCore/SGSenseGloveInfo.h"
#include "SGCore/SGSenseGloveHandProfile.h"
#include "SGCore/SGQuatArray.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGUtils/SGArrayUtils.h"
@@ -71,11 +72,21 @@ public:
const TArray<TArray<FQuat>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles);
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions,
const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles);
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
public:
static USGSenseGlovePose* IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo);
@@ -100,11 +111,21 @@ public:
const TArray<TArray<FQuat>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles);
USGSenseGlovePose(bool bRightHanded,
const TArray<TArray<FVector>>& JointPositions,
const TArray<TArray<FRotator>>& JointRotations,
const TArray<TArray<FVector>>& GloveAngles);
USGSenseGlovePose(bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
USGSenseGlovePose(bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
public:
/**
* The cast from underlying type constructor.
@@ -134,14 +155,18 @@ public:
TArray<TArray<FVector>> GetJointPositions() const;
TArray<TArray<FQuat>> GetJointRotations() const;
TArray<TArray<FQuat>> GetJointRotationsQ() const;
TArray<TArray<FRotator>> GetJointRotations() const;
TArray<TArray<FVector>> GetGloveAngles() const;
public:
TArray<FVector> GetThimblePositions() const;
TArray<FQuat> GetThimbleRotations() const;
TArray<FQuat> GetThimbleRotationsQ() const;
TArray<FRotator> GetThimbleRotations() const;
TArray<FVector> GetTotalGloveAngles() const;
@@ -66,10 +66,18 @@ public:
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
static USGSenseGloveSensorData* NewSenseGloveSensorData(
UObject* Outer, const TArray<TArray<float>>& SensorAngles,
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
static USGSenseGloveSensorData* NewSenseGloveSensorData(
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
static USGSenseGloveSensorData* NewSenseGloveSensorData(
UObject* Outer, const TArray<FSGFloatArray>& SensorAngles,
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
public:
static USGSenseGloveSensorData* Empty(UObject* Outer);
@@ -94,9 +102,15 @@ public:
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
USGSenseGloveSensorData(const TArray<TArray<float>>& SensorAngles,
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles,
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
USGSenseGloveSensorData(const TArray<FSGFloatArray>& SensorAngles,
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
public:
/**
* The cast from underlying type constructor.
@@ -124,7 +138,9 @@ public:
public:
TArray<TArray<float>> GetSensorAngles() const;
FQuat GetImuRotation() const;
FQuat GetImuRotationQ() const;
FRotator GetImuRotation() const;
int32 GetParsedValues() const;
@@ -57,13 +57,17 @@ public:
static TArray<FVector> GetStartPositions(const FString& HardwareVersion, bool bRightHanded);
static TArray<FQuat> GetStartRotations(const FString& HardwareVersion, bool bRightHanded);
static TArray<FQuat> GetStartRotationsQ(const FString& HardwareVersion, bool bRightHanded);
static TArray<FRotator> GetStartRotations(const FString& HardwareVersion, bool bRightHanded);
static TArray<TArray<FVector>> GetGloveLengths(const FString& HardwareVersion);
static int32 GetSensors(const FString& HardwareVersion);
static FQuat GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
static FQuat GetImuCorrectionQ(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
static FRotator GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
static TArray<bool> GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
@@ -55,58 +55,96 @@ public:
const FVector& PositionOffset, const FQuat& RotationOffset,
FVector& OutNewPosition, FQuat& OutNewRotation);
static void CalculateLocation(
const FVector& TrackedPosition, const FRotator& TrackedRotation,
const FVector& PositionOffset, const FRotator& RotationOffset,
FVector& OutNewPosition, FRotator& OutNewRotation);
static TArray<FVector> GetSenseGloveFingerToGlovePositionOrigin();
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOrigin();
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOriginQ();
static TArray<FRotator> GetSenseGloveFingerToGloveRotationOrigin();
static FVector GetSenseGloveWristPositionOffset();
static FQuat GetSenseGloveWristRotationOffset();
static FQuat GetSenseGloveWristRotationOffsetQ();
static FRotator GetSenseGloveWristRotationOffset();
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation);
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
FVector& OutIPosition, FRotator& OutIRotation);
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset);
static FVector GetSenseGloveViveToAttachPosition();
static FQuat GetSenseGloveViveToAttachRotation();
static FQuat GetSenseGloveViveToAttachRotationQ();
static FRotator GetSenseGloveViveToAttachRotation();
static FVector GetSenseGloveOculusTouchToAttachPosition();
static FQuat GetSenseGloveOculusTouchToAttachRotation();
static FQuat GetSenseGloveOculusTouchToAttachRotationQ();
static FRotator GetSenseGloveOculusTouchToAttachRotation();
static FVector GetNovaToWristPositionOffset();
static FQuat GetNovaToWristRotationOffset();
static FQuat GetNovaToWristRotationOffsetQ();
static FRotator GetNovaToWristRotationOffset();
static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset);
static FVector GetRightNovaViveToAttachPosition();
static FQuat GetRightNovaViveToAttachRotation();
static FQuat GetRightNovaViveToAttachRotationQ();
static FRotator GetRightNovaViveToAttachRotation();
static FVector GetLeftNovaViveToAttachPosition();
static FQuat GetLeftNovaViveToAttachRotation();
static FQuat GetLeftNovaViveToAttachRotationQ();
static FRotator GetLeftNovaViveToAttachRotation();
static FVector GetRightNovaQuest2ToAttachPosition();
static FQuat GetRightNovaQuest2ToAttachRotation();
static FQuat GetRightNovaQuest2ToAttachRotationQ();
static FRotator GetRightNovaQuest2ToAttachRotation();
static FVector GetLeftNovaQuest2ToAttachPosition();
static FQuat GetLeftNovaQuest2ToAttachRotation();
static FQuat GetLeftNovaQuest2ToAttachRotationQ();
static FRotator GetLeftNovaQuest2ToAttachRotation();
static FVector GetRightNovaPico2ToAttachPosition();
static FQuat GetRightNovaPico2ToAttachRotation();
static FQuat GetRightNovaPico2ToAttachRotationQ();
static FQuat GetLeftNovaPico2ToAttachRotation();
static FRotator GetRightNovaPico2ToAttachRotation();
static FQuat GetLeftNovaPico2ToAttachRotationQ();
static FRotator GetLeftNovaPico2ToAttachRotation();
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset);
static FString ToString(ESGPositionalTrackingHardware Hardware);
};
@@ -51,7 +51,7 @@ USGBasicHandModel* USGBasicHandModelKismetLibrary::MakeBasicHandModel_bRightHand
}
USGBasicHandModel* USGBasicHandModelKismetLibrary::
MakeBasicHandModel_bRightHanded_Lengths_StartPositions_StartRotations(
MakeBasicHandModel_bRightHanded_Lengths_StartPositions_TArrayFQuatStartRotations(
UObject* WorldContextObject,
const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations)
@@ -60,6 +60,16 @@ MakeBasicHandModel_bRightHanded_Lengths_StartPositions_StartRotations(
StartPositions, StartRotations);
}
USGBasicHandModel* USGBasicHandModelKismetLibrary::
MakeBasicHandModel_bRightHanded_Lengths_StartPositions_TArrayFRotatorStartRotations(
UObject* WorldContextObject,
const bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations)
{
return USGBasicHandModel::NewBasicHandModel(WorldContextObject, bRightHanded, Lengths,
StartPositions, StartRotations);
}
USGBasicHandModel* USGBasicHandModelKismetLibrary::Default(UObject* WorldContextObject, const bool bRightHanded)
{
return USGBasicHandModel::Default(WorldContextObject, bRightHanded);
@@ -142,7 +152,14 @@ void USGBasicHandModelKismetLibrary::SetStartJointPosition_uint8Finger(USGBasicH
BasicHandModel->SetStartJointPosition(Finger, Position);
}
TArray<FQuat> USGBasicHandModelKismetLibrary::GetStartJointRotations(const USGBasicHandModel* BasicHandModel)
TArray<FQuat> USGBasicHandModelKismetLibrary::GetStartJointRotations_TArrayFQuat(
const USGBasicHandModel* BasicHandModel)
{
return BasicHandModel->GetStartJointRotationsQ();
}
TArray<FRotator> USGBasicHandModelKismetLibrary::GetStartJointRotations_TArrayFRotator(
const USGBasicHandModel* BasicHandModel)
{
return BasicHandModel->GetStartJointRotations();
}
@@ -159,13 +176,26 @@ void USGBasicHandModelKismetLibrary::SetJointPosition(USGBasicHandModel* BasicHa
return BasicHandModel->SetJointPosition(NewPosition, Finger);
}
FQuat USGBasicHandModelKismetLibrary::GetJointRotation(const USGBasicHandModel* BasicHandModel, const ESGFinger Finger)
FQuat USGBasicHandModelKismetLibrary::GetJointRotation_FQuat(const USGBasicHandModel* BasicHandModel,
const ESGFinger Finger)
{
return BasicHandModel->GetJointRotationQ(Finger);
}
FRotator USGBasicHandModelKismetLibrary::GetJointRotation_FRotator(const USGBasicHandModel* BasicHandModel,
const ESGFinger Finger)
{
return BasicHandModel->GetJointRotation(Finger);
}
void USGBasicHandModelKismetLibrary::SetJointRotation(USGBasicHandModel* BasicHandModel, const FQuat& NewRotation,
const ESGFinger Finger)
void USGBasicHandModelKismetLibrary::SetJointRotation_FQuatNewRotation_Finger(
USGBasicHandModel* BasicHandModel, const FQuat& NewRotation, const ESGFinger Finger)
{
return BasicHandModel->SetJointRotation(NewRotation, Finger);
}
void USGBasicHandModelKismetLibrary::SetJointRotation_FRotatorNewRotation_Finger(
USGBasicHandModel* BasicHandModel, const FRotator& NewRotation, const ESGFinger Finger)
{
return BasicHandModel->SetJointRotation(NewRotation, Finger);
}
@@ -49,13 +49,21 @@ USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_Join
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations);
}
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JointInterpolations_CmcStartRotation(
USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JointInterpolations_FQuatCmcStartRotation(
UObject* WorldContextObject,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation)
{
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations, CmcStartRotation);
}
USGHandInterpolator*
USGHandInterpolatorKismetLibrary::MakeHandInterpolator_JointInterpolations_FRotatorCmcStartRotation(
UObject* WorldContextObject,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation)
{
return USGHandInterpolator::NewHandInterpolator(WorldContextObject, JointInterpolations, CmcStartRotation);
}
USGHandInterpolator* USGHandInterpolatorKismetLibrary::Default(UObject* WorldContextObject, const bool bRightHanded)
{
return USGHandInterpolator::Default(WorldContextObject, bRightHanded);
@@ -93,7 +101,13 @@ TArray<FSGInterpolationSetArray> USGHandInterpolatorKismetLibrary::GetJointInter
HandInterpolator->GetJointInterpolations(WorldContextObject));
}
FQuat USGHandInterpolatorKismetLibrary::GetCmcStartRotation(const USGHandInterpolator* HandInterpolator) const
FQuat USGHandInterpolatorKismetLibrary::GetCmcStartRotation_FQuat(const USGHandInterpolator* HandInterpolator) const
{
return HandInterpolator->GetCmcStartRotationQ();
}
FRotator USGHandInterpolatorKismetLibrary::GetCmcStartRotation_FRotator(
const USGHandInterpolator* HandInterpolator) const
{
return HandInterpolator->GetCmcStartRotation();
}
@@ -44,7 +44,7 @@ USGHandPose* USGHandPoseKismetLibrary::MakeHandPose(UObject* WorldContextObject)
return USGHandPose::NewHandPose(WorldContextObject);
}
USGHandPose* USGHandPoseKismetLibrary::MakeHandPose_bRightHanded_JointPositions_JointRotations_HandAngles(
USGHandPose* USGHandPoseKismetLibrary::MakeHandPose_bRightHanded_JointPositions_FSGQuatArrayJointRotations_HandAngles(
UObject* WorldContextObject,
const bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles)
@@ -52,6 +52,16 @@ USGHandPose* USGHandPoseKismetLibrary::MakeHandPose_bRightHanded_JointPositions_
return USGHandPose::NewHandPose(WorldContextObject, bRightHanded, JointPositions, JointRotations, HandAngles);
}
USGHandPose* USGHandPoseKismetLibrary::
MakeHandPose_bRightHanded_JointPositions_FSGRotatorArrayJointRotations_HandAngles(
UObject* WorldContextObject,
const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles)
{
return USGHandPose::NewHandPose(WorldContextObject, bRightHanded, JointPositions, JointRotations, HandAngles);
}
USGHandPose* USGHandPoseKismetLibrary::Deserialize(UObject* WorldContextObject, const FString& SerializedString)
{
return USGHandPose::Deserialize(WorldContextObject, SerializedString);
@@ -132,9 +142,14 @@ TArray<FSGVectorArray> USGHandPoseKismetLibrary::GetJointPositions(const USGHand
return FSGArrayUtils::ToBPNestedArray<FVector, FSGVectorArray>(HandPose->GetJointPositions());
}
TArray<FSGQuatArray> USGHandPoseKismetLibrary::GetJointRotations(const USGHandPose* HandPose)
TArray<FSGQuatArray> USGHandPoseKismetLibrary::GetJointRotationsQ(const USGHandPose* HandPose)
{
return FSGArrayUtils::ToBPNestedArray<FQuat, FSGQuatArray>(HandPose->GetJointRotations());
return FSGArrayUtils::ToBPNestedArray<FQuat, FSGQuatArray>(HandPose->GetJointRotationsQ());
}
TArray<FSGRotatorArray> USGHandPoseKismetLibrary::GetJointRotations(const USGHandPose* HandPose)
{
return FSGArrayUtils::ToBPNestedArray<FRotator, FSGRotatorArray>(HandPose->GetJointRotations());
}
TArray<FSGVectorArray> USGHandPoseKismetLibrary::GetHandAngles(const USGHandPose* HandPose)
@@ -89,7 +89,12 @@ bool USGHapticGloveKismetLibrary::IsRight(const USGHapticGlove* HapticGlove)
return HapticGlove->IsRight();
}
bool USGHapticGloveKismetLibrary::GetImuRotation(USGHapticGlove* HapticGlove, FQuat& OutImu)
bool USGHapticGloveKismetLibrary::GetImuRotation_FQuatOutImu(USGHapticGlove* HapticGlove, FQuat& OutImu)
{
return HapticGlove->GetImuRotation(OutImu);
}
bool USGHapticGloveKismetLibrary::GetImuRotation_FRotatorOutImu(USGHapticGlove* HapticGlove, FRotator& OutImu)
{
return HapticGlove->GetImuRotation(OutImu);
}
@@ -205,21 +210,48 @@ void USGHapticGloveKismetLibrary::ApplyCalibration(
HapticGlove->ApplyCalibration(WorldContextObject, OutProfile);
}
void USGHapticGloveKismetLibrary::GetWristLocation(const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation)
void USGHapticGloveKismetLibrary::
GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristLocation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation)
{
HapticGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
OutWristPosition, OutWristRotation);
}
void USGHapticGloveKismetLibrary::GetGloveLocation(const USGHapticGlove* HapticGlove, const FVector& ReferencePosition,
const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition,
FQuat& OutGloveRotation)
void USGHapticGloveKismetLibrary::
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristLocation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
HapticGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
OutWristPosition, OutWristRotation);
}
void USGHapticGloveKismetLibrary::
GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation)
{
HapticGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
OutGlovePosition, OutGloveRotation);
}
void USGHapticGloveKismetLibrary::
GetGloveLocation_FRotatorReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
HapticGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
@@ -38,7 +38,7 @@
#include "SGCore/SGJointKinematics.h"
bool USGJointKinematicsKismetLibrary::
ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
ForwardKinematics_StartPosition_FQuatStartRotation_JointLengths_JointAngles_OutNewPositions_TArrayFQuatOutNewRotations(
const FVector& StartPosition, const FQuat& StartRotation, const TArray<FVector>& JointLengths,
const TArray<FVector>& JointAngles, TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations)
{
@@ -46,9 +46,27 @@ ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPos
OutNewPositions, OutNewRotations);
}
bool USGJointKinematicsKismetLibrary::ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
bool USGJointKinematicsKismetLibrary::
ForwardKinematics_StartPosition_FRotatorStartRotation_JointLengths_JointAngles_OutNewPositions_TArrayFRotatorOutNewRotations(
const FVector& StartPosition, const FRotator& StartRotation, const TArray<FVector>& JointLengths,
const TArray<FVector>& JointAngles, TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
{
return FSGJointKinematics::ForwardKinematics(StartPosition, StartRotation, JointLengths, JointAngles,
OutNewPositions, OutNewRotations);
}
bool
USGJointKinematicsKismetLibrary::ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_TArrayFQuatOutNewRotations(
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations)
{
return FSGJointKinematics::ForwardKinematics(Profile, Finger, JointAngles, OutNewPositions, OutNewRotations);
}
bool
USGJointKinematicsKismetLibrary::ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_TArrayFRotatorOutNewRotations(
const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations)
{
return FSGJointKinematics::ForwardKinematics(Profile, Finger, JointAngles, OutNewPositions, OutNewRotations);
}
@@ -94,7 +94,8 @@ void USGNovaGloveKismetLibrary::CalibrateInterpolation(
USGNovaGlove::CalibrateInterpolation(WorldContextObject, MinValues, MaxValues, OutProfile);
}
void USGNovaGloveKismetLibrary::CalculateGloveLocation(
void USGNovaGloveKismetLibrary::
CalculateGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_OutGlovePosition_FQuatOutGloveRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutGlovePosition, FQuat& OutGloveRotation)
@@ -104,11 +105,33 @@ void USGNovaGloveKismetLibrary::CalculateGloveLocation(
OutGlovePosition, OutGloveRotation);
}
void USGNovaGloveKismetLibrary::CalculateWristLocation(const FVector& ReferencePosition,
const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
const bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation)
void USGNovaGloveKismetLibrary::
CalculateGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_OutGlovePosition_FRotatorOutGloveRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
USGNovaGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded,
OutGlovePosition, OutGloveRotation);
}
void USGNovaGloveKismetLibrary::
CalculateWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_OutWristPosition_FQuatOutWristRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation)
{
USGNovaGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded,
OutWristPosition, OutWristRotation);
}
void
USGNovaGloveKismetLibrary::CalculateWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_OutWristPosition_FRotatorOutWristRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
USGNovaGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded,
@@ -176,7 +199,12 @@ bool USGNovaGloveKismetLibrary::GetSensorData(
return NovaGlove->GetSensorData(WorldContextObject, OutSensorData);
}
bool USGNovaGloveKismetLibrary::GetImuRotation(USGNovaGlove* NovaGlove, FQuat& OutImu)
bool USGNovaGloveKismetLibrary::GetImuRotation_FQuatOutImu(USGNovaGlove* NovaGlove, FQuat& OutImu)
{
return NovaGlove->GetImuRotation(OutImu);
}
bool USGNovaGloveKismetLibrary::GetImuRotation_FRotatorOutImu(USGNovaGlove* NovaGlove, FRotator& OutImu)
{
return NovaGlove->GetImuRotation(OutImu);
}
@@ -248,7 +276,7 @@ void USGNovaGloveKismetLibrary::ApplyCalibration_NovaGloveHandProfile(
}
void USGNovaGloveKismetLibrary::
GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
GetGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutGlovePosition_FQuatOutGloveRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
@@ -260,7 +288,19 @@ GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePo
}
void USGNovaGloveKismetLibrary::
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
return NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
OutGlovePosition, OutGloveRotation);
}
void USGNovaGloveKismetLibrary::
GetWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutWristPosition_FQuatOutWristRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
@@ -271,6 +311,18 @@ GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHa
OutWristPosition, OutWristRotation);
}
void USGNovaGloveKismetLibrary::
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
return NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware,
OutWristPosition, OutWristRotation);
}
FString USGNovaGloveKismetLibrary::ToString(const USGNovaGlove* NovaGlove)
{
return NovaGlove->ToString();
@@ -43,7 +43,7 @@ USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::MakeNovaGloveSensor
}
USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::
MakeNovaGloveSensorData_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
MakeNovaGloveSensorData_Values_ParsedValues_FQuatImuRotation_bImuParsed_BatteryLevel_bCharging(
UObject* WorldContextObject, const TArray<FVector>& Values, const int32 ParsedValues,
const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
{
@@ -51,6 +51,15 @@ MakeNovaGloveSensorData_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_
WorldContextObject, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging);
}
USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::
MakeNovaGloveSensorData_Values_ParsedValues_FRotatorImuRotation_bImuParsed_BatteryLevel_bCharging(
UObject* WorldContextObject, const TArray<FVector>& Values, const int32 ParsedValues,
const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging)
{
return USGNovaGloveSensorData::NewNovaGloveSensorData(
WorldContextObject, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging);
}
USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::Empty(UObject* WorldContextObject)
{
return USGNovaGloveSensorData::Empty(WorldContextObject);
@@ -74,7 +83,12 @@ TArray<FVector> USGNovaGloveSensorDataKismetLibrary::GetSensorValues(
return NovaGloveSensorData->GetSensorValues();
}
FQuat USGNovaGloveSensorDataKismetLibrary::GetImuRotation(const USGNovaGloveSensorData* NovaGloveSensorData)
FQuat USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGNovaGloveSensorData* NovaGloveSensorData)
{
return NovaGloveSensorData->GetImuRotationQ();
}
FRotator USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FRotator(const USGNovaGloveSensorData* NovaGloveSensorData)
{
return NovaGloveSensorData->GetImuRotation();
}
@@ -44,7 +44,7 @@ USGSenseGloveInfo* USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo(UObject* W
}
USGSenseGloveInfo*
USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPosition_StartRotation_GloveLengths_Functions(
USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_FQuatImuCorrection_StartPositions_TArrayFQuatStartRotations_GloveLengths_Functions(
UObject* WorldContextObject, const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection,
@@ -58,6 +58,21 @@ USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DeviceId_HardwareVersion_Firm
GloveLengths, Functions);
}
USGSenseGloveInfo*
USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_FRotatorImuCorrection_StartPositions_TArrayFRotatorStartRotations_GloveLengths_Functions(
UObject* WorldContextObject, const FString& DeviceId,
const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion,
const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions)
{
return USGSenseGloveInfo::NewSenseGloveInfo(WorldContextObject, DeviceId,
HardwareVersion, FirmwareVersion, SubFirmwareVersion,
bRightHanded, NumberOfSensors, ImuCorrection,
StartPositions, StartRotations,
GloveLengths, Functions);
}
bool USGSenseGloveInfoKismetLibrary::Parse(UObject* WorldContextObject,
const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo,
const bool bUpdateOldModels)
@@ -101,7 +116,12 @@ int32 USGSenseGloveInfoKismetLibrary::GetNumberOfSensors(const USGSenseGloveInfo
return SenseGloveInfo->GetNumberOfSensors();
}
FQuat USGSenseGloveInfoKismetLibrary::GetImuCorrection(const USGSenseGloveInfo* SenseGloveInfo)
FQuat USGSenseGloveInfoKismetLibrary::GetImuCorrection_FQuat(const USGSenseGloveInfo* SenseGloveInfo)
{
return SenseGloveInfo->GetImuCorrectionQ();
}
FRotator USGSenseGloveInfoKismetLibrary::GetImuCorrection_FRotator(const USGSenseGloveInfo* SenseGloveInfo)
{
return SenseGloveInfo->GetImuCorrection();
}
@@ -111,7 +131,13 @@ TArray<FVector> USGSenseGloveInfoKismetLibrary::GetStartPositions(const USGSense
return SenseGloveInfo->GetStartPositions();
}
TArray<FQuat> USGSenseGloveInfoKismetLibrary::GetStartRotations(const USGSenseGloveInfo* SenseGloveInfo)
TArray<FQuat> USGSenseGloveInfoKismetLibrary::GetStartRotations_TArrayFQuat(const USGSenseGloveInfo* SenseGloveInfo)
{
return SenseGloveInfo->GetStartRotationsQ();
}
TArray<FRotator> USGSenseGloveInfoKismetLibrary::GetStartRotations_TArrayFRotator(
const USGSenseGloveInfo* SenseGloveInfo)
{
return SenseGloveInfo->GetStartRotations();
}
@@ -132,7 +158,14 @@ FVector USGSenseGloveInfoKismetLibrary::GetStartPosition(const USGSenseGloveInfo
return SenseGloveInfo->GetStartPosition(Finger);
}
FQuat USGSenseGloveInfoKismetLibrary::GetStartRotation(const USGSenseGloveInfo* SenseGloveInfo, const ESGFinger Finger)
FQuat USGSenseGloveInfoKismetLibrary::GetStartRotation_FQuat(const USGSenseGloveInfo* SenseGloveInfo,
const ESGFinger Finger)
{
return SenseGloveInfo->GetStartRotationQ(Finger);
}
FRotator USGSenseGloveInfoKismetLibrary::GetStartRotation_FRotator(const USGSenseGloveInfo* SenseGloveInfo,
const ESGFinger Finger)
{
return SenseGloveInfo->GetStartRotation(Finger);
}
@@ -108,7 +108,8 @@ void USGSenseGloveKismetLibrary::CalibrateInterpolation(
USGSenseGlove::CalibrateInterpolation(WorldContextObject, MinValues, MaxValues, bRightHanded, OutProfile);
}
void USGSenseGloveKismetLibrary::CalculateGloveLocation(
void USGSenseGloveKismetLibrary::
CalculateGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_MountedOn_OutGlovePosition_FQuatOutGloveRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation)
@@ -118,13 +119,36 @@ void USGSenseGloveKismetLibrary::CalculateGloveLocation(
OutGlovePosition, OutGloveRotation);
}
void USGSenseGloveKismetLibrary::CalculateWristLocation(const FVector& ReferencePosition,
const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
const bool bRightHanded, const ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation)
void USGSenseGloveKismetLibrary::
CalculateGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_MountedOn_OutGlovePosition_FRotatorOutGloveRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation)
{
USGSenseGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded, MountedOn,
OutGlovePosition, OutGloveRotation);
}
void USGSenseGloveKismetLibrary::
CalculateWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_MountedOn_GloveWristPositionOffset_FQuatGloveWristRotationOffset_OutWristPosition_FQuatOutWristRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn,
const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation)
{
USGSenseGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded, MountedOn,
GloveWristPositionOffset, GloveWristRotationOffset,
OutWristPosition, OutWristRotation);
}
void USGSenseGloveKismetLibrary::
CalculateWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_MountedOn_GloveWristPositionOffset_FRotatorGloveWristRotationOffset_OutWristPosition_FRotatorOutWristRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn,
const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation)
{
USGSenseGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation,
TrackingHardware, bRightHanded, MountedOn,
@@ -174,7 +198,12 @@ bool USGSenseGloveKismetLibrary::GetSensorData(UObject* WorldContextObject, cons
return SenseGlove->GetSensorData(WorldContextObject, OutSensorData);
}
bool USGSenseGloveKismetLibrary::GetImuRotation(USGSenseGlove* SenseGlove, FQuat& OutImu)
bool USGSenseGloveKismetLibrary::GetImuRotation_FQuatOutImu(USGSenseGlove* SenseGlove, FQuat& OutImu)
{
return SenseGlove->GetImuRotation(OutImu);
}
bool USGSenseGloveKismetLibrary::GetImuRotation_FRotatorOutImu(USGSenseGlove* SenseGlove, FRotator& OutImu)
{
return SenseGlove->GetImuRotation(OutImu);
}
@@ -258,7 +287,7 @@ void USGSenseGloveKismetLibrary::ApplyCalibration_SenseGloveHandProfile(
}
void USGSenseGloveKismetLibrary::
GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
GetGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutGlovePosition_FQuatOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
@@ -270,7 +299,19 @@ GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePo
}
void USGSenseGloveKismetLibrary::
GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation(
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
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_ReferencePosition_FQuatReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_FQuatOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn,
@@ -282,7 +323,19 @@ GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_
}
void USGSenseGloveKismetLibrary::
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_FRotatorOutGloveRotation(
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_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutWristPosition_FQuatOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
@@ -294,7 +347,19 @@ GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHa
}
void USGSenseGloveKismetLibrary::
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation(
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristRotation(
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_ReferencePosition_FQuatReferenceRotation_TrackingHardware_GloveWristPositionOffset_FQuatGloveWristRotationOffset_OutWristPosition_FQuatOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
const ESGPositionalTrackingHardware TrackingHardware,
@@ -307,6 +372,20 @@ GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHa
OutWristPosition, OutWristRotation);
}
void USGSenseGloveKismetLibrary::
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_GloveWristPositionOffset_FRotatorGloveWristRotationOffset_OutWristPosition_FRotatorOutWristRotation(
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);
}
FString USGSenseGloveKismetLibrary::ToString(const USGSenseGlove* SenseGlove)
{
return SenseGlove->ToString();
@@ -44,7 +44,7 @@ USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose(UObject* W
}
USGSenseGlovePose*
USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRightHanded_JointPositions_JointRotations_GloveAngles(
USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGQuatArrayJointRotations_GloveAngles(
UObject* WorldContextObject, const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles)
@@ -53,6 +53,16 @@ USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRightHanded_JointPositions_J
JointPositions, JointRotations, GloveAngles);
}
USGSenseGlovePose*
USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGRotatorArrayJointRotations_GloveAngles(
UObject* WorldContextObject, const bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles)
{
return USGSenseGlovePose::NewSenseGlovePose(WorldContextObject, bRightHanded,
JointPositions, JointRotations, GloveAngles);
}
USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::IdlePose(UObject* WorldContextObject,
const USGSenseGloveInfo* GloveInfo)
{
@@ -75,9 +85,16 @@ TArray<FSGVectorArray> USGSenseGlovePoseKismetLibrary::GetJointPositions(const U
return FSGArrayUtils::ToBPNestedArray<FVector, FSGVectorArray>(SenseGlovePose->GetJointPositions());
}
TArray<FSGQuatArray> USGSenseGlovePoseKismetLibrary::GetJointRotations(const USGSenseGlovePose* SenseGlovePose)
TArray<FSGQuatArray> USGSenseGlovePoseKismetLibrary::GetJointRotations_TArrayFSGQuatArray(
const USGSenseGlovePose* SenseGlovePose)
{
return FSGArrayUtils::ToBPNestedArray<FQuat, FSGQuatArray>(SenseGlovePose->GetJointRotations());
return FSGArrayUtils::ToBPNestedArray<FQuat, FSGQuatArray>(SenseGlovePose->GetJointRotationsQ());
}
TArray<FSGRotatorArray> USGSenseGlovePoseKismetLibrary::GetJointRotations_TArrayFSGRotatorArray(
const USGSenseGlovePose* SenseGlovePose)
{
return FSGArrayUtils::ToBPNestedArray<FRotator, FSGRotatorArray>(SenseGlovePose->GetJointRotations());
}
TArray<FSGVectorArray> USGSenseGlovePoseKismetLibrary::GetGloveAngles(const USGSenseGlovePose* SenseGlovePose)
@@ -90,7 +107,12 @@ TArray<FVector> USGSenseGlovePoseKismetLibrary::GetThimblePositions(const USGSen
return SenseGlovePose->GetThimblePositions();
}
TArray<FQuat> USGSenseGlovePoseKismetLibrary::GetThimbleRotations(const USGSenseGlovePose* SenseGlovePose)
TArray<FQuat> USGSenseGlovePoseKismetLibrary::GetThimbleRotations_FQuat(const USGSenseGlovePose* SenseGlovePose)
{
return SenseGlovePose->GetThimbleRotationsQ();
}
TArray<FRotator> USGSenseGlovePoseKismetLibrary::GetThimbleRotations_FRotator(const USGSenseGlovePose* SenseGlovePose)
{
return SenseGlovePose->GetThimbleRotations();
}
@@ -43,7 +43,7 @@ USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSen
}
USGSenseGloveSensorData*
USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SensorAngles_FQuatImuRotation_ParsedValues_bImuParsed(
UObject* WorldContextObject, const TArray<FSGFloatArray>& SensorAngles,
const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
{
@@ -51,6 +51,15 @@ USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SensorAngles_ImuR
ImuRotation, ParsedValues, bImuParsed);
}
USGSenseGloveSensorData*
USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SensorAngles_FRotatorImuRotation_ParsedValues_bImuParsed(
UObject* WorldContextObject, const TArray<FSGFloatArray>& SensorAngles,
const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed)
{
return USGSenseGloveSensorData::NewSenseGloveSensorData(WorldContextObject, SensorAngles,
ImuRotation, ParsedValues, bImuParsed);
}
USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::Empty(UObject* WorldContextObject)
{
return USGSenseGloveSensorData::Empty(WorldContextObject);
@@ -75,7 +84,13 @@ TArray<FSGFloatArray> USGSenseGloveSensorDataKismetLibrary::GetSensorAngles(
return FSGArrayUtils::ToBPNestedArray<float, FSGFloatArray>(SenseGloveSensorData->GetSensorAngles());
}
FQuat USGSenseGloveSensorDataKismetLibrary::GetImuRotation(const USGSenseGloveSensorData* SenseGloveSensorData)
FQuat USGSenseGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGSenseGloveSensorData* SenseGloveSensorData)
{
return SenseGloveSensorData->GetImuRotationQ();
}
FRotator USGSenseGloveSensorDataKismetLibrary::GetImuRotation_FRotator(
const USGSenseGloveSensorData* SenseGloveSensorData)
{
return SenseGloveSensorData->GetImuRotation();
}
@@ -56,7 +56,14 @@ TArray<FVector> USGSenseGloveVarsKismetLibrary::GetStartPositions(const FString&
return FSGSenseGloveVars::GetStartPositions(HardwareVersion, bRightHanded);
}
TArray<FQuat> USGSenseGloveVarsKismetLibrary::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded)
TArray<FQuat> USGSenseGloveVarsKismetLibrary::GetStartRotations_TArrayFQuat(
const FString& HardwareVersion, const bool bRightHanded)
{
return FSGSenseGloveVars::GetStartRotationsQ(HardwareVersion, bRightHanded);
}
TArray<FRotator> USGSenseGloveVarsKismetLibrary::GetStartRotations_TArrayFRotator(
const FString& HardwareVersion, const bool bRightHanded)
{
return FSGSenseGloveVars::GetStartRotations(HardwareVersion, bRightHanded);
}
@@ -71,8 +78,16 @@ int32 USGSenseGloveVarsKismetLibrary::GetSensors(const FString& HardwareVersion)
return FSGSenseGloveVars::GetSensors(HardwareVersion);
}
FQuat USGSenseGloveVarsKismetLibrary::GetImuCorrection(const FString& HardwareVersion,
const int32 FirmwareVersion, const int32 SubFirmwareVersion)
FQuat USGSenseGloveVarsKismetLibrary::GetImuCorrection_FQuat(const FString& HardwareVersion,
const int32 FirmwareVersion,
const int32 SubFirmwareVersion)
{
return FSGSenseGloveVars::GetImuCorrectionQ(HardwareVersion, FirmwareVersion, SubFirmwareVersion);
}
FRotator USGSenseGloveVarsKismetLibrary::GetImuCorrection_FRotator(const FString& HardwareVersion,
const int32 FirmwareVersion,
const int32 SubFirmwareVersion)
{
return FSGSenseGloveVars::GetImuCorrection(HardwareVersion, FirmwareVersion, SubFirmwareVersion);
}
@@ -37,9 +37,21 @@
#include "SGCore/SGTracking.h"
void USGTrackingKismetLibrary::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation,
const FVector& PositionOffset, const FQuat& RotationOffset,
FVector& OutNewPosition, FQuat& OutNewRotation)
void
USGTrackingKismetLibrary::CalculateLocation_TrackedPosition_FQuatTrackedRotation_PositionOffset_FQuatRotationOffset_OutNewPosition_FQuatOutNewRotation(
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_TrackedPosition_FRotatorTrackedRotation_PositionOffset_FRotatorRotationOffset_OutNewPosition_FRotatorOutNewRotation(
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);
@@ -50,7 +62,12 @@ TArray<FVector> USGTrackingKismetLibrary::GetSenseGloveFingerToGlovePositionOrig
return FSGTracking::GetSenseGloveFingerToGlovePositionOrigin();
}
TArray<FQuat> USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin()
TArray<FQuat> USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFQuat()
{
return FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ();
}
TArray<FRotator> USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFRotator()
{
return FSGTracking::GetSenseGloveFingerToGloveRotationOrigin();
}
@@ -60,18 +77,32 @@ FVector USGTrackingKismetLibrary::GetSenseGloveWristPositionOffset()
return FSGTracking::GetSenseGloveWristPositionOffset();
}
FQuat USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset()
FQuat USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FQuat()
{
return FSGTracking::GetSenseGloveWristRotationOffsetQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FRotator()
{
return FSGTracking::GetSenseGloveWristRotationOffset();
}
void USGTrackingKismetLibrary::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation)
void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRightHanded_ToFinger_OutIPosition_FQuatOutIRotation(
const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation)
{
return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation);
}
void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset(
void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRightHanded_ToFinger_OutIPosition_FRotatorOutIRotation(
const bool bRightHanded, const ESGFinger ToFinger,
FVector& OutIPosition, FRotator& OutIRotation)
{
return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation);
}
void
USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_Hardware_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
@@ -79,12 +110,26 @@ void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset(
OutPositionOffset, OutRotationOffset);
}
void
USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_Hardware_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
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 USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FQuat()
{
return FSGTracking::GetSenseGloveViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FRotator()
{
return FSGTracking::GetSenseGloveViveToAttachRotation();
}
@@ -94,7 +139,12 @@ FVector USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachPosition()
return FSGTracking::GetSenseGloveOculusTouchToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation()
FQuat USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FQuat()
{
return FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FRotator()
{
return FSGTracking::GetSenseGloveOculusTouchToAttachRotation();
}
@@ -104,13 +154,24 @@ FVector USGTrackingKismetLibrary::GetNovaToWristPositionOffset()
return FSGTracking::GetNovaToWristPositionOffset();
}
FQuat USGTrackingKismetLibrary::GetNovaToWristRotationOffset()
FQuat USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FQuat()
{
return FSGTracking::GetNovaToWristRotationOffsetQ();
}
FRotator USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FRotator()
{
return FSGTracking::GetNovaToWristRotationOffset();
}
void USGTrackingKismetLibrary::GetNovaGloveWristOffset(const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
}
void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
const bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset)
{
return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset);
}
@@ -120,7 +181,12 @@ FVector USGTrackingKismetLibrary::GetRightNovaViveToAttachPosition()
return FSGTracking::GetRightNovaViveToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation()
FQuat USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaViveToAttachRotation();
}
@@ -130,7 +196,12 @@ FVector USGTrackingKismetLibrary::GetLeftNovaViveToAttachPosition()
return FSGTracking::GetLeftNovaViveToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation()
FQuat USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaViveToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaViveToAttachRotation();
}
@@ -140,7 +211,12 @@ FVector USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachPosition()
return FSGTracking::GetRightNovaQuest2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation()
FQuat USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaQuest2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaQuest2ToAttachRotation();
}
@@ -150,7 +226,12 @@ FVector USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachPosition()
return FSGTracking::GetLeftNovaQuest2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation()
FQuat USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaQuest2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaQuest2ToAttachRotation();
}
@@ -160,23 +241,41 @@ FVector USGTrackingKismetLibrary::GetRightNovaPico2ToAttachPosition()
return FSGTracking::GetRightNovaPico2ToAttachPosition();
}
FQuat USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation()
FQuat USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FQuat()
{
return FSGTracking::GetRightNovaPico2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FRotator()
{
return FSGTracking::GetRightNovaPico2ToAttachRotation();
}
FQuat USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation()
FQuat USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FQuat()
{
return FSGTracking::GetLeftNovaPico2ToAttachRotationQ();
}
FRotator USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FRotator()
{
return FSGTracking::GetLeftNovaPico2ToAttachRotation();
}
void USGTrackingKismetLibrary::GetNovaGloveTrackerOffset(
void USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_Hardware_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
const ESGPositionalTrackingHardware Hardware, const bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset)
{
return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset);
}
void
USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_Hardware_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
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);
@@ -63,11 +63,19 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Basic Hand Model",
Category="SenseGlove | Core | Kinematics | Basic Hand Model",
meta=(WorldContext="WorldContextObject"))
static USGBasicHandModel* MakeBasicHandModel_bRightHanded_Lengths_StartPositions_StartRotations(
static USGBasicHandModel* MakeBasicHandModel_bRightHanded_Lengths_StartPositions_TArrayFQuatStartRotations(
UObject* WorldContextObject,
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations);
UFUNCTION(BlueprintCallable, DisplayName="Make Basic Hand Model",
Category="SenseGlove | Core | Kinematics | Basic Hand Model",
meta=(WorldContext="WorldContextObject"))
static USGBasicHandModel* MakeBasicHandModel_bRightHanded_Lengths_StartPositions_TArrayFRotatorStartRotations(
UObject* WorldContextObject,
bool bRightHanded, const TArray<FSGFloatArray>& Lengths,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model",
meta=(WorldContext="WorldContextObject"))
static USGBasicHandModel* Default(UObject* WorldContextObject, bool bRightHanded);
@@ -125,8 +133,13 @@ public:
static void SetStartJointPosition_uint8Finger(UPARAM(ref) USGBasicHandModel* BasicHandModel, uint8 Finger,
const FVector& Position);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static TArray<FQuat> GetStartJointRotations(const USGBasicHandModel* BasicHandModel);
UFUNCTION(BlueprintPure, DisplayName="Get Start Joint Rotations",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static TArray<FQuat> GetStartJointRotations_TArrayFQuat(const USGBasicHandModel* BasicHandModel);
UFUNCTION(BlueprintPure, DisplayName="Get Start Joint Rotations",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static TArray<FRotator> GetStartJointRotations_TArrayFRotator(const USGBasicHandModel* BasicHandModel);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static FVector GetJointPosition(const USGBasicHandModel* BasicHandModel, ESGFinger Finger);
@@ -135,12 +148,23 @@ public:
static void SetJointPosition(UPARAM(ref) USGBasicHandModel* BasicHandModel, const FVector& NewPosition,
ESGFinger Finger);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static FQuat GetJointRotation(const USGBasicHandModel* BasicHandModel, ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotation",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static FQuat GetJointRotation_FQuat(const USGBasicHandModel* BasicHandModel, ESGFinger Finger);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static void SetJointRotation(UPARAM(ref) USGBasicHandModel* BasicHandModel, const FQuat& NewRotation,
ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotation",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static FRotator GetJointRotation_FRotator(const USGBasicHandModel* BasicHandModel, ESGFinger Finger);
UFUNCTION(BlueprintCallable, DisplayName="Set Joint Rotation",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static void SetJointRotation_FQuatNewRotation_Finger(
UPARAM(ref) USGBasicHandModel* BasicHandModel, const FQuat& NewRotation, ESGFinger Finger);
UFUNCTION(BlueprintCallable, DisplayName="Set Joint Rotation",
Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static void SetJointRotation_FRotatorNewRotation_Finger(
UPARAM(ref) USGBasicHandModel* BasicHandModel, const FRotator& NewRotation, ESGFinger Finger);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model")
static TArray<float> GetTotalLengths(const USGBasicHandModel* BasicHandModel);
@@ -62,10 +62,16 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
static USGHandInterpolator* MakeHandInterpolator_JointInterpolations_CmcStartRotation(
static USGHandInterpolator* MakeHandInterpolator_JointInterpolations_FQuatCmcStartRotation(
UObject* WorldContextObject,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FQuat& CmcStartRotation);
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator",
Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject"))
static USGHandInterpolator* MakeHandInterpolator_JointInterpolations_FRotatorCmcStartRotation(
UObject* WorldContextObject,
const TArray<FSGInterpolationSetArray>& JointInterpolations, const FRotator& CmcStartRotation);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator",
meta=(WorldContext="WorldContextObject"))
static USGHandInterpolator* Default(UObject* WorldContextObject, bool bRightHanded);
@@ -91,8 +97,13 @@ public:
TArray<FSGInterpolationSetArray> GetJointInterpolations(
UObject* WorldContextObject, const USGHandInterpolator* HandInterpolator) const;
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Hand Interpolator")
FQuat GetCmcStartRotation(const USGHandInterpolator* HandInterpolator) const;
UFUNCTION(BlueprintPure, DisplayName="Get Cmc Start Rotation",
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
FQuat GetCmcStartRotation_FQuat(const USGHandInterpolator* HandInterpolator) const;
UFUNCTION(BlueprintPure, DisplayName="Get Cmc Start Rotation",
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
FRotator GetCmcStartRotation_FRotator(const USGHandInterpolator* HandInterpolator) const;
UFUNCTION(BlueprintPure, DisplayName="CalculateAngle",
Category="SenseGlove | Core | Kinematics | Hand Interpolator")
@@ -36,6 +36,7 @@
#pragma once
#include "SGCore/SGQuatArray.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGTypes/SGCoreTypes.h"
@@ -56,11 +57,18 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Pose", Category="SenseGlove | Core | Hand Pose",
meta=(WorldContext="WorldContextObject"))
static USGHandPose* MakeHandPose_bRightHanded_JointPositions_JointRotations_HandAngles(
static USGHandPose* MakeHandPose_bRightHanded_JointPositions_FSGQuatArrayJointRotations_HandAngles(
UObject* WorldContextObject,
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
UFUNCTION(BlueprintCallable, DisplayName="Make Hand Pose", Category="SenseGlove | Core | Hand Pose",
meta=(WorldContext="WorldContextObject"))
static USGHandPose* MakeHandPose_bRightHanded_JointPositions_FSGRotatorArrayJointRotations_HandAngles(
UObject* WorldContextObject,
bool bRightHanded, const TArray<FSGVectorArray>& JointPositions, const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& HandAngles);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Pose",
meta=(WorldContext="WorldContextObject"))
static USGHandPose* Deserialize(UObject* WorldContextObject, const FString& SerializedString);
@@ -122,8 +130,11 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose")
static TArray<FSGVectorArray> GetJointPositions(const USGHandPose* HandPose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose")
static TArray<FSGQuatArray> GetJointRotations(const USGHandPose* HandPose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | Hand Pose")
static TArray<FSGQuatArray> GetJointRotationsQ(const USGHandPose* HandPose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | Hand Pose")
static TArray<FSGRotatorArray> GetJointRotations(const USGHandPose* HandPose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose")
static TArray<FSGVectorArray> GetHandAngles(const USGHandPose* HandPose);
@@ -132,8 +143,8 @@ public:
static bool Equals(const USGHandPose* A, const USGHandPose* B);
UFUNCTION(BlueprintPure, DisplayName="Get Normalized Flexion", Category="SenseGlove | Core | Hand Pose")
static float GetNormalizedFlexion_Finger_bClamp01(const USGHandPose* HandPose, ESGFinger Finger,
bool bClamp01 = true);
static float GetNormalizedFlexion_Finger_bClamp01(const USGHandPose* HandPose,
ESGFinger Finger, bool bClamp01 = true);
UFUNCTION(BlueprintPure, DisplayName="Get Normalized Flexion", Category="SenseGlove | Core | Hand Pose")
static TArray<float> GetNormalizedFlexion_bClamp01(const USGHandPose* HandPose, bool bClamp01 = true);
@@ -84,8 +84,11 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove")
static bool IsRight(const USGHapticGlove* HapticGlove);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove")
static bool GetImuRotation(UPARAM(ref) USGHapticGlove* HapticGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
static bool GetImuRotation_FQuatOutImu(UPARAM(ref) USGHapticGlove* HapticGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove")
static bool GetImuRotation_FRotatorOutImu(UPARAM(ref) USGHapticGlove* HapticGlove, FRotator& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove",
meta=(WorldContext="WorldContextObject"))
@@ -171,15 +174,33 @@ public:
static void ApplyCalibration(UObject* WorldContextObject,
const USGHapticGlove* HapticGlove, USGHandProfile*& OutProfile);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove")
static void GetWristLocation(const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Haptic Glove")
static void GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristLocation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove")
static void GetGloveLocation(const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Haptic Glove")
static void
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristLocation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Haptic Glove")
static void GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Haptic Glove")
static void
GetGloveLocation_FRotatorReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
const USGHapticGlove* HapticGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
};
@@ -53,14 +53,27 @@ class SENSEGLOVECOREKISMET_API USGJointKinematicsKismetLibrary final : public US
public:
UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics",
Category="SenseGlove | Core | Kinematics | Joint Kinematics")
static bool ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations(
static bool ForwardKinematics_StartPosition_FQuatStartRotation_JointLengths_JointAngles_OutNewPositions_TArrayFQuatOutNewRotations(
const FVector& StartPosition, const FQuat& StartRotation,
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics",
Category="SenseGlove | Core | Kinematics | Joint Kinematics")
static bool ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations(
static bool ForwardKinematics_StartPosition_FRotatorStartRotation_JointLengths_JointAngles_OutNewPositions_TArrayFRotatorOutNewRotations(
const FVector& StartPosition, const FRotator& StartRotation,
const TArray<FVector>& JointLengths, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics",
Category="SenseGlove | Core | Kinematics | Joint Kinematics")
static bool ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_TArrayFQuatOutNewRotations(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FQuat>& OutNewRotations);
UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics",
Category="SenseGlove | Core | Kinematics | Joint Kinematics")
static bool ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_TArrayFRotatorOutNewRotations(
const USGBasicHandModel* Profile, ESGFinger Finger, const TArray<FVector>& JointAngles,
TArray<FVector>& OutNewPositions, TArray<FRotator>& OutNewRotations);
};
@@ -96,15 +96,37 @@ public:
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
USGNovaGloveHandProfile*& OutProfile);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
Category="SenseGlove | Core | Nova | Nova Glove")
static void
CalculateGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_OutGlovePosition_FQuatOutGloveRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
Category="SenseGlove | Core | Nova | Nova Glove")
static void
CalculateGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_OutGlovePosition_FRotatorOutGloveRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
Category="SenseGlove | Core | Nova | Nova Glove")
static void
CalculateWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_OutWristPosition_FQuatOutWristRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
Category="SenseGlove | Core | Nova | Nova Glove")
static void
CalculateWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_OutWristPosition_FRotatorOutWristRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintCallable, DisplayName="To Bytes", Category="SenseGlove | Core | Nova | Nova Glove")
static FString ToBytes_ThumperCommand(const USGThumperCommand* ThumperCommand);
@@ -144,8 +166,11 @@ public:
static bool GetSensorData(UObject* WorldContextObject,
UPARAM(ref) USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove")
static bool GetImuRotation(UPARAM(ref) USGNovaGlove* NovaGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova Glove")
static bool GetImuRotation_FQuatOutImu(UPARAM(ref) USGNovaGlove* NovaGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova Glove")
static bool GetImuRotation_FRotatorOutImu(UPARAM(ref) USGNovaGlove* NovaGlove, FRotator& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove",
meta=(WorldContext="WorldContextObject"))
@@ -206,20 +231,37 @@ public:
USGNovaGloveHandProfile*& OutProfile);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova Glove")
static void GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
static void
GetGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutGlovePosition_FQuatOutGloveRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova Glove")
static void
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova Glove")
static void
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
GetWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutWristPosition_FQuatOutWristRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova Glove")
static void
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristRotation(
const USGNovaGlove* NovaGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove")
static FString ToString(const USGNovaGlove* NovaGlove);
};
@@ -55,10 +55,17 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Sensor Data",
Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
static USGNovaGloveSensorData*
MakeNovaGloveSensorData_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging(
MakeNovaGloveSensorData_Values_ParsedValues_FQuatImuRotation_bImuParsed_BatteryLevel_bCharging(
UObject* WorldContextObject, const TArray<FVector>& Values, int32 ParsedValues,
const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Sensor Data",
Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
static USGNovaGloveSensorData*
MakeNovaGloveSensorData_Values_ParsedValues_FRotatorImuRotation_bImuParsed_BatteryLevel_bCharging(
UObject* WorldContextObject, const TArray<FVector>& Values, int32 ParsedValues,
const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data",
meta=(WorldContext="WorldContextObject"))
static USGNovaGloveSensorData* Empty(UObject* WorldContextObject);
@@ -75,8 +82,13 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
static TArray<FVector> GetSensorValues(const USGNovaGloveSensorData* NovaGloveSensorData);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
static FQuat GetImuRotation(const USGNovaGloveSensorData* NovaGloveSensorData);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
static FQuat GetImuRotation_FQuat(const USGNovaGloveSensorData* NovaGloveSensorData);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
static FRotator GetImuRotation_FRotator(const USGNovaGloveSensorData* NovaGloveSensorData);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data")
static int32 GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData);
@@ -57,13 +57,23 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Info",
Category="SenseGlove | Core | SG | Sense Glove Info", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo*
MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPosition_StartRotation_GloveLengths_Functions(
MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_FQuatImuCorrection_StartPositions_TArrayFQuatStartRotations_GloveLengths_Functions(
UObject* WorldContextObject, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FQuat>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Info",
Category="SenseGlove | Core | SG | Sense Glove Info", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo*
MakeSenseGloveInfo_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_FRotatorImuCorrection_StartPositions_TArrayFRotatorStartRotations_GloveLengths_Functions(
UObject* WorldContextObject, const FString& DeviceId,
const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion,
bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection,
const TArray<FVector>& StartPositions, const TArray<FRotator>& StartRotations,
const TArray<FSGVectorArray>& GloveLengths, const TArray<bool>& Functions);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info",
meta=(WorldContext="WorldContextObject"))
static bool Parse(UObject* WorldContextObject,
@@ -92,14 +102,20 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static int32 GetNumberOfSensors(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetImuCorrection(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetImuCorrection_FQuat(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Info")
static FRotator GetImuCorrection_FRotator(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FVector> GetStartPositions(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FQuat> GetStartRotations(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, DisplayName="Get Start Rotations", Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FQuat> GetStartRotations_TArrayFQuat(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, DisplayName="Get Start Rotations", Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FRotator> GetStartRotations_TArrayFRotator(const USGSenseGloveInfo* SenseGloveInfo);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FSGVectorArray> GetGloveLengths(const USGSenseGloveInfo* SenseGloveInfo);
@@ -110,8 +126,11 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FVector GetStartPosition(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetStartRotation(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Start Rotation", Category="SenseGlove | Core | SG | Sense Glove Info")
static FQuat GetStartRotation_FQuat(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Start Rotation", Category="SenseGlove | Core | SG | Sense Glove Info")
static FRotator GetStartRotation_FRotator(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Lengths", Category="SenseGlove | Core | SG | Sense Glove Info")
static TArray<FVector> GetGloveLengths_Finger(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger);
@@ -107,19 +107,46 @@ public:
const TArray<FVector>& MinValues, const TArray<FVector>& MaxValues,
bool bRightHanded, USGSenseGloveHandProfile*& OutProfile);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
Category="SenseGlove | Core | SG | Sense Glove")
static void
CalculateGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_MountedOn_OutGlovePosition_FQuatOutGloveRotation(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location",
Category="SenseGlove | Core | SG | Sense Glove")
static void
CalculateGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_MountedOn_OutGlovePosition_FRotatorOutGloveRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
Category="SenseGlove | Core | SG | Sense Glove")
static void
CalculateWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_bRightHanded_MountedOn_GloveWristPositionOffset_FQuatGloveWristRotationOffset_OutWristPosition_FQuatOutWristRotation
(
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location",
Category="SenseGlove | Core | SG | Sense Glove")
static void
CalculateWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_bRightHanded_MountedOn_GloveWristPositionOffset_FRotatorGloveWristRotationOffset_OutWristPosition_FRotatorOutWristRotation(
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
bool bRightHanded, ESGFinger MountedOn,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveInfo* GetGloveModel(UObject* WorldContextObject, const USGSenseGlove* SenseGlove);
@@ -146,8 +173,11 @@ public:
static bool GetSensorData(UObject* WorldContextObject,
const USGSenseGlove* SenseGlove, USGSenseGloveSensorData*& OutSensorData);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove")
static bool GetImuRotation(UPARAM(ref) USGSenseGlove* SenseGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove")
static bool GetImuRotation_FQuatOutImu(UPARAM(ref) USGSenseGlove* SenseGlove, FQuat& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove")
static bool GetImuRotation_FRotatorOutImu(UPARAM(ref) USGSenseGlove* SenseGlove, FRotator& OutImu);
UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove",
meta=(WorldContext="WorldContextObject"))
@@ -220,7 +250,8 @@ public:
USGSenseGloveHandProfile*& OutProfile);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove")
static void GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation(
static void
GetGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutGlovePosition_FQuatOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
@@ -228,15 +259,31 @@ public:
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation(
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutGlovePosition_FRotatorOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetGloveLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_FQuatOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
FVector& OutGlovePosition, FQuat& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetGloveLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_FRotatorOutGloveRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn,
FVector& OutGlovePosition, FRotator& OutGloveRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation(
GetWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_OutWristPosition_FQuatOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
@@ -244,7 +291,15 @@ public:
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetWristLocation_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation(
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_OutWristPosition_FRotatorOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetWristLocation_ReferencePosition_FQuatReferenceRotation_TrackingHardware_GloveWristPositionOffset_FQuatGloveWristRotationOffset_OutWristPosition_FQuatOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FQuat& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
@@ -252,6 +307,16 @@ public:
const FQuat& GloveWristRotationOffset,
FVector& OutWristPosition, FQuat& OutWristRotation);
UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove")
static void
GetWristLocation_ReferencePosition_FRotatorReferenceRotation_TrackingHardware_GloveWristPositionOffset_FRotatorGloveWristRotationOffset_OutWristPosition_FRotatorOutWristRotation(
const USGSenseGlove* SenseGlove,
const FVector& ReferencePosition, const FRotator& ReferenceRotation,
ESGPositionalTrackingHardware TrackingHardware,
const FVector& GloveWristPositionOffset,
const FRotator& GloveWristRotationOffset,
FVector& OutWristPosition, FRotator& OutWristRotation);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove")
static FString ToString(const USGSenseGlove* SenseGlove);
};
@@ -36,6 +36,7 @@
#pragma once
#include "SGCore/SGQuatArray.h"
#include "SGCore/SGRotatorArray.h"
#include "SGCore/SGVectorArray.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
@@ -57,12 +58,22 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose",
Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose* MakeSenseGlovePose_bRightHanded_JointPositions_JointRotations_GloveAngles(
static USGSenseGlovePose*
MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGQuatArrayJointRotations_GloveAngles(
UObject* WorldContextObject, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGQuatArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose",
Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose*
MakeSenseGlovePose_bRightHanded_JointPositions_TArrayFSGRotatorArrayJointRotations_GloveAngles(
UObject* WorldContextObject, bool bRightHanded,
const TArray<FSGVectorArray>& JointPositions,
const TArray<FSGRotatorArray>& JointRotations,
const TArray<FSGVectorArray>& GloveAngles);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose",
meta=(WorldContext="WorldContextObject"))
static USGSenseGlovePose* IdlePose(UObject* WorldContextObject, const USGSenseGloveInfo* GloveInfo);
@@ -77,8 +88,11 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGVectorArray> GetJointPositions(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGQuatArray> GetJointRotations(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGQuatArray> GetJointRotations_TArrayFSGQuatArray(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGRotatorArray> GetJointRotations_TArrayFSGRotatorArray(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FSGVectorArray> GetGloveAngles(const USGSenseGlovePose* SenseGlovePose);
@@ -86,8 +100,11 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> GetThimblePositions(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FQuat> GetThimbleRotations(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FQuat> GetThimbleRotations_FQuat(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FRotator> GetThimbleRotations_FRotator(const USGSenseGlovePose* SenseGlovePose);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose")
static TArray<FVector> GetTotalGloveAngles(const USGSenseGlovePose* SenseGlovePose);
@@ -56,10 +56,16 @@ public:
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Data",
Category="SenseGlove | Core | SG | Sense Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveSensorData* MakeSenseGloveSensorData_SensorAngles_ImuRotation_ParsedValues_bImuParsed(
static USGSenseGloveSensorData* MakeSenseGloveSensorData_SensorAngles_FQuatImuRotation_ParsedValues_bImuParsed(
UObject* WorldContextObject, const TArray<FSGFloatArray>& SensorAngles,
const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed);
UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Data",
Category="SenseGlove | Core | SG | Sense Glove Sensor Data", meta=(WorldContext="WorldContextObject"))
static USGSenseGloveSensorData* MakeSenseGloveSensorData_SensorAngles_FRotatorImuRotation_ParsedValues_bImuParsed(
UObject* WorldContextObject, const TArray<FSGFloatArray>& SensorAngles,
const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Data",
meta=(WorldContext="WorldContextObject"))
static USGSenseGloveSensorData* Empty(UObject* WorldContextObject);
@@ -76,8 +82,13 @@ public:
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
static TArray<FSGFloatArray> GetSensorAngles(const USGSenseGloveSensorData* SenseGloveSensorData);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
static FQuat GetImuRotation(const USGSenseGloveSensorData* SenseGloveSensorData);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
static FQuat GetImuRotation_FQuat(const USGSenseGloveSensorData* SenseGloveSensorData);
UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation",
Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
static FRotator GetImuRotation_FRotator(const USGSenseGloveSensorData* SenseGloveSensorData);
UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data")
static int32 GetParsedValues(const USGSenseGloveSensorData* SenseGloveSensorData);
@@ -49,7 +49,7 @@
class USGSenseGloveInfo;
UCLASS(meta=(ScriptName = "SesneGloveVarsKismetLibrary"))
class SENSEGLOVECOREKISMET_API USGSenseGloveVarsKismetLibrary : public USGBlueprintFunctionLibrary
class SENSEGLOVECOREKISMET_API USGSenseGloveVarsKismetLibrary final : public USGBlueprintFunctionLibrary
{
GENERATED_BODY()
@@ -63,8 +63,13 @@ public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<FVector> GetStartPositions(const FString& HardwareVersion, bool bRightHanded);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<FQuat> GetStartRotations(const FString& HardwareVersion, bool bRightHanded);
UFUNCTION(BlueprintCallable, DisplayName="Get Start Rotations",
Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<FQuat> GetStartRotations_TArrayFQuat(const FString& HardwareVersion, bool bRightHanded);
UFUNCTION(BlueprintCallable, DisplayName="Get Start Rotations",
Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<FRotator> GetStartRotations_TArrayFRotator(const FString& HardwareVersion, bool bRightHanded);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<FSGVectorArray> GetGloveLengths(const FString& HardwareVersion);
@@ -72,8 +77,13 @@ public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static int32 GetSensors(const FString& HardwareVersion);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static FQuat GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Vars")
static FQuat GetImuCorrection_FQuat(const FString& HardwareVersion,
int32 FirmwareVersion, int32 SubFirmwareVersion);
UFUNCTION(BlueprintCallable, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Vars")
static FRotator GetImuCorrection_FRotator(const FString& HardwareVersion,
int32 FirmwareVersion, int32 SubFirmwareVersion);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars")
static TArray<bool> GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion);
@@ -36,6 +36,9 @@
#pragma once
#include "Containers/Array.h"
#include "Math/Quat.h"
#include "Math/Rotator.h"
#include "Math/Vector.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGTypes/SGCoreTypes.h"
@@ -48,89 +51,177 @@ class SENSEGLOVECOREKISMET_API USGTrackingKismetLibrary final : public USGBluepr
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static void CalculateLocation(
UFUNCTION(BlueprintCallable, DisplayName="Calculate Location", Category="SenseGlove | Core | Tracking")
static void
CalculateLocation_TrackedPosition_FQuatTrackedRotation_PositionOffset_FQuatRotationOffset_OutNewPosition_FQuatOutNewRotation(
const FVector& TrackedPosition, const FQuat& TrackedRotation,
const FVector& PositionOffset, const FQuat& RotationOffset,
FVector& OutNewPosition, FQuat& OutNewRotation);
UFUNCTION(BlueprintCallable, DisplayName="Calculate Location", Category="SenseGlove | Core | Tracking")
static void
CalculateLocation_TrackedPosition_FRotatorTrackedRotation_PositionOffset_FRotatorRotationOffset_OutNewPosition_FRotatorOutNewRotation(
const FVector& TrackedPosition, const FRotator& TrackedRotation,
const FVector& PositionOffset, const FRotator& RotationOffset,
FVector& OutNewPosition, FRotator& OutNewRotation);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static TArray<FVector> GetSenseGloveFingerToGlovePositionOrigin();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOrigin();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Finger To Glove Rotation Origin",
Category="SenseGlove | Core | Tracking")
static TArray<FQuat> GetSenseGloveFingerToGloveRotationOrigin_TArrayFQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Finger To Glove Rotation Origin",
Category="SenseGlove | Core | Tracking")
static TArray<FRotator> GetSenseGloveFingerToGloveRotationOrigin_TArrayFRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetSenseGloveWristPositionOffset();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveWristRotationOffset();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Wrist Rotation Offset",
Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveWristRotationOffset_FQuat();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation);
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Wrist Rotation Offset",
Category="SenseGlove | Core | Tracking")
static FRotator GetSenseGloveWristRotationOffset_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Mount Offset", Category="SenseGlove | Core | Tracking")
static void GetSenseGloveMountOffset_bRightHanded_ToFinger_OutIPosition_FQuatOutIRotation(
bool bRightHanded, ESGFinger ToFinger,
FVector& OutIPosition, FQuat& OutIRotation);
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Mount Offset", Category="SenseGlove | Core | Tracking")
static void GetSenseGloveMountOffset_bRightHanded_ToFinger_OutIPosition_FRotatorOutIRotation(
bool bRightHanded, ESGFinger ToFinger,
FVector& OutIPosition, FRotator& OutIRotation);
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset",
Category="SenseGlove | Core | Tracking")
static void GetSenseGloveTrackerMountOffset_Hardware_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset",
Category="SenseGlove | Core | Tracking")
static void GetSenseGloveTrackerMountOffset_Hardware_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetSenseGloveViveToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveViveToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveViveToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetSenseGloveViveToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetSenseGloveOculusTouchToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveOculusTouchToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Oculus Touch To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetSenseGloveOculusTouchToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Oculus Touch To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetSenseGloveOculusTouchToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetNovaToWristPositionOffset();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetNovaToWristRotationOffset();
UFUNCTION(BlueprintCallable, DisplayName="Get Nove To Wrist Rotation Offset",
Category="SenseGlove | Core | Tracking")
static FQuat GetNovaToWristRotationOffset_FQuat();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get Nove To Wrist Rotation Offset",
Category="SenseGlove | Core | Tracking")
static FRotator GetNovaToWristRotationOffset_FRotator();
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
static void GetNovaGloveWristOffset_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking")
static void GetNovaGloveWristOffset_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetRightNovaViveToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaViveToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaViveToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetRightNovaViveToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetLeftNovaViveToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaViveToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaViveToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetLeftNovaViveToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetRightNovaQuest2ToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaQuest2ToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaQuest2ToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetRightNovaQuest2ToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetLeftNovaQuest2ToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaQuest2ToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaQuest2ToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetLeftNovaQuest2ToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FVector GetRightNovaPico2ToAttachPosition();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaPico2ToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Pico 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetRightNovaPico2ToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaPico2ToAttachRotation();
UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Pico 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetRightNovaPico2ToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Pico 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FQuat GetLeftNovaPico2ToAttachRotation_FQuat();
UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Pico 2 To Attach Rotation",
Category="SenseGlove | Core | Tracking")
static FRotator GetLeftNovaPico2ToAttachRotation_FRotator();
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Tracker Offset", Category="SenseGlove | Core | Tracking")
static void GetNovaGloveTrackerOffset_Hardware_bRightHanded_OutPositionOffset_FQuatOutRotationOffset(
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FQuat& OutRotationOffset);
UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Tracker Offset", Category="SenseGlove | Core | Tracking")
static void GetNovaGloveTrackerOffset_Hardware_bRightHanded_OutPositionOffset_FRotatorOutRotationOffset(
ESGPositionalTrackingHardware Hardware, bool bRightHanded,
FVector& OutPositionOffset, FRotator& OutRotationOffset);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking")
static FString ToString(ESGPositionalTrackingHardware Hardware);
@@ -33,4 +33,56 @@
*/
#include "SGUtils/SGArrayUtils.h"
#include "SGUtils/SGArrayUtils.h"
TArray<FRotator> FSGArrayUtils::QuatsToRotators(const TArray<FQuat>& QuatsArray)
{
TArray<FRotator> RotatorsArray;
for (const FQuat& Quat: QuatsArray)
{
FRotator Rotator{Quat.Rotator()};
RotatorsArray.Add(MoveTemp(Rotator));
}
return MoveTemp(RotatorsArray);
}
TArray<TArray<FRotator>> FSGArrayUtils::QuatsToRotators(const TArray<TArray<FQuat>>& QuatsNestedArray)
{
TArray<TArray<FRotator>> RotatorsNestedArray;
for (const TArray<FQuat>& InnerQuatsArray: QuatsNestedArray)
{
TArray<FRotator> InnerRotatorsArray{QuatsToRotators(InnerQuatsArray)};
RotatorsNestedArray.Add(MoveTemp(InnerRotatorsArray));
}
return MoveTemp(RotatorsNestedArray);
}
TArray<FQuat> FSGArrayUtils::RotatorsToQuats(const TArray<FRotator>& RotatorsArray)
{
TArray<FQuat> QuatsArray;
for (const FRotator& Rotator: RotatorsArray)
{
FQuat Quat{Rotator.Quaternion()};
QuatsArray.Add(MoveTemp(Quat));
}
return MoveTemp(QuatsArray);
}
TArray<TArray<FQuat>> FSGArrayUtils::RotatorsToQuats(const TArray<TArray<FRotator>>& RotatorsNestedArray)
{
TArray<TArray<FQuat>> QuatsNestedArray;
for (const TArray<FRotator>& RotatorsInnerArray: RotatorsNestedArray)
{
TArray<FQuat> InnerQuatsArray{RotatorsToQuats(RotatorsInnerArray)};
QuatsNestedArray.Add(MoveTemp(InnerQuatsArray));
}
return MoveTemp(QuatsNestedArray);
}
@@ -374,7 +374,8 @@ public:
return MoveTemp(ImplArray);
}
template<typename T1, typename T2, const T2&(T1::*ToUnderlyingTypeMethod)() const, typename S, TArray<T1> S::*InnerArray>
template<typename T1, typename T2, const T2&(T1::*ToUnderlyingTypeMethod)() const, typename S, TArray<T1> S::*
InnerArray>
static TArray<TArray<T2>> ToImplType(const TArray<S>& Array)
{
TArray<TArray<T2>> ImplArray;
@@ -388,7 +389,8 @@ public:
return MoveTemp(ImplArray);
}
template<typename T1, typename T2, const T2&(T1::*ToUnderlyingTypeMethod)() const, typename S, TArray<T1*> S::*InnerArray>
template<typename T1, typename T2, const T2&(T1::*ToUnderlyingTypeMethod)() const, typename S, TArray<T1*> S::*
InnerArray>
static TArray<TArray<T2>> ToImplType(const TArray<S>& Array)
{
TArray<TArray<T2>> ImplArray;
@@ -429,7 +431,6 @@ public:
return MoveTemp(BPNestedArray);
}
template<typename T, typename S>
static TArray<S> ToBPNestedArray(const TArray<TArray<T*>>& NestedArray)
{
@@ -444,6 +445,94 @@ public:
return MoveTemp(BPNestedArray);
}
static TArray<FRotator> QuatsToRotators(const TArray<FQuat>& QuatsArray);
static TArray<TArray<FRotator>> QuatsToRotators(const TArray<TArray<FQuat>>& QuatsNestedArray);
template<typename S, TArray<FQuat> S::*InnerArray>
static TArray<TArray<FRotator>> QuatsToRotators(const TArray<S>& QuatsNestedArray)
{
TArray<TArray<FRotator>> RotatorsNestedArray;
for (const S& BPQuatsInnerArrayContainer: QuatsNestedArray)
{
RotatorsNestedArray.Add(QuatsToRotators(BPQuatsInnerArrayContainer.*InnerArray));
}
return MoveTemp(RotatorsNestedArray);
}
template<typename S>
static TArray<S> QuatsToRotators(const TArray<TArray<FQuat>>& QuatsNestedArray)
{
TArray<S> BPRotatorsNestedArray;
for (const TArray<FQuat>& QuatsInnerArray: QuatsNestedArray)
{
S BPRotatorsInnerArrayContainer{QuatsToRotators(QuatsInnerArray)};
BPRotatorsNestedArray.Add(MoveTemp(BPRotatorsInnerArrayContainer));
}
return MoveTemp(BPRotatorsNestedArray);
}
template<typename Q, typename R, TArray<FQuat> Q::*InnerArray>
static TArray<R> QuatsToRotators(const TArray<Q>& QuatsNestedArray)
{
TArray<R> BPRotatorsNestedArray;
for (const Q& QuatsInnerArrayContainer: QuatsNestedArray)
{
R BPRotatorsInnerArrayContainer{QuatsToRotators(QuatsInnerArrayContainer.*InnerArray)};
BPRotatorsNestedArray.Add(MoveTemp(BPRotatorsInnerArrayContainer));
}
return MoveTemp(BPRotatorsNestedArray);
}
static TArray<FQuat> RotatorsToQuats(const TArray<FRotator>& RotatorsArray);
static TArray<TArray<FQuat>> RotatorsToQuats(const TArray<TArray<FRotator>>& RotatorsNestedArray);
template<typename S, TArray<FRotator> S::*InnerArray>
static TArray<TArray<FQuat>> RotatorsToQuats(const TArray<S>& RotatorsNestedArray)
{
TArray<TArray<FQuat>> QuatsNestedArray;
for (const S& BPRotatorsInnerArrayContainer: RotatorsNestedArray)
{
QuatsNestedArray.Add(RotatorsToQuats(BPRotatorsInnerArrayContainer.*InnerArray));
}
return MoveTemp(QuatsNestedArray);
}
template<typename S>
static TArray<S> RotatorsToQuats(const TArray<TArray<FRotator>>& RotatorsNestedArray)
{
TArray<S> BPQuatsNestedArray;
for (const TArray<FRotator>& RotatorsInnerArray: RotatorsNestedArray)
{
S BPQuatsInnerArrayContainer{RotatorsToQuats(RotatorsInnerArray)};
BPQuatsNestedArray.Add(MoveTemp(BPQuatsInnerArrayContainer));
}
return MoveTemp(BPQuatsNestedArray);
}
template<typename Q, typename R, TArray<FRotator> Q::*InnerArray>
static TArray<R> RotatorsToQuats(const TArray<Q>& RotatorsNestedArray)
{
TArray<R> BPQuatsNestedArray;
for (const Q& RotatorsInnerArrayContainer: RotatorsNestedArray)
{
R BPQuatsInnerArrayContainer{RotatorsToQuats(RotatorsInnerArrayContainer.*InnerArray)};
BPQuatsNestedArray.Add(MoveTemp(BPQuatsInnerArrayContainer));
}
return MoveTemp(BPQuatsNestedArray);
}
public:
FSGArrayUtils() = delete;
virtual ~FSGArrayUtils() = delete;