re-implement the virtual hand settings overrides; and apply plenty of other improvements and bug fixes to the settings system; and introduce sgdebugcubesettings
This commit is contained in:
@@ -124,9 +124,9 @@ void FSGVirtualHandAnimInstanceProxy::PreEvaluateAnimation(UAnimInstance* InAnim
|
||||
BoneNamesMap.Add(HandKeyIndex, BoneName);
|
||||
}
|
||||
|
||||
const FRotator& AnimationBoneRotationCorrectionOffset{VirtualHand->GetAnimationBoneRotationCorrectionOffset()};
|
||||
AnimationBoneCorrectionOffsetTransform = FTransform{AnimationBoneRotationCorrectionOffset};
|
||||
bShouldAnimationApplyBoneLocation = VirtualHand->ShouldAnimationApplyBoneLocation();
|
||||
const FSGVirtualHandAnimationSettings AnimationSettings{VirtualHand->GetVirtualHandSettings().AnimationSettings};
|
||||
AnimationBoneCorrectionOffsetTransform = FTransform{AnimationSettings.AnimationBoneRotationCorrectionOffset};
|
||||
bShouldAnimationApplyBoneLocation = AnimationSettings.bShouldAnimationApplyBoneLocation;
|
||||
}
|
||||
|
||||
bool FSGVirtualHandAnimInstanceProxy::Evaluate(FPoseContext& Output)
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGDebug/SGDebugVirtualHand.h"
|
||||
#include "SGLog/SGLog.h"
|
||||
#include "SGSettings/SGSettings.h"
|
||||
#include "SGTracking/SGGloveTracker.h"
|
||||
#include "SGTracking/SGXRTracker.h"
|
||||
|
||||
@@ -60,32 +61,31 @@ struct USGVirtualHandComponent::FImpl
|
||||
* Static methods
|
||||
************************/
|
||||
|
||||
FORCEINLINE static const FSGVirtualHandSettings& GetPluginVirtualHandSettings()
|
||||
{
|
||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
||||
return Settings->GetVirtualHandSettings();
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
|
||||
return Path;
|
||||
return GetPluginVirtualHandSettings().MeshSettings.DefaultLeftHandMeshPath;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
|
||||
return Path;
|
||||
return GetPluginVirtualHandSettings().MeshSettings.DefaultLeftHandMeshPathOnly;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
|
||||
{
|
||||
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
|
||||
return Path;
|
||||
return GetPluginVirtualHandSettings().MeshSettings.DefaultRightHandMeshPath;
|
||||
}
|
||||
|
||||
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
|
||||
{
|
||||
static const FString Path{TEXT("/SenseGlove/Meshes/"
|
||||
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
|
||||
return Path;
|
||||
return GetPluginVirtualHandSettings().MeshSettings.DefaultRightHandMeshPathOnly;
|
||||
}
|
||||
|
||||
/************************
|
||||
@@ -140,7 +140,7 @@ struct USGVirtualHandComponent::FImpl
|
||||
|
||||
FORCEINLINE bool ShouldDrawDebugVirtualHand() const
|
||||
{
|
||||
const FSGVirtualHandDebuggingSettings& Settings{Owner->GetVirtualHandDebuggingSettings()};
|
||||
const FSGVirtualHandDebuggingSettings& Settings{Owner->GetVirtualHandSettings().DebuggingSettings};
|
||||
const bool bDraw = !!Settings.bDrawDebugVirtualHand
|
||||
&& Settings.DrawingMode != ESGDebugVirtualHandDrawingMode::None;
|
||||
return bDraw;
|
||||
@@ -153,12 +153,12 @@ struct USGVirtualHandComponent::FImpl
|
||||
|
||||
const TArray<FName>& USGVirtualHandComponent::GetLeftHandBoneNames()
|
||||
{
|
||||
return GetVirtualHandSettings().MeshSettings.LeftHandBoneNames;
|
||||
return FImpl::GetPluginVirtualHandSettings().MeshSettings.LeftHandBoneNames;
|
||||
}
|
||||
|
||||
const TArray<FName>& USGVirtualHandComponent::GetRightHandBoneNames()
|
||||
{
|
||||
return GetVirtualHandSettings().MeshSettings.RightHandBoneNames;
|
||||
return FImpl::GetPluginVirtualHandSettings().MeshSettings.RightHandBoneNames;
|
||||
}
|
||||
|
||||
const FName& USGVirtualHandComponent::GetLeftHandBoneName(const int32 Joint)
|
||||
@@ -213,7 +213,6 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
||||
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
|
||||
|
||||
bRight = true;
|
||||
bVisibleWhenHandDataUnavailable = false;
|
||||
|
||||
Super::SetSkeletalMesh(nullptr, true);
|
||||
|
||||
@@ -234,6 +233,38 @@ void USGVirtualHandComponent::SetRight(const bool bInRight)
|
||||
}
|
||||
}
|
||||
|
||||
void USGVirtualHandComponent::SetVirtualHandSettingsOverrides(
|
||||
const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides)
|
||||
{
|
||||
VirtualHandSettingsOverrides = InVirtualHandSettingsOverrides;
|
||||
}
|
||||
|
||||
FSGVirtualHandSettings USGVirtualHandComponent::GetVirtualHandSettings() const
|
||||
{
|
||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||
if (!ensureAlwaysMsgf(IsValid(Settings), TEXT("The settings subsystem has not been initialized!")))
|
||||
{
|
||||
return FSGVirtualHandSettings{};
|
||||
}
|
||||
|
||||
const FSGVirtualHandSettings& PluginVirtualHandSettings{Settings->GetVirtualHandSettings()};
|
||||
if (!OverridesPluginVirtualHandSettings())
|
||||
{
|
||||
return PluginVirtualHandSettings;
|
||||
}
|
||||
|
||||
const FSGVirtualHandSettings VirtualHandSettings{
|
||||
!!VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable,
|
||||
VirtualHandSettingsOverrides.AnimationSettings,
|
||||
VirtualHandSettingsOverrides.DebuggingSettings,
|
||||
VirtualHandSettingsOverrides.GrabSettings,
|
||||
VirtualHandSettingsOverrides.HapticsSettings,
|
||||
PluginVirtualHandSettings.MeshSettings,
|
||||
VirtualHandSettingsOverrides.TouchSettings
|
||||
};
|
||||
return VirtualHandSettings;
|
||||
}
|
||||
|
||||
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
|
||||
{
|
||||
ensureAlwaysMsgf((TIsDerivedFrom<decltype(NewClass), USGVirtualHandAnimInstance>::IsDerived),
|
||||
@@ -290,7 +321,8 @@ void USGVirtualHandComponent::UninitializeComponent()
|
||||
|
||||
const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(GetOuter())};
|
||||
USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(IsRight()) : nullptr};
|
||||
if (IsValid(Glove) && Glove->IsConnected() && AutoStopsAllHapticsOnEndPlay())
|
||||
const bool bAutoStopHaptics = !!GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
||||
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
||||
{
|
||||
Glove->StopHaptics();
|
||||
}
|
||||
@@ -309,7 +341,8 @@ void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||
|
||||
const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(GetOuter())};
|
||||
USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(IsRight()) : nullptr};
|
||||
if (IsValid(Glove) && Glove->IsConnected() && AutoStopsAllHapticsOnEndPlay())
|
||||
const bool bAutoStopHaptics = !!GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
||||
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
||||
{
|
||||
Glove->StopHaptics();
|
||||
}
|
||||
@@ -625,7 +658,8 @@ void USGVirtualHandComponent::FImpl::UpdateVisibility()
|
||||
&& MotionControllerData.bValid
|
||||
&& MotionControllerData.DeviceVisualType == EXRVisualType::Hand;
|
||||
const bool bHandVisible = Owner->IsVisible();
|
||||
const bool bShouldBeVisibleWhenHandDataUnavailable = Owner->IsVisibleWhenHandDataUnavailable();
|
||||
const bool bShouldBeVisibleWhenHandDataUnavailable =
|
||||
!!Owner->GetVirtualHandSettings().bVisibleWhenHandDataUnavailable;
|
||||
|
||||
bool bSetNewVisibility = false;
|
||||
|
||||
@@ -688,7 +722,7 @@ void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
|
||||
return;
|
||||
}
|
||||
|
||||
FSGDebugVirtualHand::Draw(World, MotionControllerData, Owner->GetVirtualHandDebuggingSettings());
|
||||
FSGDebugVirtualHand::Draw(World, MotionControllerData, Owner->GetVirtualHandSettings().DebuggingSettings);
|
||||
}
|
||||
|
||||
void USGVirtualHandComponent::FImpl::TriggerHandVisibilityChangedEvent(const bool bNewVisibility) const
|
||||
|
||||
@@ -79,7 +79,7 @@ struct USGWristTrackerComponent::FImpl
|
||||
|
||||
void UpdateMotionSource() const;
|
||||
void UpdateWristTrackingData() const;
|
||||
void DrawDebugGizmo() const;
|
||||
void DrawDebugWristTracker() const;
|
||||
};
|
||||
|
||||
USGWristTrackerComponent::USGWristTrackerComponent(const FObjectInitializer& ObjectInitializer)
|
||||
@@ -140,8 +140,7 @@ FSGWristTrackingSettings USGWristTrackerComponent::GetWristTrackingSettings() co
|
||||
PluginWristTrackingSettings.TrackingHardwareRotationOffsetRightHand,
|
||||
PluginWristTrackingSettings.LeftHandMotionSource,
|
||||
PluginWristTrackingSettings.RightHandMotionSource,
|
||||
!!WristTrackingSettingsOverrides.bDrawDebugGizmo,
|
||||
WristTrackingSettingsOverrides.DebugGizmoSettings,
|
||||
WristTrackingSettingsOverrides.DebuggingSettings,
|
||||
};
|
||||
return WristTrackingSettings;
|
||||
}
|
||||
@@ -192,9 +191,9 @@ void USGWristTrackerComponent::TickComponent(
|
||||
|
||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||
|
||||
if (!!GetWristTrackingSettings().bDrawDebugGizmo)
|
||||
if (!!GetWristTrackingSettings().DebuggingSettings.bDrawDebugWristTracker)
|
||||
{
|
||||
Pimpl->DrawDebugGizmo();
|
||||
Pimpl->DrawDebugWristTracker();
|
||||
}
|
||||
|
||||
Pimpl->UpdateWristTrackingData();
|
||||
@@ -284,12 +283,12 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
|
||||
}
|
||||
}
|
||||
|
||||
void USGWristTrackerComponent::FImpl::DrawDebugGizmo() const
|
||||
void USGWristTrackerComponent::FImpl::DrawDebugWristTracker() const
|
||||
{
|
||||
const UWorld* World{Owner->GetWorld()};
|
||||
const FSGDebugGizmoSettings& DebugGizmoSettings{Owner->GetWristTrackingSettings().DebugGizmoSettings};
|
||||
const FSGWristTrackingDebuggingSettings& DebuggingSettings{Owner->GetWristTrackingSettings().DebuggingSettings};
|
||||
|
||||
FSGDebugGizmo::Draw(World, Owner->WristLocation, Owner->WristRotation, DebugGizmoSettings);
|
||||
FSGDebugGizmo::Draw(World, Owner->WristLocation, Owner->WristRotation, DebuggingSettings.DebugWristTrackerSettings);
|
||||
}
|
||||
|
||||
void USGWristTrackerComponent::FImplDeleter::operator()(const FImpl* P) const
|
||||
|
||||
@@ -79,13 +79,6 @@ struct ASGPawn::FImpl
|
||||
* Methods
|
||||
************************/
|
||||
|
||||
FORCEINLINE static const FSGVirtualHandSettings& GetVirtualHandSettings()
|
||||
{
|
||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
||||
return Settings->GetVirtualHandSettings();
|
||||
}
|
||||
|
||||
void BindRealHandsOverlapEvents();
|
||||
void UnbindRealHandsOverlapEvents();
|
||||
|
||||
@@ -206,8 +199,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
HandLeft->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block);
|
||||
HandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
|
||||
HandLeft->SetRight(false);
|
||||
HandLeft->SetVisibleWhenHandDataUnavailable(false);
|
||||
HandLeft->SetRelativeRotation(FImpl::GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection,
|
||||
|
||||
const FSGVirtualHandSettings LeftHandSettings{HandLeft->GetVirtualHandSettings()};
|
||||
HandLeft->SetRelativeRotation(LeftHandSettings.MeshSettings.RootBoneRotationCorrection,
|
||||
false, nullptr, ETeleportType::None);
|
||||
HandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -231,23 +225,18 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
RealHandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||
RealHandLeft->SetRight(false);
|
||||
Pimpl->SetVisibility(RealHandLeft, false);
|
||||
RealHandLeft->SetVisibleWhenHandDataUnavailable(false);
|
||||
RealHandLeft->SetRelativeRotation(FImpl::GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection,
|
||||
|
||||
const FSGVirtualHandMeshSettings RealLeftHandMeshSettings{HandLeft->GetVirtualHandSettings().MeshSettings};
|
||||
RealHandLeft->SetRelativeRotation(RealLeftHandMeshSettings.RootBoneRotationCorrection,
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandLeft->SetWristTracker(WristTrackerLeft);
|
||||
|
||||
/// FIXME - REFACTOR
|
||||
// FSGVirtualHandDebuggingSettings RealHandLeftDebugSettings;
|
||||
// RealHandLeftDebugSettings.bDrawDebugVirtualHand = true;
|
||||
// RealHandLeftDebugSettings.DrawingMode = ESGDebugVirtualHandDrawingMode::GizmoJoints;
|
||||
// RealHandLeft->SetVirtualHandDebuggingSettings(MoveTemp(RealHandLeftDebugSettings));
|
||||
|
||||
LeftThumbFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftThumbFingertipGrabCollider"));
|
||||
LeftThumbFingertipGrabCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsGrabColliderSize());
|
||||
LeftThumbFingertipGrabCollider->SetupAttachment(HandLeft, HandLeft->GetThumbFingertipGrabSocketName());
|
||||
LeftThumbFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize);
|
||||
LeftThumbFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.ThumbColliderSocketName);
|
||||
LeftThumbFingertipGrabCollider->SetCastShadow(false);
|
||||
LeftThumbFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
LeftThumbFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -258,8 +247,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftIndexFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftIndexFingertipGrabCollider"));
|
||||
LeftIndexFingertipGrabCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsGrabColliderSize());
|
||||
LeftIndexFingertipGrabCollider->SetupAttachment(HandLeft, HandLeft->GetIndexFingertipGrabSocketName());
|
||||
LeftIndexFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize);
|
||||
LeftIndexFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.IndexColliderSocketName);
|
||||
LeftIndexFingertipGrabCollider->SetCastShadow(false);
|
||||
LeftIndexFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
LeftIndexFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -270,8 +259,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftMiddleFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftMiddleFingertipGrabCollider"));
|
||||
LeftMiddleFingertipGrabCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsGrabColliderSize());
|
||||
LeftMiddleFingertipGrabCollider->SetupAttachment(HandLeft, HandLeft->GetMiddleFingertipGrabSocketName());
|
||||
LeftMiddleFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize);
|
||||
LeftMiddleFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.MiddleColliderSocketName);
|
||||
LeftMiddleFingertipGrabCollider->SetCastShadow(false);
|
||||
LeftMiddleFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
LeftMiddleFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -282,8 +271,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftThumbFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftThumbFingertipTouchCollider"));
|
||||
LeftThumbFingertipTouchCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsTouchColliderSize());
|
||||
LeftThumbFingertipTouchCollider->SetupAttachment(HandLeft, HandLeft->GetThumbFingertipTouchSocketName());
|
||||
LeftThumbFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize);
|
||||
LeftThumbFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.ThumbColliderSocketName);
|
||||
LeftThumbFingertipTouchCollider->SetCastShadow(false);
|
||||
LeftThumbFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
LeftThumbFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -294,8 +283,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftIndexFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftIndexFingertipTouchCollider"));
|
||||
LeftIndexFingertipTouchCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsTouchColliderSize());
|
||||
LeftIndexFingertipTouchCollider->SetupAttachment(HandLeft, HandLeft->GetIndexFingertipTouchSocketName());
|
||||
LeftIndexFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize);
|
||||
LeftIndexFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.IndexColliderSocketName);
|
||||
LeftIndexFingertipTouchCollider->SetCastShadow(false);
|
||||
LeftIndexFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
LeftIndexFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -306,8 +295,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftMiddleFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftMiddleFingertipTouchCollider"));
|
||||
LeftMiddleFingertipTouchCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsTouchColliderSize());
|
||||
LeftMiddleFingertipTouchCollider->SetupAttachment(HandLeft, HandLeft->GetMiddleFingertipTouchSocketName());
|
||||
LeftMiddleFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize);
|
||||
LeftMiddleFingertipTouchCollider->SetupAttachment(
|
||||
HandLeft, LeftHandSettings.TouchSettings.MiddleColliderSocketName);
|
||||
LeftMiddleFingertipTouchCollider->SetCastShadow(false);
|
||||
LeftMiddleFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
LeftMiddleFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -319,8 +309,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftRingFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftRingFingertipTouchCollider"));
|
||||
LeftRingFingertipTouchCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsTouchColliderSize());
|
||||
LeftRingFingertipTouchCollider->SetupAttachment(HandLeft, HandLeft->GetRingFingertipTouchSocketName());
|
||||
LeftRingFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize);
|
||||
LeftRingFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.RingColliderSocketName);
|
||||
LeftRingFingertipTouchCollider->SetCastShadow(false);
|
||||
LeftRingFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
LeftRingFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -331,8 +321,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
LeftPinkyFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("LeftPinkyFingertipTouchCollider"));
|
||||
LeftPinkyFingertipTouchCollider->SetRelativeScale3D(HandLeft->GetDefaultFingertipsTouchColliderSize());
|
||||
LeftPinkyFingertipTouchCollider->SetupAttachment(HandLeft, HandLeft->GetPinkyFingertipTouchSocketName());
|
||||
LeftPinkyFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize);
|
||||
LeftPinkyFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.PinkyColliderSocketName);
|
||||
LeftPinkyFingertipTouchCollider->SetCastShadow(false);
|
||||
LeftPinkyFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
LeftPinkyFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -368,8 +358,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
HandRight->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block);
|
||||
HandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
|
||||
HandRight->SetRight(true);
|
||||
HandRight->SetVisibleWhenHandDataUnavailable(false);
|
||||
HandRight->SetRelativeRotation(FImpl::GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection,
|
||||
|
||||
const FSGVirtualHandSettings RightHandSettings{HandRight->GetVirtualHandSettings()};
|
||||
HandRight->SetRelativeRotation(RightHandSettings.MeshSettings.RootBoneRotationCorrection,
|
||||
false, nullptr, ETeleportType::None);
|
||||
HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
@@ -393,23 +384,18 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
RealHandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
|
||||
RealHandRight->SetRight(true);
|
||||
Pimpl->SetVisibility(RealHandRight, false);
|
||||
RealHandRight->SetVisibleWhenHandDataUnavailable(false);
|
||||
RealHandRight->SetRelativeRotation(FImpl::GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection,
|
||||
|
||||
const FSGVirtualHandMeshSettings RealRightHandMeshSettings{HandRight->GetVirtualHandSettings().MeshSettings};
|
||||
RealHandRight->SetRelativeRotation(RealRightHandMeshSettings.RootBoneRotationCorrection,
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f},
|
||||
false, nullptr, ETeleportType::None);
|
||||
RealHandRight->SetWristTracker(WristTrackerRight);
|
||||
|
||||
/// FIXME - REFACTOR
|
||||
// FSGVirtualHandDebuggingSettings RealHandRightDebugSettings;
|
||||
// RealHandRightDebugSettings.bDrawDebugVirtualHand = true;
|
||||
// RealHandRightDebugSettings.DrawingMode = ESGDebugVirtualHandDrawingMode::GizmoJoints;
|
||||
// RealHandRight->SetVirtualHandDebuggingSettings(MoveTemp(RealHandRightDebugSettings));
|
||||
|
||||
RightThumbFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightThumbFingertipGrabCollider"));
|
||||
RightThumbFingertipGrabCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsGrabColliderSize());
|
||||
RightThumbFingertipGrabCollider->SetupAttachment(HandRight, HandRight->GetThumbFingertipGrabSocketName());
|
||||
RightThumbFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize);
|
||||
RightThumbFingertipGrabCollider->SetupAttachment(HandRight, RightHandSettings.GrabSettings.ThumbColliderSocketName);
|
||||
RightThumbFingertipGrabCollider->SetCastShadow(false);
|
||||
RightThumbFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
RightThumbFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -420,8 +406,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightIndexFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightIndexFingertipGrabCollider"));
|
||||
RightIndexFingertipGrabCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsGrabColliderSize());
|
||||
RightIndexFingertipGrabCollider->SetupAttachment(HandRight, HandRight->GetIndexFingertipGrabSocketName());
|
||||
RightIndexFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize);
|
||||
RightIndexFingertipGrabCollider->SetupAttachment(HandRight, RightHandSettings.GrabSettings.IndexColliderSocketName);
|
||||
RightIndexFingertipGrabCollider->SetCastShadow(false);
|
||||
RightIndexFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
RightIndexFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -432,8 +418,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightMiddleFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightMiddleFingertipGrabCollider"));
|
||||
RightMiddleFingertipGrabCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsGrabColliderSize());
|
||||
RightMiddleFingertipGrabCollider->SetupAttachment(HandRight, HandRight->GetMiddleFingertipGrabSocketName());
|
||||
RightMiddleFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize);
|
||||
RightMiddleFingertipGrabCollider->SetupAttachment(
|
||||
HandRight, RightHandSettings.GrabSettings.MiddleColliderSocketName);
|
||||
RightMiddleFingertipGrabCollider->SetCastShadow(false);
|
||||
RightMiddleFingertipGrabCollider->bCastDynamicShadow = false;
|
||||
RightMiddleFingertipGrabCollider->SetReceivesDecals(true);
|
||||
@@ -444,8 +431,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightThumbFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightThumbFingertipTouchCollider"));
|
||||
RightThumbFingertipTouchCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsTouchColliderSize());
|
||||
RightThumbFingertipTouchCollider->SetupAttachment(HandRight, HandRight->GetThumbFingertipTouchSocketName());
|
||||
RightThumbFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize);
|
||||
RightThumbFingertipTouchCollider->SetupAttachment(
|
||||
HandRight,RightHandSettings.TouchSettings.ThumbColliderSocketName);
|
||||
RightThumbFingertipTouchCollider->SetCastShadow(false);
|
||||
RightThumbFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
RightThumbFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -456,8 +444,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightIndexFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightIndexFingertipTouchCollider"));
|
||||
RightIndexFingertipTouchCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsTouchColliderSize());
|
||||
RightIndexFingertipTouchCollider->SetupAttachment(HandRight, HandRight->GetIndexFingertipTouchSocketName());
|
||||
RightIndexFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize);
|
||||
RightIndexFingertipTouchCollider->SetupAttachment(
|
||||
HandRight, RightHandSettings.TouchSettings.IndexColliderSocketName);
|
||||
RightIndexFingertipTouchCollider->SetCastShadow(false);
|
||||
RightIndexFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
RightIndexFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -468,8 +457,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightMiddleFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightMiddleFingertipTouchCollider"));
|
||||
RightMiddleFingertipTouchCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsTouchColliderSize());
|
||||
RightMiddleFingertipTouchCollider->SetupAttachment(HandRight, HandRight->GetMiddleFingertipTouchSocketName());
|
||||
RightMiddleFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize);
|
||||
RightMiddleFingertipTouchCollider->SetupAttachment(
|
||||
HandRight, RightHandSettings.TouchSettings.MiddleColliderSocketName);
|
||||
RightMiddleFingertipTouchCollider->SetCastShadow(false);
|
||||
RightMiddleFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
RightMiddleFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -480,8 +470,8 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightRingFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightRingFingertipTouchCollider"));
|
||||
RightRingFingertipTouchCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsTouchColliderSize());
|
||||
RightRingFingertipTouchCollider->SetupAttachment(HandRight, HandRight->GetRingFingertipTouchSocketName());
|
||||
RightRingFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize);
|
||||
RightRingFingertipTouchCollider->SetupAttachment(HandRight, RightHandSettings.TouchSettings.RingColliderSocketName);
|
||||
RightRingFingertipTouchCollider->SetCastShadow(false);
|
||||
RightRingFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
RightRingFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -492,8 +482,9 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
|
||||
|
||||
RightPinkyFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
|
||||
this, TEXT("RightPinkyFingertipTouchCollider"));
|
||||
RightPinkyFingertipTouchCollider->SetRelativeScale3D(HandRight->GetDefaultFingertipsTouchColliderSize());
|
||||
RightPinkyFingertipTouchCollider->SetupAttachment(HandRight, HandRight->GetPinkyFingertipTouchSocketName());
|
||||
RightPinkyFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize);
|
||||
RightPinkyFingertipTouchCollider->SetupAttachment(
|
||||
HandRight, RightHandSettings.TouchSettings.PinkyColliderSocketName);
|
||||
RightPinkyFingertipTouchCollider->SetCastShadow(false);
|
||||
RightPinkyFingertipTouchCollider->bCastDynamicShadow = false;
|
||||
RightPinkyFingertipTouchCollider->SetReceivesDecals(true);
|
||||
@@ -2056,8 +2047,9 @@ void ASGPawn::FImpl::UpdateHandRotation(const bool bRight, const FRotator& Rotat
|
||||
|
||||
void ASGPawn::FImpl::UpdateLeftHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
|
||||
{
|
||||
const FSGVirtualHandMeshSettings& MeshSettings{Owner->HandLeft->GetVirtualHandSettings().MeshSettings};
|
||||
const FQuat NewRotation{
|
||||
Rotation.Quaternion() * GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection.Quaternion()
|
||||
Rotation.Quaternion() * MeshSettings.RootBoneRotationCorrection.Quaternion()
|
||||
};
|
||||
if (bUpdateVirtualHand)
|
||||
{
|
||||
@@ -2068,8 +2060,9 @@ void ASGPawn::FImpl::UpdateLeftHandRotation(const FRotator& Rotation, const bool
|
||||
|
||||
void ASGPawn::FImpl::UpdateRightHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand)
|
||||
{
|
||||
const FSGVirtualHandMeshSettings& MeshSettings{Owner->HandLeft->GetVirtualHandSettings().MeshSettings};
|
||||
const FQuat NewRotation{
|
||||
Rotation.Quaternion() * GetVirtualHandSettings().MeshSettings.RootBoneRotationCorrection.Quaternion()
|
||||
Rotation.Quaternion() * MeshSettings.RootBoneRotationCorrection.Quaternion()
|
||||
};
|
||||
if (bUpdateVirtualHand)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
#include "Templates/UniquePtr.h"
|
||||
#include "UObject/NameTypes.h"
|
||||
|
||||
#include "SGSettings/SGSettings.h"
|
||||
#include "SGSettings/SGVirtualHandSettings.h"
|
||||
#include "SGSettings/SGVirtualHandSettingsOverrides.h"
|
||||
|
||||
#include "SGVirtualHandComponent.generated.h"
|
||||
|
||||
@@ -63,14 +64,6 @@ class SENSEGLOVE_API USGVirtualHandComponent : public USkeletalMeshComponent
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
|
||||
public:
|
||||
static const FSGVirtualHandSettings& GetVirtualHandSettings()
|
||||
{
|
||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
||||
return Settings->GetVirtualHandSettings();
|
||||
}
|
||||
|
||||
public:
|
||||
DECLARE_EVENT_OneParam(USGVirtualHandComponent, FHandVisibilityChangedEvent, bool bNewVisibiliy);
|
||||
|
||||
@@ -104,8 +97,11 @@ private:
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
uint8 bRight : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
uint8 bVisibleWhenHandDataUnavailable : 1;
|
||||
/**
|
||||
* Overrides the plugin's virtual hand settings.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||
FSGVirtualHandSettingsOverrides VirtualHandSettingsOverrides;
|
||||
|
||||
private:
|
||||
UPROPERTY(Transient)
|
||||
@@ -128,91 +124,21 @@ public:
|
||||
|
||||
void SetRight(const bool bInRight);
|
||||
|
||||
FORCEINLINE const FRotator& GetAnimationBoneRotationCorrectionOffset() const
|
||||
FORCEINLINE bool OverridesPluginVirtualHandSettings() const
|
||||
{
|
||||
return GetVirtualHandSettings().AnimationSettings.AnimationBoneRotationCorrectionOffset;
|
||||
return !!VirtualHandSettingsOverrides.bOverridePluginSettings;
|
||||
}
|
||||
|
||||
FORCEINLINE bool ShouldAnimationApplyBoneLocation() const
|
||||
FORCEINLINE const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides() const
|
||||
{
|
||||
return !!GetVirtualHandSettings().AnimationSettings.bShouldAnimationApplyBoneLocation;
|
||||
return VirtualHandSettingsOverrides;
|
||||
}
|
||||
|
||||
FORCEINLINE bool AutoStopsAllHapticsOnEndPlay() const
|
||||
{
|
||||
return !!GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
||||
}
|
||||
void SetVirtualHandSettingsOverrides(const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides);
|
||||
|
||||
FORCEINLINE const FName& GetGrabSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().GrabSettings.GrabAttachPointSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FVector& GetDefaultFingertipsGrabColliderSize() const
|
||||
{
|
||||
return GetVirtualHandSettings().GrabSettings.DefaultColliderSize;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetThumbFingertipGrabSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().GrabSettings.ThumbColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetIndexFingertipGrabSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().GrabSettings.IndexColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetMiddleFingertipGrabSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().GrabSettings.MiddleColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FVector& GetDefaultFingertipsTouchColliderSize() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.DefaultColliderSize;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetThumbFingertipTouchSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.ThumbColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetIndexFingertipTouchSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.IndexColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetMiddleFingertipTouchSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.MiddleColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetRingFingertipTouchSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.RingColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FName& GetPinkyFingertipTouchSocketName() const
|
||||
{
|
||||
return GetVirtualHandSettings().TouchSettings.PinkyColliderSocketName;
|
||||
}
|
||||
|
||||
FORCEINLINE const FSGVirtualHandDebuggingSettings& GetVirtualHandDebuggingSettings() const
|
||||
{
|
||||
return GetVirtualHandSettings().DebuggingSettings;
|
||||
}
|
||||
|
||||
FORCEINLINE bool IsVisibleWhenHandDataUnavailable() const
|
||||
{
|
||||
return !!bVisibleWhenHandDataUnavailable;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetVisibleWhenHandDataUnavailable(const bool bInVisibleWhenHandDataUnavailable)
|
||||
{
|
||||
bVisibleWhenHandDataUnavailable = bInVisibleWhenHandDataUnavailable;
|
||||
}
|
||||
FSGVirtualHandSettings GetVirtualHandSettings() const;
|
||||
|
||||
public:
|
||||
FORCEINLINE void SetWristTracker(USGWristTrackerComponent* InWristTracker)
|
||||
{
|
||||
WristTracker = InWristTracker;
|
||||
|
||||
@@ -56,8 +56,6 @@ void FSGDebugVirtualHand::Draw(const UWorld* World,
|
||||
ensureAlwaysMsgf(MotionControllerData.HandKeyPositions.Num() == MotionControllerData.HandKeyRotations.Num(),
|
||||
TEXT("Mismatched motion controller data positions and rotations!"));
|
||||
|
||||
const float LifeTime = UGameplayStatics::GetWorldDeltaSeconds(World) * Settings.LifeTimeModifier;
|
||||
|
||||
for (TArray<FVector>::SizeType HandKeyIndex = 0;
|
||||
HandKeyIndex < MotionControllerData.HandKeyPositions.Num(); ++HandKeyIndex)
|
||||
{
|
||||
@@ -66,24 +64,21 @@ void FSGDebugVirtualHand::Draw(const UWorld* World,
|
||||
|
||||
if (Settings.DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints)
|
||||
{
|
||||
DrawDebugBox(World, HandKeyPosition, Settings.CubeExtent,
|
||||
HandKeyRotation, Settings.CubeColor,
|
||||
Settings.bPersistentLines, LifeTime, Settings.DepthPriority, Settings.CubeThickness);
|
||||
const float LifeTime = UGameplayStatics::GetWorldDeltaSeconds(World)
|
||||
* Settings.DebugCubicHandSettings.LifeTimeModifier;
|
||||
DrawDebugBox(World,
|
||||
HandKeyPosition,
|
||||
Settings.DebugCubicHandSettings.Extent,
|
||||
HandKeyRotation,
|
||||
Settings.DebugCubicHandSettings.Color,
|
||||
Settings.DebugCubicHandSettings.bPersistentLines,
|
||||
LifeTime,
|
||||
Settings.DebugCubicHandSettings.DepthPriority,
|
||||
Settings.DebugCubicHandSettings.Thickness);
|
||||
}
|
||||
else if (Settings.DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints)
|
||||
{
|
||||
FSGDebugGizmo::Draw(World,
|
||||
HandKeyPosition, HandKeyRotation,
|
||||
FSGDebugGizmoSettings{
|
||||
Settings.GizmoLength,
|
||||
Settings.GizmoThickness,
|
||||
Settings.GizmoXAxisColor,
|
||||
Settings.GizmoYAxisColor,
|
||||
Settings.GizmoZAxisColor,
|
||||
!!Settings.bPersistentLines,
|
||||
Settings.LifeTimeModifier,
|
||||
Settings.DepthPriority
|
||||
});
|
||||
FSGDebugGizmo::Draw(World, HandKeyPosition, HandKeyRotation, Settings.DebugGizmoHandSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,105 +74,34 @@ void UVirtualHandComponentKismetLibrary::SetRight(
|
||||
VirtualHandComponent->SetRight(bInRight);
|
||||
}
|
||||
|
||||
bool UVirtualHandComponentKismetLibrary::IsVisibleWhenHandDataUnavailable(
|
||||
bool UVirtualHandComponentKismetLibrary::OverridesPluginVirtualHandSettings(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->IsVisibleWhenHandDataUnavailable();
|
||||
return VirtualHandComponent->OverridesPluginVirtualHandSettings();
|
||||
}
|
||||
|
||||
void UVirtualHandComponentKismetLibrary::SetVisibleWhenHandDataUnavailable(
|
||||
USGVirtualHandComponent* VirtualHandComponent, const bool bInVisibleWhenHandDataUnavailable)
|
||||
{
|
||||
VirtualHandComponent->SetVisibleWhenHandDataUnavailable(bInVisibleWhenHandDataUnavailable);
|
||||
}
|
||||
|
||||
const FRotator& UVirtualHandComponentKismetLibrary::GetAnimationBoneRotationCorrectionOffset(
|
||||
const FSGVirtualHandSettingsOverrides& UVirtualHandComponentKismetLibrary::GetVirtualHandSettingsOverrides(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetAnimationBoneRotationCorrectionOffset();
|
||||
return VirtualHandComponent->GetVirtualHandSettingsOverrides();
|
||||
}
|
||||
|
||||
bool UVirtualHandComponentKismetLibrary::ShouldAnimationApplyBoneLocation(
|
||||
void UVirtualHandComponentKismetLibrary::SetVirtualHandSettingsOverrides(
|
||||
USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides)
|
||||
{
|
||||
VirtualHandComponent->SetVirtualHandSettingsOverrides(InVirtualHandSettingsOverrides);
|
||||
}
|
||||
|
||||
FSGVirtualHandSettings UVirtualHandComponentKismetLibrary::GetVirtualHandSettings(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->ShouldAnimationApplyBoneLocation();
|
||||
return VirtualHandComponent->GetVirtualHandSettings();
|
||||
}
|
||||
|
||||
bool UVirtualHandComponentKismetLibrary::AutoStopsAllHapticsOnEndPlay(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
bool UVirtualHandComponentKismetLibrary::IsGloveConnected(const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->AutoStopsAllHapticsOnEndPlay();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetGrabSocketName();
|
||||
}
|
||||
|
||||
const FVector& UVirtualHandComponentKismetLibrary::GetDefaultFingertipsGrabColliderSize(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetDefaultFingertipsGrabColliderSize();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetThumbFingertipGrabSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetThumbFingertipGrabSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipGrabSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetIndexFingertipGrabSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipGrabSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetMiddleFingertipGrabSocketName();
|
||||
}
|
||||
|
||||
const FVector& UVirtualHandComponentKismetLibrary::GetDefaultFingertipsTouchColliderSize(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetDefaultFingertipsTouchColliderSize();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetThumbFingertipTouchSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetThumbFingertipTouchSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetIndexFingertipTouchSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetIndexFingertipTouchSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetMiddleFingertipTouchSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetMiddleFingertipTouchSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetRingFingertipTouchSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetRingFingertipTouchSocketName();
|
||||
}
|
||||
|
||||
const FName& UVirtualHandComponentKismetLibrary::GetPinkyFingertipTouchSocketName(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetPinkyFingertipTouchSocketName();
|
||||
}
|
||||
|
||||
const FSGVirtualHandDebuggingSettings& UVirtualHandComponentKismetLibrary::GetVirtualHandDebuggingSettings(
|
||||
const USGVirtualHandComponent* VirtualHandComponent)
|
||||
{
|
||||
return VirtualHandComponent->GetVirtualHandDebuggingSettings();
|
||||
return VirtualHandComponent->IsGloveConnected();
|
||||
}
|
||||
|
||||
USGHapticGlove* UVirtualHandComponentKismetLibrary::GetConnectedGlove(
|
||||
|
||||
@@ -43,15 +43,16 @@
|
||||
#include "UObject/NameTypes.h"
|
||||
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGSettings/SGVirtualHandDebuggingSettings.h"
|
||||
#include "SGSettings/SGVirtualHandSettings.h"
|
||||
#include "SGSettings/SGVirtualHandSettingsOverrides.h"
|
||||
|
||||
#include "SGVirtualHandComponentKismetLibrary.generated.h"
|
||||
|
||||
class USkeletalMeshComponent;
|
||||
|
||||
class USGVirtualHandComponent;
|
||||
class USGHandPose;
|
||||
class USGHapticGlove;
|
||||
class USGVirtualHandComponent;
|
||||
|
||||
UCLASS(meta=(ScriptName = "SenseGloveVirtualHandComponentKismetLibrary"))
|
||||
class SENSEGLOVEKISMET_API UVirtualHandComponentKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
@@ -81,59 +82,22 @@ public:
|
||||
static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static bool IsVisibleWhenHandDataUnavailable(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
static bool OverridesPluginVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides(
|
||||
const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static void SetVisibleWhenHandDataUnavailable(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
bool bInVisibleWhenHandDataUnavailable);
|
||||
static void SetVirtualHandSettingsOverrides(
|
||||
UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent,
|
||||
const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FRotator& GetAnimationBoneRotationCorrectionOffset(
|
||||
const USGVirtualHandComponent* VirtualHandComponent);
|
||||
static FSGVirtualHandSettings GetVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static bool ShouldAnimationApplyBoneLocation(
|
||||
const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static bool AutoStopsAllHapticsOnEndPlay(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FVector& GetDefaultFingertipsGrabColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetThumbFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetIndexFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetMiddleFingertipGrabSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FVector& GetDefaultFingertipsTouchColliderSize(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetThumbFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetIndexFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetMiddleFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetRingFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FName& GetPinkyFingertipTouchSocketName(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static const FSGVirtualHandDebuggingSettings& GetVirtualHandDebuggingSettings(
|
||||
const USGVirtualHandComponent* VirtualHandComponent);
|
||||
static bool IsGloveConnected(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component")
|
||||
static USGHapticGlove* GetConnectedGlove(const USGVirtualHandComponent* VirtualHandComponent);
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGSettings/SGDebugCubeSettings.h"
|
||||
|
||||
FSGDebugCubeSettings::FSGDebugCubeSettings()
|
||||
: FSGDebugCubeSettings{
|
||||
FVector{1.0f, 1.0f, 1.0f},
|
||||
FColor{255, 0, 0, 255},
|
||||
false,
|
||||
1.1f,
|
||||
0,
|
||||
1.0f,
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
FSGDebugCubeSettings::FSGDebugCubeSettings(
|
||||
const FVector& InExtent,
|
||||
const FColor& InColor,
|
||||
const bool bInPersistentLines,
|
||||
const float InLifeTimeModifier,
|
||||
const uint8 InDepthPriority,
|
||||
const float InThickness)
|
||||
: Extent(InExtent),
|
||||
Color(InColor),
|
||||
bPersistentLines(bInPersistentLines),
|
||||
LifeTimeModifier(InLifeTimeModifier),
|
||||
DepthPriority(InDepthPriority),
|
||||
Thickness(InThickness)
|
||||
{
|
||||
}
|
||||
@@ -37,34 +37,34 @@
|
||||
|
||||
FSGDebugGizmoSettings::FSGDebugGizmoSettings()
|
||||
: FSGDebugGizmoSettings{
|
||||
4.0f,
|
||||
0.4f,
|
||||
FColor(255, 0, 0, 255),
|
||||
FColor(0, 255, 0, 255),
|
||||
FColor(0, 0, 255, 255),
|
||||
1.0f,
|
||||
FColor{255, 0, 0, 255},
|
||||
FColor{0, 255, 0, 255},
|
||||
FColor{0, 0, 255, 255},
|
||||
false,
|
||||
1.1f,
|
||||
0
|
||||
0,
|
||||
1.0f,
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
FSGDebugGizmoSettings::FSGDebugGizmoSettings(
|
||||
const float InLength,
|
||||
const float InThickness,
|
||||
const FColor& InXAxisColor,
|
||||
const FColor& InYAxisColor,
|
||||
const FColor& InZAxisColor,
|
||||
const bool bInPersistentLines,
|
||||
const float InLifeTimeModifier,
|
||||
const uint8 InDepthPriority)
|
||||
const uint8 InDepthPriority,
|
||||
const float InThickness)
|
||||
: Length(InLength),
|
||||
Thickness(InThickness),
|
||||
XAxisColor{InXAxisColor},
|
||||
YAxisColor{InYAxisColor},
|
||||
ZAxisColor{InZAxisColor},
|
||||
bPersistentLines(bInPersistentLines),
|
||||
LifeTimeModifier(InLifeTimeModifier),
|
||||
DepthPriority(InDepthPriority)
|
||||
DepthPriority(InDepthPriority),
|
||||
Thickness(InThickness)
|
||||
{
|
||||
}
|
||||
@@ -39,17 +39,24 @@ FSGVirtualHandDebuggingSettings::FSGVirtualHandDebuggingSettings()
|
||||
: FSGVirtualHandDebuggingSettings{
|
||||
false,
|
||||
ESGDebugVirtualHandDrawingMode::None,
|
||||
FVector(0.5f, 0.5f, 0.5f),
|
||||
FColor(255, 0, 0, 255),
|
||||
0.2f,
|
||||
1.0f,
|
||||
0.25f,
|
||||
FColor(255, 0, 0, 255),
|
||||
FColor(0, 255, 0, 255),
|
||||
FColor(0, 0, 255, 255),
|
||||
FSGDebugCubeSettings{
|
||||
FVector{0.5f, 0.5f, 0.5f},
|
||||
FColor{255, 0, 0, 255},
|
||||
false,
|
||||
1.1f,
|
||||
0
|
||||
0,
|
||||
0.2f,
|
||||
},
|
||||
FSGDebugGizmoSettings{
|
||||
1.0f,
|
||||
FColor{255, 0, 0, 255},
|
||||
FColor{0, 255, 0, 255},
|
||||
FColor{0, 0, 255, 255},
|
||||
false,
|
||||
1.1f,
|
||||
0,
|
||||
0.25f,
|
||||
},
|
||||
}
|
||||
{
|
||||
}
|
||||
@@ -57,29 +64,11 @@ FSGVirtualHandDebuggingSettings::FSGVirtualHandDebuggingSettings()
|
||||
FSGVirtualHandDebuggingSettings::FSGVirtualHandDebuggingSettings(
|
||||
const bool bInDrawDebugVirtualHand,
|
||||
const ESGDebugVirtualHandDrawingMode InDrawingMode,
|
||||
const FVector& InCubeExtent,
|
||||
const FColor& InCubeColor,
|
||||
const float InCubeThickness,
|
||||
const float InGizmoLength,
|
||||
const float InGizmoThickness,
|
||||
const FColor& InGizmoXAxisColor,
|
||||
const FColor& InGizmoYAxisColor,
|
||||
const FColor& InGizmoZAxisColor,
|
||||
const bool bInPersistentLines,
|
||||
const float InLifeTimeModifier,
|
||||
const uint8 InDepthPriority)
|
||||
const FSGDebugCubeSettings& InDebugCubicHandSettings,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoHandSettings)
|
||||
: bDrawDebugVirtualHand(bInDrawDebugVirtualHand),
|
||||
DrawingMode(InDrawingMode),
|
||||
CubeExtent(InCubeExtent),
|
||||
CubeColor(InCubeColor),
|
||||
CubeThickness(InCubeThickness),
|
||||
GizmoLength(InGizmoLength),
|
||||
GizmoThickness(InGizmoThickness),
|
||||
GizmoXAxisColor(InGizmoXAxisColor),
|
||||
GizmoYAxisColor(InGizmoYAxisColor),
|
||||
GizmoZAxisColor(InGizmoZAxisColor),
|
||||
bPersistentLines(bInPersistentLines),
|
||||
LifeTimeModifier(InLifeTimeModifier),
|
||||
DepthPriority(InDepthPriority)
|
||||
DebugCubicHandSettings{InDebugCubicHandSettings},
|
||||
DebugGizmoHandSettings{InDebugGizmoHandSettings}
|
||||
{
|
||||
}
|
||||
@@ -413,6 +413,18 @@ FSGVirtualHandMeshSettings::FSGVirtualHandMeshSettings(
|
||||
FName{TEXT("pinky_02_r")},// LittleIntermediate
|
||||
FName{TEXT("pinky_03_r")},// LittleDistal
|
||||
NAME_None// LittleTip
|
||||
},
|
||||
DefaultLeftHandMeshPath{
|
||||
TEXT("SkeletalMesh'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")
|
||||
},
|
||||
DefaultLeftHandMeshPathOnly{
|
||||
TEXT("/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")
|
||||
},
|
||||
DefaultRightHandMeshPath{
|
||||
TEXT("SkeletalMesh'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")
|
||||
},
|
||||
DefaultRightHandMeshPathOnly{
|
||||
TEXT("/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")
|
||||
}
|
||||
{
|
||||
}
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
FSGVirtualHandSettings::FSGVirtualHandSettings()
|
||||
: FSGVirtualHandSettings{
|
||||
false,
|
||||
FSGVirtualHandAnimationSettings{},
|
||||
FSGVirtualHandDebuggingSettings{},
|
||||
FSGVirtualHandGrabSettings{},
|
||||
@@ -50,13 +51,15 @@ FSGVirtualHandSettings::FSGVirtualHandSettings()
|
||||
}
|
||||
|
||||
FSGVirtualHandSettings::FSGVirtualHandSettings(
|
||||
const bool bInVisibleWhenHandDataUnavailable,
|
||||
const FSGVirtualHandAnimationSettings& InAnimationSettings,
|
||||
const FSGVirtualHandDebuggingSettings& InDebuggingSettings,
|
||||
const FSGVirtualHandGrabSettings& InGrabSettings,
|
||||
const FSGVirtualHandHapticsSettings& InHapticsSettings,
|
||||
const FSGVirtualHandMeshSettings& InMeshSettings,
|
||||
const FSGVirtualHandTouchSettings& InTouchSettings)
|
||||
: AnimationSettings{InAnimationSettings},
|
||||
: bVisibleWhenHandDataUnavailable(bInVisibleWhenHandDataUnavailable),
|
||||
AnimationSettings{InAnimationSettings},
|
||||
DebuggingSettings{InDebuggingSettings},
|
||||
GrabSettings{InGrabSettings},
|
||||
HapticsSettings{InHapticsSettings},
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGSettings/SGVirtualHandSettingsOverrides.h"
|
||||
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
|
||||
FSGVirtualHandSettingsOverrides::FSGVirtualHandSettingsOverrides()
|
||||
: FSGVirtualHandSettingsOverrides{
|
||||
false,
|
||||
false,
|
||||
FSGVirtualHandAnimationSettings{},
|
||||
FSGVirtualHandDebuggingSettings{},
|
||||
FSGVirtualHandGrabSettings{},
|
||||
FSGVirtualHandHapticsSettings{},
|
||||
FSGVirtualHandTouchSettings{}
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
FSGVirtualHandSettingsOverrides::FSGVirtualHandSettingsOverrides(
|
||||
const bool bInOverridePluginSettings,
|
||||
const bool bInVisibleWhenHandDataUnavailable,
|
||||
const FSGVirtualHandAnimationSettings& InAnimationSettings,
|
||||
const FSGVirtualHandDebuggingSettings& InDebuggingSettings,
|
||||
const FSGVirtualHandGrabSettings& InGrabSettings,
|
||||
const FSGVirtualHandHapticsSettings& InHapticsSettings,
|
||||
const FSGVirtualHandTouchSettings& InTouchSettings)
|
||||
: bOverridePluginSettings(bInOverridePluginSettings),
|
||||
bVisibleWhenHandDataUnavailable(bInVisibleWhenHandDataUnavailable),
|
||||
AnimationSettings{InAnimationSettings},
|
||||
DebuggingSettings{InDebuggingSettings},
|
||||
GrabSettings{InGrabSettings},
|
||||
HapticsSettings{InHapticsSettings},
|
||||
TouchSettings{InTouchSettings}
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "SGSettings/SGWristTrackingDebuggingSettings.h"
|
||||
|
||||
FSGWristTrackingDebuggingSettings::FSGWristTrackingDebuggingSettings()
|
||||
: FSGWristTrackingDebuggingSettings{
|
||||
false,
|
||||
FSGDebugGizmoSettings{
|
||||
4.0f,
|
||||
FColor{255, 0, 0, 255},
|
||||
FColor{0, 255, 0, 255},
|
||||
FColor{0, 0, 255, 255},
|
||||
false,
|
||||
1.1f,
|
||||
0,
|
||||
0.4f,
|
||||
},
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
FSGWristTrackingDebuggingSettings::FSGWristTrackingDebuggingSettings(
|
||||
const bool bInDrawDebugWristTracker,
|
||||
const FSGDebugGizmoSettings& InDebugWristTrackerSettings)
|
||||
: bDrawDebugWristTracker(bInDrawDebugWristTracker),
|
||||
DebugWristTrackerSettings{InDebugWristTrackerSettings}
|
||||
{
|
||||
}
|
||||
@@ -44,8 +44,7 @@ FSGWristTrackingSettings::FSGWristTrackingSettings()
|
||||
FRotator::ZeroRotator,
|
||||
EControllerHand::Left,
|
||||
EControllerHand::Right,
|
||||
false,
|
||||
FSGDebugGizmoSettings{}
|
||||
FSGWristTrackingDebuggingSettings{}
|
||||
}
|
||||
{
|
||||
}
|
||||
@@ -58,8 +57,7 @@ FSGWristTrackingSettings::FSGWristTrackingSettings(
|
||||
const FRotator& InTrackingHardwareRotationOffsetRightHand,
|
||||
const EControllerHand InLeftHandMotionSource,
|
||||
const EControllerHand InRightHandMotionSource,
|
||||
const bool bInDrawDebugGizmo,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoSettings)
|
||||
const FSGWristTrackingDebuggingSettings& InDebuggingSettings)
|
||||
: TrackingHardware(InTrackingHardware),
|
||||
TrackingHardwareLocationOffsetLeftHand{InTrackingHardwareLocationOffsetLeftHand},
|
||||
TrackingHardwareLocationOffsetRightHand{InTrackingHardwareLocationOffsetRightHand},
|
||||
@@ -67,7 +65,6 @@ FSGWristTrackingSettings::FSGWristTrackingSettings(
|
||||
TrackingHardwareRotationOffsetRightHand{InTrackingHardwareRotationOffsetRightHand},
|
||||
LeftHandMotionSource(InLeftHandMotionSource),
|
||||
RightHandMotionSource(InRightHandMotionSource),
|
||||
bDrawDebugGizmo(bInDrawDebugGizmo),
|
||||
DebugGizmoSettings{InDebugGizmoSettings}
|
||||
DebuggingSettings{InDebuggingSettings}
|
||||
{
|
||||
}
|
||||
@@ -38,18 +38,15 @@
|
||||
FSGWristTrackingSettingsOverrides::FSGWristTrackingSettingsOverrides()
|
||||
: FSGWristTrackingSettingsOverrides{
|
||||
false,
|
||||
false,
|
||||
FSGDebugGizmoSettings{}
|
||||
FSGWristTrackingDebuggingSettings{}
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
FSGWristTrackingSettingsOverrides::FSGWristTrackingSettingsOverrides(
|
||||
const bool bInOverridePluginSettings,
|
||||
const bool bInDrawDebugGizmo,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoSettings)
|
||||
const FSGWristTrackingDebuggingSettings& InDebuggingSettings)
|
||||
: bOverridePluginSettings(bInOverridePluginSettings),
|
||||
bDrawDebugGizmo(bInDrawDebugGizmo),
|
||||
DebugGizmoSettings{InDebugGizmoSettings}
|
||||
DebuggingSettings{InDebuggingSettings}
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "HAL/Platform.h"
|
||||
#include "Math/Color.h"
|
||||
#include "Math/Vector.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGDebugCubeSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the debug cube settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGDebugCubeSettings
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
FVector Extent;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
FColor Color;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
uint8 bPersistentLines : 1;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
float LifeTimeModifier;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
uint8 DepthPriority;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||
float Thickness;
|
||||
|
||||
public:
|
||||
FSGDebugCubeSettings();
|
||||
|
||||
FSGDebugCubeSettings(
|
||||
const FVector& InExtent,
|
||||
const FColor& InColor,
|
||||
bool bInPersistentLines,
|
||||
float InLifeTimeModifier,
|
||||
uint8 InDepthPriority,
|
||||
float InThickness);
|
||||
};
|
||||
@@ -41,46 +41,49 @@
|
||||
|
||||
#include "SGDebugGizmoSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the debug gimo settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGDebugGizmoSettings
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
float Length;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
float Thickness;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
FColor XAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
FColor YAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
FColor ZAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
uint8 bPersistentLines : 1;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
float LifeTimeModifier;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmog")
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
uint8 DepthPriority;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||
float Thickness;
|
||||
|
||||
public:
|
||||
FSGDebugGizmoSettings();
|
||||
|
||||
FSGDebugGizmoSettings(
|
||||
float InLength,
|
||||
float InThickness,
|
||||
const FColor& InXAxisColor,
|
||||
const FColor& InYAxisColor,
|
||||
const FColor& InZAxisColor,
|
||||
bool bInPersistentLines,
|
||||
float InLifeTimeModifier,
|
||||
uint8 InDepthPriority);
|
||||
uint8 InDepthPriority,
|
||||
float InThickness);
|
||||
};
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
#include "SGGameUserSettingSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the game user settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGGameUserSettingSettings
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "SGHMDTrackingSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove Tracking module.
|
||||
* Implements the HMD tracking settings for the SenseGlove Tracking module.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGHMDTrackingSettings
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
#include "SGHardwareBenchmarkSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the hadware benchamrk settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGHardwareBenchmarkSettings
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "SGInitializationSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the glove tracking settings for the SenseGlove Tracking module.
|
||||
* Implements the plugin initialization settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGInitializationSettings
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand animation settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandAnimationSettings
|
||||
|
||||
@@ -36,14 +36,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "HAL/Platform.h"
|
||||
#include "Math/Color.h"
|
||||
#include "Math/Vector.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGSettings/SGDebugCubeSettings.h"
|
||||
#include "SGSettings/SGDebugGizmoSettings.h"
|
||||
#include "SGTypes/SGDebugTypes.h"
|
||||
|
||||
#include "SGVirtualHandDebuggingSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the virtual hand debugging settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandDebuggingSettings
|
||||
{
|
||||
@@ -60,57 +63,12 @@ public:
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints",
|
||||
EditConditionHides))
|
||||
FVector CubeExtent;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints",
|
||||
EditConditionHides))
|
||||
FColor CubeColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints",
|
||||
EditConditionHides))
|
||||
float CubeThickness;
|
||||
FSGDebugCubeSettings DebugCubicHandSettings;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
float GizmoLength;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
float GizmoThickness;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
FColor GizmoXAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
FColor GizmoYAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
FColor GizmoZAxisColor;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
uint8 bPersistentLines : 1;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
float LifeTimeModifier;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints",
|
||||
EditConditionHides))
|
||||
uint8 DepthPriority;
|
||||
FSGDebugGizmoSettings DebugGizmoHandSettings;
|
||||
|
||||
public:
|
||||
FSGVirtualHandDebuggingSettings();
|
||||
@@ -118,15 +76,6 @@ public:
|
||||
FSGVirtualHandDebuggingSettings(
|
||||
bool bInDrawDebugVirtualHand,
|
||||
ESGDebugVirtualHandDrawingMode InDrawingMode,
|
||||
const FVector& InCubeExtent,
|
||||
const FColor& InCubeColor,
|
||||
float InCubeThickness,
|
||||
float InGizmoLength,
|
||||
float InGizmoThickness,
|
||||
const FColor& InGizmoXAxisColor,
|
||||
const FColor& InGizmoYAxisColor,
|
||||
const FColor& InGizmoZAxisColor,
|
||||
bool bInPersistentLines,
|
||||
float InLifeTimeModifier,
|
||||
uint8 InDepthPriority);
|
||||
const FSGDebugCubeSettings& InDebugCubicHandSettings,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoHandSettings);
|
||||
};
|
||||
@@ -46,7 +46,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand grab settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandGrabSettings
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand haptics settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandHapticsSettings
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Containers/Array.h"
|
||||
#include "Containers/Map.h"
|
||||
#include "Containers/UnrealString.h"
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
#include "Math/Rotator.h"
|
||||
#include "Math/Transform.h"
|
||||
@@ -51,7 +52,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand mesh settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandMeshSettings
|
||||
@@ -83,6 +84,18 @@ public:
|
||||
UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh")
|
||||
TArray<FName> RightHandBoneNames;
|
||||
|
||||
UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh")
|
||||
FString DefaultLeftHandMeshPath;
|
||||
|
||||
UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh")
|
||||
FString DefaultLeftHandMeshPathOnly;
|
||||
|
||||
UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh")
|
||||
FString DefaultRightHandMeshPath;
|
||||
|
||||
UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh")
|
||||
FString DefaultRightHandMeshPathOnly;
|
||||
|
||||
public:
|
||||
FSGVirtualHandMeshSettings();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand phalanges length settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandPhalangesLengthSettings
|
||||
|
||||
@@ -47,10 +47,8 @@
|
||||
|
||||
#include "SGVirtualHandSettings.generated.h"
|
||||
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandSettings
|
||||
@@ -58,6 +56,9 @@ struct SENSEGLOVESETTINGS_API FSGVirtualHandSettings
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
||||
uint8 bVisibleWhenHandDataUnavailable : 1;
|
||||
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
||||
FSGVirtualHandAnimationSettings AnimationSettings;
|
||||
|
||||
@@ -80,6 +81,7 @@ public:
|
||||
FSGVirtualHandSettings();
|
||||
|
||||
FSGVirtualHandSettings(
|
||||
bool bInVisibleWhenHandDataUnavailable,
|
||||
const FSGVirtualHandAnimationSettings& InAnimationSettings,
|
||||
const FSGVirtualHandDebuggingSettings& InDebuggingSettings,
|
||||
const FSGVirtualHandGrabSettings& InGrabSettings,
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "UObject/ObjectMacros.h"
|
||||
#include "UObject/SoftObjectPtr.h"
|
||||
|
||||
#include "SGSettings/SGVirtualHandAnimationSettings.h"
|
||||
#include "SGSettings/SGVirtualHandDebuggingSettings.h"
|
||||
#include "SGSettings/SGVirtualHandGrabSettings.h"
|
||||
#include "SGSettings/SGVirtualHandHapticsSettings.h"
|
||||
#include "SGSettings/SGVirtualHandTouchSettings.h"
|
||||
|
||||
#include "SGVirtualHandSettingsOverrides.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the virtual hand settings' overrides.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandSettingsOverrides
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* Determines whether to override the plugin's virtual hand settings or not.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
||||
uint8 bOverridePluginSettings : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
uint8 bVisibleWhenHandDataUnavailable : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
FSGVirtualHandAnimationSettings AnimationSettings;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
FSGVirtualHandDebuggingSettings DebuggingSettings;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
FSGVirtualHandGrabSettings GrabSettings;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
FSGVirtualHandHapticsSettings HapticsSettings;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
FSGVirtualHandTouchSettings TouchSettings;
|
||||
|
||||
public:
|
||||
FSGVirtualHandSettingsOverrides();
|
||||
|
||||
FSGVirtualHandSettingsOverrides(
|
||||
bool bInOverridePluginSettings,
|
||||
bool bInVisibleWhenHandDataUnavailable,
|
||||
const FSGVirtualHandAnimationSettings& InAnimationSettings,
|
||||
const FSGVirtualHandDebuggingSettings& InDebuggingSettings,
|
||||
const FSGVirtualHandGrabSettings& InGrabSettings,
|
||||
const FSGVirtualHandHapticsSettings& InHapticsSettings,
|
||||
const FSGVirtualHandTouchSettings& InTouchSettings);
|
||||
};
|
||||
@@ -45,7 +45,7 @@
|
||||
class USkeletalMesh;
|
||||
|
||||
/**
|
||||
* Implements the hand tracking settings for the SenseGlove module.
|
||||
* Implements the virtual hand touch settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGVirtualHandTouchSettings
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @author Mamadou Babaei <mamadou@senseglove.com>
|
||||
*
|
||||
* @section LICENSE
|
||||
*
|
||||
* (The MIT License)
|
||||
*
|
||||
* Copyright (c) 2020 - 2024 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 "HAL/Platform.h"
|
||||
#include "Math/Color.h"
|
||||
#include "Math/Vector.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGDebugGizmoSettings.h"
|
||||
|
||||
#include "SGWristTrackingDebuggingSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the wrist tracking debugging settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGWristTrackingDebuggingSettings
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
public:
|
||||
/**
|
||||
* If enabled, draws debug Wrist trackers where possible.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "Debugging")
|
||||
uint8 bDrawDebugWristTracker : 1;
|
||||
|
||||
/**
|
||||
* Valid only if bDrawDebugGizmo is enabled.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "Debugging",
|
||||
meta=(EditCondition="bDrawDebugWristTracker", EditConditionHides))
|
||||
FSGDebugGizmoSettings DebugWristTrackerSettings;
|
||||
|
||||
public:
|
||||
FSGWristTrackingDebuggingSettings();
|
||||
|
||||
FSGWristTrackingDebuggingSettings(
|
||||
bool bInDrawDebugWristTracker,
|
||||
const FSGDebugGizmoSettings& InDebugWristTrackerSettings);
|
||||
};
|
||||
@@ -41,11 +41,14 @@
|
||||
#include "Math/Vector.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGSettings/SGDebugGizmoSettings.h"
|
||||
#include "SGSettings/SGWristTrackingDebuggingSettings.h"
|
||||
#include "SGTypes/SGCoreTypes.h"
|
||||
|
||||
#include "SGWristTrackingSettings.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the wrist tracking settings.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGWristTrackingSettings
|
||||
{
|
||||
@@ -100,18 +103,8 @@ public:
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category="Wrist Tracking")
|
||||
EControllerHand RightHandMotionSource;
|
||||
|
||||
/**
|
||||
* If enabled, draws debug Wrist trackers where possible.
|
||||
*/
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking | Debug")
|
||||
uint8 bDrawDebugGizmo : 1;
|
||||
|
||||
/**
|
||||
* Valid only if bDrawDebugGizmo is enabled.
|
||||
*/
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking | Debug",
|
||||
meta=(EditCondition="bDrawDebugGizmo", EditConditionHides))
|
||||
FSGDebugGizmoSettings DebugGizmoSettings;
|
||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking")
|
||||
FSGWristTrackingDebuggingSettings DebuggingSettings;
|
||||
|
||||
public:
|
||||
FSGWristTrackingSettings();
|
||||
@@ -124,6 +117,5 @@ public:
|
||||
const FRotator& InTrackingHardwareRotationOffsetRightHand,
|
||||
EControllerHand InLeftHandMotionSource,
|
||||
EControllerHand InRightHandMotionSource,
|
||||
bool bInDrawDebugGizmo,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoSettings);
|
||||
const FSGWristTrackingDebuggingSettings& InDebuggingSettings);
|
||||
};
|
||||
@@ -39,10 +39,13 @@
|
||||
#include "InputCoreTypes.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
#include "SGSettings/SGDebugGizmoSettings.h"
|
||||
#include "SGWristTrackingDebuggingSettings.h"
|
||||
|
||||
#include "SGWristTrackingSettingsOverrides.generated.h"
|
||||
|
||||
/**
|
||||
* Implements the wrist tracking settings' overrides.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct SENSEGLOVESETTINGS_API FSGWristTrackingSettingsOverrides
|
||||
{
|
||||
@@ -55,25 +58,14 @@ public:
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
||||
uint8 bOverridePluginSettings : 1;
|
||||
|
||||
/**
|
||||
* If enabled, draws debug Wrist trackers where possible.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||
uint8 bDrawDebugGizmo : 1;
|
||||
|
||||
/**
|
||||
* Valid only if bDrawDebugGizmo is enabled.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||
meta=(EditCondition="bOverridePluginSettings && bDrawDebugGizmo", EditConditionHides))
|
||||
FSGDebugGizmoSettings DebugGizmoSettings;
|
||||
FSGWristTrackingDebuggingSettings DebuggingSettings;
|
||||
|
||||
public:
|
||||
FSGWristTrackingSettingsOverrides();
|
||||
|
||||
FSGWristTrackingSettingsOverrides(
|
||||
bool bInOverridePluginSettings,
|
||||
bool bInDrawDebugGizmo,
|
||||
const FSGDebugGizmoSettings& InDebugGizmoSettings);
|
||||
const FSGWristTrackingDebuggingSettings& InDebuggingSettings);
|
||||
};
|
||||
Reference in New Issue
Block a user