virtualx-engine/modules/openxr/doc_classes/OpenXRAction.xml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
2.5 KiB
XML
Raw Normal View History

2021-12-14 02:44:12 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OpenXRAction" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2021-12-14 02:44:12 +01:00
<brief_description>
An OpenXR action.
</brief_description>
<description>
This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics).
OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return [code]false[/code] if the trigger is depressed and [code]true[/code] if pressed fully.
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 [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved]reserved path section in the OpenXR specification[/url] for more info on the top level paths.
2021-12-14 02:44:12 +01:00
Note that the name of the resource is used to register the action with.
</description>
<tutorials>
</tutorials>
<members>
<member name="action_type" type="int" setter="set_action_type" getter="get_action_type" enum="OpenXRAction.ActionType" default="1">
The type of action.
</member>
<member name="localized_name" type="String" setter="set_localized_name" getter="get_localized_name" default="&quot;&quot;">
The localized description of this action.
2021-12-14 02:44:12 +01:00
</member>
<member name="toplevel_paths" type="PackedStringArray" setter="set_toplevel_paths" getter="get_toplevel_paths" default="PackedStringArray()">
A collections of toplevel paths to which this action can be bound.
</member>
</members>
<constants>
<constant name="OPENXR_ACTION_BOOL" value="0" enum="ActionType">
This action provides a boolean value.
</constant>
<constant name="OPENXR_ACTION_FLOAT" value="1" enum="ActionType">
This action provides a float value between [code]0.0[/code] and [code]1.0[/code] for any analog input such as triggers.
2021-12-14 02:44:12 +01:00
</constant>
<constant name="OPENXR_ACTION_VECTOR2" value="2" enum="ActionType">
2023-03-09 07:56:23 +01:00
This action provides a [Vector2] value and can be bound to embedded trackpads and joysticks.
2021-12-14 02:44:12 +01:00
</constant>
<constant name="OPENXR_ACTION_POSE" value="3" enum="ActionType">
</constant>
</constants>
</class>