Function: transformRgbUvToWorld()
transformRgbUvToWorld(
rgbUv,depthArray,viewProjectionMatrix,matrixWorld,xrDeviceCamera?,xrDepth?):null|Vector3
Defined in: src/camera/CameraUtils.ts:138
Retrieves the world space position of a given RGB UV coordinate. Note: it is essential that the coordinates, depth array, and projection matrix all correspond to the same view ID (e.g., 0 for left). It is also advised that all of these are obtained at the same time.
Parameters
rgbUv
The RGB UV coordinate, e.g., { u: 0.5, v: 0.5 }.
u
number
v
number
depthArray
Array containing depth data.
number[] | Uint16Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>
viewProjectionMatrix
XRView object with corresponding projection matrix.
matrixWorld
Matrix for view-to-world translation.
xrDeviceCamera?
The device camera instance.
xrDepth?
The SDK's Depth module.
undefined | Depth
Returns
null | Vector3
Vertex at (u, v) in world space.