Skip to content

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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebXRRenderWindowHelperInitialValuesNo(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.

ArgumentTypeRequiredDescription
initialValuesIWebXRRenderWindowHelperInitialValuesNofor pre-setting some of its content

resetXRScene ​

Adjust world-to-physical parameters for different viewing modalities

ArgumentTypeRequiredDescription
inputRescaleFactorNumberYes
inputTranslateZNumberYes

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