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: {}) |
getRenderWindow
Get the underlying render window to drive XR rendering.
getXrSession
Get the active WebXR session.
initialize
Initialize the instance.
newInstance
Method used to create a new instance of vtkWebXRRenderWindowHelper.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebXRRenderWindowHelperInitialValues | No | for pre-setting some of its content |
resetXRScene
Adjust world-to-physical parameters for different viewing modalities
| Argument | Type | Required | Description |
|---|---|---|---|
inputRescaleFactor | Number | Yes | |
inputTranslateZ | Number | Yes |
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