Blender V4.3
GHOST_XrControllerModel.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021-2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9/* NOTE: Requires OpenXR headers to be included before this one for OpenXR types (XrInstance,
10 * XrSession, etc.). */
11
12#pragma once
13
14#include <atomic>
15#include <future>
16#include <vector>
17
19
24 public:
25 GHOST_XrControllerModel(XrInstance instance, const char *subaction_path);
27
28 void load(XrSession session);
29 void updateComponents(XrSession session);
30 void getData(GHOST_XrControllerModelData &r_data);
31
32 private:
33 XrPath m_subaction_path = XR_NULL_PATH;
34 XrControllerModelKeyMSFT m_model_key = XR_NULL_CONTROLLER_MODEL_KEY_MSFT;
35
36 std::future<void> m_load_task;
37 std::atomic<bool> m_data_loaded = false;
38
39 std::vector<GHOST_XrControllerModelVertex> m_vertices;
40 std::vector<uint32_t> m_indices;
41 std::vector<GHOST_XrControllerModelComponent> m_components;
42 std::vector<GHOST_XrControllerModelNode> m_nodes;
44 std::vector<int32_t> m_node_state_indices;
45
46 void loadControllerModel(XrSession session);
47};
void updateComponents(XrSession session)
GHOST_XrControllerModel(XrInstance instance, const char *subaction_path)
void getData(GHOST_XrControllerModelData &r_data)