minor fixes, mostrly formatting
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION <= 3
|
||||
void EnumerateOpenXRApiLayers(TArray<XrApiLayerProperties>& OutProperties)
|
||||
{
|
||||
uint32_t Count = 0;
|
||||
uint32 Count = 0;
|
||||
XR_ENSURE(xrEnumerateApiLayerProperties(0, &Count, nullptr));
|
||||
OutProperties.SetNum(Count);
|
||||
for (auto& Prop: OutProperties)
|
||||
@@ -849,7 +849,7 @@ FTransform FSGXRTracker::FImpl::GetMeshFingerStartBoneRefTransform(
|
||||
};
|
||||
const FTransform& RootBoneRefTransform{GetMeshRawBoneRefTransform(bRight, EHandKeypoint::Wrist)};
|
||||
FQuat CorrectedRootBoneRefRotation{MoveTemp(RootRotationCorrection) * RootBoneRefTransform.GetRotation()};
|
||||
FTransform CorrectedRootBoneRefTransform {
|
||||
FTransform CorrectedRootBoneRefTransform{
|
||||
MoveTemp(CorrectedRootBoneRefRotation), RootBoneRefTransform.GetLocation()
|
||||
};
|
||||
|
||||
@@ -1800,36 +1800,32 @@ bool FSGXRTracker::FImpl::UpdateSGThumbJointData(
|
||||
const FQuat& ThumbTipRotation{JointRotations[ThumbFingerIndex][ThumbTipJointIndex]};
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::ThumbMetacarpal, ThumbMetacarpalLocation, ThumbMetacarpalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::ThumbMetacarpal,
|
||||
ThumbMetacarpalLocation, ThumbMetacarpalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::ThumbProximal, ThumbProximalLocation, ThumbProximalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::ThumbProximal,
|
||||
ThumbProximalLocation, ThumbProximalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::ThumbDistal, ThumbDistalLocation, ThumbDistalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::ThumbDistal,
|
||||
ThumbDistalLocation, ThumbDistalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::ThumbTip, ThumbTipLocation, ThumbTipRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::ThumbTip,
|
||||
ThumbTipLocation, ThumbTipRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
@@ -1853,7 +1849,7 @@ bool FSGXRTracker::FImpl::UpdateSGIndexJointData(
|
||||
static constexpr int32 IndexTipJointIndex = 3;
|
||||
|
||||
const FTransform& IndexMetacarpalTransform{
|
||||
GetMeshWristChildBoneRefTransform(DeviceHand, EHandKeypoint::IndexMetacarpal)
|
||||
GetMeshWristChildBoneRefTransform(DeviceHand, EHandKeypoint::IndexMetacarpal)
|
||||
};
|
||||
FVector IndexMetacarpalLocation{IndexMetacarpalTransform.GetLocation()};
|
||||
FQuat IndexMetacarpalRotation{IndexMetacarpalTransform.GetRotation()};
|
||||
@@ -1869,8 +1865,7 @@ bool FSGXRTracker::FImpl::UpdateSGIndexJointData(
|
||||
const FQuat& IndexTipRotation{JointRotations[IndexFingerIndex][IndexTipJointIndex]};
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::IndexMetacarpal,
|
||||
OutHandState, EHandKeypoint::IndexMetacarpal,
|
||||
MoveTemp(IndexMetacarpalLocation), MoveTemp(IndexMetacarpalRotation),
|
||||
WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
@@ -1879,36 +1874,32 @@ bool FSGXRTracker::FImpl::UpdateSGIndexJointData(
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::IndexProximal, IndexProximalLocation, IndexProximalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::IndexProximal,
|
||||
IndexProximalLocation, IndexProximalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::IndexIntermediate, IndexIntermediateLocation, IndexIntermediateRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::IndexIntermediate,
|
||||
IndexIntermediateLocation, IndexIntermediateRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::IndexDistal, IndexDistalLocation, IndexDistalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::IndexDistal,
|
||||
IndexDistalLocation, IndexDistalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::IndexTip, IndexTipLocation, IndexTipRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::IndexTip,
|
||||
IndexTipLocation, IndexTipRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
@@ -1948,8 +1939,7 @@ bool FSGXRTracker::FImpl::UpdateSGMiddleJointData(
|
||||
const FQuat& MiddleTipRotation{JointRotations[MiddleFingerMiddle][MiddleTipJointMiddle]};
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::MiddleMetacarpal,
|
||||
OutHandState, EHandKeypoint::MiddleMetacarpal,
|
||||
MoveTemp(MiddleMetacarpalLocation), MoveTemp(MiddleMetacarpalRotation),
|
||||
WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
@@ -1958,36 +1948,32 @@ bool FSGXRTracker::FImpl::UpdateSGMiddleJointData(
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::MiddleProximal, MiddleProximalLocation, MiddleProximalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::MiddleProximal,
|
||||
MiddleProximalLocation, MiddleProximalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::MiddleIntermediate, MiddleIntermediateLocation, MiddleIntermediateRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::MiddleIntermediate,
|
||||
MiddleIntermediateLocation, MiddleIntermediateRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::MiddleDistal, MiddleDistalLocation, MiddleDistalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::MiddleDistal,
|
||||
MiddleDistalLocation, MiddleDistalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::MiddleTip, MiddleTipLocation, MiddleTipRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::MiddleTip,
|
||||
MiddleTipLocation, MiddleTipRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
@@ -2027,8 +2013,7 @@ bool FSGXRTracker::FImpl::UpdateSGRingJointData(
|
||||
const FQuat& RingTipRotation{JointRotations[RingFingerRing][RingTipJointRing]};
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::RingMetacarpal,
|
||||
OutHandState, EHandKeypoint::RingMetacarpal,
|
||||
MoveTemp(RingMetacarpalLocation), MoveTemp(RingMetacarpalRotation),
|
||||
WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
@@ -2037,36 +2022,32 @@ bool FSGXRTracker::FImpl::UpdateSGRingJointData(
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::RingProximal, RingProximalLocation, RingProximalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::RingProximal,
|
||||
RingProximalLocation, RingProximalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::RingIntermediate, RingIntermediateLocation, RingIntermediateRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::RingIntermediate,
|
||||
RingIntermediateLocation, RingIntermediateRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::RingDistal, RingDistalLocation, RingDistalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::RingDistal,
|
||||
RingDistalLocation, RingDistalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::RingTip, RingTipLocation, RingTipRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::RingTip,
|
||||
RingTipLocation, RingTipRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
@@ -2106,8 +2087,7 @@ bool FSGXRTracker::FImpl::UpdateSGLittleJointData(
|
||||
const FQuat& LittleTipRotation{JointRotations[LittleFingerLittle][LittleTipJointLittle]};
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::LittleMetacarpal,
|
||||
OutHandState, EHandKeypoint::LittleMetacarpal,
|
||||
MoveTemp(LittleMetacarpalLocation), MoveTemp(LittleMetacarpalRotation),
|
||||
WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
@@ -2116,36 +2096,32 @@ bool FSGXRTracker::FImpl::UpdateSGLittleJointData(
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::LittleProximal, LittleProximalLocation, LittleProximalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::LittleProximal,
|
||||
LittleProximalLocation, LittleProximalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::LittleIntermediate, LittleIntermediateLocation, LittleIntermediateRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::LittleIntermediate,
|
||||
LittleIntermediateLocation, LittleIntermediateRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::LittleDistal, LittleDistalLocation, LittleDistalRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::LittleDistal,
|
||||
LittleDistalLocation, LittleDistalRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGJointData(
|
||||
OutHandState,
|
||||
EHandKeypoint::LittleTip, LittleTipLocation, LittleTipRotation,
|
||||
WristLocation, WristRotation,
|
||||
OutHandState, EHandKeypoint::LittleTip,
|
||||
LittleTipLocation, LittleTipRotation, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
@@ -2185,31 +2161,36 @@ bool FSGXRTracker::FImpl::UpdateSGHandState(const EControllerHand DeviceHand, FS
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGThumbJointData(OutHandState, DeviceHand, JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
if (!UpdateSGThumbJointData(OutHandState, DeviceHand,
|
||||
JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGIndexJointData(OutHandState, DeviceHand, JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
if (!UpdateSGIndexJointData(OutHandState, DeviceHand,
|
||||
JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGMiddleJointData(OutHandState, DeviceHand, JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
if (!UpdateSGMiddleJointData(OutHandState, DeviceHand,
|
||||
JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGRingJointData(OutHandState, DeviceHand, JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
if (!UpdateSGRingJointData(OutHandState, DeviceHand,
|
||||
JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UpdateSGLittleJointData(OutHandState, DeviceHand, JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
if (!UpdateSGLittleJointData(OutHandState, DeviceHand,
|
||||
JointLocations, JointRotations, WristLocation, WristRotation,
|
||||
bMotionSourceHandTracking))
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user