OpenXRActionMap
Collection of OpenXRActionSet
and OpenXRInteractionProfile
resources for the OpenXR module.
class OpenXRActionMap
OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports.
Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available.
The action map therefore needs to be loaded at startup and can’t be changed afterwards. This resource is a container for the entire action map.
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var actionSets: GArray
Collection of
OpenXRActionSet
s that are part of this action map.var interactionProfiles: GArray
Collection of
OpenXRInteractionProfile
s that are part of this action map.func addActionSet(OpenXRActionSet?
) Add an action set.
func addInteractionProfile(OpenXRInteractionProfile?
) Add an interaction profile.
func createDefaultActionSets(
) Setup this action set with our default actions.
func findActionSet(name: String
) -> OpenXRActionSet? Retrieve an action set by name.
func findInteractionProfile(name: String
) -> OpenXRInteractionProfile? Find an interaction profile by its name (path).
func getActionSet(idx: Int32
) -> OpenXRActionSet? Retrieve the action set at this index.
func getActionSetCount(
) -> Int32 Retrieve the number of actions sets in our action map.
func getInteractionProfile(idx: Int32
) -> OpenXRInteractionProfile? Get the interaction profile at this index.
func getInteractionProfileCount(
) -> Int32 Retrieve the number of interaction profiles in our action map.
func removeActionSet(OpenXRActionSet?
) Remove an action set.
func removeInteractionProfile(OpenXRInteractionProfile?
) Remove an interaction profile.