Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kim <pk15950@gmail.com>2021-08-05 15:11:01 +0300
committerPeter Kim <pk15950@gmail.com>2021-08-05 15:11:01 +0300
commitfb1822ddeb28037544e94862112aa7338a0c278b (patch)
tree267df230cd7bbe4bff3dfee204755b959ddc2d30 /source/blender/windowmanager/WM_api.h
parentf45860fba9c47466a18d92c1621c153aaef7be05 (diff)
XR: Controller Data Improvements
Provides two key improvements to runtime controller data. 1. Separates controller poses into two components, "grip" and "aim", which are both required to accurately represent the controllers without manual offsets. Following their OpenXR definitions, the grip pose represents the user's hand when holding the controller, and the aim pose represents the controller's aiming source. 2. Runtime controller data is now stored as a dynamic array instead of a fixed array. This makes the API/functionality more adaptable to different systems. Does not bring about any changes for users since only internal runtime functionality is currently affected. Reviewed By: Julian Eisel Differential Revision: http://developer.blender.org/D12073
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 8c1511fd152..7e26d921bd7 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -962,12 +962,18 @@ bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float r_ro
bool WM_xr_session_state_viewer_pose_matrix_info_get(const wmXrData *xr,
float r_viewmat[4][4],
float *r_focal_len);
-bool WM_xr_session_state_controller_pose_location_get(const wmXrData *xr,
+bool WM_xr_session_state_controller_grip_location_get(const wmXrData *xr,
unsigned int subaction_idx,
float r_location[3]);
-bool WM_xr_session_state_controller_pose_rotation_get(const wmXrData *xr,
+bool WM_xr_session_state_controller_grip_rotation_get(const wmXrData *xr,
unsigned int subaction_idx,
float r_rotation[4]);
+bool WM_xr_session_state_controller_aim_location_get(const wmXrData *xr,
+ unsigned int subaction_idx,
+ float r_location[3]);
+bool WM_xr_session_state_controller_aim_rotation_get(const wmXrData *xr,
+ unsigned int subaction_idx,
+ float r_rotation[4]);
/* wm_xr_actions.c */
/* XR action functions to be called pre-XR session start.
@@ -1002,9 +1008,10 @@ void WM_xr_action_binding_destroy(wmXrData *xr,
/* If action_set_name is NULL, then all action sets will be treated as active. */
bool WM_xr_active_action_set_set(wmXrData *xr, const char *action_set_name);
-bool WM_xr_controller_pose_action_set(wmXrData *xr,
- const char *action_set_name,
- const char *action_name);
+bool WM_xr_controller_pose_actions_set(wmXrData *xr,
+ const char *action_set_name,
+ const char *grip_action_name,
+ const char *aim_action_name);
/* XR action functions to be called post-XR session start. */
bool WM_xr_action_state_get(const wmXrData *xr,