OpenXRInteractionProfileMetadata
繼承: Object
在 OpenXR 中註冊支援的裝置的元類別。
說明
這類允許OpenXR 核心和擴充註冊與受支援的互動裝置(例如控制器、追蹤器、觸覺裝置等)相關的元資料。它主要由動作地圖編輯器使用,並用於在適用時透過刪除依賴於擴充的條目來清理任何操作對應。
方法
void |
register_interaction_profile(display_name: String, openxr_path: String, openxr_extension_name: String) |
void |
register_io_path(interaction_profile: String, display_name: String, toplevel_path: String, openxr_path: String, openxr_extension_name: String, action_type: ActionType) |
void |
register_profile_rename(old_name: String, new_name: String) |
void |
register_top_level_path(display_name: String, openxr_path: String, openxr_extension_name: String) |
方法說明
void register_interaction_profile(display_name: String, openxr_path: String, openxr_extension_name: String) 🔗
使用 OpenXR 名稱註冊互動設定檔(例如 /interaction_profiles/khr/simple_controller 是 OpenXR 簡單控制器設定檔的設定檔)。
display_name 是向使用者顯示的描述。 openxr_path 是正在註冊的互動設定檔路徑。 openxr_extension_name 可以選擇將此設定檔限制為啟用/可用的給定擴充。如果擴充功能不可用,則操作對應中使用的設定檔和所有相關條目都會被篩選掉。
void register_io_path(interaction_profile: String, display_name: String, toplevel_path: String, openxr_path: String, openxr_extension_name: String, action_type: ActionType) 🔗
Registers an input/output path for the given interaction_profile. The profile should previously have been registered using register_interaction_profile(). display_name is the description shown to the user. toplevel_path specifies the bind path this input/output can be bound to (e.g. /user/hand/left or /user/hand/right). openxr_path is the action input/output being registered (e.g. /user/hand/left/input/aim/pose). openxr_extension_name restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. XR_EXT_palm_pose that introduces …/input/palm_ext/pose input paths). action_type defines the type of input or output provided by OpenXR.
void register_profile_rename(old_name: String, new_name: String) 🔗
允許將舊的互動設定檔路徑重新命名為新路徑,以保持與舊操作對應的向後相容性。
void register_top_level_path(display_name: String, openxr_path: String, openxr_extension_name: String) 🔗
Registers a top level path to which profiles can be bound. For instance /user/hand/left refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register /user/body/vest.
display_name is the name shown to the user. openxr_path is the top level path being registered. openxr_extension_name is optional and ensures the top level path is only used if the specified extension is available/enabled.
When a top level path ends up being bound by OpenXR, an XRPositionalTracker is instantiated to manage the state of the device.