Class XRPose
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
XRPose is a WebXR API interface representing a position and orientation in the 3D space, relative to the XRSpace within which it resides. The XRSpace—which is either an XRReferenceSpace or an XRBoundedReferenceSpace—defines the coordinate system used for the pose and, in the case of an XRViewerPose, its underlying views.
[Value("XRPose")]
public class XRPose
- Inheritance
-
XRPose
- Derived
- Inherited Members
Remarks
To obtain the XRPose for the XRSpace used as the local coordinate system of an object, call GetPose(XRSpace, XRSpace), specifying that local XRSpace and the space to which you wish to convert:
The pose for a viewer (or camera) is represented by the XRViewerPose subclass of XRPose. This is obtained using GetViewerPose(XRReferenceSpace) instead of getPose(), specifying a reference space which has been adjusted to position and orient the node to provide the desired viewing position and angle:
Here, adjReferenceSpace is a reference space which has been updated using the base frame of reference for the frame and any adjustments needed to position the viewer based on movement or rotation which is being supplied from a source other than the XR device, such as keyboard or mouse inputs.
See the article Movement, orientation, and motion for further details and an example with thorough explanations of what's going on.
Constructors
XRPose()
public XRPose()
Properties
AngularVelocity
The angularVelocity read-only property of the
XRPose interface is a DOMPointReadOnly describing
the angular velocity in radians per second relative to the base
XRSpace.
[Value("angularVelocity")]
public DOMPointReadOnly? AngularVelocity { get; }
Property Value
- DOMPointReadOnly
A DOMPointReadOnly describing the angular velocity in radians
per second relative to the base XRSpace. Returnsnull
if the user agent can't populate this value.
Remarks
EmulatedPosition
The emulatedPosition read-only attribute of the
XRPose interface is a Boolean value indicating whether or not both the
Position component of the pose's
Transform is directly taken from the XR device, or
it's simulated or computed based on other sources.
[Value("emulatedPosition")]
public bool EmulatedPosition { get; }
Property Value
- bool
A Boolean which is
trueif the pose's position is computed based on
estimates or is derived from sources other than direct sensor data. If the position is
precisely based on direct sensor inputs, the value isfalse.
Remarks
LinearVelocity
The linearVelocity read-only property of the
XRPose interface is a DOMPointReadOnly describing
the linear velocity in meters per second relative to the base
XRSpace.
[Value("linearVelocity")]
public DOMPointReadOnly? LinearVelocity { get; }
Property Value
- DOMPointReadOnly
A DOMPointReadOnly describing the linear velocity in meters
per second relative to the base XRSpace. Returnsnull
if the user agent can't populate this value.
Remarks
Transform
The transform read-only attribute of the
XRPose interface is a XRRigidTransform object providing
the position and orientation of the pose relative to the base XRSpace
as specified when the pose was obtained by calling
GetPose(XRSpace, XRSpace).
[Value("transform")]
public XRRigidTransform Transform { get; }
Property Value
- XRRigidTransform
An XRRigidTransform which provides the position and orientation of the
XRPose relative to the XRFrame to which thisXRPoseis aligned. This is the same pose that's returned by the frame's
GetPose(XRSpace, XRSpace) method.