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.
| 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 | IRadialDistortionPassInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IRadialDistortionPassInitialValues | No | for pre-setting some of its content |
setCameraCenterX1
Set the x coordinate of the left half's distortion center.
| Argument | Type | Required | Description |
|---|---|---|---|
cameraCenterX1 | Number | Yes |
setCameraCenterX2
Set the x coordinate of the right half's distortion center.
| Argument | Type | Required | Description |
|---|---|---|---|
cameraCenterX2 | Number | Yes |
setCameraCenterY
Set the y coordinate of the distortion center.
| Argument | Type | Required | Description |
|---|---|---|---|
cameraCenterY | Number | Yes |
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.
| Argument | Type | Required | Description |
|---|---|---|---|
k1 | Number | Yes |
setK2
Set the fourth-order radial distortion coefficient.
| Argument | Type | Required | Description |
|---|---|---|---|
k2 | Number | Yes |