Skip to content

Camera ​

Introduction ​

The WebGPU backend view node for a vtkCamera.

Methods ​

convertToOpenGLDepth ​

Convert a WebGPU depth value into the equivalent OpenGL depth value.

ArgumentTypeRequiredDescription
valYes

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUCamera characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUCameraInitialValuesNo(default: {})

getKeyMatrices ​

Recompute the view/projection matrices if the camera, the renderer, the render window or the stabilized center changed since the last call.

ArgumentTypeRequiredDescription
webGPURenderervtkWebGPURendererYes

getKeyMatrixTime ​

The time stamp guarding the cached key matrices.

getProjectionMatrix ​

Fill the given matrix with the WebGPU projection matrix, whose depth range is [0, 1] rather than the OpenGL [-1, 1].

ArgumentTypeRequiredDescription
outMatYesthe 4x4 matrix to write into
aspectYesthe viewport aspect ratio
cRangeYesthe clipping range
windowCenterYesthe normalized window center

newInstance ​

Method used to create a new instance of vtkWebGPUCamera.

ArgumentTypeRequiredDescription
initialValuesIWebGPUCameraInitialValuesNofor pre-setting some of its content

setKeyMatrixTime ​

ArgumentTypeRequiredDescription
keyMatrixTimeYes