reckfellENGINE

XRInterfaceExtension

Base class for XR interface extensions (plugins).

On this page
class XRInterfaceExtensionReckfellSharpInherits XRInterface

Base class for XR interface extensions (plugins).

External XR interface plugins should inherit from this class.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

XRInterfaceExtensionConstructor
# XRInterfaceExtension
C#
public XRInterfaceExtension();

Methods39

AddBlitvoid
# AddBlit
C#
public void AddBlit(Rid renderTarget, Rect2 srcRect, Rect2I dstRect, bool useLayer, uint layer, bool applyLensDistortion, Vector2 eyeCenter, double k1, double k2, double upscale, double aspectRatio);

Blits our render results to screen optionally applying lens distortion. This can only be called while processing _commit_views.

Parameters
NameTypeDefault
renderTargetRid—
srcRectRect2—
dstRectRect2I—
useLayerbool—
layeruint—
applyLensDistortionbool—
eyeCenterVector2—
k1double—
k2double—
upscaledouble—
aspectRatiodouble—
GetColorTextureRid
# GetColorTexture
C#
public Rid GetColorTexture();

Return color texture into which to render (if applicable).

Returns Rid
GetDepthTextureRid
# GetDepthTexture
C#
public Rid GetDepthTexture();

Return depth texture into which to render (if applicable).

Returns Rid
GetRenderTargetTextureRid
# GetRenderTargetTexture
C#
public Rid GetRenderTargetTexture(Rid renderTarget);

Returns a valid Rid for a texture to which we should render the current frame if supported by the interface.

Parameters
NameTypeDefault
renderTargetRid—
Returns Rid
GetVelocityTextureRid
# GetVelocityTexture
C#
public Rid GetVelocityTexture();

Return velocity texture into which to render (if applicable).

Returns Rid
_EndFramevoid
# _EndFrame
C#
public virtual void _EndFrame();

Called if interface is active and queues have been submitted.

_GetAnchorDetectionIsEnabledbool
# _GetAnchorDetectionIsEnabled
C#
public virtual bool _GetAnchorDetectionIsEnabled();

Return true if anchor detection is enabled for this interface.

Returns bool
_GetCameraFeedIdint
# _GetCameraFeedId
C#
public virtual int _GetCameraFeedId();

Returns the camera feed ID for the CameraFeed registered with the CameraServer that should be presented as the background on an AR capable device (if applicable).

Returns int
_GetCameraOffsetsReckfell.Collections.Array<Transform3D>
# _GetCameraOffsets
C#
public virtual Reckfell.Collections.Array<Transform3D> _GetCameraOffsets(StringName trackerName);

Gets an array of offset transforms for each view for tracker tracker_name. tracker_name must refer to an XRPositionalTracker used as a camera. Returns an empty array if this interface is not responsible for this tracker.

Parameters
NameTypeDefault
trackerNameStringName—
Returns Reckfell.Collections.Array<Transform3D>
_GetCameraProjectionsReckfell.Collections.Array<Projection>
# _GetCameraProjections
C#
public virtual Reckfell.Collections.Array<Projection> _GetCameraProjections(StringName trackerName, double aspect, double zNear, double zFar);

Gets an array of projection matrices for each view for tracker tracker_name. tracker_name must refer to an XRPositionalTracker used as a camera. Returns an empty array if this interface is not responsible for this tracker.

Parameters
NameTypeDefault
trackerNameStringName—
aspectdouble—
zNeardouble—
zFardouble—
Returns Reckfell.Collections.Array<Projection>
_GetCameraTransformTransform3D
# _GetCameraTransform
C#
public virtual Transform3D _GetCameraTransform();

Returns the Transform3D that positions the XRCamera3D in the world.

Returns Transform3D
_GetCapabilitiesuint
# _GetCapabilities
C#
public virtual uint _GetCapabilities();

Returns the capabilities of this interface.

Returns uint
_GetColorTextureRid
# _GetColorTexture
C#
public virtual Rid _GetColorTexture();

Return color texture into which to render (if applicable).

Returns Rid
_GetDepthTextureRid
# _GetDepthTexture
C#
public virtual Rid _GetDepthTexture();

Return depth texture into which to render (if applicable).

Returns Rid
_GetNameStringName
# _GetName
C#
public virtual StringName _GetName();

Returns the name of this interface.

Returns StringName
_GetPlayAreaVector3[]
# _GetPlayArea
C#
public virtual Vector3[] _GetPlayArea();

Returns a Vector3[] that represents the play areas boundaries (if applicable).

Returns Vector3[]
_GetPlayAreaModeXRInterface.PlayAreaMode
# _GetPlayAreaMode
C#
public virtual XRInterface.PlayAreaMode _GetPlayAreaMode();

Returns the play area mode that sets up our play area.

Returns XRInterface.PlayAreaMode
_GetProjectionForViewdouble[] · Deprecated
# _GetProjectionForView
C#
public virtual double[] _GetProjectionForView(uint view, double aspect, double zNear, double zFar);

Returns the projection matrix for the given view as a double[].

Parameters
NameTypeDefault
viewuint—
aspectdouble—
zNeardouble—
zFardouble—
Returns double[]
_GetRenderTargetSizeVector2
# _GetRenderTargetSize
C#
public virtual Vector2 _GetRenderTargetSize();

