Documentation
¶
Overview ¶
This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, 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 false if the trigger is depressed and true 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 reserved path section in the OpenXR specification for more info on the top level paths.
Note that the name of the resource is used to register the action with.
Index ¶
- type ActionType
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) ActionType() ActionType
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsOpenXRAction() Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) ID() ID
- func (self Instance) LocalizedName() string
- func (self Instance) SetActionType(value ActionType)
- func (self Instance) SetLocalizedName(value string)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetToplevelPaths(value []string)
- func (self Instance) ToplevelPaths() []string
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType int //gd:OpenXRAction.ActionType
const ( // This action provides a boolean value. OpenxrActionBool ActionType = 0 // This action provides a float value between 0.0 and 1.0 for any analog input such as triggers. OpenxrActionFloat ActionType = 1 // This action provides a [Vector2.XY] value and can be bound to embedded trackpads and joysticks. OpenxrActionVector2 ActionType = 2 OpenxrActionPose ActionType = 3 )
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsOpenXRAction ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.OpenXRAction
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) ActionType ¶
func (self Instance) ActionType() ActionType
func (Instance) AsOpenXRAction ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) LocalizedName ¶
func (Instance) SetActionType ¶
func (self Instance) SetActionType(value ActionType)