replace all bitfield uproperties with booleans
This commit is contained in:
@@ -100,6 +100,7 @@ This is a minor release focusing mainly on bringing OpenXR-compatible hand track
|
|||||||
- The Planned Features Completion Status section of the main README file has been migrated to <code>/Handbook/src/overview/planned-features-completion-status.md</code>.
|
- The Planned Features Completion Status section of the main README file has been migrated to <code>/Handbook/src/overview/planned-features-completion-status.md</code>.
|
||||||
- The Directory Structure section of the main README file has been migrated to <code>/Handbook/src/overview/directory-structure.md</code>.
|
- The Directory Structure section of the main README file has been migrated to <code>/Handbook/src/overview/directory-structure.md</code>.
|
||||||
- The SenseGlove settings' main config struct is now marked as DefaultConfig which means it does not require to be saved when settings are changed and they take effect immediately as the user updates them.
|
- The SenseGlove settings' main config struct is now marked as DefaultConfig which means it does not require to be saved when settings are changed and they take effect immediately as the user updates them.
|
||||||
|
- Replaced all bitfield uproperties with booleans.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
@@ -665,4 +666,4 @@ This is a minor release focusing on adherence to the Unreal Engine Marketplace G
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
|
||||||
@@ -148,7 +148,7 @@ struct USGVirtualHandComponent::FImpl
|
|||||||
FORCEINLINE bool ShouldDrawDebugVirtualHand() const
|
FORCEINLINE bool ShouldDrawDebugVirtualHand() const
|
||||||
{
|
{
|
||||||
const FSGVirtualHandDebuggingSettings& Settings{Owner->GetVirtualHandSettings().DebuggingSettings};
|
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;
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ FSGVirtualHandSettings USGVirtualHandComponent::GetVirtualHandSettings() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FSGVirtualHandSettings VirtualHandSettings{
|
const FSGVirtualHandSettings VirtualHandSettings{
|
||||||
!!VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable,
|
VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable,
|
||||||
VirtualHandSettingsOverrides.AnimationSettings,
|
VirtualHandSettingsOverrides.AnimationSettings,
|
||||||
VirtualHandSettingsOverrides.DebuggingSettings,
|
VirtualHandSettingsOverrides.DebuggingSettings,
|
||||||
VirtualHandSettingsOverrides.GrabSettings,
|
VirtualHandSettingsOverrides.GrabSettings,
|
||||||
@@ -362,7 +362,7 @@ 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};
|
||||||
const bool bAutoStopHaptics = !!GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
const bool bAutoStopHaptics = GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
||||||
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
||||||
{
|
{
|
||||||
Glove->StopHaptics();
|
Glove->StopHaptics();
|
||||||
@@ -382,7 +382,7 @@ 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};
|
||||||
const bool bAutoStopHaptics = !!GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
const bool bAutoStopHaptics = GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay;
|
||||||
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics)
|
||||||
{
|
{
|
||||||
Glove->StopHaptics();
|
Glove->StopHaptics();
|
||||||
@@ -577,7 +577,7 @@ void USGVirtualHandComponent::FImpl::OverridePluginSettingsPropertyChanged()
|
|||||||
|
|
||||||
const FSGVirtualHandSettings& PluginVirtualHandSettings{Settings->GetVirtualHandSettings()};
|
const FSGVirtualHandSettings& PluginVirtualHandSettings{Settings->GetVirtualHandSettings()};
|
||||||
Owner->VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable =
|
Owner->VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable =
|
||||||
!!PluginVirtualHandSettings.bVisibleWhenHandDataUnavailable;
|
PluginVirtualHandSettings.bVisibleWhenHandDataUnavailable;
|
||||||
Owner->VirtualHandSettingsOverrides.AnimationSettings = PluginVirtualHandSettings.AnimationSettings;
|
Owner->VirtualHandSettingsOverrides.AnimationSettings = PluginVirtualHandSettings.AnimationSettings;
|
||||||
Owner->VirtualHandSettingsOverrides.DebuggingSettings = PluginVirtualHandSettings.DebuggingSettings;
|
Owner->VirtualHandSettingsOverrides.DebuggingSettings = PluginVirtualHandSettings.DebuggingSettings;
|
||||||
Owner->VirtualHandSettingsOverrides.GrabSettings = PluginVirtualHandSettings.GrabSettings;
|
Owner->VirtualHandSettingsOverrides.GrabSettings = PluginVirtualHandSettings.GrabSettings;
|
||||||
@@ -743,7 +743,7 @@ void USGVirtualHandComponent::FImpl::UpdateVisibility()
|
|||||||
&& MotionControllerData.DeviceVisualType == EXRVisualType::Hand;
|
&& MotionControllerData.DeviceVisualType == EXRVisualType::Hand;
|
||||||
const bool bHandVisible = Owner->IsVisible();
|
const bool bHandVisible = Owner->IsVisible();
|
||||||
const bool bShouldBeVisibleWhenHandDataUnavailable =
|
const bool bShouldBeVisibleWhenHandDataUnavailable =
|
||||||
!!Owner->GetVirtualHandSettings().bVisibleWhenHandDataUnavailable;
|
Owner->GetVirtualHandSettings().bVisibleWhenHandDataUnavailable;
|
||||||
|
|
||||||
bool bSetNewVisibility = false;
|
bool bSetNewVisibility = false;
|
||||||
|
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ void USGWristTrackerComponent::TickComponent(
|
|||||||
|
|
||||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||||
|
|
||||||
if (!!GetWristTrackingSettings().DebuggingSettings.bDrawDebugWristTracker)
|
if (GetWristTrackingSettings().DebuggingSettings.bDrawDebugWristTracker)
|
||||||
{
|
{
|
||||||
Pimpl->DrawDebugWristTracker();
|
Pimpl->DrawDebugWristTracker();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ private:
|
|||||||
EAttachmentRule AttachmentScaleRule;
|
EAttachmentRule AttachmentScaleRule;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bAttachmentWeldSimulatedBodies : 1;
|
bool bAttachmentWeldSimulatedBodies;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
FName AttachmentSocketName;
|
FName AttachmentSocketName;
|
||||||
@@ -80,10 +80,10 @@ private:
|
|||||||
EDetachmentRule DetachmentScaleRule;
|
EDetachmentRule DetachmentScaleRule;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bDetachmentCallModify : 1;
|
bool bDetachmentCallModify;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bAffectPhysicsState : 1;
|
bool bAffectPhysicsState;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct FImpl;
|
struct FImpl;
|
||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool GetAttachmentWeldSimulatedBodies() const
|
FORCEINLINE bool GetAttachmentWeldSimulatedBodies() const
|
||||||
{
|
{
|
||||||
return !!bAttachmentWeldSimulatedBodies;
|
return bAttachmentWeldSimulatedBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE void SetAttachmentWeldSimulatedBodies(const bool bInAttachmentWeldSimulatedBodies)
|
FORCEINLINE void SetAttachmentWeldSimulatedBodies(const bool bInAttachmentWeldSimulatedBodies)
|
||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool GetDetachmentInCallModify() const
|
FORCEINLINE bool GetDetachmentInCallModify() const
|
||||||
{
|
{
|
||||||
return !!bDetachmentCallModify;
|
return bDetachmentCallModify;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE void SetDetachmentInCallModify(const bool bInDetachmentCallModify)
|
FORCEINLINE void SetDetachmentInCallModify(const bool bInDetachmentCallModify)
|
||||||
@@ -189,7 +189,7 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool GetAffectPhysicsState() const
|
FORCEINLINE bool GetAffectPhysicsState() const
|
||||||
{
|
{
|
||||||
return !!bAffectPhysicsState;
|
return bAffectPhysicsState;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE void SetAffectPhysicsState(const bool bInAffectPhysicsState)
|
FORCEINLINE void SetAffectPhysicsState(const bool bInAffectPhysicsState)
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bRight : 1;
|
bool bRight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides the plugin's virtual hand settings.
|
* Overrides the plugin's virtual hand settings.
|
||||||
@@ -119,14 +119,14 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool IsRight() const
|
FORCEINLINE bool IsRight() const
|
||||||
{
|
{
|
||||||
return !!bRight;
|
return bRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRight(const bool bInRight);
|
void SetRight(const bool bInRight);
|
||||||
|
|
||||||
FORCEINLINE bool OverridesPluginVirtualHandSettings() const
|
FORCEINLINE bool OverridesPluginVirtualHandSettings() const
|
||||||
{
|
{
|
||||||
return !!VirtualHandSettingsOverrides.bOverridePluginSettings;
|
return VirtualHandSettingsOverrides.bOverridePluginSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides() const
|
FORCEINLINE const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides() const
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
|
||||||
uint8 bRight : 1;
|
bool bRight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides the plugin's wrist tracking settings.
|
* Overrides the plugin's wrist tracking settings.
|
||||||
@@ -116,14 +116,14 @@ public:
|
|||||||
|
|
||||||
FORCEINLINE bool IsRight() const
|
FORCEINLINE bool IsRight() const
|
||||||
{
|
{
|
||||||
return !!bRight;
|
return bRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRight(const bool bInRight);
|
void SetRight(const bool bInRight);
|
||||||
|
|
||||||
FORCEINLINE bool OverridesPluginWristTrackingSettings() const
|
FORCEINLINE bool OverridesPluginWristTrackingSettings() const
|
||||||
{
|
{
|
||||||
return !!WristTrackingSettingsOverrides.bOverridePluginSettings;
|
return WristTrackingSettingsOverrides.bOverridePluginSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE const FSGWristTrackingSettingsOverrides& GetWristTrackingSettingsOverrides() const
|
FORCEINLINE const FSGWristTrackingSettingsOverrides& GetWristTrackingSettingsOverrides() const
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class SENSEGLOVEBACKEND_API USGBackend : public UEngineSubsystem
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Transient)
|
UPROPERTY(Transient)
|
||||||
uint8 bBackendInitialized : 1;
|
bool bBackendInitialized;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static USGBackend* GetInstance();
|
static USGBackend* GetInstance();
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
FORCEINLINE bool IsBackendInitialized() const
|
FORCEINLINE bool IsBackendInitialized() const
|
||||||
{
|
{
|
||||||
return !!bBackendInitialized;
|
return bBackendInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InitializeBackend();
|
bool InitializeBackend();
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
FColor Color;
|
FColor Color;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||||
uint8 bPersistentLines : 1;
|
bool bPersistentLines;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube")
|
||||||
float LifeTimeModifier;
|
float LifeTimeModifier;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
FColor ZAxisColor;
|
FColor ZAxisColor;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||||
uint8 bPersistentLines : 1;
|
bool bPersistentLines;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo")
|
||||||
float LifeTimeModifier;
|
float LifeTimeModifier;
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ public:
|
|||||||
* between motion sources from different device types.
|
* between motion sources from different device types.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking")
|
||||||
uint8 bUseMoreSpecificMotionSourceNames : 1;
|
bool bUseMoreSpecificMotionSourceNames;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If true hand tracking supports the 'Left' and 'Right' legacy motion sources. If false it does not. False is
|
* If true hand tracking supports the 'Left' and 'Right' legacy motion sources. If false it does not. False is
|
||||||
* recommended unless you need legacy compatibility in an older unreal projects.
|
* recommended unless you need legacy compatibility in an older unreal projects.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking")
|
||||||
uint8 bSupportLegacyControllerMotionSources : 1;
|
bool bSupportLegacyControllerMotionSources;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGHandTrackingSettings();
|
FSGHandTrackingSettings();
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
* like this behavior for whatever reason, consider disabling this option.
|
* like this behavior for whatever reason, consider disabling this option.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Initialization")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Initialization")
|
||||||
uint8 bValidateIfDefaultClassesAreSGCompliant : 1;
|
bool bValidateIfDefaultClassesAreSGCompliant;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGInitializationSettings();
|
FSGInitializationSettings();
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
* supported by the HMD device.
|
* supported by the HMD device.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Tracking")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Tracking")
|
||||||
uint8 bFallbackToHandTrackingIfNoGloveDetected : 1;
|
bool bFallbackToHandTrackingIfNoGloveDetected;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Tracking")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Tracking")
|
||||||
FSGGloveTrackingSettings GloveTrackingSettings;
|
FSGGloveTrackingSettings GloveTrackingSettings;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
FRotator AnimationBoneRotationCorrectionOffset;
|
FRotator AnimationBoneRotationCorrectionOffset;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Animation")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Animation")
|
||||||
uint8 bShouldAnimationApplyBoneLocation : 1;
|
bool bShouldAnimationApplyBoneLocation;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGVirtualHandAnimationSettings();
|
FSGVirtualHandAnimationSettings();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ struct SENSEGLOVESETTINGS_API FSGVirtualHandDebuggingSettings
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging")
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging")
|
||||||
uint8 bDrawDebugVirtualHand : 1;
|
bool bDrawDebugVirtualHand;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging",
|
||||||
meta=(EditCondition="bDrawDebugVirtualHand", EditConditionHides))
|
meta=(EditCondition="bDrawDebugVirtualHand", EditConditionHides))
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ struct SENSEGLOVESETTINGS_API FSGVirtualHandHapticsSettings
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Haptics")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Haptics")
|
||||||
uint8 bAutoStopAllHapticsOnEndPlay : 1;
|
bool bAutoStopAllHapticsOnEndPlay;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGVirtualHandHapticsSettings();
|
FSGVirtualHandHapticsSettings();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ struct SENSEGLOVESETTINGS_API FSGVirtualHandSettings
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
||||||
uint8 bVisibleWhenHandDataUnavailable : 1;
|
bool bVisibleWhenHandDataUnavailable;
|
||||||
|
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand")
|
||||||
FSGVirtualHandAnimationSettings AnimationSettings;
|
FSGVirtualHandAnimationSettings AnimationSettings;
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ public:
|
|||||||
* Determines whether to override the plugin's virtual hand settings or not.
|
* Determines whether to override the plugin's virtual hand settings or not.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
||||||
uint8 bOverridePluginSettings : 1;
|
bool bOverridePluginSettings;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||||
uint8 bVisibleWhenHandDataUnavailable : 1;
|
bool bVisibleWhenHandDataUnavailable;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
* If enabled, draws debug Wrist trackers where possible.
|
* If enabled, draws debug Wrist trackers where possible.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(EditAnywhere, Category = "Debugging")
|
UPROPERTY(EditAnywhere, Category = "Debugging")
|
||||||
uint8 bDrawDebugWristTracker : 1;
|
bool bDrawDebugWristTracker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Valid only if bDrawDebugGizmo is enabled.
|
* Valid only if bDrawDebugGizmo is enabled.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
* Determines whether to override the plugin's wrist tracking settings or not.
|
* Determines whether to override the plugin's wrist tracking settings or not.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
UPROPERTY(EditAnywhere, Category = "SenseGlove")
|
||||||
uint8 bOverridePluginSettings : 1;
|
bool bOverridePluginSettings;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
UPROPERTY(EditAnywhere, Category = "SenseGlove",
|
||||||
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
meta=(EditCondition="bOverridePluginSettings", EditConditionHides))
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ bool FSGXRHandState::GetTransform(const EHandKeypoint Keypoint, FTransform& OutT
|
|||||||
check(static_cast<int32>(Keypoint) < EHandKeypointCount);
|
check(static_cast<int32>(Keypoint) < EHandKeypointCount);
|
||||||
OutTransform = KeypointTransforms[static_cast<uint32>(Keypoint)];
|
OutTransform = KeypointTransforms[static_cast<uint32>(Keypoint)];
|
||||||
|
|
||||||
return !!bReceivedJointPoses;
|
return bReceivedJointPoses;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FTransform& FSGXRHandState::GetTransform(const EHandKeypoint Keypoint) const
|
const FTransform& FSGXRHandState::GetTransform(const EHandKeypoint Keypoint) const
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ struct FSGXRTracker::FImpl
|
|||||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||||
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
||||||
const bool bFallbackToHandTrackingIfNoGloveDetected =
|
const bool bFallbackToHandTrackingIfNoGloveDetected =
|
||||||
!!Settings->GetTrackingSettings().bFallbackToHandTrackingIfNoGloveDetected;
|
Settings->GetTrackingSettings().bFallbackToHandTrackingIfNoGloveDetected;
|
||||||
return bFallbackToHandTrackingIfNoGloveDetected;
|
return bFallbackToHandTrackingIfNoGloveDetected;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ struct FSGXRTracker::FImpl
|
|||||||
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
||||||
const bool bUseMoreSpecificMotionSourceNames =
|
const bool bUseMoreSpecificMotionSourceNames =
|
||||||
bFallbackToHandTrackingIfNoGloveDetected
|
bFallbackToHandTrackingIfNoGloveDetected
|
||||||
? !!Settings->GetTrackingSettings().HandTrackingSettings.bUseMoreSpecificMotionSourceNames
|
? Settings->GetTrackingSettings().HandTrackingSettings.bUseMoreSpecificMotionSourceNames
|
||||||
: false;
|
: false;
|
||||||
return bUseMoreSpecificMotionSourceNames;
|
return bUseMoreSpecificMotionSourceNames;
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ struct FSGXRTracker::FImpl
|
|||||||
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
||||||
const bool bSupportLegacyControllerMotionSources =
|
const bool bSupportLegacyControllerMotionSources =
|
||||||
bFallbackToHandTrackingIfNoGloveDetected
|
bFallbackToHandTrackingIfNoGloveDetected
|
||||||
? !!Settings->GetTrackingSettings().HandTrackingSettings.bSupportLegacyControllerMotionSources
|
? Settings->GetTrackingSettings().HandTrackingSettings.bSupportLegacyControllerMotionSources
|
||||||
: false;
|
: false;
|
||||||
return bSupportLegacyControllerMotionSources;
|
return bSupportLegacyControllerMotionSources;
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@ struct FSGXRTracker::FImpl
|
|||||||
* Member variables
|
* Member variables
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
uint8 bHandTrackingAvailable : 1;
|
bool bHandTrackingAvailable;
|
||||||
|
|
||||||
PFN_xrCreateHandTrackerEXT XRCreateHandTrackerEXT;
|
PFN_xrCreateHandTrackerEXT XRCreateHandTrackerEXT;
|
||||||
PFN_xrDestroyHandTrackerEXT XRDestroyHandTrackerEXT;
|
PFN_xrDestroyHandTrackerEXT XRDestroyHandTrackerEXT;
|
||||||
@@ -1225,7 +1225,7 @@ bool FSGXRTracker::IsHandTrackingSupportedByDevice() const
|
|||||||
const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected();
|
const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected();
|
||||||
|
|
||||||
const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected();
|
const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected();
|
||||||
const bool bHandTrackingAvailable = !!Pimpl->bHandTrackingAvailable;
|
const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable;
|
||||||
|
|
||||||
const bool bHandTrackingSupportedByDevice =
|
const bool bHandTrackingSupportedByDevice =
|
||||||
bAnyGloveConnected || (bFallbackToHandTrackingIfNoGloveDetected && bHandTrackingAvailable);
|
bAnyGloveConnected || (bFallbackToHandTrackingIfNoGloveDetected && bHandTrackingAvailable);
|
||||||
@@ -1301,7 +1301,7 @@ const void* FSGXRTracker::OnCreateSession(const XrInstance InInstance, const XrS
|
|||||||
|
|
||||||
const void* FSGXRTracker::OnBeginSession(const XrSession InSession, const void* InNext)
|
const void* FSGXRTracker::OnBeginSession(const XrSession InSession, const void* InNext)
|
||||||
{
|
{
|
||||||
const bool bHandTrackingAvailable = !!Pimpl->bHandTrackingAvailable;
|
const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable;
|
||||||
|
|
||||||
if (bHandTrackingAvailable)
|
if (bHandTrackingAvailable)
|
||||||
{
|
{
|
||||||
@@ -1462,7 +1462,7 @@ ETrackingStatus FSGXRTracker::GetControllerTrackingStatus(const int32 Controller
|
|||||||
if (bFallbackToHandTrackingIfNoGloveDetected)
|
if (bFallbackToHandTrackingIfNoGloveDetected)
|
||||||
{
|
{
|
||||||
const FSGXRHandState& HandState{bRight ? GetRightHandState() : GetLeftHandState()};
|
const FSGXRHandState& HandState{bRight ? GetRightHandState() : GetLeftHandState()};
|
||||||
return !!HandState.bReceivedJointPoses ? ETrackingStatus::Tracked : ETrackingStatus::NotTracked;
|
return HandState.bReceivedJointPoses ? ETrackingStatus::Tracked : ETrackingStatus::NotTracked;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ETrackingStatus::NotTracked;
|
return ETrackingStatus::NotTracked;
|
||||||
@@ -1545,7 +1545,7 @@ bool FSGXRTracker::IsHandTrackingStateValid() const
|
|||||||
{
|
{
|
||||||
const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected();
|
const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected();
|
||||||
|
|
||||||
const bool bHandTrackingAvailable = !!Pimpl->bHandTrackingAvailable;
|
const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable;
|
||||||
const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected();
|
const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected();
|
||||||
|
|
||||||
const bool bHandTrackingStateValid =
|
const bool bHandTrackingStateValid =
|
||||||
@@ -1717,7 +1717,7 @@ bool FSGXRTracker::FImpl::CanOutputTrackingData(const EControllerHand Hand) cons
|
|||||||
{
|
{
|
||||||
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected();
|
||||||
|
|
||||||
const bool bIsHandTrackingAvailable = !!bHandTrackingAvailable;
|
const bool bIsHandTrackingAvailable = bHandTrackingAvailable;
|
||||||
|
|
||||||
bool bGloveConnected = false;
|
bool bGloveConnected = false;
|
||||||
if (Hand == EControllerHand::Left)
|
if (Hand == EControllerHand::Left)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
float Radii[EHandKeypointCount];
|
float Radii[EHandKeypointCount];
|
||||||
|
|
||||||
uint8 bReceivedJointPoses : 1;
|
bool bReceivedJointPoses;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGXRHandState();
|
FSGXRHandState();
|
||||||
|
|||||||
Reference in New Issue
Block a user