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.
Declaration
protected Ray? eyeGaze
Field Value
Type | Description |
---|---|
Ray? |
eyeProperties
Eye properties array.
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 mirror display attribute.
Declaration
protected Display mirrorDisplay
Field Value
Type | Description |
---|---|
Display |
msaaSampleCount
Filter 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 needed by this device to draw.
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 that the user's eyes are looking towards.
Declaration
public Ray? EyeGaze { get; }
Property Value
Type | Description |
---|---|
Ray? |
FarClipDistance
Gets or sets the view far clip distance.
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. Represents the direction that the user's head is pointed in.
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 or lack of tracking hardware or permissions.
Declaration
public bool IsEyeGazeValid { get; }
Property Value
Type | Description |
---|---|
bool |
LightEstimation
Gets the light estimation info.
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 near clip distance.
Declaration
public float NearClipDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
Passthrough
Gets the passthrough 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 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 trackable item collection.
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's available for this XR device.
Declaration
public virtual SpatialMappingObserver CreateSpatialMappingObserver()
Returns
Type | Description |
---|---|
SpatialMappingObserver | The spatial mapping observer. |
GetNativePointer(string, out IntPtr)
Obtain a native pointer of this graphics context using the given key.
Declaration
public virtual bool GetNativePointer(string pointerKey, out IntPtr nativePointer)
Parameters
Type | Name | Description |
---|---|---|
string | pointerKey | The pointer key. |
IntPtr | nativePointer | The native pointer. |
Returns
Type | Description |
---|---|
bool | True if there are an available pointer with this key. |
InternalUpdate()
Update the XR device and all properties.
Declaration
protected abstract void InternalUpdate()
MirrorDisplayUpdated()
Update the mirror display.
Declaration
protected virtual void MirrorDisplayUpdated()
RefreshMSAA()
Refresh 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 in other case. |
Update()
Render method of the XR device.
Declaration
public void Update()
UpdateCameras()
Update camera properties of all application to render in XR.
Declaration
protected virtual void UpdateCameras()