XRRigidTransform class

The is a WebXR API interface that represents the 3D geometric transform described by a position and orientation. is used to specify transforms throughout the WebXR APIs, including:

The offset and orientation relative to the parent reference space to use when creating a new reference space with getOffsetReferenceSpace(). The transform of an XRView. The transform of an XRPose. The XRReferenceSpaceEvent event's transform property, as found in the reset event received by an XRReferenceSpace.

Using in these places rather than bare arrays that provide the matrix data has an advantage. It automatically computes the inverse of the transform and even caches it making subsequent requests significantly faster.

Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

XRRigidTransform([DOMPointInit? position, DOMPointInit? orientation])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited