Function: transformRgbUvToWorld()
transformRgbUvToWorld(
rgbUv,depthArray,projectionMatrix,matrixWorld,xrDeviceCamera?,xrDepth?):Vector3
Defined in: src/camera/CameraUtils.ts:148
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[] | Float32Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike>
projectionMatrix
XRView object with corresponding projection matrix.
matrixWorld
Rendering camera's model matrix.
xrDeviceCamera?
The device camera instance.
xrDepth?
The SDK's Depth module.
undefined | Depth
Returns
Vertex at (u, v) in world space.