XRPose
Inherits: RefCounted < Object
Description
Section titled “Description”This object contains all data related to a pose on a tracked object.
XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| Vector3 | angular_velocity |
Vector3(0, 0, 0) |
| bool | has_tracking_data |
false |
| Vector3 | linear_velocity |
Vector3(0, 0, 0) |
| StringName | name |
&"" |
| TrackingConfidence | tracking_confidence |
0 |
| Transform3D | transform |
Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| Transform3D | get_adjusted_transform() const |
Enumerations
Section titled “Enumerations”TrackingConfidence
enum TrackingConfidence
XR_TRACKING_CONFIDENCE_NONE = 0
No tracking information is available for this pose.
XR_TRACKING_CONFIDENCE_LOW = 1
Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
XR_TRACKING_CONFIDENCE_HIGH = 2
Tracking information is considered accurate and up to date.
Property descriptions
Section titled “Property descriptions”angular_velocity
Vector3 angular_velocity = Vector3(0, 0, 0)
The angular velocity for this pose.
has_tracking_data
bool has_tracking_data = false
If true our tracking data is up to date. If false we’re no longer receiving new tracking data and our state is whatever that last valid state was.
linear_velocity
Vector3 linear_velocity = Vector3(0, 0, 0)
The linear velocity of this pose.
name
StringName name = &""
The name of this pose. Usually, this name is derived from an action map set up by the user. Orblit also suggests some pose names that XRInterface objects are expected to implement:
-
rootis the root location, often used for tracked objects that do not have further nodes. -
aimis the tip of a controller with its orientation pointing outwards, often used for raycasts. -
gripis the location where the user grips the controller. -
skeletonis the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.
tracking_confidence
TrackingConfidence tracking_confidence = 0
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
transform
Transform3D transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
The transform containing the original and transform as reported by the XR runtime.
Method descriptions
Section titled “Method descriptions”get_adjusted_transform
Transform3D get_adjusted_transform() const
Returns the transform with world scale and our reference frame applied. This is the transform used to position XREntity3D objects.
