112 lines
3.2 KiB
C++
112 lines
3.2 KiB
C++
/**
|
|
* @file
|
|
*
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
*
|
|
* @section LICENSE
|
|
*
|
|
* (The MIT License)
|
|
*
|
|
* Copyright (c) 2020 - 2025 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 "UObject/NameTypes.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
|
|
#include "SGTypes/SGTrackingTypes.h"
|
|
|
|
#include "SGHMDTracker.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
USTRUCT()
|
|
struct SENSEGLOVETRACKING_API FSGHMDTracker
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
private:
|
|
struct FStaticImpl;
|
|
|
|
public:
|
|
static FName GetDeviceName();
|
|
|
|
/**
|
|
* Checks whether the HMD device is Meta Quest 2, or not.
|
|
*/
|
|
static bool IsMetaQuest2();
|
|
|
|
/**
|
|
* Checks whether the HMD device is Meta Quest Pro, or not.
|
|
*/
|
|
static bool IsMetaQuestPro();
|
|
|
|
/**
|
|
* Checks whether the HMD device is Meta Quest 3, or not.
|
|
*/
|
|
static bool IsMetaQuest3();
|
|
|
|
FORCEINLINE static bool IsAMetaQuestDevice()
|
|
{
|
|
return IsMetaQuest2() || IsMetaQuestPro() || IsMetaQuest3();
|
|
}
|
|
|
|
/**
|
|
* Checks whether the HMD device is HTC VIVE Pro, or not.
|
|
*/
|
|
static bool IsHtcVivePro();
|
|
|
|
/**
|
|
* Checks whether the HMD device is HTC VIVE Focus 3, or not.
|
|
*
|
|
* @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.
|
|
*/
|
|
static bool IsHtcViveFocus3();
|
|
|
|
/**
|
|
* Checks whether the HMD device is HTC VIVE XR Elite, or not.
|
|
*
|
|
* @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.
|
|
*/
|
|
static bool IsHtcViveXRElite();
|
|
|
|
/**
|
|
* Checks whether the HMD device is HTC VIVE Focus Vision, or not.
|
|
*/
|
|
static bool IsHtcViveFocusVision();
|
|
|
|
FORCEINLINE static bool IsAHtcViveDevice()
|
|
{
|
|
return IsHtcVivePro() || IsHtcViveFocus3() || IsHtcViveXRElite() || IsHtcViveFocusVision();
|
|
}
|
|
|
|
static ESGHeadMountedDisplayDevice GetDeviceType();
|
|
}; |