A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
OpenVRExpansionFunctionLibrary.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#include "CoreMinimal.h"
5#include "UObject/ObjectMacros.h"
6#include "Kismet/BlueprintFunctionLibrary.h"
7#include "UObject/Object.h"
8#include "Engine/Texture.h"
9#include "Engine/EngineTypes.h"
10#include "RHI.h"
11//#include "EngineMinimal.h"
12#include "IMotionController.h"
13//#include "VRBPDatatypes.h"
14
15class UTexture;
16
17//Re-defined here as I can't load ISteamVRPlugin on non windows platforms
18// Make sure to update if it changes
19
20// #TODO: 4.19 check this
21#define STEAMVR_SUPPORTED_PLATFORM (PLATFORM_MAC || (PLATFORM_LINUX && PLATFORM_CPU_X86_FAMILY && PLATFORM_64BITS) || (PLATFORM_WINDOWS && WINVER > 0x0502))
22
23// #TODO: Check this over time for when they make it global
24// @TODO: hardcoded to match FSteamVRHMD::GetSystemName(), which we should turn into
25static FName SteamVRSystemName(TEXT("SteamVR"));
26
27
28#if STEAMVR_SUPPORTED_PLATFORM
29#include "openvr.h"
30//#include "ISteamVRPlugin.h"
31//#include "SteamVRFunctionLibrary.h"
32
33#endif // STEAMVR_SUPPORTED_PLATFORM
34
35#include "ProceduralMeshComponent.h"
36#include "KismetProceduralMeshLibrary.h"
37// Or procedural mesh component throws an error....
38//#include "PhysicsEngine/ConvexElem.h" // Fixed in 4.13.1?
39
40//#include "HeadMountedDisplay.h"
41//#include "HeadMountedDisplayFunctionLibrary.h"
42#include "HeadMountedDisplayFunctionLibrary.h"
43#include "IHeadMountedDisplay.h"
44
45#include "OpenVRExpansionFunctionLibrary.generated.h"
46
47//General Advanced Sessions Log
48DECLARE_LOG_CATEGORY_EXTERN(OpenVRExpansionFunctionLibraryLog, Log, All);
49
50
51UENUM()
52enum class EBPOpenVRTrackedDeviceClass : uint8
53{
54 // #TODO: Keep up to date
55 //enum ETrackedDeviceClass - copied from valves enum
56TrackedDeviceClass_Invalid = 0, // the ID was not valid.
57TrackedDeviceClass_HMD = 1, // Head-Mounted Displays
58TrackedDeviceClass_Controller = 2, // Tracked controllers
59TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers
60TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points
61TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices
62};
63
64// This makes a lot of the blueprint functions cleaner
65/*UENUM()
66enum class EBPVRDeviceIndex : uint8
67{
68 // On Success
69 HMD = 0,
70 FirstTracking_Reference = 1,
71 SecondTracking_Reference = 2,
72 FirstController = 3,
73 SecondController = 4,
74 TrackedDevice1 = 5,
75 TrackedDevice2 = 6,
76 TrackedDevice3 = 7,
77 TrackedDevice4 = 8,
78 TrackedDevice5 = 9,
79 TrackedDevice6 = 10,
80 TrackedDevice7 = 11,
81 TrackedDevice8 = 12,
82 TrackedDevice9 = 13,
83 TrackedDevice10 = 14,
84 TrackedDevice11 = 15,
85 None = 255
86};*/
87
88// This makes a lot of the blueprint functions cleaner
89UENUM()
90enum class EBPOVRResultSwitch : uint8
91{
92 // On Success
94 // On Failure
96};
97
98//USTRUCT(BlueprintType, Category = "VRExpansionFunctions|SteamVR")
99struct OPENVREXPANSIONPLUGIN_API FBPOpenVRKeyboardHandle
100{
101 //GENERATED_BODY()
102public:
104 uint64_t VRKeyboardHandle;
105
107 {
108#if STEAMVR_SUPPORTED_PLATFORM
109 //static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0;
110 VRKeyboardHandle = vr::k_ulOverlayHandleInvalid;
111#endif
112 }
113 const bool IsValid()
114 {
115#if STEAMVR_SUPPORTED_PLATFORM
116 return VRKeyboardHandle != vr::k_ulOverlayHandleInvalid;
117#else
118 return false;
119#endif
120 }
121
122 //This is here for the Find() and Remove() functions from TArray
123 FORCEINLINE bool operator==(const FBPOpenVRKeyboardHandle &Other) const
124 {
125 if (VRKeyboardHandle == Other.VRKeyboardHandle)
126 return true;
128 return false;
129 }
130 //#define INVALID_TRACKED_CAMERA_HANDLE
131};
132
133
134USTRUCT(BlueprintType, Category = "VRExpansionFunctions|SteamVR|VRCamera")
135struct OPENVREXPANSIONPLUGIN_API FBPOpenVRCameraHandle
136{
137 GENERATED_BODY()
138public:
139
140 uint64_t pCameraHandle;
141
143 {
144#if STEAMVR_SUPPORTED_PLATFORM
145 pCameraHandle = INVALID_TRACKED_CAMERA_HANDLE;
146#endif
148 const bool IsValid()
150#if STEAMVR_SUPPORTED_PLATFORM
151 return pCameraHandle != INVALID_TRACKED_CAMERA_HANDLE;
152#else
153 return false;
154#endif
156
157 //This is here for the Find() and Remove() functions from TArray
158 FORCEINLINE bool operator==(const FBPOpenVRCameraHandle &Other) const
159 {
160 if (pCameraHandle == Other.pCameraHandle)
161 return true;
162
163 return false;
164 }
165 //#define INVALID_TRACKED_CAMERA_HANDLE
166};
167
168UENUM(BlueprintType)
169enum class EOpenVRCameraFrameType : uint8
170{
174};
175
176// This will make using the load model as async easier to understand
177UENUM()
178enum class EAsyncBlueprintResultSwitch : uint8
180 // On Success
181 OnSuccess,
182 // On still loading async
184 // On Failure
186};
187
188// Redefined here so that non windows packages can compile
190// #TODO: Update these
191UENUM(BlueprintType)
192enum class EBPSteamVRTrackedDeviceType : uint8
193{
196
199
201 Other,
202
204 Invalid
205};
206
207#if STEAMVR_SUPPORTED_PLATFORM
208static vr::ETrackedDeviceProperty VREnumToString(const FString& enumName, uint8 value)
209{
210 const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, *enumName, true);
211
212 if (!EnumPtr)
213 return vr::ETrackedDeviceProperty::Prop_Invalid;
214
215 FString EnumName = EnumPtr->GetNameStringByIndex(value).Right(4);
216
217 if (EnumName.IsEmpty() || EnumName.Len() < 4)
218 return vr::ETrackedDeviceProperty::Prop_Invalid;
219
220 return static_cast<vr::ETrackedDeviceProperty>(FCString::Atoi(*EnumName));
221}
222#endif
223
224
225/*
226// Not implementing currently
227
228// Properties that are unique to TrackedDeviceClass_HMD
229Prop_DisplayMCImageData_Binary = 2041,
230
231Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
232
233
234// Not implemented because very little use, and names are huuggge.....
235Prop_NamedIconPathControllerLeftDeviceOff_String_2051
236Prop_NamedIconPAthControllerRightDeviceOff_String_2052
237Prop_NamedIconPathTrackingReferenceDeviceOff_String_2053
238
239
240// Properties that are used by helpers, but are opaque to applications
241Prop_DisplayHiddenArea_Binary_Start = 5100,
242Prop_DisplayHiddenArea_Binary_End = 5150,
243Prop_ParentContainer = 5151
244
245// Vendors are free to expose private debug data in this reserved region
246Prop_VendorSpecific_Reserved_Start = 10000,
247Prop_VendorSpecific_Reserved_End = 10999,
248
249Prop_ImuFactoryGyroBias_Vector3 = 2064,
250Prop_ImuFactoryGyroScale_Vector3 = 2065,
251Prop_ImuFactoryAccelerometerBias_Vector3 = 2066,
252Prop_ImuFactoryAccelerometerScale_Vector3 = 2067,
253// reserved 2068
254
255// Driver requested mura correction properties
256Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
257Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
258Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
259Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203,
260Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204,
261Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205,
262Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206,
263Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207,
264Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208,
265
266Prop_TrackedDeviceProperty_Max = 1000000,
267
268
269Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras)
270Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras)
271Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras)
272Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
273*/
274
275
276// #TODO: Update these
277UENUM(BlueprintType)
278enum class EVRDeviceProperty_String : uint8
279{
280
281 // No prefix = 1000 series
282 Prop_TrackingSystemName_String_1000 UMETA(DisplayName = "Prop_TrackingSystemName_String"),
283 Prop_ModelNumber_String_1001 UMETA(DisplayName = "Prop_ModelNumber_String"),
284 Prop_SerialNumber_String_1002 UMETA(DisplayName = "Prop_SerialNumber_String"),
285 Prop_RenderModelName_String_1003 UMETA(DisplayName = "Prop_RenderModelName_String"),
286 Prop_ManufacturerName_String_1005 UMETA(DisplayName = "Prop_ManufacturerName_String"),
287 Prop_TrackingFirmwareVersion_String_1006 UMETA(DisplayName = "Prop_TrackingFirmwareVersion_String"),
288 Prop_HardwareRevision_String_1007 UMETA(DisplayName = "Prop_HardwareRevision_String"),
289 Prop_AllWirelessDongleDescriptions_String_1008 UMETA(DisplayName = "Prop_AllWirelessDongleDescriptions_String"),
290 Prop_ConnectedWirelessDongle_String_1009 UMETA(DisplayName = "Prop_ConnectedWirelessDongle_String"),
291 Prop_Firmware_ManualUpdateURL_String_1016 UMETA(DisplayName = "Prop_Firmware_ManualUpdateURL_String"),
292 Prop_Firmware_ProgrammingTarget_String_1028 UMETA(DisplayName = "Prop_Firmware_ProgrammingTarget_String"),
293 Prop_DriverVersion_String_1031 UMETA(DisplayName = "Prop_DriverVersion_String"),
294 Prop_ResourceRoot_String_1035 UMETA(DisplayName = "Prop_ResourceRoot_String"),
295 Prop_RegisteredDeviceType_String_1036 UMETA(DisplayName = "Prop_RegisteredDeviceType_String"),
296 Prop_InputProfileName_String_1037 UMETA(DisplayName = "Prop_InputProfileName_String"),
297
298 Prop_AdditionalDeviceSettingsPath_String_1042 UMETA(DisplayName = "Prop_AdditionalDeviceSettingsPath_String"),
299 Prop_AdditionalSystemReportData_String_1045 UMETA(DisplayName = "Prop_AdditionalSystemReportData_String"),
300 Prop_CompositeFirmwareVersion_String_1046 UMETA(DisplayName = "Prop_CompositeFirmwareVersion_String"),
301
302 // 1 prefix = 2000 series
303 HMDProp_DisplayMCImageLeft_String_2012 UMETA(DisplayName = "HMDProp_DisplayMCImageLeft_String"),
304 HMDProp_DisplayMCImageRight_String_2013 UMETA(DisplayName = "HMDProp_DisplayMCImageRight_String"),
305 HMDProp_DisplayGCImage_String_2021 UMETA(DisplayName = "HMDProp_DisplayGCImage_String"),
306 HMDProp_CameraFirmwareDescription_String_2028 UMETA(DisplayName = "HMDProp_CameraFirmwareDescription_String"),
307 HMDProp_DriverProvidedChaperonePath_String_2048 UMETA(DisplayName = "HMDProp_DriverProvidedChaperonePath_String"),
308
309 HMDProp_ExpectedControllerType_String_2074 UMETA(DisplayName = "HMDProp_ExpectedControllerType_String"),
310 HMDProp_DashboardLayoutPathName_String_2090 UMETA(DisplayName = "HMDProp_DashboardLayoutPathName_String"),
311
312 // 2 prefix = 3000 series
313 ControllerProp_AttachedDeviceId_String_3000 UMETA(DisplayName = "ControllerProp_AttachedDeviceId_String"),
314
315 // 3 prefix = 4000 series
316 TrackRefProp_ModeLabel_String_4006 UMETA(DisplayName = "TrackRefProp_ModeLabel_String"),
317
318 // 4 prefix = 5000 series
319 UIProp_NamedIconPathDeviceOff_String_5001 UMETA(DisplayName = "UIProp_NamedIconPathDeviceOff_String"),
320 UIProp_NamedIconPathDeviceSearching_String_5002 UMETA(DisplayName = "UIProp_NamedIconPathDeviceSearching_String"),
321 UIProp_NamedIconPathDeviceSearchingAlert_String_5003 UMETA(DisplayName = "UIProp_NamedIconPathDeviceSearchingAlert_String_"),
322 UIProp_NamedIconPathDeviceReady_String_5004 UMETA(DisplayName = "UIProp_NamedIconPathDeviceReady_String"),
323 UIProp_NamedIconPathDeviceReadyAlert_String_5005 UMETA(DisplayName = "UIProp_NamedIconPathDeviceReadyAlert_String"),
324 UIProp_NamedIconPathDeviceNotReady_String_5006 UMETA(DisplayName = "UIProp_NamedIconPathDeviceNotReady_String"),
325 UIProp_NamedIconPathDeviceStandby_String_5007 UMETA(DisplayName = "UIProp_NamedIconPathDeviceStandby_String"),
326 UIProp_NamedIconPathDeviceAlertLow_String_5008 UMETA(DisplayName = "UIProp_NamedIconPathDeviceAlertLow_String"),
327
328 // 5 prefix = 6000 series
329 DriverProp_UserConfigPath_String_6000 UMETA(DisplayName = "DriverProp_UserConfigPath_String"),
330 DriverProp_InstallPath_String_6001 UMETA(DisplayName = "DriverProp_InstallPath_String"),
331
332 // Properties that are set internally based on other information provided by drivers
333 DriverProp_ControllerType_String_7000 UMETA(DisplayName = "DriverProp_ControllerType_String"),
334 //DriveerProp_LegacyInputProfile_String_7001 UMETA(DisplayName = "DriveerProp_LegacyInputProfile_String") // Deprecated
335
336};
337
338UENUM(BlueprintType)
339enum class EVRDeviceProperty_Bool : uint8
340{
341 // No prefix = 1000 series
342 Prop_WillDriftInYaw_Bool_1004 UMETA(DisplayName = "Prop_WillDriftInYaw_Bool"),
343 Prop_DeviceIsWireless_Bool_1010 UMETA(DisplayName = "Prop_DeviceIsWireless_Bool"),
344 Prop_DeviceIsCharging_Bool_1011 UMETA(DisplayName = "Prop_DeviceIsCharging_Bool"),
345 Prop_Firmware_UpdateAvailable_Bool_1014 UMETA(DisplayName = "Prop_Firmware_UpdateAvailable_Bool"),
346 Prop_Firmware_ManualUpdate_Bool_1015 UMETA(DisplayName = "Prop_Firmware_ManualUpdate_Bool"),
347 Prop_BlockServerShutdown_Bool_1023 UMETA(DisplayName = "Prop_BlockServerShutdown_Bool"),
348 Prop_CanUnifyCoordinateSystemWithHmd_Bool_1024 UMETA(DisplayName = "Prop_CanUnifyCoordinateSystemWithHmd_Bool"),
349 Prop_ContainsProximitySensor_Bool_1025 UMETA(DisplayName = "Prop_ContainsProximitySensor_Bool"),
350 Prop_DeviceProvidesBatteryStatus_Bool_1026 UMETA(DisplayName = "Prop_DeviceProvidesBatteryStatus_Bool"),
351 Prop_DeviceCanPowerOff_Bool_1027 UMETA(DisplayName = "Prop_DeviceCanPowerOff_Bool"),
352 Prop_HasCamera_Bool_1030 UMETA(DisplayName = "Prop_HasCamera_Bool"),
353 Prop_Firmware_ForceUpdateRequired_Bool_1032 UMETA(DisplayName = "Prop_Firmware_ForceUpdateRequired_Bool"),
354 Prop_ViveSystemButtonFixRequired_Bool_1033 UMETA(DisplayName = "Prop_ViveSystemButtonFixRequired_Bool"),
355 Prop_NeverTracked_Bool_1038 UMETA(DisplayName = "Prop_NeverTracked_Bool"),
356 Prop_Identifiable_Bool_1043 UMETA(DisplayName = "Prop_Identifiable_Bool"),
357 Prop_Firmware_RemindUpdate_Bool_1047 UMETA(DisplayName = "Prop_Firmware_RemindUpdate_Bool"),
358
359 // 1 prefix = 2000 series
360 HMDProp_ReportsTimeSinceVSync_Bool_2000 UMETA(DisplayName = "HMDProp_ReportsTimeSinceVSync_Bool"),
361 HMDProp_IsOnDesktop_Bool_2007 UMETA(DisplayName = "HMDProp_IsOnDesktop_Bool"),
362 HMDProp_DisplaySuppressed_Bool_2036 UMETA(DisplayName = "HMDProp_DisplaySuppressed_Bool"),
363 HMDProp_DisplayAllowNightMode_Bool_2037 UMETA(DisplayName = "HMDProp_DisplayAllowNightMode_Bool"),
364 HMDProp_DriverDirectModeSendsVsyncEvents_Bool_2043 UMETA(DisplayName = "HMDProp_DriverDirectModeSendsVsyncEvents_Bool"),
365 HMDProp_DisplayDebugMode_Bool_2044 UMETA(DisplayName = "HMDProp_DisplayDebugMode_Bool"),
366 HMDProp_DoNotApplyPrediction_Bool_2054 UMETA(DisplayName = "HMDProp_DoNotApplyPrediction_Bool"),
367
368 HMDProp_DriverIsDrawingControllers_Bool_2057 UMETA(DisplayName = "HMDProp_DriverIsDrawingControllers_Bool"),
369 HMDProp_DriverRequestsApplicationPause_Bool_2058 UMETA(DisplayName = "HMDProp_DriverRequestsApplicationPause_Bool"),
370 HMDProp_DriverRequestsReducedRendering_Bool_2059 UMETA(DisplayName = "HMDProp_DriverRequestsReducedRendering_Bool"),
371 HMDProp_ConfigurationIncludesLighthouse20Features_Bool_2069 UMETA(DisplayName = "HMDProp_ConfigurationIncludesLighthouse20Features_Bool"),
372
373 HMDProp_DriverProvidedChaperoneVisibility_Bool_2076 UMETA(DisplayName = "HMDProp_DriverProvidedChaperoneVisibility_Bool"),
374 HMDProp_DisplaySupportsMultipleFramerates_Bool_2081 UMETA(DisplayName = "HMDProp_DisplaySupportsMultipleFramerates_Bool"),
375
376 // Tracked devices
377 TrackRefProp_CanWirelessIdentify_Bool_4007 UMETA(DisplayName = "TrackRefProp_CanWirelessIdentify_Bool"),
378
379
380 // 5 prefix = 6000 series
381 DriverProp_HasDisplayComponent_Bool_6002 UMETA(DisplayName = "DriverProp_HasDisplayComponent_Bool"),
382 DriverProp_HasControllerComponent_Bool_6003 UMETA(DisplayName = "DriverProp_HasControllerComponent_Bool"),
383 DriverProp_HasCameraComponent_Bool_6004 UMETA(DisplayName = "DriverProp_HasCameraComponent_Bool"),
384 DriverProp_HasDriverDirectModeComponent_Bool_6005 UMETA(DisplayName = "DriverProp_HasDriverDirectModeComponent_Bool"),
385 DriverProp_HasVirtualDisplayComponent_Bool_6006 UMETA(DisplayName = "DriverProp_HasVirtualDisplayComponent_Bool"),
386 DriverProp_HasSpatialAnchorsSupport_Bool_6007 UMETA(DisplayName = "DriverProp_HasSpatialAnchorsSupport_Bool")
387
388};
389
390UENUM(BlueprintType)
391enum class EVRDeviceProperty_Float : uint8
392{
393 // No Prefix = 1000 series
394 Prop_DeviceBatteryPercentage_Float_1012 UMETA(DisplayName = "Prop_DeviceBatteryPercentage_Float"),
395
396 // 1 Prefix = 2000 series
397 HMDProp_SecondsFromVsyncToPhotons_Float_2001 UMETA(DisplayName = "HMDProp_SecondsFromVsyncToPhotons_Float"),
398 HMDProp_DisplayFrequency_Float_2002 UMETA(DisplayName = "HMDProp_DisplayFrequency_Float"),
399 HMDProp_UserIpdMeters_Float_2003 UMETA(DisplayName = "HMDProp_UserIpdMeters_Float"),
400 HMDProp_DisplayMCOffset_Float_2009 UMETA(DisplayName = "HMDProp_DisplayMCOffset_Float"),
401 HMDProp_DisplayMCScale_Float_2010 UMETA(DisplayName = "HMDProp_DisplayMCScale_Float"),
402 HMDProp_DisplayGCBlackClamp_Float_2014 UMETA(DisplayName = "HMDProp_DisplayGCBlackClamp_Float"),
403 HMDProp_DisplayGCOffset_Float_2018 UMETA(DisplayName = "HMDProp_DisplayGCOffset_Float"),
404 HMDProp_DisplayGCScale_Float_2019 UMETA(DisplayName = "HMDProp_DisplayGCScale_Float"),
405 HMDProp_DisplayGCPrescale_Float_2020 UMETA(DisplayName = "HMDProp_DisplayGCPrescale_Float"),
406 HMDProp_LensCenterLeftU_Float_2022 UMETA(DisplayName = "HMDProp_LensCenterLeftU_Float"),
407 HMDProp_LensCenterLeftV_Float_2023 UMETA(DisplayName = "HMDProp_LensCenterLeftV_Float"),
408 HMDProp_LensCenterRightU_Float_2024 UMETA(DisplayName = "HMDProp_LensCenterRightU_Float"),
409 HMDProp_LensCenterRightV_Float_2025 UMETA(DisplayName = "HMDProp_LensCenterRightV_Float"),
410 HMDProp_UserHeadToEyeDepthMeters_Float_2026 UMETA(DisplayName = "HMDProp_UserHeadToEyeDepthMeters_Float"),
411 HMDProp_ScreenshotHorizontalFieldOfViewDegrees_Float_2034 UMETA(DisplayName = "HMDProp_ScreenshotHorizontalFieldOfViewDegrees_Float"),
412 HMDProp_ScreenshotVerticalFieldOfViewDegrees_Float_2035 UMETA(DisplayName = "HMDProp_ScreenshotVerticalFieldOfViewDegrees_Float"),
413 HMDProp_SecondsFromPhotonsToVblank_Float_2042 UMETA(DisplayName = "HMDProp_SecondsFromPhotonsToVblank_Float"),
414 HMDProp_MinimumIpdStepMeters_Float_2060 UMETA(DisplayName = "HMDProp_MinimumIpdStepMeters_Float"),
416 // 3 Prefix = 4000 series
417 TrackRefProp_FieldOfViewLeftDegrees_Float_4000 UMETA(DisplayName = "TrackRefProp_FieldOfViewLeftDegrees_Float"),
418 TrackRefProp_FieldOfViewRightDegrees_Float_4001 UMETA(DisplayName = "TrackRefProp_FieldOfViewRightDegrees_Float"),
419 TrackRefProp_FieldOfViewTopDegrees_Float_4002 UMETA(DisplayName = "TrackRefProp_FieldOfViewTopDegrees_Float"),
420 TrackRefProp_FieldOfViewBottomDegrees_Float_4003 UMETA(DisplayName = "TrackRefProp_FieldOfViewBottomDegrees_Float"),
421 TrackRefProp_TrackingRangeMinimumMeters_Float_4004 UMETA(DisplayName = "TrackRefProp_TrackingRangeMinimumMeters_Float"),
422 TrackRefProp_TrackingRangeMaximumMeters_Float_4005 UMETA(DisplayName = "TrackRefProp_TrackingRangeMaximumMeters_Float")
423};
424
425UENUM(BlueprintType)
426enum class EVRDeviceProperty_Int32 : uint8
427{
428 // No prefix = 1000 series
429 Prop_DeviceClass_Int32_1029 UMETA(DisplayName = "Prop_DeviceClass_Int32"),
430 Prop_NumCameras_Int32_1039 UMETA(DisplayName = "Prop_NumCameras_Int32"),
431 Prop_CameraFrameLayout_Int32_1040 UMETA(DisplayName = "Prop_CameraFrameLayout_Int32"), // EVRTrackedCameraFrameLayout value
432 Prop_CameraStreamFormat_Int32_1041 UMETA(DisplayName = "Prop_CameraStreamFormat_Int32"),
433
434 // 1 Prefix = 2000 series
435 HMDProp_DisplayMCType_Int32_2008 UMETA(DisplayName = "HMDProp_DisplayMCType_Int32"),
436 HMDProp_EdidVendorID_Int32_2011 UMETA(DisplayName = "HMDProp_EdidVendorID_Int32"),
437 HMDProp_EdidProductID_Int32_2015 UMETA(DisplayName = "HMDProp_EdidProductID_Int32"),
438 HMDProp_DisplayGCType_Int32_2017 UMETA(DisplayName = "HMDProp_DisplayGCType_Int32"),
439 HMDProp_CameraCompatibilityMode_Int32_2033 UMETA(DisplayName = "HMDProp_CameraCompatibilityMode_Int32"),
440 HMDProp_DisplayMCImageWidth_Int32_2038 UMETA(DisplayName = "HMDProp_DisplayMCImageWidth_Int32"),
441 HMDProp_DisplayMCImageHeight_Int32_2039 UMETA(DisplayName = "HMDProp_DisplayMCImageHeight_Int32"),
442 HMDProp_DisplayMCImageNumChannels_Int32_2040 UMETA(DisplayName = "HMDProp_DisplayMCImageNumChannels_Int32"),
443 HMDProp_ExpectedTrackingReferenceCount_Int32_2049 UMETA(DisplayName = "HMDProp_ExpectedTrackingReferenceCount_Int32"),
444 HMDProp_ExpectedControllerCount_Int32_2050 UMETA(DisplayName = "HMDProp_ExpectedControllerCount_Int32"),
445 HMDProp_DistortionMeshResolution_Int32_2056 UMETA(DisplayName = "HMDProp_DistortionMeshResolution_Int32"),
446
447 HMDProp_HmdTrackingStyle_Int32_2075 UMETA(DisplayName = "HMDProp_HmdTrackingStyle_Int32"),
448
449 // 2 Prefix = 3000 series
450 ControllerProp_Axis0Type_Int32_3002 UMETA(DisplayName = "ControllerProp_Axis0Type_Int32"),
451 ControllerPropProp_Axis1Type_Int32_3003 UMETA(DisplayName = "ControllerPropProp_Axis1Type_Int32"),
452 ControllerPropProp_Axis2Type_Int32_3004 UMETA(DisplayName = "ControllerPropProp_Axis2Type_Int32"),
453 ControllerPropProp_Axis3Type_Int32_3005 UMETA(DisplayName = "ControllerPropProp_Axis3Type_Int32"),
454 ControllerPropProp_Axis4Type_Int32_3006 UMETA(DisplayName = "ControllerPropProp_Axis4Type_Int32"),
455 ControllerProp_ControllerRoleHint_Int32_3007 UMETA(DisplayName = "ControllerProp_ControllerRoleHint_Int32"),
456
457 // Tracked device props
458 TrackRefProp_Nonce_Int32_4008 UMETA(DisplayName = "TrackRefProp_Nonce_Int32"),
459
460 // Driver Props
461 DriverProp_ControllerHandSelectionPriority_Int32_7002 UMETA(DisplayName = "DriverProp_ControllerHandSelectionPriority_Int32")
462};
463
464UENUM(BlueprintType)
465enum class EVRDeviceProperty_UInt64 : uint8
466{
467 // No prefix = 1000 series
468 Prop_HardwareRevision_Uint64_1017 UMETA(DisplayName = "Prop_HardwareRevision_Uint64"),
469 Prop_FirmwareVersion_Uint64_1018 UMETA(DisplayName = "Prop_FirmwareVersion_Uint64"),
470 Prop_FPGAVersion_Uint64_1019 UMETA(DisplayName = "Prop_FPGAVersion_Uint64"),
471 Prop_VRCVersion_Uint64_1020 UMETA(DisplayName = "Prop_VRCVersion_Uint64"),
472 Prop_RadioVersion_Uint64_1021 UMETA(DisplayName = "Prop_RadioVersion_Uint64"),
473 Prop_DongleVersion_Uint64_1022 UMETA(DisplayName = "Prop_DongleVersion_Uint64"),
474 Prop_ParentDriver_Uint64_1034 UMETA(DisplayName = "Prop_ParentDriver_Uint64"),
475 Prop_BootloaderVersion_Uint64_1044 UMETA(DisplayName = "Prop_BootloaderVersion_Uint64"),
476
477 // 1 Prefix = 2000 series
478 HMDProp_CurrentUniverseId_Uint64_2004 UMETA(DisplayName = "HMDProp_CurrentUniverseId_Uint64"),
479 HMDProp_PreviousUniverseId_Uint64_2005 UMETA(DisplayName = "HMDProp_PreviousUniverseId_Uint64"),
480 HMDProp_DisplayFirmwareVersion_Uint64_2006 UMETA(DisplayName = "HMDProp_DisplayFirmwareVersion_Uint64"),
481 HMDProp_CameraFirmwareVersion_Uint64_2027 UMETA(DisplayName = "HMDProp_CameraFirmwareVersion_Uint64"),
482 HMDProp_DisplayFPGAVersion_Uint64_2029 UMETA(DisplayName = "HMDProp_DisplayFPGAVersion_Uint64"),
483 HMDProp_DisplayBootloaderVersion_Uint64_2030 UMETA(DisplayName = "HMDProp_DisplayBootloaderVersion_Uint64"),
484 HMDProp_DisplayHardwareVersion_Uint64_2031 UMETA(DisplayName = "HMDProp_DisplayHardwareVersion_Uint64"),
485 HMDProp_AudioFirmwareVersion_Uint64_2032 UMETA(DisplayName = "HMDProp_AudioFirmwareVersion_Uint64"),
486 HMDProp_GraphicsAdapterLuid_Uint64_2045 UMETA(DisplayName = "HMDProp_GraphicsAdapterLuid_Uint64"),
487 HMDProp_AudioBridgeFirmwareVersion_Uint64_2061 UMETA(DisplayName = "HMDProp_AudioBridgeFirmwareVersion_Uint64"),
488 HMDProp_ImageBridgeFirmwareVersion_Uint64_2062 UMETA(DisplayName = "HMDProp_ImageBridgeFirmwareVersion_Uint64"),
489 HMDProp_AdditionalRadioFeatures_Uint64_2070 UMETA(DisplayName = "HMDProp_AdditionalRadioFeatures_Uint64"),
490
491 // 2 Prefix = 3000 series
492 ControllerProp_SupportedButtons_Uint64_3001 UMETA(DisplayName = "ControllerProp_SupportedButtons_Uint64")
493};
494
495UENUM(BlueprintType)
496enum class EVRDeviceProperty_Matrix34 : uint8
497{
498 // No prefix = 1000 series
499 Prop_StatusDisplayTransform_Matrix34_1013 UMETA(DisplayName = "Prop_StatusDisplayTransform_Matrix34"),
500
501 // 1 Prefix = 2000 series
502 HMDProp_CameraToHeadTransform_Matrix34_2016 UMETA(DisplayName = "HMDProp_CameraToHeadTransform_Matrix34"),
503 HMDProp_CameraToHeadTransforms_Matrix34_2055 UMETA(DisplayName = "HMDProp_CameraToHeadTransforms_Matrix34"),
504 HMDProp_ImuToHeadTransform_Matrix34_2063 UMETA(DisplayName = "HMDProp_ImToHeadTransform_Matrix34")
505};
506
507// This needs to be updated as the original gets changed, that or hope they make the original blueprint accessible.
508UENUM(Blueprintable)
509enum class EBPOpenVRHMDDeviceType : uint8
510{
513 DT_Vive,
521 //DT_OSVR,
523};
524
525// This needs to be updated as the original gets changed, that or hope they make the original blueprint accessible.
526UENUM(Blueprintable)
527enum class EBPOpenVRControllerDeviceType : uint8
528{
539
540UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent))
541class OPENVREXPANSIONPLUGIN_API UOpenVRExpansionFunctionLibrary : public UBlueprintFunctionLibrary
542{
543 //GENERATED_BODY()
544 GENERATED_BODY()
546public:
547 UOpenVRExpansionFunctionLibrary(const FObjectInitializer& ObjectInitializer);
548
550public:
551
552#if STEAMVR_SUPPORTED_PLATFORM
553 static FBPOpenVRCameraHandle OpenCamera;
554
555 static FORCEINLINE FMatrix ToFMatrix(const vr::HmdMatrix34_t& tm)
556 {
557 // Rows and columns are swapped between vr::HmdMatrix34_t and FMatrix
558 return FMatrix(
559 FPlane(tm.m[0][0], tm.m[1][0], tm.m[2][0], 0.0f),
560 FPlane(tm.m[0][1], tm.m[1][1], tm.m[2][1], 0.0f),
561 FPlane(tm.m[0][2], tm.m[1][2], tm.m[2][2], 0.0f),
562 FPlane(tm.m[0][3], tm.m[1][3], tm.m[2][3], 1.0f));
563 }
564
565 static FORCEINLINE FMatrix ToFMatrix(const vr::HmdMatrix44_t& tm)
567 // Rows and columns are swapped between vr::HmdMatrix44_t and FMatrix
568 return FMatrix(
569 FPlane(tm.m[0][0], tm.m[1][0], tm.m[2][0], tm.m[3][0]),
570 FPlane(tm.m[0][1], tm.m[1][1], tm.m[2][1], tm.m[3][1]),
571 FPlane(tm.m[0][2], tm.m[1][2], tm.m[2][2], tm.m[3][2]),
572 FPlane(tm.m[0][3], tm.m[1][3], tm.m[2][3], tm.m[3][3]));
573 }
574
575 static FORCEINLINE vr::HmdMatrix34_t ToHmdMatrix34(const FMatrix& tm)
576 {
577 // Rows and columns are swapped between vr::HmdMatrix34_t and FMatrix
578 vr::HmdMatrix34_t out;
579
580 out.m[0][0] = tm.M[0][0];
581 out.m[1][0] = tm.M[0][1];
582 out.m[2][0] = tm.M[0][2];
584 out.m[0][1] = tm.M[1][0];
585 out.m[1][1] = tm.M[1][1];
586 out.m[2][1] = tm.M[1][2];
587
588 out.m[0][2] = tm.M[2][0];
589 out.m[1][2] = tm.M[2][1];
590 out.m[2][2] = tm.M[2][2];
591
592 out.m[0][3] = tm.M[3][0];
593 out.m[1][3] = tm.M[3][1];
594 out.m[2][3] = tm.M[3][2];
595
596 return out;
597 }
598
599#endif
600
601 // Gets whether an HMD device is connected, this is an expanded version for SteamVR
602 UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetOpenVRHMDType"))
603 static EBPOpenVRHMDDeviceType GetOpenVRHMDType();
604
605 // Gets what type of controller is plugged in
606 UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetOpenVRControllerType"))
607 static EBPOpenVRControllerDeviceType GetOpenVRControllerType();
608
609 // Checks if a specific OpenVR device is connected, index names are assumed, they may not be exact
610 UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true"))
611 static bool IsOpenVRDeviceConnected(int32 DeviceIndex);
612
613 // Get what type a specific openVR device index is
614 UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true"))
615 static EBPOpenVRTrackedDeviceClass GetOpenVRDeviceType(int32 DeviceIndex);
616
617 // Get a list of all currently tracked devices and their types, index in the array is their device index
618 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true"))
619 static void GetOpenVRDevices(TArray<EBPOpenVRTrackedDeviceClass> &FoundDevices);
620
621 // Get a list of all currently tracked devices of a specific type
622 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true"))
623 static void GetOpenVRDevicesByType(EBPOpenVRTrackedDeviceClass TypeToRetreive, TArray<int32> &FoundIndexs);
624
625 // Gets the model / texture of a SteamVR Device, can use to fill procedural mesh components or just get the texture of them to apply to a pre-made model.
626 // If the render model name override is empty then the render model name will be automatically retrieved from SteamVR and RenderModelNameOut will be filled with it.
627 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", WorldContext = "WorldContextObject", DisplayName = "GetVRDeviceModelAndTexture", ExpandEnumAsExecs = "Result", AdvancedDisplay = "OverrideDeviceID"))
628 static UTexture2D * GetVRDeviceModelAndTexture(UObject* WorldContextObject, FString RenderModelNameOverride, FString & RenderModelNameOut, EBPOpenVRTrackedDeviceClass DeviceType, TArray<UProceduralMeshComponent *> ProceduralMeshComponentsToFill, bool bCreateCollision, EAsyncBlueprintResultSwitch &Result, int32 OverrideDeviceID = -1);
629
630 // Gets a String device property
631 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyString", ExpandEnumAsExecs = "Result"))
632 static void GetVRDevicePropertyString(EVRDeviceProperty_String PropertyToRetrieve, int32 DeviceID, FString & StringValue, EBPOVRResultSwitch & Result);
633
634 // Gets a Bool device property
635 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyBool", ExpandEnumAsExecs = "Result"))
636 static void GetVRDevicePropertyBool(EVRDeviceProperty_Bool PropertyToRetrieve, int32 DeviceID, bool & BoolValue, EBPOVRResultSwitch & Result);
637
638 // Gets a Float device property
639 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyFloat", ExpandEnumAsExecs = "Result"))
640 static void GetVRDevicePropertyFloat(EVRDeviceProperty_Float PropertyToRetrieve, int32 DeviceID, float & FloatValue, EBPOVRResultSwitch & Result);
641
642 // Gets a Int32 device property
643 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyInt32", ExpandEnumAsExecs = "Result"))
644 static void GetVRDevicePropertyInt32(EVRDeviceProperty_Int32 PropertyToRetrieve, int32 DeviceID, int32 & IntValue, EBPOVRResultSwitch & Result);
645
646 // Gets a UInt64 device property as a string (Blueprints do not support int64)
647 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyUInt64", ExpandEnumAsExecs = "Result"))
648 static void GetVRDevicePropertyUInt64(EVRDeviceProperty_UInt64 PropertyToRetrieve, int32 DeviceID, FString & UInt64Value, EBPOVRResultSwitch & Result);
649
650 // Gets a Matrix34 device property as a Transform
651 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR", meta = (bIgnoreSelf = "true", DisplayName = "GetVRDevicePropertyMatrix34AsTransform", ExpandEnumAsExecs = "Result"))
652 static void GetVRDevicePropertyMatrix34AsTransform(EVRDeviceProperty_Matrix34 PropertyToRetrieve, int32 DeviceID, FTransform & TransformValue, EBPOVRResultSwitch & Result);
653
654 // VR Camera options
655
656 // Returns if there is a VR camera and what its pixel height / width is
657 UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "HasVRCamera"))
658 static bool HasVRCamera(EOpenVRCameraFrameType FrameType, int32 &Width, int32 &Height);
659
660 // Gets a screen cap from the HMD camera if there is one
661 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "GetVRCameraFrame", ExpandEnumAsExecs = "Result"))
662 static void GetVRCameraFrame(UPARAM(ref) FBPOpenVRCameraHandle & CameraHandle, EOpenVRCameraFrameType FrameType, EBPOVRResultSwitch & Result, UTexture2D * TargetRenderTarget = nullptr);
663
664 // Create Camera Render Target, automatically pulls the correct texture size and format
665 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "CreateCameraTexture2D", ExpandEnumAsExecs = "Result"))
666 static UTexture2D * CreateCameraTexture2D(UPARAM(ref) FBPOpenVRCameraHandle & CameraHandle, EOpenVRCameraFrameType FrameType, EBPOVRResultSwitch & Result);
667
668 // Acquire the vr camera for access (wakes it up) and returns a handle to use for functions regarding it (MUST RELEASE CAMERA WHEN DONE)
669 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "AcquireVRCamera", ExpandEnumAsExecs = "Result"))
670 static void AcquireVRCamera(FBPOpenVRCameraHandle & CameraHandle, EBPOVRResultSwitch & Result);
671
672 // Releases the vr camera from access - you MUST call this when done with the camera
673 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "ReleaseVRCamera", ExpandEnumAsExecs = "Result"))
674 static void ReleaseVRCamera(UPARAM(ref) FBPOpenVRCameraHandle & CameraHandle, EBPOVRResultSwitch & Result);
675
676 // Checks if a camera handle is valid
677 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|VRCamera", meta = (bIgnoreSelf = "true", DisplayName = "IsValid"))
678 static bool IsValid(UPARAM(ref) FBPOpenVRCameraHandle & CameraHandle);
679
680 // VR compositor
681
682 // Override the standard skybox texture in steamVR - LatLong format - need to call ClearSkyboxOverride when finished
683 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
684 static bool SetSkyboxOverride_LatLong(UTexture2D * LatLongSkybox);
685
686 // Override the standard skybox texture in steamVR - LatLong stereo pair - need to call ClearSkyboxOverride when finished
687 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
688 static bool SetSkyboxOverride_LatLongStereoPair(UTexture2D * LatLongSkyboxL, UTexture2D * LatLongSkyboxR);
689
690 // Override the standard skybox texture in steamVR - 6 cardinal textures - need to call ClearSkyboxOverride when finished
691 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
692 static bool SetSkyboxOverride(UTexture * tFront, UTexture2D * tBack, UTexture * tLeft, UTexture * tRight, UTexture * tTop, UTexture * tBottom);
693
694 // Remove skybox override in steamVR
695 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
696 static bool ClearSkyboxOverride();
697
701 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
702 static bool FadeHMDToColor(float fSeconds, FColor Color, bool bBackground = false);
703
704
706 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
707 static bool GetCurrentHMDFadeColor(FColor & ColorOut, bool bBackground = false);
708
710 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
711 static bool FadeVRGrid(float fSeconds, bool bFadeIn);
712
714 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
715 static bool GetCurrentVRGridAlpha(float & VRGridAlpha);
716
717 // Sets whether the compositor is allows to render or not (reverts to base compositor / grid when active)
718 // Useful to place players out of the app during frame drops/hitches/loading and into the vr skybox.
719 UFUNCTION(BlueprintCallable, Category = "VRExpansionFunctions|SteamVR|Compositor", meta = (bIgnoreSelf = "true"))
720 static bool SetSuspendRendering(bool bSuspendRendering);
721
722#if STEAMVR_SUPPORTED_PLATFORM
723 static vr::Texture_t CreateOpenVRTexture_t(UTexture * Texture)
724 {
725 vr::Texture_t VRTexture;
726
727 if (Texture)
728 VRTexture.handle = Texture->Resource->TextureRHI->GetNativeResource();
729 else
730 VRTexture.handle = NULL;
731
732 VRTexture.eColorSpace = vr::EColorSpace::ColorSpace_Auto;
733
734 VRTexture.eType = vr::ETextureType::TextureType_OpenGL;
735#if PLATFORM_MAC
736 VRTexture.eType = vr::ETextureType::TextureType_IOSurface;
737#else
738 if (IsPCPlatform(GMaxRHIShaderPlatform))
739 {
740 if (IsVulkanPlatform(GMaxRHIShaderPlatform))
741 {
742 VRTexture.eType = vr::ETextureType::TextureType_Vulkan;
743 }
744 else if (IsOpenGLPlatform(GMaxRHIShaderPlatform))
745 {
746 VRTexture.eType = vr::ETextureType::TextureType_OpenGL;
747 }
748#if PLATFORM_WINDOWS
749 else
750 {
751 VRTexture.eType = vr::ETextureType::TextureType_DirectX;
752 }
753#endif
754 }
755#endif
756 return VRTexture;
757 }
758#endif
759};
EAsyncBlueprintResultSwitch
UENUM()
EVRDeviceProperty_UInt64
UENUM(BlueprintType)
@ HMDProp_AudioBridgeFirmwareVersion_Uint64_2061
@ HMDProp_ImageBridgeFirmwareVersion_Uint64_2062
EBPOpenVRTrackedDeviceClass
UENUM()
static FName SteamVRSystemName(TEXT("SteamVR"))
EVRDeviceProperty_Bool
UENUM(BlueprintType)
@ DriverProp_HasControllerComponent_Bool_6003
@ HMDProp_DriverProvidedChaperoneVisibility_Bool_2076
@ HMDProp_DriverIsDrawingControllers_Bool_2057
@ HMDProp_ConfigurationIncludesLighthouse20Features_Bool_2069
@ DriverProp_HasSpatialAnchorsSupport_Bool_6007
@ Prop_CanUnifyCoordinateSystemWithHmd_Bool_1024
@ HMDProp_DriverRequestsApplicationPause_Bool_2058
@ Prop_ViveSystemButtonFixRequired_Bool_1033
@ DriverProp_HasDriverDirectModeComponent_Bool_6005
@ Prop_Firmware_ForceUpdateRequired_Bool_1032
@ DriverProp_HasVirtualDisplayComponent_Bool_6006
@ HMDProp_DriverRequestsReducedRendering_Bool_2059
@ TrackRefProp_CanWirelessIdentify_Bool_4007
@ Prop_DeviceProvidesBatteryStatus_Bool_1026
@ HMDProp_DriverDirectModeSendsVsyncEvents_Bool_2043
@ HMDProp_DisplaySupportsMultipleFramerates_Bool_2081
EBPOpenVRControllerDeviceType
UENUM(Blueprintable)
DECLARE_LOG_CATEGORY_EXTERN(OpenVRExpansionFunctionLibraryLog, Log, All)
EBPOVRResultSwitch
UENUM()
EVRDeviceProperty_String
UENUM(BlueprintType)
@ UIProp_NamedIconPathDeviceSearchingAlert_String_5003
@ Prop_AllWirelessDongleDescriptions_String_1008
@ HMDProp_DriverProvidedChaperonePath_String_2048
@ UIProp_NamedIconPathDeviceReadyAlert_String_5005
@ UIProp_NamedIconPathDeviceNotReady_String_5006
@ UIProp_NamedIconPathDeviceAlertLow_String_5008
@ UIProp_NamedIconPathDeviceSearching_String_5002
EBPSteamVRTrackedDeviceType
UENUM(BlueprintType)
EVRDeviceProperty_Int32
UENUM(BlueprintType)
@ ControllerProp_ControllerRoleHint_Int32_3007
@ HMDProp_ExpectedTrackingReferenceCount_Int32_2049
@ DriverProp_ControllerHandSelectionPriority_Int32_7002
@ HMDProp_DisplayMCImageNumChannels_Int32_2040
EOpenVRCameraFrameType
UENUM(BlueprintType)
EVRDeviceProperty_Float
UENUM(BlueprintType)
@ TrackRefProp_FieldOfViewLeftDegrees_Float_4000
@ TrackRefProp_FieldOfViewBottomDegrees_Float_4003
@ TrackRefProp_FieldOfViewRightDegrees_Float_4001
@ TrackRefProp_FieldOfViewTopDegrees_Float_4002
@ HMDProp_ScreenshotHorizontalFieldOfViewDegrees_Float_2034
@ HMDProp_ScreenshotVerticalFieldOfViewDegrees_Float_2035
@ HMDProp_SecondsFromPhotonsToVblank_Float_2042
@ TrackRefProp_TrackingRangeMinimumMeters_Float_4004
@ HMDProp_SecondsFromVsyncToPhotons_Float_2001
@ TrackRefProp_TrackingRangeMaximumMeters_Float_4005
EVRDeviceProperty_Matrix34
UENUM(BlueprintType)
EBPOpenVRHMDDeviceType
UENUM(Blueprintable)
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent))
USTRUCT(BlueprintType, Category = "VRExpansionFunctions|SteamVR|VRCamera")
FORCEINLINE bool operator==(const FBPOpenVRCameraHandle &Other) const
FORCEINLINE bool operator==(const FBPOpenVRKeyboardHandle &Other) const