|
Blender V4.3
|
#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "GHOST_C-api.h"#include "MEM_guardedalloc.h"#include "WM_api.hh"#include "WM_types.hh"#include "wm_xr_intern.hh"#include <cstring>Go to the source code of this file.
Functions | |
XR-Action API | |
API functions for managing OpenXR actions. | |
| static wmXrActionSet * | action_set_create (const char *action_set_name) |
| static void | action_set_destroy (void *val) |
| static wmXrActionSet * | action_set_find (wmXrData *xr, const char *action_set_name) |
| static wmXrAction * | action_create (const char *action_name, eXrActionType type, const ListBase *user_paths, wmOperatorType *ot, IDProperty *op_properties, const char *haptic_name, const int64_t *haptic_duration, const float *haptic_frequency, const float *haptic_amplitude, eXrOpFlag op_flag, eXrActionFlag action_flag, eXrHapticFlag haptic_flag) |
| static void | action_destroy (void *val) |
| static wmXrAction * | action_find (wmXrData *xr, const char *action_set_name, const char *action_name) |
| bool | WM_xr_action_set_create (wmXrData *xr, const char *action_set_name) |
| void | WM_xr_action_set_destroy (wmXrData *xr, const char *action_set_name) |
| bool | WM_xr_action_create (wmXrData *xr, const char *action_set_name, const char *action_name, eXrActionType type, const ListBase *user_paths, wmOperatorType *ot, IDProperty *op_properties, const char *haptic_name, const int64_t *haptic_duration, const float *haptic_frequency, const float *haptic_amplitude, eXrOpFlag op_flag, eXrActionFlag action_flag, eXrHapticFlag haptic_flag) |
| void | WM_xr_action_destroy (wmXrData *xr, const char *action_set_name, const char *action_name) |
| bool | WM_xr_action_binding_create (wmXrData *xr, const char *action_set_name, const char *action_name, const char *profile_path, const ListBase *user_paths, const ListBase *component_paths, const float *float_thresholds, const eXrAxisFlag *axis_flags, const wmXrPose *poses) |
| void | WM_xr_action_binding_destroy (wmXrData *xr, const char *action_set_name, const char *action_name, const char *profile_path) |
| bool | WM_xr_active_action_set_set (wmXrData *xr, const char *action_set_name, bool delayed) |
| bool | WM_xr_controller_pose_actions_set (wmXrData *xr, const char *action_set_name, const char *grip_action_name, const char *aim_action_name) |
| bool | WM_xr_action_state_get (const wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path, wmXrActionState *r_state) |
| bool | WM_xr_haptic_action_apply (wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path, const int64_t *duration, const float *frequency, const float *amplitude) |
| void | WM_xr_haptic_action_stop (wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path) |
|
static |
Definition at line 64 of file wm_xr_action.cc.
References wmXrAction::action_flag, wmXrAction::axis_flags, BLI_assert, BLI_listbase_count(), BLI_strdup(), count, wmXrAction::count_subaction_paths, ELEM, float, wmXrAction::float_thresholds, wmXrAction::haptic_amplitude, wmXrAction::haptic_duration, wmXrAction::haptic_flag, wmXrAction::haptic_frequency, wmXrAction::haptic_name, LISTBASE_FOREACH_INDEX, MEM_calloc_arrayN, MEM_callocN, MEM_mallocN, wmXrAction::name, wmXrAction::op_flag, wmXrAction::op_properties, ot, wmXrAction::ot, size(), wmXrAction::states, wmXrAction::states_prev, wmXrAction::subaction_paths, wmXrAction::type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
Referenced by WM_xr_action_create().
|
static |
Definition at line 140 of file wm_xr_action.cc.
References wmXrAction::axis_flags, wmXrAction::count_subaction_paths, wmXrAction::float_thresholds, wmXrAction::haptic_name, MEM_freeN(), MEM_SAFE_FREE, wmXrAction::name, wmXrAction::states, wmXrAction::states_prev, and wmXrAction::subaction_paths.
Referenced by WM_xr_action_create().
|
static |
Definition at line 165 of file wm_xr_action.cc.
References wmXrRuntimeData::context, and wmXrData::runtime.
Referenced by WM_xr_action_create(), WM_xr_action_destroy(), WM_xr_action_state_get(), and WM_xr_controller_pose_actions_set().
|
static |
Definition at line 38 of file wm_xr_action.cc.
References BLI_strdup(), MEM_callocN, and wmXrActionSet::name.
Referenced by WM_xr_action_set_create().
|
static |
Definition at line 46 of file wm_xr_action.cc.
References wmXrActionSet::active_haptic_actions, wmXrActionSet::active_modal_actions, BLI_freelistN(), MEM_freeN(), MEM_SAFE_FREE, and wmXrActionSet::name.
Referenced by WM_xr_action_set_create().
|
static |
Definition at line 58 of file wm_xr_action.cc.
References wmXrRuntimeData::context, and wmXrData::runtime.
Referenced by WM_xr_action_destroy(), WM_xr_action_set_create(), WM_xr_action_set_destroy(), WM_xr_active_action_set_set(), and WM_xr_controller_pose_actions_set().
| bool WM_xr_action_binding_create | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| const char * | profile_path, | ||
| const ListBase * | user_paths, | ||
| const ListBase * | component_paths, | ||
| const float * | float_thresholds, | ||
| const eXrAxisFlag * | axis_flags, | ||
| const wmXrPose * | poses ) |
Definition at line 332 of file wm_xr_action.cc.
References BLI_assert, BLI_findlink(), BLI_listbase_count(), wmXrRuntimeData::context, copy_qt_qt(), copy_v3_v3(), count, MEM_calloc_arrayN, MEM_freeN(), XrComponentPath::path, XrUserPath::path, and wmXrData::runtime.
| void WM_xr_action_binding_destroy | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| const char * | profile_path ) |
Definition at line 388 of file wm_xr_action.cc.
References wmXrRuntimeData::context, and wmXrData::runtime.
| bool WM_xr_action_create | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| eXrActionType | type, | ||
| const ListBase * | user_paths, | ||
| wmOperatorType * | ot, | ||
| IDProperty * | op_properties, | ||
| const char * | haptic_name, | ||
| const int64_t * | haptic_duration, | ||
| const float * | haptic_frequency, | ||
| const float * | haptic_amplitude, | ||
| eXrOpFlag | op_flag, | ||
| eXrActionFlag | action_flag, | ||
| eXrHapticFlag | haptic_flag ) |
Definition at line 215 of file wm_xr_action.cc.
References action_create(), action_destroy(), action_find(), wmXrAction::axis_flags, BLI_listbase_count(), wmXrRuntimeData::context, count, wmXrAction::float_thresholds, LISTBASE_FOREACH_INDEX, MEM_calloc_arrayN, MEM_freeN(), ot, wmXrData::runtime, wmXrAction::states, wmXrAction::type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
| void WM_xr_action_destroy | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name ) |
Definition at line 292 of file wm_xr_action.cc.
References action_find(), action_set_find(), wmXrSessionState::active_action_set, wmXrActionSet::active_haptic_actions, wmXrActionSet::active_modal_actions, BLI_freelinkN(), wmXrRuntimeData::context, wmXrActionSet::controller_aim_action, wmXrActionSet::controller_grip_action, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, wmXrAction::name, wmXrData::runtime, wmXrRuntimeData::session_state, STREQ, and wm_xr_session_controller_data_clear().
| bool WM_xr_action_set_create | ( | wmXrData * | xr, |
| const char * | action_set_name ) |
Definition at line 171 of file wm_xr_action.cc.
References action_set_create(), action_set_destroy(), action_set_find(), wmXrRuntimeData::context, and wmXrData::runtime.
| void WM_xr_action_set_destroy | ( | wmXrData * | xr, |
| const char * | action_set_name ) |
Definition at line 191 of file wm_xr_action.cc.
References action_set_find(), wmXrSessionState::active_action_set, wmXrActionSet::active_haptic_actions, wmXrActionSet::active_modal_actions, BLI_freelistN(), wmXrRuntimeData::context, wmXrActionSet::controller_aim_action, wmXrActionSet::controller_grip_action, wmXrData::runtime, wmXrRuntimeData::session_state, and wm_xr_session_controller_data_clear().
| bool WM_xr_action_state_get | ( | const wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| const char * | subaction_path, | ||
| wmXrActionState * | r_state ) |
Definition at line 475 of file wm_xr_action.cc.
References action_find(), BLI_assert_unreachable, copy_qt_qt(), copy_v2_v2(), copy_v3_v3(), wmXrAction::count_subaction_paths, int, wmXrAction::states, STREQ, wmXrAction::subaction_paths, wmXrAction::type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
| bool WM_xr_active_action_set_set | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| bool | delayed ) |
Definition at line 397 of file wm_xr_action.cc.
References action_set_find(), wmXrSessionState::active_action_set, wmXrSessionState::active_action_set_next, wmXrActionSet::active_haptic_actions, wmXrActionSet::active_modal_actions, BLI_freelistN(), wmXrActionSet::controller_aim_action, wmXrActionSet::controller_grip_action, wmXrData::runtime, wmXrRuntimeData::session_state, STRNCPY, wm_xr_session_controller_data_clear(), and wm_xr_session_controller_data_populate().
Referenced by wm_xr_session_actions_update().
| bool WM_xr_controller_pose_actions_set | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | grip_action_name, | ||
| const char * | aim_action_name ) |
Definition at line 433 of file wm_xr_action.cc.
References action_find(), action_set_find(), wmXrSessionState::active_action_set, wmXrActionSet::controller_aim_action, wmXrActionSet::controller_grip_action, count, wmXrAction::count_subaction_paths, wmXrData::runtime, wmXrRuntimeData::session_state, STREQ, wmXrAction::subaction_paths, and wm_xr_session_controller_data_populate().
| bool WM_xr_haptic_action_apply | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| const char * | subaction_path, | ||
| const int64_t * | duration, | ||
| const float * | frequency, | ||
| const float * | amplitude ) |
Definition at line 518 of file wm_xr_action.cc.
References wmXrRuntimeData::context, wmXrData::runtime, and true.
Referenced by wm_xr_session_action_states_interpret().
| void WM_xr_haptic_action_stop | ( | wmXrData * | xr, |
| const char * | action_set_name, | ||
| const char * | action_name, | ||
| const char * | subaction_path ) |
Definition at line 537 of file wm_xr_action.cc.
References wmXrRuntimeData::context, and wmXrData::runtime.
Referenced by wm_xr_session_action_states_interpret().