Returns the size of our render target for this interface, this overrides the size of the Viewport marked as the xr viewport.

Returns Vector2
_GetSuggestedPoseNamesstring[]
# _GetSuggestedPoseNames
C#
public virtual string[] _GetSuggestedPoseNames(StringName trackerName);

Returns a string[] with pose names configured by this interface. Note that user configuration can override this list.

Parameters
NameTypeDefault
trackerNameStringName—
Returns string[]
_GetSuggestedTrackerNamesstring[]
# _GetSuggestedTrackerNames
C#
public virtual string[] _GetSuggestedTrackerNames();

Returns a string[] with tracker names configured by this interface. Note that user configuration can override this list.

Returns string[]
_GetSystemInfoReckfell.Collections.Dictionary
# _GetSystemInfo
C#
public virtual Reckfell.Collections.Dictionary _GetSystemInfo();

Returns a Reckfell.Collections.Dictionary with system information related to this interface.

Returns Reckfell.Collections.Dictionary
_GetTrackingStatusXRInterface.TrackingStatus
# _GetTrackingStatus
C#
public virtual XRInterface.TrackingStatus _GetTrackingStatus();

Returns the current status of our tracking.

Returns XRInterface.TrackingStatus
_GetTransformForViewTransform3D · Deprecated
# _GetTransformForView
C#
public virtual Transform3D _GetTransformForView(uint view, Transform3D camTransform);

Returns a Transform3D for a given view.

Parameters
NameTypeDefault
viewuint—
camTransformTransform3D—
Returns Transform3D
_GetVelocityTextureRid
# _GetVelocityTexture
C#
public virtual Rid _GetVelocityTexture();

Return velocity texture into which to render (if applicable).

Returns Rid
_GetViewCountuint
# _GetViewCount
C#
public virtual uint _GetViewCount();

Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.

Returns uint
_GetVrsTextureRid
# _GetVrsTexture
C#
public virtual Rid _GetVrsTexture();
Returns Rid
_GetVrsTextureFormatXRInterface.VrsTextureFormat
# _GetVrsTextureFormat
C#
public virtual XRInterface.VrsTextureFormat _GetVrsTextureFormat();

Returns the format of the texture returned by XRInterfaceExtension._GetVrsTexture.

Returns XRInterface.VrsTextureFormat
_Initializebool
# _Initialize
C#
public virtual bool _Initialize();

Initializes the interface, returns true on success.

Returns bool
_IsInitializedbool
# _IsInitialized
C#
public virtual bool _IsInitialized();

Returns true if this interface has been initialized.

Returns bool
_PostDrawViewportvoid
# _PostDrawViewport
C#
public virtual void _PostDrawViewport(Rid renderTarget, Rect2 screenRect);

Called after the XR Viewport draw logic has completed.

Parameters
NameTypeDefault
renderTargetRid—
screenRectRect2—
_PreDrawViewportbool
# _PreDrawViewport
C#
public virtual bool _PreDrawViewport(Rid renderTarget);

Called if this is our primary XRInterfaceExtension before we start processing a Viewport for every active XR Viewport, returns true if that viewport should be rendered. An XR interface may return false if the user has taken off their headset and we can pause rendering.

Parameters
NameTypeDefault
renderTargetRid—
Returns bool
_PreRendervoid
# _PreRender
C#
public virtual void _PreRender();

Called if this XRInterfaceExtension is active before rendering starts. Most XR interfaces will sync tracking at this point in time.

_Processvoid
# _Process
C#
public virtual void _Process();

Called if this XRInterfaceExtension is active before our physics and game process is called. Most XR interfaces will update its XRPositionalTrackers at this point in time.

_SetAnchorDetectionIsEnabledvoid
# _SetAnchorDetectionIsEnabled
C#
public virtual void _SetAnchorDetectionIsEnabled(bool enabled);

Enables anchor detection on this interface if supported.

Parameters
NameTypeDefault
enabledbool—
_SetPlayAreaModebool
# _SetPlayAreaMode
C#
public virtual bool _SetPlayAreaMode(XRInterface.PlayAreaMode mode);

Set the play area mode for this interface.

Parameters
NameTypeDefault
modeXRInterface.PlayAreaMode—
Returns bool
_SupportsPlayAreaModebool
# _SupportsPlayAreaMode
C#
public virtual bool _SupportsPlayAreaMode(XRInterface.PlayAreaMode mode);

Returns true if this interface supports this play area mode.

Parameters
NameTypeDefault
modeXRInterface.PlayAreaMode—
Returns bool
_TriggerHapticPulsevoid
# _TriggerHapticPulse
C#
public virtual void _TriggerHapticPulse(string actionName, StringName trackerName, double frequency, double amplitude, double durationSec, double delaySec);

Triggers a haptic pulse to be emitted on the specified tracker.

Parameters
NameTypeDefault
actionNamestring—
trackerNameStringName—
frequencydouble—
amplitudedouble—
durationSecdouble—
delaySecdouble—
_Uninitializevoid
# _Uninitialize
C#
public virtual void _Uninitialize();

Uninitialize the interface.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.