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