Table of Contents

Class XRCPUDepthInformation

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The XRCPUDepthInformation interface contains depth information from the CPU (returned by GetDepthInformation(XRView)).
[Value("XRCPUDepthInformation")]
public class XRCPUDepthInformation : XRDepthInformation
Inheritance
XRCPUDepthInformation
Inherited Members

Remarks

Constructors

XRCPUDepthInformation()

public XRCPUDepthInformation()

Properties

Data

NOTE
Experimental
The read-only data property of the XRCPUDepthInformation interface is an {{jsxref("ArrayBuffer")}} containing depth-buffer information in raw format.
[Value("data")]
public ArrayBuffer Data { get; }

Property Value

ArrayBuffer

An ArrayBuffer.

Remarks

The data is stored in row-major format, without padding, with each entry corresponding to distance from the view's near plane to the users' environment, in unspecified units. The size of each data entry and the type is determined by DepthDataFormat. The values can be converted from unspecified units to meters by multiplying them by RawValueToMeters. The NormDepthBufferFromNormView property can be used to transform from normalized view coordinates (an origin in the top left corner of the view, with X axis growing to the right, and Y axis growing downward) into the depth buffer's coordinate system.

See also on MDN

Methods

GetDepthInMeters(Number, Number)

NOTE
Experimental
The getDepthInMeters() method of the XRCPUDepthInformation interface returns the depth in meters at (x, y) in normalized view coordinates (origin in the top left corner).
[Value("getDepthInMeters")]
public Number GetDepthInMeters(Number x, Number y)

Parameters

x Number
y Number

Returns

Number

None (GlobalObject.Undefined).

Remarks