revamp the whole settings system in order to unify the settings across various systems, modules, and api layers
This commit is contained in:
@@ -403,7 +403,7 @@ struct FSGXRTracker::FImpl
|
||||
|
||||
FORCEINLINE static const FName& GetLeftMeshBoneName(const int32 JointIndex)
|
||||
{
|
||||
const FName& Name{GetVirtualHandSettings().LeftHandBoneNames[JointIndex]};
|
||||
const FName& Name{GetVirtualHandSettings().MeshSettings.LeftHandBoneNames[JointIndex]};
|
||||
return Name;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ struct FSGXRTracker::FImpl
|
||||
|
||||
FORCEINLINE static const FName& GetRightMeshBoneName(const int32 JointIndex)
|
||||
{
|
||||
const FName& Name{GetVirtualHandSettings().RightHandBoneNames[JointIndex]};
|
||||
const FName& Name{GetVirtualHandSettings().MeshSettings.RightHandBoneNames[JointIndex]};
|
||||
return Name;
|
||||
}
|
||||
|
||||
@@ -771,27 +771,27 @@ TArray<TArray<float>> FSGXRTracker::FImpl::GetFingerLengths(const bool bRight)
|
||||
GetFingerLengths(bRight,
|
||||
EHandKeypoint::ThumbProximal,
|
||||
EHandKeypoint::ThumbDistal,
|
||||
Settings.ThumbDistalPhalanxLength
|
||||
Settings.MeshSettings.DistalPhalangesLengthSettings.Thumb
|
||||
),
|
||||
GetFingerLengths(bRight,
|
||||
EHandKeypoint::IndexIntermediate,
|
||||
EHandKeypoint::IndexDistal,
|
||||
Settings.IndexDistalPhalanxLength
|
||||
Settings.MeshSettings.DistalPhalangesLengthSettings.Index
|
||||
),
|
||||
GetFingerLengths(bRight,
|
||||
EHandKeypoint::MiddleIntermediate,
|
||||
EHandKeypoint::MiddleDistal,
|
||||
Settings.MiddleDistalPhalanxLength
|
||||
Settings.MeshSettings.DistalPhalangesLengthSettings.Middle
|
||||
),
|
||||
GetFingerLengths(bRight,
|
||||
EHandKeypoint::RingIntermediate,
|
||||
EHandKeypoint::RingDistal,
|
||||
Settings.RingDistalPhalanxLength
|
||||
Settings.MeshSettings.DistalPhalangesLengthSettings.Ring
|
||||
),
|
||||
GetFingerLengths(bRight,
|
||||
EHandKeypoint::LittleIntermediate,
|
||||
EHandKeypoint::LittleDistal,
|
||||
Settings.LittleDistalPhalanxLength
|
||||
Settings.MeshSettings.DistalPhalangesLengthSettings.Little
|
||||
),
|
||||
};
|
||||
|
||||
@@ -901,8 +901,8 @@ FTransform FSGXRTracker::FImpl::GetMeshRawBoneRefTransform(const bool bRight, co
|
||||
{
|
||||
const TSoftObjectPtr<USkeletalMesh>& HandMesh{
|
||||
bRight
|
||||
? GetVirtualHandSettings().LeftHandReferenceMesh
|
||||
: GetVirtualHandSettings().RightHandReferenceMesh
|
||||
? GetVirtualHandSettings().MeshSettings.LeftHandReferenceMesh
|
||||
: GetVirtualHandSettings().MeshSettings.RightHandReferenceMesh
|
||||
};
|
||||
|
||||
if (HandMesh.IsValid())
|
||||
@@ -924,7 +924,7 @@ FTransform FSGXRTracker::FImpl::GetMeshRawBoneRefTransform(const bool bRight, co
|
||||
return Transform;
|
||||
}
|
||||
|
||||
const FSGVirtualHandSettings& Settings{GetVirtualHandSettings()};
|
||||
const FSGVirtualHandMeshSettings& Settings{GetVirtualHandSettings().MeshSettings};
|
||||
ensureAlwaysMsgf(
|
||||
bRight
|
||||
? Settings.RightHandDefaultReferenceBoneTransforms.Contains(BoneName)
|
||||
@@ -942,7 +942,7 @@ FTransform FSGXRTracker::FImpl::GetMeshRawBoneRefTransform(const bool bRight, co
|
||||
FTransform FSGXRTracker::FImpl::GetMeshWristChildBoneRefTransform(const bool bRight, const FName& BoneName)
|
||||
{
|
||||
FQuat RootRotationCorrection{
|
||||
GetVirtualHandSettings().RootBoneRotationCorrection
|
||||
GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection
|
||||
};
|
||||
const FTransform& RootBoneRefTransform{GetMeshRawBoneRefTransform(bRight, EHandKeypoint::Wrist)};
|
||||
const FTransform& RawTransform{GetMeshRawBoneRefTransform(bRight, BoneName)};
|
||||
@@ -957,7 +957,7 @@ FTransform FSGXRTracker::FImpl::GetMeshFingerStartBoneRefTransform(
|
||||
const bool bRight, const EHandKeypoint Parent, const FName& BoneName)
|
||||
{
|
||||
FQuat RootRotationCorrection{
|
||||
GetVirtualHandSettings().RootBoneRotationCorrection
|
||||
GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection
|
||||
};
|
||||
const FTransform& RootBoneRefTransform{GetMeshRawBoneRefTransform(bRight, EHandKeypoint::Wrist)};
|
||||
FQuat CorrectedRootBoneRefRotation{MoveTemp(RootRotationCorrection) * RootBoneRefTransform.GetRotation()};
|
||||
|
||||
Reference in New Issue
Block a user