Navigation
API > API/Plugins > API/Plugins/XRBase
Inheritance Hierarchy
- FXRTrackingSystemBase
- IHeadMountedDisplay
- IStereoRendering
- FHeadMountedDisplayBase
- FPixelStreamingHMD
References
| Module | XRBase |
| Header | /Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/HeadMountedDisplayBase.h |
| Include | #include "HeadMountedDisplayBase.h" |
Syntax
class FHeadMountedDisplayBase :
public FXRTrackingSystemBase,
public IHeadMountedDisplay,
public IStereoRendering
Remarks
Default implementation for various IHeadMountedDisplay methods. You can extend this class instead of IHeadMountedDisplay directly when implementing support for new HMD devices.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< class FDefaultStereoLayers, ESPMode::ThreadSafe > | DefaultStereoLayers | ||
| TUniquePtr< FDefaultSpectatorScreenController > | SpectatorScreenController |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FHeadMountedDisplayBase
(
IARSystemSupport* InARImplementation |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CopyTexture_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Helper to copy one render target into another for spectator screen display. | |
| void | CVar sink for pixel density | ||
| 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. | |
| FIntRect | GetFullFlatEyeRect_RenderThread
(
FTexture2DRHIRef 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. | |
| FTexture2DRHIRef | 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. | |
| FTexture2DRHIRef | GetSceneLayerTarget_RenderThread
(
int32 ViewIndex, |
Implement this method to override the render target for scene based stereo layers. | |
| bool | PopulateAnalyticsAttributes
(
TArray< struct FAnalyticsEventAttribute >& EventAttributes |
Called by RecordAnalytics when creating the analytics event sent during HMD initialization. |
Overridden from IXRTrackingSystem
| Type | Name | Description | |
|---|---|---|---|
| bool | Default IXRTrackingSystem implementation | ||
| bool | Optional IXRTrackingSystem methods. | ||
| void | OnLateUpdateApplied_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Called just after the late update on the render thread passing back the current relative transform. | |
| void | SetHeadTrackingEnforced
(
bool bEnabled |
Can be used to enforce tracking even when stereo rendering is disabled. |
Overridden from IHeadMountedDisplay
| Type | Name | Description | |
|---|---|---|---|
| bool | GetHMDDistortionEnabled
(
EShadingPath ShadingPath |
Whether HMDDistortion post processing is enabled or not | |
| FName | GetHMDName () |
Retrieves the HMD name, by default this is the same as the system name. | |
| ISpectatorScreenController * | Return a pointer to the SpectatorScreenController for the HMD if supported, else null. | ||
| ISpectatorScreenController const * | |||
| bool | Are we outputting so a Spectator Screen now. | ||
| void | Record analytics - To add custom information logged with the analytics, override PopulateAnalyticsAttributes |
Overridden from IStereoRendering
| Type | Name | Description | |
|---|---|---|---|
| void | CalculateStereoViewOffset
(
const int32 ViewIndex, |
Calculates the offset for the camera position, given the specified position, rotation, and world scale Specifying eSSE_MONOSCOPIC for the view index returns a center offset behind the stereo views | |
| IStereoLayers * | Default stereo layer implementation | ||
| void | InitCanvasFromView
(
FSceneView* InView, |
Sets view-specific params (such as view projection matrix) for the canvas. |
Constants
| Name | Description |
|---|---|
| CVarSink | |
| PixelDensityMax | |
| PixelDensityMin | Sane pixel density values. |