Class XRPlatform
Factory to create Timer objects.
Inheritance
Inherited Members
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public abstract class XRPlatform : Service, IDependencyObject, IGetNativePointers
Constructors
XRPlatform()
Initializes a new instance of the XRPlatform class.
Declaration
public XRPlatform()
Fields
AssetsService
Gets the assets service.
Declaration
[BindService(true)]
public AssetsService AssetsService
Field Value
Type | Description |
---|---|
AssetsService |
eyeGaze
The eye gaze view.
Declaration
protected Ray? eyeGaze
Field Value
Type | Description |
---|---|
Ray? |
eyeProperties
Array of eye properties.
Declaration
protected ViewProperties[] eyeProperties
Field Value
Type | Description |
---|---|
ViewProperties[] |
headGaze
The head gaze attribute.
Declaration
protected Ray headGaze
Field Value
Type | Description |
---|---|
Ray |
mirrorDisplay
The mirrored display attribute.
Declaration
protected Display mirrorDisplay
Field Value
Type | Description |
---|---|
Display |
msaaSampleCount
Filters MSAA sample count attribute.
Declaration
protected TextureSampleCount msaaSampleCount
Field Value
Type | Description |
---|---|
TextureSampleCount |
screenContextManager
Gets the screen context manager.
Declaration
[BindService(true)]
protected ScreenContextManager screenContextManager
Field Value
Type | Description |
---|---|
ScreenContextManager |
trackingState
The tracking space attribute.
Declaration
protected XRTrackingState trackingState
Field Value
Type | Description |
---|---|
XRTrackingState |
Properties
AvailablePointerKeys
Gets a list of all available keys to obtain native pointers.
Declaration
public virtual IEnumerable<string> AvailablePointerKeys { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Display
Gets the display provided by this XR device.
Declaration
public abstract Display Display { get; }
Property Value
Type | Description |
---|---|
Display |
EyeCount
Gets the number of eyes required by this device to view.
Declaration
public virtual int EyeCount { get; }
Property Value
Type | Description |
---|---|
int |
EyeGaze
Gets the eye gaze or null if it is not available. Eye gaze represents the direction in which the user's eyes are looking.
Declaration
public Ray? EyeGaze { get; }
Property Value
Type | Description |
---|---|
Ray? |
FarClipDistance
Gets or sets the distance to the far clipping plane of the view.
Declaration
public float FarClipDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
FeaturePoints
Gets the feature points.
Declaration
public virtual XRFeaturePoints FeaturePoints { get; }
Property Value
Type | Description |
---|---|
XRFeaturePoints |
HeadGaze
Gets the head gaze, representing the direction in which the user's head is pointed.
Declaration
public Ray HeadGaze { get; }
Property Value
Type | Description |
---|---|
Ray |
InputTracking
Gets the input tracking.
Declaration
public abstract XRInputTracking InputTracking { get; }
Property Value
Type | Description |
---|---|
XRInputTracking |
IsEyeGazeValid
Gets a value indicating whether the eye gaze is valid. It may be invalid due to timeout, lack of tracking hardware, or permissions.
Declaration
public bool IsEyeGazeValid { get; }
Property Value
Type | Description |
---|---|
bool |
LightEstimation
Gets the light estimation information.
Declaration
public virtual XRLightEstimation LightEstimation { get; }
Property Value
Type | Description |
---|---|
XRLightEstimation |
MSAASampleCount
Gets or sets the MSAA filter sample count.
Declaration
public TextureSampleCount MSAASampleCount { get; set; }
Property Value
Type | Description |
---|---|
TextureSampleCount |
MirrorDisplay
Gets or sets the mirror display.
Declaration
public Display MirrorDisplay { get; set; }
Property Value
Type | Description |
---|---|
Display |
MirrorHMDTexture
Gets or sets a value indicating whether this device should mirror the HMD texture.
Declaration
public bool MirrorHMDTexture { get; set; }
Property Value
Type | Description |
---|---|
bool |
NearClipDistance
Gets or sets the view's near clip distance.
Declaration
public float NearClipDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
Passthrough
Gets the pass-through manager.
Declaration
public virtual XRPassthrough Passthrough { get; }
Property Value
Type | Description |
---|---|
XRPassthrough |
RenderMirrorTexture
Gets or sets a value indicating whether the HMD images will be rendered into the mirror display.
Declaration
public virtual bool RenderMirrorTexture { get; set; }
Property Value
Type | Description |
---|---|
bool |
RenderableModels
Gets the renderable models.
Declaration
public virtual XRRenderableModels RenderableModels { get; }
Property Value
Type | Description |
---|---|
XRRenderableModels |
SpatialAnchorStore
Gets the spatial anchor store.
Declaration
public virtual SpatialAnchorStore SpatialAnchorStore { get; }
Property Value
Type | Description |
---|---|
SpatialAnchorStore |
SpatialInputManager
Gets the spatial input manager.
Declaration
public virtual XRSpatialInputManager SpatialInputManager { get; }
Property Value
Type | Description |
---|---|
XRSpatialInputManager |
TrackableItems
Gets the collection of trackable items.
Declaration
public virtual XRTrackableItems TrackableItems { get; }
Property Value
Type | Description |
---|---|
XRTrackableItems |
TrackingState
Gets the current tracking state.
Declaration
public XRTrackingState TrackingState { get; }
Property Value
Type | Description |
---|---|
XRTrackingState |
Methods
CreateSpatialMappingObserver()
Creates a spatial mapping observer if it is available for this XR device.
Declaration
public virtual SpatialMappingObserver CreateSpatialMappingObserver()
Returns
Type | Description |
---|---|
SpatialMappingObserver | The spatial mapping observer. |
GetNativePointer(string, out nint)
Obtains a native pointer for this graphics context using the given key.
Declaration
public virtual bool GetNativePointer(string pointerKey, out nint nativePointer)
Parameters
Type | Name | Description |
---|---|---|
string | pointerKey | The pointer key. |
nint | nativePointer | The native pointer. |
Returns
Type | Description |
---|---|
bool | True if there is an available pointer with this key. |
InternalUpdate()
Updates the XR device and all properties.
Declaration
protected abstract void InternalUpdate()
MirrorDisplayUpdated()
Updates the mirror display.
Declaration
protected virtual void MirrorDisplayUpdated()
RefreshMSAA()
Refreshes the MSAA sample count.
Declaration
protected virtual void RefreshMSAA()
RequestEyeGazePermission()
Request permission for eye gaze.
Declaration
public virtual Task<bool> RequestEyeGazePermission()
Returns
Type | Description |
---|---|
Task<bool> | True if the permission is granted, false otherwise. |
Update()
Renders the method of the XR device.
Declaration
public void Update()
UpdateCameras()
Updates the camera properties of the entire application to render in XR.
Declaration
protected virtual void UpdateCameras()