OpenXRInterface

package
v0.0.0-...-c909628 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package OpenXRInterface provides methods for working with OpenXRInterface object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsOpenXRInterface() Instance
}

type Hand

type Hand = gdclass.OpenXRInterfaceHand //gd:OpenXRInterface.Hand
const (
	/*Left hand.*/
	HandLeft Hand = 0
	/*Right hand.*/
	HandRight Hand = 1
	/*Maximum value for the hand enum.*/
	HandMax Hand = 2
)

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsOpenXRInterface

func (self Instance) AsOpenXRInterface() Instance

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsXRInterface

func (self Instance) AsXRInterface() XRInterface.Instance

func (Instance) DisplayRefreshRate

func (self Instance) DisplayRefreshRate() Float.X

func (Instance) FoveationDynamic

func (self Instance) FoveationDynamic() bool

func (Instance) FoveationLevel

func (self Instance) FoveationLevel() int

func (Instance) GetActionSets

func (self Instance) GetActionSets() []any

Returns a list of action sets registered with Godot (loaded from the action map at runtime).

func (Instance) GetAvailableDisplayRefreshRates

func (self Instance) GetAvailableDisplayRefreshRates() []any

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

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

If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for [param hand].

func (Instance) GetMotionRange

If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand].

func (Instance) IsActionSetActive

func (self Instance) IsActionSetActive(name string) bool

Returns [code]true[/code] if the given action set is active.

func (Instance) IsEyeGazeInteractionSupported

func (self Instance) IsEyeGazeInteractionSupported() bool

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

func (self Instance) IsFoveationSupported() bool

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

func (self Instance) IsHandInteractionSupported() bool

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

func (self Instance) IsHandTrackingSupported() bool

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 (self Instance) OnRefreshRateChanged(cb func(refresh_rate Float.X))

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 (self Instance) RenderTargetSizeMultiplier() Float.X

func (Instance) SetActionSetActive

func (self Instance) SetActionSetActive(name string, active bool)

Sets the given action set as active or inactive.

func (Instance) SetDisplayRefreshRate

func (self Instance) SetDisplayRefreshRate(value Float.X)

func (Instance) SetFoveationDynamic

func (self Instance) SetFoveationDynamic(value bool)

func (Instance) SetFoveationLevel

func (self Instance) SetFoveationLevel(value int)

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].

func (Instance) SetRenderTargetSizeMultiplier

func (self Instance) SetRenderTargetSizeMultiplier(value Float.X)

func (Instance) SetVrsMinRadius

func (self Instance) SetVrsMinRadius(value Float.X)

func (Instance) SetVrsStrength

func (self Instance) SetVrsStrength(value Float.X)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) VrsMinRadius

func (self Instance) VrsMinRadius() Float.X

func (Instance) VrsStrength

func (self Instance) VrsStrength() Float.X

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL