Documentation
¶
Overview ¶
Package OpenXRInterface provides methods for working with OpenXRInterface object instances.
Index ¶
- type Advanced
- type Any
- type Hand
- type HandJointFlags
- type HandJoints
- type HandMotionRange
- type HandTrackedSource
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsOpenXRInterface() Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsXRInterface() XRInterface.Instance
- func (self Instance) DisplayRefreshRate() Float.X
- func (self Instance) FoveationDynamic() bool
- func (self Instance) FoveationLevel() int
- func (self Instance) GetActionSets() []any
- func (self Instance) GetAvailableDisplayRefreshRates() []any
- func (self Instance) GetHandJointAngularVelocity(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
- func (self Instance) GetHandJointFlags(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) gdclass.OpenXRInterfaceHandJointFlags
- func (self Instance) GetHandJointLinearVelocity(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
- func (self Instance) GetHandJointPosition(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
- func (self Instance) GetHandJointRadius(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Float.X
- func (self Instance) GetHandJointRotation(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Quaternion.IJKX
- func (self Instance) GetHandTrackingSource(hand gdclass.OpenXRInterfaceHand) gdclass.OpenXRInterfaceHandTrackedSource
- func (self Instance) GetMotionRange(hand gdclass.OpenXRInterfaceHand) gdclass.OpenXRInterfaceHandMotionRange
- func (self Instance) IsActionSetActive(name string) bool
- func (self Instance) IsEyeGazeInteractionSupported() bool
- func (self Instance) IsFoveationSupported() bool
- func (self Instance) IsHandInteractionSupported() bool
- func (self Instance) IsHandTrackingSupported() bool
- func (self Instance) OnInstanceExiting(cb func())
- func (self Instance) OnPoseRecentered(cb func())
- func (self Instance) OnRefreshRateChanged(cb func(refresh_rate Float.X))
- func (self Instance) OnSessionBegun(cb func())
- func (self Instance) OnSessionFocussed(cb func())
- func (self Instance) OnSessionLossPending(cb func())
- func (self Instance) OnSessionStopping(cb func())
- func (self Instance) OnSessionVisible(cb func())
- func (self Instance) RenderTargetSizeMultiplier() Float.X
- func (self Instance) SetActionSetActive(name string, active bool)
- func (self Instance) SetDisplayRefreshRate(value Float.X)
- func (self Instance) SetFoveationDynamic(value bool)
- func (self Instance) SetFoveationLevel(value int)
- func (self Instance) SetMotionRange(hand gdclass.OpenXRInterfaceHand, ...)
- func (self Instance) SetRenderTargetSizeMultiplier(value Float.X)
- func (self Instance) SetVrsMinRadius(value Float.X)
- func (self Instance) SetVrsStrength(value Float.X)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) VrsMinRadius() Float.X
- func (self Instance) VrsStrength() Float.X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Hand ¶
type Hand = gdclass.OpenXRInterfaceHand //gd:OpenXRInterface.Hand
type HandJointFlags ¶
type HandJointFlags = gdclass.OpenXRInterfaceHandJointFlags //gd:OpenXRInterface.HandJointFlags
const ( /*No flags are set.*/ HandJointNone HandJointFlags = 0 /*If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.*/ HandJointOrientationValid HandJointFlags = 1 /*If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.*/ HandJointOrientationTracked HandJointFlags = 2 /*If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.*/ HandJointPositionValid HandJointFlags = 4 /*If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.*/ HandJointPositionTracked HandJointFlags = 8 /*If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.*/ HandJointLinearVelocityValid HandJointFlags = 16 /*If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.*/ HandJointAngularVelocityValid HandJointFlags = 32 )
type HandJoints ¶
type HandJoints = gdclass.OpenXRInterfaceHandJoints //gd:OpenXRInterface.HandJoints
const ( /*Palm joint.*/ HandJointPalm HandJoints = 0 /*Wrist joint.*/ HandJointWrist HandJoints = 1 /*Thumb metacarpal joint.*/ HandJointThumbMetacarpal HandJoints = 2 /*Thumb proximal joint.*/ HandJointThumbProximal HandJoints = 3 /*Thumb distal joint.*/ HandJointThumbDistal HandJoints = 4 /*Thumb tip joint.*/ HandJointThumbTip HandJoints = 5 /*Index metacarpal joint.*/ HandJointIndexMetacarpal HandJoints = 6 /*Index proximal joint.*/ HandJointIndexProximal HandJoints = 7 /*Index intermediate joint.*/ HandJointIndexIntermediate HandJoints = 8 /*Index distal joint.*/ HandJointIndexDistal HandJoints = 9 /*Index tip joint.*/ HandJointIndexTip HandJoints = 10 /*Middle metacarpal joint.*/ HandJointMiddleMetacarpal HandJoints = 11 /*Middle proximal joint.*/ HandJointMiddleProximal HandJoints = 12 /*Middle intermediate joint.*/ HandJointMiddleIntermediate HandJoints = 13 /*Middle distal joint.*/ HandJointMiddleDistal HandJoints = 14 /*Middle tip joint.*/ HandJointMiddleTip HandJoints = 15 /*Ring metacarpal joint.*/ HandJointRingMetacarpal HandJoints = 16 /*Ring proximal joint.*/ HandJointRingProximal HandJoints = 17 /*Ring intermediate joint.*/ HandJointRingIntermediate HandJoints = 18 /*Ring distal joint.*/ HandJointRingDistal HandJoints = 19 /*Ring tip joint.*/ HandJointRingTip HandJoints = 20 /*Little metacarpal joint.*/ HandJointLittleMetacarpal HandJoints = 21 /*Little proximal joint.*/ HandJointLittleProximal HandJoints = 22 /*Little intermediate joint.*/ HandJointLittleIntermediate HandJoints = 23 /*Little distal joint.*/ HandJointLittleDistal HandJoints = 24 /*Little tip joint.*/ HandJointLittleTip HandJoints = 25 /*Maximum value for the hand joint enum.*/ HandJointMax HandJoints = 26 )
type HandMotionRange ¶
type HandMotionRange = gdclass.OpenXRInterfaceHandMotionRange //gd:OpenXRInterface.HandMotionRange
const ( /*Full hand range, if user closes their hands, we make a full fist.*/ HandMotionRangeUnobstructed HandMotionRange = 0 /*Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.*/ HandMotionRangeConformToController HandMotionRange = 1 /*Maximum value for the motion range enum.*/ HandMotionRangeMax HandMotionRange = 2 )
type HandTrackedSource ¶
type HandTrackedSource = gdclass.OpenXRInterfaceHandTrackedSource //gd:OpenXRInterface.HandTrackedSource
const ( /*The source of hand tracking data is unknown (the extension is likely unsupported).*/ HandTrackedSourceUnknown HandTrackedSource = 0 /*The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc.*/ HandTrackedSourceUnobstructed HandTrackedSource = 1 /*The source of hand tracking is a controller, bone positions are inferred from controller inputs.*/ HandTrackedSourceController HandTrackedSource = 2 /*Maximum value for the hand tracked source enum.*/ HandTrackedSourceMax HandTrackedSource = 3 )
type Instance ¶
type Instance [1]gdclass.OpenXRInterface
The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games. Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsOpenXRInterface ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsXRInterface ¶
func (self Instance) AsXRInterface() XRInterface.Instance
func (Instance) DisplayRefreshRate ¶
func (Instance) FoveationDynamic ¶
func (Instance) FoveationLevel ¶
func (Instance) GetActionSets ¶
Returns a list of action sets registered with Godot (loaded from the action map at runtime).
func (Instance) GetAvailableDisplayRefreshRates ¶
Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized.
func (Instance) GetHandJointAngularVelocity ¶
func (self Instance) GetHandJointAngularVelocity(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
If handtracking is enabled, returns the angular velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D]!
func (Instance) GetHandJointFlags ¶
func (self Instance) GetHandJointFlags(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) gdclass.OpenXRInterfaceHandJointFlags
If handtracking is enabled, returns flags that inform us of the validity of the tracking data.
func (Instance) GetHandJointLinearVelocity ¶
func (self Instance) GetHandJointLinearVelocity(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
If handtracking is enabled, returns the linear velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
func (Instance) GetHandJointPosition ¶
func (self Instance) GetHandJointPosition(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Vector3.XYZ
If handtracking is enabled, returns the position of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!
func (Instance) GetHandJointRadius ¶
func (self Instance) GetHandJointRadius(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Float.X
If handtracking is enabled, returns the radius of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is without worldscale applied!
func (Instance) GetHandJointRotation ¶
func (self Instance) GetHandJointRotation(hand gdclass.OpenXRInterfaceHand, joint gdclass.OpenXRInterfaceHandJoints) Quaternion.IJKX
If handtracking is enabled, returns the rotation of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR.
func (Instance) GetHandTrackingSource ¶
func (self Instance) GetHandTrackingSource(hand gdclass.OpenXRInterfaceHand) gdclass.OpenXRInterfaceHandTrackedSource
If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for [param hand].
func (Instance) GetMotionRange ¶
func (self Instance) GetMotionRange(hand gdclass.OpenXRInterfaceHand) gdclass.OpenXRInterfaceHandMotionRange
If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand].
func (Instance) IsActionSetActive ¶
Returns [code]true[/code] if the given action set is active.
func (Instance) IsEyeGazeInteractionSupported ¶
Returns the capabilities of the eye gaze interaction extension. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
func (Instance) IsFoveationSupported ¶
Returns [code]true[/code] if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value. [b]Note:[/b] This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set [member Viewport.vrs_mode] to [code]VRS_XR[/code] on desktop.
func (Instance) IsHandInteractionSupported ¶
Returns [code]true[/code] if OpenXR's hand interaction profile is supported and enabled. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
func (Instance) IsHandTrackingSupported ¶
Returns [code]true[/code] if OpenXR's hand tracking is supported and enabled. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
func (Instance) OnInstanceExiting ¶
func (self Instance) OnInstanceExiting(cb func())
func (Instance) OnPoseRecentered ¶
func (self Instance) OnPoseRecentered(cb func())
func (Instance) OnRefreshRateChanged ¶
func (Instance) OnSessionBegun ¶
func (self Instance) OnSessionBegun(cb func())
func (Instance) OnSessionFocussed ¶
func (self Instance) OnSessionFocussed(cb func())
func (Instance) OnSessionLossPending ¶
func (self Instance) OnSessionLossPending(cb func())
func (Instance) OnSessionStopping ¶
func (self Instance) OnSessionStopping(cb func())
func (Instance) OnSessionVisible ¶
func (self Instance) OnSessionVisible(cb func())
func (Instance) RenderTargetSizeMultiplier ¶
func (Instance) SetActionSetActive ¶
Sets the given action set as active or inactive.
func (Instance) SetDisplayRefreshRate ¶
func (Instance) SetFoveationDynamic ¶
func (Instance) SetFoveationLevel ¶
func (Instance) SetMotionRange ¶
func (self Instance) SetMotionRange(hand gdclass.OpenXRInterfaceHand, motion_range gdclass.OpenXRInterfaceHandMotionRange)
If handtracking is enabled and motion range is supported, sets the currently configured motion range for [param hand] to [param motion_range].