RenderWindowHelper
Introduction
WebXR rendering helper
vtkWebXRRenderWindowHelper is designed to wrap a vtkRenderWindow for XR rendering.
Methods
enterXR
When an XR session is available, set up the XRWebGLLayer and request the first animation frame for the device
extend
Method used to decorate a given object (publicAPI+model) with vtkWebXRRenderWindowHelper characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IWebXRRenderWindowHelperInitialValues | No | (default: {}) |
getDrawControllersRay
Whether a ray is drawn from each tracked-pointer controller.
getRenderWindow
Get the underlying render window to drive XR rendering.
getXrSession
Get the active WebXR session.
getXrSupported
Whether the browser exposes the WebXR device API.
initialize
Initialize the instance.
invokeEvent
Invoke the generic event fired by this helper.
newInstance
Method used to create a new instance of vtkWebXRRenderWindowHelper.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebXRRenderWindowHelperInitialValues | No | for pre-setting some of its content |
onEvent
Subscribe to the generic event fired by this helper.
resetXRScene
Adjust world-to-physical parameters for different viewing modalities
| Argument | Type | Required | Description |
|---|---|---|---|
inputRescaleFactor | Number | Yes | |
inputTranslateZ | Number | Yes |
setDrawControllersRay
Set whether a ray is drawn from each tracked-pointer controller.
setRenderWindow
Set the underlying render window to drive XR rendering.
startXR
Request an XR session on the user device with WebXR, typically in response to a user request such as a button press.
stopXR
Request to stop the current XR session