mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
246 lines
10 KiB
ReStructuredText
246 lines
10 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRPose.xml.
|
|
|
|
.. _class_XRPose:
|
|
|
|
XRPose
|
|
======
|
|
|
|
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
This object contains all data related to a pose on a tracked object.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`XR documentation index <../tutorials/xr/index>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_XRPose_property_angular_velocity>` | ``Vector3(0, 0, 0)`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_tracking_data<class_XRPose_property_has_tracking_data>` | ``false`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_XRPose_property_linear_velocity>` | ``Vector3(0, 0, 0)`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`StringName<class_StringName>` | :ref:`name<class_XRPose_property_name>` | ``&""`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` | :ref:`tracking_confidence<class_XRPose_property_tracking_confidence>` | ``0`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
| :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_XRPose_property_transform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
|
|
+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Methods
|
|
-------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------------+-----------------------------------------------------------------------------------------+
|
|
| :ref:`Transform3D<class_Transform3D>` | :ref:`get_adjusted_transform<class_XRPose_method_get_adjusted_transform>`\ (\ ) |const| |
|
|
+---------------------------------------+-----------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_XRPose_TrackingConfidence:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **TrackingConfidence**: :ref:`🔗<enum_XRPose_TrackingConfidence>`
|
|
|
|
.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_NONE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` **XR_TRACKING_CONFIDENCE_NONE** = ``0``
|
|
|
|
No tracking information is available for this pose.
|
|
|
|
.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_LOW:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` **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.
|
|
|
|
.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_HIGH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` **XR_TRACKING_CONFIDENCE_HIGH** = ``2``
|
|
|
|
Tracking information is considered accurate and up to date.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_XRPose_property_angular_velocity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_XRPose_property_angular_velocity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
|
- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ )
|
|
|
|
The angular velocity for this pose.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_XRPose_property_has_tracking_data:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **has_tracking_data** = ``false`` :ref:`🔗<class_XRPose_property_has_tracking_data>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_has_tracking_data**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_has_tracking_data**\ (\ )
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_XRPose_property_linear_velocity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_XRPose_property_linear_velocity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
|
- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ )
|
|
|
|
The linear velocity of this pose.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_XRPose_property_name:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`StringName<class_StringName>` **name** = ``&""`` :ref:`🔗<class_XRPose_property_name>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_name**\ (\ value\: :ref:`StringName<class_StringName>`\ )
|
|
- :ref:`StringName<class_StringName>` **get_name**\ (\ )
|
|
|
|
The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that :ref:`XRInterface<class_XRInterface>` objects are expected to implement:
|
|
|
|
- ``root`` is the root location, often used for tracked objects that do not have further nodes.
|
|
|
|
- ``aim`` is the tip of a controller with its orientation pointing outwards, often used for raycasts.
|
|
|
|
- ``grip`` is the location where the user grips the controller.
|
|
|
|
- ``skeleton`` is the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_XRPose_property_tracking_confidence:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` **tracking_confidence** = ``0`` :ref:`🔗<class_XRPose_property_tracking_confidence>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_tracking_confidence**\ (\ value\: :ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>`\ )
|
|
- :ref:`TrackingConfidence<enum_XRPose_TrackingConfidence>` **get_tracking_confidence**\ (\ )
|
|
|
|
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_XRPose_property_transform:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_XRPose_property_transform>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
|
|
- :ref:`Transform3D<class_Transform3D>` **get_transform**\ (\ )
|
|
|
|
The transform containing the original and transform as reported by the XR runtime.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_XRPose_method_get_adjusted_transform:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Transform3D<class_Transform3D>` **get_adjusted_transform**\ (\ ) |const| :ref:`🔗<class_XRPose_method_get_adjusted_transform>`
|
|
|
|
Returns the :ref:`transform<class_XRPose_property_transform>` with world scale and our reference frame applied. This is the transform used to position :ref:`XRNode3D<class_XRNode3D>` objects.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
|
.. |void| replace:: :abbr:`void (No return value.)`
|