Navigation
API > API/Plugins > API/Plugins/XRBase
Default implementation for various IHeadMountedDisplay methods. You can extend this class instead of IHeadMountedDisplay directly when implementing support for new HMD devices.
| Name | FHeadMountedDisplayBase |
| Type | class |
| Header File | /Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/HeadMountedDisplayBase.h |
| Include Path | #include "HeadMountedDisplayBase.h" |
Syntax
class FHeadMountedDisplayBase :
public FXRTrackingSystemBase ,
public IHeadMountedDisplay ,
public IStereoRendering
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FHeadMountedDisplayBase
(
IARSystemSupport* InARImplementation |
HeadMountedDisplayBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FHeadMountedDisplayBase() |
HeadMountedDisplayBase.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CVarSink | FAutoConsoleVariableSink | HeadMountedDisplayBase.h | |
| PixelDensityMax | float | HeadMountedDisplayBase.h | |
| PixelDensityMin | float | Sane pixel density values. | HeadMountedDisplayBase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHeadTrackingEnforced | bool | HeadMountedDisplayBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CalculateStereoViewOffset
(
const int32 ViewIndex, |
HeadMountedDisplayBase.h | ||
virtual void CopyTexture_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Helper to copy one render target into another for spectator screen display | HeadMountedDisplayBase.h | |
virtual FVector2D GetEyeCenterPoint_RenderThread
(
const int32 ViewIndex |
Spectator Screen Hooks into specific implementations Get the point on the left eye render target which the viewers eye is aimed directly at when looking straight forward. | HeadMountedDisplayBase.h | |
virtual FIntRect GetFullFlatEyeRect_RenderThread
(
FTextureRHIRef EyeTexture |
HeadMountedDisplayBase.h | ||
virtual FIntRect GetFullFlatEyeRect_RenderThread
(
const FRHITextureDesc& EyeTexture |
Get the rectangle of the HMD rendertarget for the left eye which seems undistorted enough to be cropped and displayed on the spectator screen. | HeadMountedDisplayBase.h | |
virtual IStereoLayers * GetStereoLayers() |
Default stereo layer implementation | HeadMountedDisplayBase.h | |
virtual void InitCanvasFromView
(
FSceneView* InView, |
HeadMountedDisplayBase.h |
Overridden from IXRTrackingSystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsHeadTrackingAllowed() |
Default IXRTrackingSystem implementation | HeadMountedDisplayBase.h | |
virtual bool IsHeadTrackingEnforced() |
Optional IXRTrackingSystem methods. | HeadMountedDisplayBase.h | |
virtual void OnLateUpdateApplied_RenderThread
(
FRDGBuilder& GraphBuilder, |
HeadMountedDisplayBase.h | ||
virtual void SetHeadTrackingEnforced
(
bool bEnabled |
HeadMountedDisplayBase.h |
Overridden from IHeadMountedDisplay
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetHMDDistortionEnabled
(
EShadingPath ShadingPath |
HeadMountedDisplayBase.h | ||
virtual FName GetHMDName() |
Retrieves the HMD name, by default this is the same as the system name. | HeadMountedDisplayBase.h | |
virtual ISpectatorScreenController const * GetSpectatorScreenController () |
HeadMountedDisplayBase.h | ||
virtual ISpectatorScreenController * GetSpectatorScreenController () |
HeadMountedDisplayBase.h | ||
virtual bool IsSpectatorScreenActive() |
HeadMountedDisplayBase.h | ||
virtual void RecordAnalytics() |
Record analytics - To add custom information logged with the analytics, override PopulateAnalyticsAttributes | HeadMountedDisplayBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FTextureRHIRef GetOverlayLayerTarget_RenderThread
(
int32 ViewIndex, |
Implement this method to provide an alternate render target for head locked stereo layer rendering, when using the default Stereo Layers implementation. | HeadMountedDisplayBase.h | |
virtual FTextureRHIRef GetSceneLayerTarget_RenderThread
(
int32 ViewIndex, |
Implement this method to override the render target for scene based stereo layers. | HeadMountedDisplayBase.h | |
virtual bool PopulateAnalyticsAttributes
(
TArray< struct FAnalyticsEventAttribute >& EventAttributes |
Called by RecordAnalytics when creating the analytics event sent during HMD initialization. | HeadMountedDisplayBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CVarSinkHandler() |
CVar sink for pixel density | HeadMountedDisplayBase.h |