Blender
V3.3
|
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "GHOST_C-api.h"
#include "MEM_guardedalloc.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_xr_intern.h"
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 struct 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 57 of file wm_xr_action.c.
References wmXrAction::action_flag, wmXrAction::axis_flags, BLI_assert, BLI_listbase_count(), bool, 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, type, wmXrAction::type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
Referenced by WM_xr_action_create().
Definition at line 137 of file wm_xr_action.c.
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 162 of file wm_xr_action.c.
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 31 of file wm_xr_action.c.
References MEM_callocN, MEM_mallocN, and wmXrActionSet::name.
Referenced by WM_xr_action_set_create().
Definition at line 40 of file wm_xr_action.c.
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 52 of file wm_xr_action.c.
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 struct wmXrPose * | poses | ||
) |
Definition at line 329 of file wm_xr_action.c.
References BLI_assert, BLI_findlink(), BLI_listbase_count(), wmXrRuntimeData::context, copy_qt_qt(), copy_v3_v3(), count, if(), 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 385 of file wm_xr_action.c.
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 212 of file wm_xr_action.c.
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, type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
Definition at line 290 of file wm_xr_action.c.
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, NULL, wmXrData::runtime, wmXrRuntimeData::session_state, STREQ, and wm_xr_session_controller_data_clear().
Definition at line 167 of file wm_xr_action.c.
References action_set_create(), action_set_destroy(), action_set_find(), wmXrRuntimeData::context, and wmXrData::runtime.
Definition at line 188 of file wm_xr_action.c.
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, NULL, 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 472 of file wm_xr_action.c.
References action_find(), BLI_assert_unreachable, copy_qt_qt(), copy_v2_v2(), copy_v3_v3(), wmXrAction::count_subaction_paths, wmXrAction::states, STREQ, wmXrAction::subaction_paths, wmXrAction::type, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
Definition at line 394 of file wm_xr_action.c.
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, 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 430 of file wm_xr_action.c.
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 515 of file wm_xr_action.c.
References wmXrRuntimeData::context, and wmXrData::runtime.
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 534 of file wm_xr_action.c.
References wmXrRuntimeData::context, and wmXrData::runtime.
Referenced by wm_xr_session_action_states_interpret().