class_openxraction.rst 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRAction.xml.
  6. .. _class_OpenXRAction:
  7. OpenXRAction
  8. ============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. An OpenXR action.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, etc.) and outputs (haptics).
  15. OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return ``false`` if the trigger is depressed and ``true`` if pressed fully.
  16. Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the `reserved path section in the OpenXR specification <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved>`__ for more info on the top level paths.
  17. Note that the name of the resource is used to register the action with.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
  24. | :ref:`ActionType<enum_OpenXRAction_ActionType>` | :ref:`action_type<class_OpenXRAction_property_action_type>` | ``1`` |
  25. +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
  26. | :ref:`String<class_String>` | :ref:`localized_name<class_OpenXRAction_property_localized_name>` | ``""`` |
  27. +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
  28. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`toplevel_paths<class_OpenXRAction_property_toplevel_paths>` | ``PackedStringArray()`` |
  29. +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
  30. .. rst-class:: classref-section-separator
  31. ----
  32. .. rst-class:: classref-descriptions-group
  33. Enumerations
  34. ------------
  35. .. _enum_OpenXRAction_ActionType:
  36. .. rst-class:: classref-enumeration
  37. enum **ActionType**: :ref:`🔗<enum_OpenXRAction_ActionType>`
  38. .. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL:
  39. .. rst-class:: classref-enumeration-constant
  40. :ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_BOOL** = ``0``
  41. This action provides a boolean value.
  42. .. _class_OpenXRAction_constant_OPENXR_ACTION_FLOAT:
  43. .. rst-class:: classref-enumeration-constant
  44. :ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_FLOAT** = ``1``
  45. This action provides a float value between ``0.0`` and ``1.0`` for any analog input such as triggers.
  46. .. _class_OpenXRAction_constant_OPENXR_ACTION_VECTOR2:
  47. .. rst-class:: classref-enumeration-constant
  48. :ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_VECTOR2** = ``2``
  49. This action provides a :ref:`Vector2<class_Vector2>` value and can be bound to embedded trackpads and joysticks.
  50. .. _class_OpenXRAction_constant_OPENXR_ACTION_POSE:
  51. .. rst-class:: classref-enumeration-constant
  52. :ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_POSE** = ``3``
  53. .. container:: contribute
  54. There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  55. .. rst-class:: classref-section-separator
  56. ----
  57. .. rst-class:: classref-descriptions-group
  58. Property Descriptions
  59. ---------------------
  60. .. _class_OpenXRAction_property_action_type:
  61. .. rst-class:: classref-property
  62. :ref:`ActionType<enum_OpenXRAction_ActionType>` **action_type** = ``1`` :ref:`🔗<class_OpenXRAction_property_action_type>`
  63. .. rst-class:: classref-property-setget
  64. - |void| **set_action_type**\ (\ value\: :ref:`ActionType<enum_OpenXRAction_ActionType>`\ )
  65. - :ref:`ActionType<enum_OpenXRAction_ActionType>` **get_action_type**\ (\ )
  66. The type of action.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_OpenXRAction_property_localized_name:
  70. .. rst-class:: classref-property
  71. :ref:`String<class_String>` **localized_name** = ``""`` :ref:`🔗<class_OpenXRAction_property_localized_name>`
  72. .. rst-class:: classref-property-setget
  73. - |void| **set_localized_name**\ (\ value\: :ref:`String<class_String>`\ )
  74. - :ref:`String<class_String>` **get_localized_name**\ (\ )
  75. The localized description of this action.
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_OpenXRAction_property_toplevel_paths:
  79. .. rst-class:: classref-property
  80. :ref:`PackedStringArray<class_PackedStringArray>` **toplevel_paths** = ``PackedStringArray()`` :ref:`🔗<class_OpenXRAction_property_toplevel_paths>`
  81. .. rst-class:: classref-property-setget
  82. - |void| **set_toplevel_paths**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ )
  83. - :ref:`PackedStringArray<class_PackedStringArray>` **get_toplevel_paths**\ (\ )
  84. A collections of toplevel paths to which this action can be bound.
  85. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details.
  86. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  87. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  88. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  89. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  90. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  91. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  92. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  93. .. |void| replace:: :abbr:`void (No return value.)`