Default implementation for various IHeadMountedDisplay methods. 更多...
#include <HeadMountedDisplayBase.h>
类 FHeadMountedDisplayBase 继承关系图:Public 成员函数 | |
| virtual bool | GetHMDDistortionEnabled (EShadingPath ShadingPath) const override |
| Whether HMDDistortion post processing is enabled or not | |
| virtual class ISpectatorScreenController * | GetSpectatorScreenController () override |
| Return a pointer to the SpectatorScreenController for the HMD if supported, else null. 更多... | |
| virtual IStereoLayers * | GetStereoLayers () override |
| Default stereo layer implementation | |
| virtual bool | IsHeadTrackingAllowed () const override |
| Default IXRTrackingSystem implementation | |
| virtual bool | IsHeadTrackingEnforced () const override |
| Optional IXRTrackingSystem methods. | |
| virtual void | OnLateUpdateApplied_RenderThread (const FTransform &NewRelativeTransform) override |
| Called just after the late update on the render thread passing back the current relative transform. | |
| virtual void | RecordAnalytics () override |
| Record analytics - To add custom information logged with the analytics, override PopulateAnalyticsAttributes | |
| virtual void | SetHeadTrackingEnforced (bool bEnabled) override |
| Can be used to enforce tracking even when stereo rendering is disabled. 更多... | |
Public 成员函数 继承自 FXRTrackingSystemBase | |
| virtual void | CalibrateExternalTrackingSource (const FTransform &ExternalTrackingTransform) override |
| Called to calibrate the offset transform between an external tracking source and the internal tracking source (e.g. 更多... | |
| virtual uint32 | CountTrackedDevices (EXRTrackedDeviceType Type=EXRTrackedDeviceType::Any) override |
| Get the count of tracked devices. 更多... | |
| virtual bool | DoesSupportPositionalTracking () const override |
| Whether or not the system supports positional tracking (either via sensor or other means). 更多... | |
| virtual bool | GetFloorToEyeTrackingTransform (FTransform &OutFloorToEye) const override |
| Returns a transform for converting from 'Floor' origin space to 'Eye' origin space. 更多... | |
| virtual class IXRLoadingScreen * | GetLoadingScreen () override final |
| Access the loading screen interface associated with this tracking system, if any. 更多... | |
| virtual void | GetMotionControllerData (UObject *WorldContext, const EControllerHand Hand, FXRMotionControllerData &MotionControllerData) override |
| Platform Agnostic Query about MotionControllers details | |
| virtual bool | GetRelativeEyePose (int32 DeviceId, EStereoscopicPass Eye, FQuat &OutOrientation, FVector &OutPosition) override |
| If the device id represents a head mounted display, fetches the relative position of the given eye relative to the eye. 更多... | |
| virtual FString | GetTrackedDevicePropertySerialNumber (int32 DeviceId) override |
| If the device id represents a tracking sensor, reports the serial number as a string if the device supports it. 更多... | |
| virtual EXRTrackedDeviceType | GetTrackedDeviceType (int32 DeviceId) const override |
| If the device id represents a tracking sensor, reports the device type. 更多... | |
| virtual EHMDTrackingOrigin::Type | GetTrackingOrigin () const override |
| Returns current tracking origin. 更多... | |
| virtual bool | GetTrackingSensorProperties (int32 DeviceId, FQuat &OutOrientation, FVector &OutPosition, FXRSensorProperties &OutSensorProperties) override |
| If the device id represents a tracking sensor, reports the frustum properties in game-world space of the sensor. 更多... | |
| virtual FTransform | GetTrackingToWorldTransform () const override |
| Returns the system's latest known tracking-to-world transform. | |
| virtual FString | GetVersionString () const |
| Returns version string. | |
| virtual TSharedPtr< class IXRCamera, ESPMode::ThreadSafe > | GetXRCamera (int32 DeviceId=HMDDeviceId) override |
| Get the IXCamera instance for the given device. 更多... | |
| virtual bool | HasValidTrackingPosition () override |
| If the system currently has valid tracking positions. 更多... | |
| virtual bool | IsTracking (int32 DeviceId) override |
| Check current tracking status of a device. 更多... | |
| virtual void | SetTrackingOrigin (EHMDTrackingOrigin::Type NewOrigin) override |
| Sets tracking origin (either 'eye'-level or 'floor'-level). 更多... | |
| virtual void | UpdateExternalTrackingPosition (const FTransform &ExternalTrackingTransform) override |
| Called after calibration to attempt to pull the internal tracker (e.g. 更多... | |
| virtual void | UpdateTrackingToWorldTransform (const FTransform &TrackingToWorldOverride) override |
| Refreshes the system's known tracking-to-world transform. | |
Public 成员函数 继承自 IXRTrackingSystem | |
| virtual void | CalibrateExternalTrackingSource (const FTransform &ExternalTrackingTransform) |
| Called to calibrate the offset transform between an external tracking source and the internal tracking source (e.g. 更多... | |
| virtual uint32 | CountTrackedDevices (EXRTrackedDeviceType Type=EXRTrackedDeviceType::Any)=0 |
| Get the count of tracked devices 更多... | |
| virtual bool | DoesSupportLateUpdate () const |
| Return true if the default camera implementation should query the current pose at the start of the render frame and apply late update. 更多... | |
| virtual bool | DoesSupportPositionalTracking () const =0 |
| Whether or not the system supports positional tracking (either via sensor or other means) | |
| virtual bool | EnumerateTrackedDevices (TArray< int32 > &OutDevices, EXRTrackedDeviceType Type=EXRTrackedDeviceType::Any)=0 |
| Reports all devices currently available to the system, optionally limiting the result to a given class of devices. 更多... | |
| virtual FVector | GetAudioListenerOffset (int32 DeviceId=HMDDeviceId) const |
| Get the offset, in device space, of the reported device (screen / eye) position to the center of the head. 更多... | |
| virtual FQuat | GetBaseOrientation () const |
| Returns current base orientation of HMD as a quaternion. | |
| virtual FVector | GetBasePosition () const |
| Returns current base position of HMD. | |
| virtual FRotator | GetBaseRotation () const |
| Returns current base orientation of HMD as yaw-pitch-roll combination. | |
| virtual bool | GetCurrentPose (int32 DeviceId, FQuat &OutOrientation, FVector &OutPosition)=0 |
| Get the current pose for a device. 更多... | |
| virtual bool | GetFloorToEyeTrackingTransform (FTransform &OutFloorToEye) const =0 |
| Computes a transform to convert from 'Floor' origin space to 'Eye' origin space. 更多... | |
| virtual void | GetHMDData (UObject *WorldContext, FXRHMDData &HMDData) |
| Platform Agnostic Query about HMD details | |
| virtual class IHeadMountedDisplay * | GetHMDDevice () |
| Access HMD rendering-related features. 更多... | |
| virtual class IXRLoadingScreen * | GetLoadingScreen () |
| Access the loading screen interface associated with this tracking system, if any. 更多... | |
| virtual void | GetMotionControllerData (UObject *WorldContext, const EControllerHand Hand, FXRMotionControllerData &MotionControllerData)=0 |
| Platform Agnostic Query about MotionControllers details | |
| virtual bool | GetRelativeEyePose (int32 DeviceId, EStereoscopicPass Eye, FQuat &OutOrientation, FVector &OutPosition)=0 |
| If the device id represents a head mounted display, fetches the relative position of the given eye relative to the eye. 更多... | |
| virtual class TSharedPtr< class IStereoRendering, ESPMode::ThreadSafe > | GetStereoRenderingDevice () |
| Access Stereo rendering device associated with this XR system. 更多... | |
| virtual FString | GetTrackedDevicePropertySerialNumber (int32 DeviceId)=0 |
| If the device id represents a tracking sensor, reports the serial number as a string if the device supports it. 更多... | |
| virtual EXRTrackedDeviceType | GetTrackedDeviceType (int32 DeviceId) const =0 |
| If the device id represents a tracking sensor, reports the device type. 更多... | |
| virtual EHMDTrackingOrigin::Type | GetTrackingOrigin () const =0 |
| Returns current tracking origin. | |
| virtual bool | GetTrackingSensorProperties (int32 DeviceId, FQuat &OutOrientation, FVector &OutPosition, FXRSensorProperties &OutSensorProperties)=0 |
| If the device id represents a tracking sensor, reports the frustum properties in game-world space of the sensor. 更多... | |
| virtual FTransform | GetTrackingToWorldTransform () const =0 |
| Returns the system's latest known tracking-to-world transform. 更多... | |
| virtual FString | GetVersionString () const =0 |
| Returns version string. | |
| virtual float | GetWorldToMetersScale () const =0 |
| This method should return the world to meters scale for the current frame. 更多... | |
| virtual class TSharedPtr< class IXRCamera, ESPMode::ThreadSafe > | GetXRCamera (int32 DeviceId=HMDDeviceId)=0 |
| Get the IXCamera instance for the given device. 更多... | |
| virtual IXRInput * | GetXRInput () |
| Access optional HMD input override interface. 更多... | |
| virtual int32 | GetXRSystemFlags () const =0 |
| Returns device specific flags. | |
| virtual bool | HasValidTrackingPosition ()=0 |
| If the system currently has valid tracking positions. 更多... | |
| virtual bool | IsHeadTrackingAllowed () const =0 |
| Returns true, if head tracking is allowed. 更多... | |
| virtual bool | IsHeadTrackingAllowedForWorld (UWorld &World) const |
| Same as IsHeadTrackingAllowed, but returns false if the World is not using VR (such as with the non-VR PIE instances when using VR Preview) | |
| virtual bool | IsHeadTrackingEnforced () const |
| Can be used to enforce tracking even when stereo rendering is disabled. 更多... | |
| virtual bool | IsTracking (int32 DeviceId)=0 |
| Check current tracking status of a device. 更多... | |
| virtual void | OnBeginPlay (FWorldContext &InWorldContext) |
| This method is called when playing begins. 更多... | |
| virtual void | OnBeginRendering_GameThread () |
| Called just before rendering the current frame on the game frame. | |
| virtual void | OnBeginRendering_RenderThread (FRHICommandListImmediate &RHICmdList, FSceneViewFamily &ViewFamily) |
| Called just before rendering the current frame on the render thread. 更多... | |
| virtual bool | OnEndGameFrame (FWorldContext &WorldContext) |
| This method is called when game frame ends (called on a game thread). | |
| virtual void | OnEndPlay (FWorldContext &InWorldContext) |
| This method is called when playing ends. 更多... | |
| virtual void | OnLateUpdateApplied_RenderThread (const FTransform &NewRelativeTransform) |
| Called just after the late update on the render thread passing back the current relative transform. | |
| virtual bool | OnStartGameFrame (FWorldContext &WorldContext) |
| This method is called when new game frame begins (called on a game thread). | |
| virtual void | RebaseObjectOrientationAndPosition (FVector &Position, FQuat &Orientation) const |
| Temporary method until Morpheus controller code has been refactored. | |
| virtual void | RefreshPoses () |
| Refresh poses. 更多... | |
| virtual void | ResetOrientation (float Yaw=0.f) |
| Resets orientation by setting roll and pitch to 0, assuming that current yaw is forward direction. 更多... | |
| virtual void | ResetOrientationAndPosition (float Yaw=0.f)=0 |
| Resets orientation by setting roll and pitch to 0, assuming that current yaw is forward direction and assuming current position as a 'zero-point' (for positional tracking). 更多... | |
| virtual void | ResetPosition () |
| Resets position, assuming current position as a 'zero-point'. | |
| virtual void | SetBaseOrientation (const FQuat &BaseOrient) |
| Sets base orientation, assuming that this is forward direction. 更多... | |
| virtual void | SetBasePosition (const FVector &BasePosition) |
| Sets base position of the HMD. 更多... | |
| virtual void | SetBaseRotation (const FRotator &BaseRot) |
| Sets base orientation by setting yaw, pitch, roll, assuming that this is forward direction. 更多... | |
| virtual void | SetHeadTrackingEnforced (bool bEnabled) |
| Can be used to enforce tracking even when stereo rendering is disabled. 更多... | |
| virtual void | SetTrackingOrigin (EHMDTrackingOrigin::Type NewOrigin)=0 |
| Sets tracking origin (either 'eye'-level or 'floor'-level). | |
| virtual void | UpdateExternalTrackingPosition (const FTransform &ExternalTrackingTransform) |
| Called after calibration to attempt to pull the internal tracker (e.g. 更多... | |
| virtual void | UpdateTrackingToWorldTransform (const FTransform &TrackingToWorldOverride)=0 |
| Refreshes the system's known tracking-to-world transform. 更多... | |
Public 成员函数 继承自 IHeadMountedDisplay | |
| virtual void | BeginRendering_GameThread () |
| Called just before rendering the current frame on the game frame. | |
| virtual void | BeginRendering_RenderThread (const FTransform &NewRelativeTransform, FRHICommandListImmediate &RHICmdList, FSceneViewFamily &ViewFamily) |
| Called just before rendering the current frame on the render thread. 更多... | |
| virtual void | CreateHMDPostProcessPass_RenderThread (class FRDGBuilder &GraphBuilder, const class FViewInfo &View, const struct FHMDDistortionInputs &Inputs, struct FScreenPassTexture &OutPass) const |
| When implemented, creates a new post process node to provide platform-specific HMD distortion. | |
| virtual bool | DoesAppHaveVRFocus () const |
| Returns true, if the app has VR focus, meaning if it is rendered in the HMD. | |
| virtual bool | DoesAppUseVRFocus () const |
| Returns true, if the App is using VR focus. 更多... | |
| virtual void | DrawHiddenAreaMesh_RenderThread (class FRHICommandList &RHICmdList, EStereoscopicPass StereoPass) const |
| Optional method to draw a view's hidden area mesh where supported. 更多... | |
| virtual void | DrawVisibleAreaMesh_RenderThread (class FRHICommandList &RHICmdList, EStereoscopicPass StereoPass) const |
| Optional method to draw a view's visible area mesh where supported. 更多... | |
| virtual void | EnableHMD (bool bEnable=true)=0 |
| Enables or disables switching to stereo. | |
| virtual bool | GetChromaAbCorrectionValues (FVector4 &K) const |
| Gets the chromatic aberration correction shader values for the device. 更多... | |
| virtual float | GetDistortionScalingFactor () const |
| Gets the scaling factor, applied to the post process warping effect | |
| virtual FTexture * | GetDistortionTextureLeft () const |
| Additional optional distortion rendering parameters 更多... | |
| virtual void | GetDistortionWarpValues (FVector4 &K) const |
| Gets the barrel distortion shader warp values for the device | |
| virtual void | GetEyeRenderParams_RenderThread (const struct FRenderingCompositePassContext &Context, FVector2D &EyeToSrcUVScaleValue, FVector2D &EyeToSrcUVOffsetValue) const |
| Returns eye render params, used from PostProcessHMD, RenderThread. | |
| virtual void | GetFieldOfView (float &InOutHFOVInDegrees, float &InOutVFOVInDegrees) const =0 |
| Calculates the FOV, based on the screen dimensions of the device. 更多... | |
| virtual bool | GetHMDDistortionEnabled (EShadingPath ShadingPath) const =0 |
| Whether HMDDistortion post processing is enabled or not | |
| virtual bool | GetHMDMonitorInfo (MonitorInfo &)=0 |
| Get the name or id of the display to output for this HMD. | |
| virtual EHMDWornState::Type | GetHMDWornState () |
| Returns EHMDWornState::Worn if we detect that the user is wearing the HMD, EHMDWornState::NotWorn if we detect the user is not wearing the HMD, and EHMDWornState::Unknown if we cannot detect the state. | |
| virtual FIntPoint | GetIdealDebugCanvasRenderTargetSize () const |
| Gets the ideal render target size for the debug canvas on the device. | |
| virtual FIntPoint | GetIdealRenderTargetSize () const |
| Gets the ideal render target size for the device. 更多... | |
| virtual float | GetLensCenterOffset () const |
| Gets the offset (in clip coordinates) from the center of the screen for the lens position | |
| virtual float | GetPixelDenity () const |
| Gets the current pixel density setting. | |
| virtual class ISpectatorScreenController * | GetSpectatorScreenController () |
| Return a pointer to the SpectatorScreenController for the HMD if supported, else null. 更多... | |
| virtual bool | HasHiddenAreaMesh () const |
| virtual bool | HasVisibleAreaMesh () const |
| virtual bool | IsChromaAbCorrectionEnabled () const =0 |
| Returns 'false' if chromatic aberration correction is off. | |
| virtual bool | IsHMDConnected ()=0 |
| Returns true if HMD is currently connected. 更多... | |
| virtual bool | IsHMDEnabled () const =0 |
| Whether or not switching to stereo is enabled; if it is false, then EnableStereo(true) will do nothing. | |
| virtual bool | IsRenderingPaused () const |
| If true, scene rendering should be skipped. | |
| virtual void | RecordAnalytics () |
| Record analytics | |
| virtual void | SetClippingPlanes (float NCP, float FCP) |
| Sets near and far clipping planes (NCP and FCP) for the HMD. 更多... | |
| virtual void | SetInterpupillaryDistance (float NewInterpupillaryDistance)=0 |
| Accessors to modify the interpupillary distance (meters) | |
| virtual void | SetPixelDensity (const float NewDensity) |
| Sets the pixel density. 更多... | |
| virtual void | UpdateScreenSettings (const class FViewport *InViewport) |
| This method is able to change screen settings right before any drawing occurs. 更多... | |
Public 成员函数 继承自 IModuleInterface | |
| virtual bool | IsGameModule () const |
| Returns true if this module hosts gameplay code 更多... | |
| virtual void | PostLoadCallback () |
| Called after the module has been reloaded | |
| virtual void | PreUnloadCallback () |
| Called before the module has been unloaded | |
| virtual void | ShutdownModule () |
| Called before the module is unloaded, right before the module object is destroyed. 更多... | |
| virtual void | StartupModule () |
| Called right after the module DLL has been loaded and the module object has been created Load dependent modules here, and they will be guaranteed to be available during ShutdownModule. 更多... | |
| virtual bool | SupportsAutomaticShutdown () |
| Override this to set whether your module would like cleanup on application shutdown 更多... | |
| virtual bool | SupportsDynamicReloading () |
| Override this to set whether your module is allowed to be unloaded on the fly 更多... | |
| virtual | ~IModuleInterface () |
| Note: Even though this is an interface class we need a virtual destructor here because modules are deleted via a pointer to this interface | |
Protected 成员函数 | |
| virtual FTexture2DRHIRef | GetOverlayLayerTarget_RenderThread (EStereoscopicPass StereoPass, FIntRect &InOutViewport) |
| Implement this method to provide an alternate render target for head locked stereo layer rendering, when using the default Stereo Layers implementation. 更多... | |
| virtual FTexture2DRHIRef | GetSceneLayerTarget_RenderThread (EStereoscopicPass StereoPass, FIntRect &InOutViewport) |
| Implement this method to override the render target for scene based stereo layers. 更多... | |
| virtual bool | PopulateAnalyticsAttributes (TArray< struct FAnalyticsEventAttribute > &EventAttributes) |
| Called by RecordAnalytics when creating the analytics event sent during HMD initialization. 更多... | |
Protected 成员函数 继承自 FXRTrackingSystemBase | |
| virtual class IXRLoadingScreen * | CreateLoadingScreen () |
| Override this method if you need to customize the IXRLoadingScreen implementation. 更多... | |
| virtual void | OnTrackingOriginChanged () |
| Meant to be called by sub-classes whenever the tracking origin is altered. | |
| FTransform | RefreshTrackingToWorldTransform (FWorldContext &WorldContext) |
| Computes the project's tracking-to-world transform based off how the user has set up their camera system (assumes the camera is parented to the XR origin, and in turn uses that transform). 更多... | |
静态 Protected 成员函数 | |
| static void | CVarSinkHandler () |
| CVar sink for pixel density | |
友元 | |
| class | FDefaultStereoLayers |
额外继承的成员函数 | |
静态 Public 属性 继承自 IXRTrackingSystem | |
| static const int32 | HMDDeviceId = 0 |
| Device id 0 is reserved for an HMD. 更多... | |
Protected 属性 继承自 FXRTrackingSystemBase | |
| FTransform | CalibratedOffset |
| If the tracker is trying to lock itself to an external tracking source for drift control, this stores the calibrated offset between the external tracking system and the internal tracking system (e.g. 更多... | |
Default implementation for various IHeadMountedDisplay methods.
You can extend this class instead of IHeadMountedDisplay directly when implementing support for new HMD devices.
|
inlineprotectedvirtual |
Implement this method to provide an alternate render target for head locked stereo layer rendering, when using the default Stereo Layers implementation.
Return a FTexture2DRHIRef pointing to a texture that can be composed on top of each eye without applying reprojection to it. Return nullptr to render head locked stereo layers into the same render target as other layer types, in which case InOutViewport must not be modified.
|
inlineprotectedvirtual |
Implement this method to override the render target for scene based stereo layers.
Return nullptr to render stereo layers into the normal render target passed to the stereo layers scene view extension, in which case OutViewport must not be modified.
|
overridevirtual |
Return a pointer to the SpectatorScreenController for the HMD if supported, else null.
The controller is owned by the HMD, and will be destroyed when the HMD is destroyed.
重载 IHeadMountedDisplay .
|
protectedvirtual |
Called by RecordAnalytics when creating the analytics event sent during HMD initialization.
Return false to disable recording the analytics event
|
overridevirtual |
Can be used to enforce tracking even when stereo rendering is disabled.
The default implementation does not allow enforcing tracking and ignores the argument.
重载 IXRTrackingSystem .