rename sgheadmountdisplay to sgheadmounteddisplay
This commit is contained in:
+2
-2
@@ -10,9 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
This is a bugfix release that contains a somewhat important bugfix backported from the next release of the plugin as documented below.
|
||||
|
||||
- A fallback to HMD and wrist tracker hardware auto-detection mechanism has been added to be triggered in situations when automatic detection of the wrist tracker hardware is desired, e.g., either by not setting it explicitly, or setting it to the default None value. Please note that this is still highly experimental and HTC VIVE Focus 3 and HTC XR Elite cannot be distinguished in the current iteration. Though, since the tracker devices and offsets for both headsets are the same in the end it does not make a difference if both headsets are detected as each other.
|
||||
- Added the SGHeadMountDisplay utility class, exposed to both C++ and Blueprint, in order to easily gather information about the HMD at runtime.
|
||||
- Added the SGHeadMountedDisplay utility class, exposed to both C++ and Blueprint, in order to easily gather information about the HMD at runtime.
|
||||
- Added the SGTypes header to the SenseGloveTypes module in order to define and share SenseGlove module types through this header across the plugin modules.
|
||||
- Added ESGHeadMountDisplayDevice enum with supported HMDs list.
|
||||
- Added ESGHeadMountedDisplayDevice enum with supported HMDs list.
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
#include "UObject/ConstructorHelpers.h"
|
||||
|
||||
#include "SenseGlove/SGHeadMountDisplay.h"
|
||||
#include "SenseGlove/SGHeadMountedDisplay.h"
|
||||
#include "SGBackend/SGBackend.h"
|
||||
#include "SGCore/SGHapticGlove.h"
|
||||
#include "SGDebug/SGDebugGizmo.h"
|
||||
@@ -289,24 +289,24 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
|
||||
ESGPositionalTrackingHardware TrackerHardware = Owner->GetWristTrackingSettings().TrackingHardware;
|
||||
if (TrackerHardware == ESGPositionalTrackingHardware::None)
|
||||
{
|
||||
const ESGHeadMountDisplayDevice HmdDevice = FSGHeadMountDisplay::GetDeviceType();
|
||||
const ESGHeadMountedDisplayDevice HmdDevice = FSGHeadMountedDisplay::GetDeviceType();
|
||||
switch (HmdDevice)
|
||||
{
|
||||
case ESGHeadMountDisplayDevice::MetaQuest2:
|
||||
case ESGHeadMountedDisplayDevice::MetaQuest2:
|
||||
TrackerHardware = ESGPositionalTrackingHardware::Quest2Controller;
|
||||
break;
|
||||
case ESGHeadMountDisplayDevice::MetaQuestPro:
|
||||
case ESGHeadMountedDisplayDevice::MetaQuestPro:
|
||||
TrackerHardware = ESGPositionalTrackingHardware::QuestProController;
|
||||
break;
|
||||
case ESGHeadMountDisplayDevice::MetaQuest3:
|
||||
case ESGHeadMountedDisplayDevice::MetaQuest3:
|
||||
TrackerHardware = ESGPositionalTrackingHardware::Quest3Controller;
|
||||
break;
|
||||
case ESGHeadMountDisplayDevice::HtcVivePro:
|
||||
case ESGHeadMountedDisplayDevice::HtcVivePro:
|
||||
TrackerHardware = ESGPositionalTrackingHardware::ViveTracker;
|
||||
break;
|
||||
case ESGHeadMountDisplayDevice::HtcViveFocus3:
|
||||
case ESGHeadMountedDisplayDevice::HtcViveFocus3:
|
||||
// Fall through
|
||||
case ESGHeadMountDisplayDevice::HtcViveXRElite:
|
||||
case ESGHeadMountedDisplayDevice::HtcViveXRElite:
|
||||
TrackerHardware = ESGPositionalTrackingHardware::ViveFocus3WristTracker;
|
||||
break;
|
||||
default:
|
||||
|
||||
+16
-16
@@ -33,13 +33,13 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SenseGlove/SGHeadMountDisplay.h"
|
||||
#include "SenseGlove/SGHeadMountedDisplay.h"
|
||||
|
||||
#include "Engine/Engine.h"
|
||||
#include "IHeadMountedDisplay.h"
|
||||
#include "IXRTrackingSystem.h"
|
||||
|
||||
FName FSGHeadMountDisplay::GetDeviceName()
|
||||
FName FSGHeadMountedDisplay::GetDeviceName()
|
||||
{
|
||||
if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed())
|
||||
{
|
||||
@@ -53,7 +53,7 @@ FName FSGHeadMountDisplay::GetDeviceName()
|
||||
return NAME_None;
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsMetaQuest2()
|
||||
bool FSGHeadMountedDisplay::IsMetaQuest2()
|
||||
{
|
||||
static const FName MetaQuest2DeviceIdentifier{TEXT("Meta Quest 2")};
|
||||
static const FName OculusQuest2DeviceIdentifier{TEXT("Oculus Quest2")};
|
||||
@@ -72,7 +72,7 @@ bool FSGHeadMountDisplay::IsMetaQuest2()
|
||||
return bMatched;
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsMetaQuestPro()
|
||||
bool FSGHeadMountedDisplay::IsMetaQuestPro()
|
||||
{
|
||||
static const FName MetaQuestProDeviceIdentifier{TEXT("Meta Quest Pro")};
|
||||
static const FName OculusQuestProDeviceIdentifier{TEXT("Oculus QuestPro")};
|
||||
@@ -91,7 +91,7 @@ bool FSGHeadMountDisplay::IsMetaQuestPro()
|
||||
return bMatched;
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsMetaQuest3()
|
||||
bool FSGHeadMountedDisplay::IsMetaQuest3()
|
||||
{
|
||||
static const FName MetaQuest3DeviceIdentifier{TEXT("Meta Quest 3")};
|
||||
static const FName OculusQuest3DeviceIdentifier{TEXT("Oculus Quest3")};
|
||||
@@ -110,7 +110,7 @@ bool FSGHeadMountDisplay::IsMetaQuest3()
|
||||
return bMatched;
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsHtcVivePro()
|
||||
bool FSGHeadMountedDisplay::IsHtcVivePro()
|
||||
{
|
||||
#if PLATFORM_ANDROID
|
||||
return false;
|
||||
@@ -165,7 +165,7 @@ bool FSGHeadMountDisplay::IsHtcVivePro()
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsHtcViveFocus3()
|
||||
bool FSGHeadMountedDisplay::IsHtcViveFocus3()
|
||||
{
|
||||
static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")};
|
||||
static const FString ViveDeviceIdentifier{TEXT("Vive")};
|
||||
@@ -225,7 +225,7 @@ bool FSGHeadMountDisplay::IsHtcViveFocus3()
|
||||
return bMatched;
|
||||
}
|
||||
|
||||
bool FSGHeadMountDisplay::IsHtcViveXRElite()
|
||||
bool FSGHeadMountedDisplay::IsHtcViveXRElite()
|
||||
{
|
||||
static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")};
|
||||
static const FString ViveDeviceIdentifier{TEXT("Vive")};
|
||||
@@ -285,37 +285,37 @@ bool FSGHeadMountDisplay::IsHtcViveXRElite()
|
||||
return bMatched;
|
||||
}
|
||||
|
||||
ESGHeadMountDisplayDevice FSGHeadMountDisplay::GetDeviceType()
|
||||
ESGHeadMountedDisplayDevice FSGHeadMountedDisplay::GetDeviceType()
|
||||
{
|
||||
if (IsMetaQuest2())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::MetaQuest2;
|
||||
return ESGHeadMountedDisplayDevice::MetaQuest2;
|
||||
}
|
||||
|
||||
if (IsMetaQuestPro())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::MetaQuestPro;
|
||||
return ESGHeadMountedDisplayDevice::MetaQuestPro;
|
||||
}
|
||||
|
||||
if (IsMetaQuest3())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::MetaQuest3;
|
||||
return ESGHeadMountedDisplayDevice::MetaQuest3;
|
||||
}
|
||||
|
||||
if (IsHtcVivePro())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::HtcVivePro;
|
||||
return ESGHeadMountedDisplayDevice::HtcVivePro;
|
||||
}
|
||||
|
||||
if (IsHtcViveFocus3())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::HtcViveFocus3;
|
||||
return ESGHeadMountedDisplayDevice::HtcViveFocus3;
|
||||
}
|
||||
|
||||
if (IsHtcViveXRElite())
|
||||
{
|
||||
return ESGHeadMountDisplayDevice::HtcViveXRElite;
|
||||
return ESGHeadMountedDisplayDevice::HtcViveXRElite;
|
||||
}
|
||||
|
||||
return ESGHeadMountDisplayDevice::None;
|
||||
return ESGHeadMountedDisplayDevice::None;
|
||||
}
|
||||
+3
-3
@@ -41,13 +41,13 @@
|
||||
|
||||
#include "SGTypes/SGTypes.h"
|
||||
|
||||
#include "SGHeadMountDisplay.generated.h"
|
||||
#include "SGHeadMountedDisplay.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
USTRUCT()
|
||||
struct SENSEGLOVE_API FSGHeadMountDisplay
|
||||
struct SENSEGLOVE_API FSGHeadMountedDisplay
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -90,5 +90,5 @@ public:
|
||||
*/
|
||||
static bool IsHtcViveXRElite();
|
||||
|
||||
static ESGHeadMountDisplayDevice GetDeviceType();
|
||||
static ESGHeadMountedDisplayDevice GetDeviceType();
|
||||
};
|
||||
+18
-18
@@ -33,46 +33,46 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SGKismet/SGHeadMountDisplayKismetLibrary.h"
|
||||
#include "SGKismet/SGHeadMountedDisplayKismetLibrary.h"
|
||||
|
||||
#include "SenseGlove/SGHeadMountDisplay.h"
|
||||
#include "SenseGlove/SGHeadMountedDisplay.h"
|
||||
|
||||
FName UHeadMountDisplayKismetLibrary::GetDeviceName()
|
||||
FName UHeadMountedDisplayKismetLibrary::GetDeviceName()
|
||||
{
|
||||
return FSGHeadMountDisplay::GetDeviceName();
|
||||
return FSGHeadMountedDisplay::GetDeviceName();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsMetaQuest2()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsMetaQuest2()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsMetaQuest2();
|
||||
return FSGHeadMountedDisplay::IsMetaQuest2();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsMetaQuestPro()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsMetaQuestPro()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsMetaQuestPro();
|
||||
return FSGHeadMountedDisplay::IsMetaQuestPro();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsMetaQuest3()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsMetaQuest3()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsMetaQuest3();
|
||||
return FSGHeadMountedDisplay::IsMetaQuest3();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsHtcVivePro()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsHtcVivePro()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsHtcVivePro();
|
||||
return FSGHeadMountedDisplay::IsHtcVivePro();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsHtcViveFocus3()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsHtcViveFocus3()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsHtcViveFocus3();
|
||||
return FSGHeadMountedDisplay::IsHtcViveFocus3();
|
||||
}
|
||||
|
||||
bool UHeadMountDisplayKismetLibrary::IsHtcViveXRElite()
|
||||
bool UHeadMountedDisplayKismetLibrary::IsHtcViveXRElite()
|
||||
{
|
||||
return FSGHeadMountDisplay::IsHtcViveXRElite();
|
||||
return FSGHeadMountedDisplay::IsHtcViveXRElite();
|
||||
}
|
||||
|
||||
ESGHeadMountDisplayDevice UHeadMountDisplayKismetLibrary::GetDeviceType()
|
||||
ESGHeadMountedDisplayDevice UHeadMountedDisplayKismetLibrary::GetDeviceType()
|
||||
{
|
||||
return FSGHeadMountDisplay::GetDeviceType();
|
||||
return FSGHeadMountedDisplay::GetDeviceType();
|
||||
}
|
||||
+12
-12
@@ -40,39 +40,39 @@
|
||||
#include "SGKismet/SGBlueprintFunctionLibrary.h"
|
||||
#include "SGTypes/SGTypes.h"
|
||||
|
||||
#include "SGHeadMountDisplayKismetLibrary.generated.h"
|
||||
#include "SGHeadMountedDisplayKismetLibrary.generated.h"
|
||||
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHeadMountDisplayKismetLibrary"))
|
||||
class SENSEGLOVEKISMET_API UHeadMountDisplayKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
UCLASS(meta=(ScriptName = "SesneGloveHeadMountedDisplayKismetLibrary"))
|
||||
class SENSEGLOVEKISMET_API UHeadMountedDisplayKismetLibrary final : public USGBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static FName GetDeviceName();
|
||||
|
||||
/**
|
||||
* Checks whether the HMD device is Meta Quest 2, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static bool IsMetaQuest2();
|
||||
|
||||
/**
|
||||
* Checks whether the HMD device is Meta Quest Pro, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static bool IsMetaQuestPro();
|
||||
|
||||
/**
|
||||
* Checks whether the HMD device is Meta Quest 3, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static bool IsMetaQuest3();
|
||||
|
||||
/**
|
||||
* Checks whether the HMD device is HTC VIVE Pro, or not.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static bool IsHtcVivePro();
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveFocus3 returns
|
||||
* true, IsHtcViveXRElite will return true as well; thus we cannot know for sure which headset we are running on.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static bool IsHtcViveFocus3();
|
||||
|
||||
/**
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
* @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveXRElite returns
|
||||
* true, IsHtcViveFocus3 will return true as well; thus we cannot know for sure which headset we are running on.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category = "SenseGlove | Head Mount Display")
|
||||
UFUNCTION(BlueprintCallable, Category = "SenseGlove | Head-mounted Display")
|
||||
static bool IsHtcViveXRElite();
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head Mount Display")
|
||||
static ESGHeadMountDisplayDevice GetDeviceType();
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Head-mounted Display")
|
||||
static ESGHeadMountedDisplayDevice GetDeviceType();
|
||||
};
|
||||
@@ -38,9 +38,9 @@
|
||||
#include "CoreTypes.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
|
||||
/* The Head Mount Display device enum to determine the HMD device type. */
|
||||
/* The Head-mounted Display device enum to determine the HMD device type. */
|
||||
UENUM(BlueprintType)
|
||||
enum class ESGHeadMountDisplayDevice : uint8
|
||||
enum class ESGHeadMountedDisplayDevice : uint8
|
||||
{
|
||||
/* The default none value. */
|
||||
None UMETA(DisplayName = "None"),
|
||||
|
||||
Reference in New Issue
Block a user