Class XRCPUDepthInformation
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalXRCPUDepthInformation interface contains depth information from the CPU (returned by GetDepthInformation(XRView)).
[Value("XRCPUDepthInformation")]
public class XRCPUDepthInformation : XRDepthInformation
- Inheritance
-
XRCPUDepthInformation
- Inherited Members
Remarks
This interface inherits properties from its parent, XRDepthInformation.
-XRDepthInformation
-XRWebGLDepthInformation
-GetDepthInformation(XRView)
Constructors
XRCPUDepthInformation()
public XRCPUDepthInformation()
Properties
Data
NOTE
Experimentaldata property of the XRCPUDepthInformation interface is an {{jsxref("ArrayBuffer")}} containing depth-buffer information in raw format.
[Value("data")]
public ArrayBuffer Data { get; }
Property Value
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.
Methods
GetDepthInMeters(Number, Number)
NOTE
ExperimentalgetDepthInMeters() 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
Returns
- Number
None (GlobalObject.Undefined).