Skip to content

RadialDistortionPass ​

Methods ​

buildVBO ​

Build the distorted grid the delegate output is drawn onto. The grid is two side-by-side halves, one per eye, whose texture coordinates carry the radial distortion. Also recomputes the render ratio from k1 and k2.

extend ​

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

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

getCameraCenterX1 ​

Get the x coordinate of the left half's distortion center, in normalized device coordinates.

getCameraCenterX2 ​

Get the x coordinate of the right half's distortion center, in normalized device coordinates.

getCameraCenterY ​

Get the y coordinate of the distortion center, in normalized device coordinates.

getFramebuffer ​

Get the framebuffer the delegate passes render into, or null before the first traversal.

getK1 ​

Get the second-order radial distortion coefficient.

getK2 ​

Get the fourth-order radial distortion coefficient.

newInstance ​

Method used to create a new instance of vtkRadialDistortionPass.

ArgumentTypeRequiredDescription
initialValuesIRadialDistortionPassInitialValuesNofor pre-setting some of its content

setCameraCenterX1 ​

Set the x coordinate of the left half's distortion center.

ArgumentTypeRequiredDescription
cameraCenterX1NumberYes

setCameraCenterX2 ​

Set the x coordinate of the right half's distortion center.

ArgumentTypeRequiredDescription
cameraCenterX2NumberYes

setCameraCenterY ​

Set the y coordinate of the distortion center.

ArgumentTypeRequiredDescription
cameraCenterYNumberYes

setK1 ​

Set the second-order radial distortion coefficient. With both k1 and k2 at zero the pass is a no-op and simply forwards to its delegates.

ArgumentTypeRequiredDescription
k1NumberYes

setK2 ​

Set the fourth-order radial distortion coefficient.

ArgumentTypeRequiredDescription
k2NumberYes