|
Blender V5.0
|
#include "BLI_kdopbvh.hh"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_time.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_idprop.hh"#include "BKE_main.hh"#include "BKE_screen.hh"#include "DEG_depsgraph.hh"#include "ED_screen.hh"#include "ED_space_api.hh"#include "ED_transform_snap_object_context.hh"#include "ED_view3d.hh"#include "GHOST_Types.h"#include "GPU_immediate.hh"#include "GPU_state.hh"#include "GPU_batch_presets.hh"#include "GPU_matrix.hh"#include "GPU_xr_defines.hh"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "wm_xr_intern.hh"Go to the source code of this file.
Classes | |
| struct | XrGrabData |
| struct | XrRaycastData |
| struct | XrFlyData |
Functions | |
Operator Conditions | |
| static bool | wm_xr_operator_sessionactive (bContext *C) |
| static bool | wm_xr_operator_test_event (const wmOperator *op, const wmEvent *event) |
XR Session Toggle | |
Toggles an XR session, creating an XR context if necessary. | |
| static void | wm_xr_session_update_screen (Main *bmain, const wmXrData *xr_data) |
| static void | wm_xr_session_update_screen_on_exit_cb (const wmXrData *xr_data) |
| static wmOperatorStatus | wm_xr_session_toggle_exec (bContext *C, wmOperator *) |
| static void | WM_OT_xr_session_toggle (wmOperatorType *ot) |
XR Grab Utilities | |
| static void | wm_xr_grab_init (wmOperator *op) |
| static void | wm_xr_grab_uninit (wmOperator *op) |
| static void | wm_xr_grab_update (wmOperator *op, const wmXrActionData *actiondata) |
| static void | orient_mat_z_normalized (float R[4][4], const float z_axis[3]) |
| static void | wm_xr_navlocks_apply (const float nav_mat[4][4], const float nav_inv[4][4], bool loc_lock, bool locz_lock, bool rotz_lock, float r_prev[4][4], float r_curr[4][4]) |
| static void | wm_xr_grab_compute (const wmXrActionData *actiondata, const XrGrabData *data, const float nav_mat[4][4], const float nav_inv[4][4], bool reverse, float r_delta[4][4]) |
| static void | wm_xr_grab_compute_bimanual (const wmXrActionData *actiondata, const XrGrabData *data, const float nav_mat[4][4], const float nav_inv[4][4], bool reverse, float r_delta[4][4]) |
XR Navigation Grab | |
Navigates the scene by grabbing with XR controllers. | |
| static wmOperatorStatus | wm_xr_navigation_grab_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | wm_xr_navigation_grab_exec (bContext *, wmOperator *) |
| static bool | wm_xr_navigation_grab_can_do_bimanual (const wmXrActionData *actiondata, const XrGrabData *data) |
| static bool | wm_xr_navigation_grab_is_bimanual_ending (const wmXrActionData *actiondata, const XrGrabData *data) |
| static bool | wm_xr_navigation_grab_is_locked (const XrGrabData *data, const bool bimanual) |
| static void | wm_xr_navigation_grab_apply (wmXrData *xr, const wmXrActionData *actiondata, const XrGrabData *data, bool bimanual) |
| static void | wm_xr_navigation_grab_bimanual_state_update (const wmXrActionData *actiondata, XrGrabData *data) |
| static void | wm_xr_navigation_grab_cancel (bContext *, wmOperator *op) |
| static wmOperatorStatus | wm_xr_navigation_grab_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | WM_OT_xr_navigation_grab (wmOperatorType *ot) |
XR Navigation Teleport | |
Casts a ray from an XR controller's pose and teleports to any hit geometry. | |
| static float | wm_xr_navigation_teleport_pose_calc (wmXrData *xr, float nav_destination[3], const float destination[4], const float normal[3], const bool teleport_axes[3], float teleport_t, float teleport_ofs, float vertical_ofs) |
| static bool | wm_xr_navigation_teleport_ground_plane (float points[XR_MAX_RAYCASTS+1][4], int *num_points, float *ray_dist) |
| static XrRaycastResult | wm_xr_navigation_teleport (bContext *C, wmXrData *xr, float nav_destination[3], float points[XR_MAX_RAYCASTS+1][4], const float direction[3], int *num_points, float *ray_dist, float *destination_dist, bool selectable_only, const bool teleport_axes[3], float teleport_t, float teleport_ofs, float gravity, float head_height) |
| static wmOperatorStatus | wm_xr_navigation_teleport_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | wm_xr_navigation_teleport_exec (bContext *, wmOperator *) |
| static void | wm_xr_navigation_teleport_cancel (bContext *, wmOperator *op) |
| static wmOperatorStatus | wm_xr_navigation_teleport_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | WM_OT_xr_navigation_teleport (wmOperatorType *ot) |
XR Navigation Reset | |
Resets XR navigation deltas relative to session base pose. | |
| static wmOperatorStatus | wm_xr_navigation_reset_exec (bContext *C, wmOperator *op) |
| static void | WM_OT_xr_navigation_reset (wmOperatorType *ot) |
XR Navigation Swap Hands | |
Resets XR navigation deltas relative to session base pose. | |
| static wmOperatorStatus | wm_xr_navigation_swap_hands_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | wm_xr_navigation_swap_hands_exec (bContext *, wmOperator *) |
| static wmOperatorStatus | wm_xr_navigation_swap_hands_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | WM_OT_xr_navigation_swap_hands (wmOperatorType *ot) |
Operator Registration | |
| void | wm_xr_operatortypes_register () |
XR Raycast Utilities | |
| enum | XrRaycastResult : uint8_t { XR_RAYCAST_MISS , XR_RAYCAST_HIT , XR_RAYCAST_FALLBACK } |
| static const float | g_xr_default_raycast_axis [3] = {0.0f, 0.0f, -1.0f} |
| static const float | g_xr_default_raycast_hit_color [4] = {0.35f, 0.35f, 1.0f, 1.0f} |
| static const float | g_xr_default_raycast_miss_color [4] = {1.0f, 0.35f, 0.35f, 1.0f} |
| static const float | g_xr_default_raycast_fallback_color [4] = {0.35f, 0.35f, 1.0f, 1.0f} |
| static void | wm_xr_raycast_destination_draw (const XrRaycastData *data) |
| static void | wm_xr_raycast_draw (const bContext *, ARegion *, void *customdata) |
| static void | wm_xr_raycast_init (wmOperator *op) |
| static void | wm_xr_raycast_uninit (wmOperator *op) |
| static void | wm_xr_raycast_update (wmOperator *op, const wmXrData *xr, const wmXrActionData *actiondata) |
| static void | wm_xr_raycast (Scene *scene, Depsgraph *depsgraph, const float origin[3], const float direction[3], float *ray_dist, bool selectable_only, float r_location[3], float r_normal[3], int *r_index, const Object **r_ob, float r_obmat[4][4]) |
| enum eXrFlyMode |
Definition at line 845 of file wm_xr_operators.cc.
| enum XrRaycastResult : uint8_t |
| Enumerator | |
|---|---|
| XR_RAYCAST_MISS | |
| XR_RAYCAST_HIT | |
| XR_RAYCAST_FALLBACK | |
Definition at line 632 of file wm_xr_operators.cc.
Definition at line 211 of file wm_xr_operators.cc.
References cross_v3_v3v3(), len_v3(), mul_v3_v3fl(), normalize_v3(), and R.
Referenced by wm_xr_navlocks_apply().
|
static |
Definition at line 1234 of file wm_xr_operators.cc.
References BLT_I18NCONTEXT_NAVIGATION, ot, RNA_def_boolean(), RNA_def_enum(), RNA_def_float(), RNA_def_float_vector(), RNA_def_property_translation_context(), wm_xr_navigation_fly_cancel(), wm_xr_navigation_fly_exec(), wm_xr_navigation_fly_invoke(), wm_xr_navigation_fly_modal(), wm_xr_operator_sessionactive(), XR_FLY_BACK, XR_FLY_CONTROLLER_FORWARD, XR_FLY_DOWN, XR_FLY_FORWARD, XR_FLY_LEFT, XR_FLY_RIGHT, XR_FLY_TURNLEFT, XR_FLY_TURNRIGHT, XR_FLY_UP, XR_FLY_VIEWER_BACK, XR_FLY_VIEWER_FORWARD, XR_FLY_VIEWER_LEFT, and XR_FLY_VIEWER_RIGHT.
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 592 of file wm_xr_operators.cc.
References ot, RNA_def_boolean(), wm_xr_navigation_grab_cancel(), wm_xr_navigation_grab_exec(), wm_xr_navigation_grab_invoke(), wm_xr_navigation_grab_modal(), and wm_xr_operator_sessionactive().
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 1910 of file wm_xr_operators.cc.
References ot, RNA_def_boolean(), wm_xr_navigation_reset_exec(), and wm_xr_operator_sessionactive().
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 1981 of file wm_xr_operators.cc.
References ot, wm_xr_navigation_swap_hands_exec(), wm_xr_navigation_swap_hands_invoke(), wm_xr_navigation_swap_hands_modal(), and wm_xr_operator_sessionactive().
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 1703 of file wm_xr_operators.cc.
References BVH_RAYCAST_DIST_MAX, FLT_MAX, g_xr_default_raycast_axis, g_xr_default_raycast_fallback_color, g_xr_default_raycast_hit_color, g_xr_default_raycast_miss_color, ot, RNA_def_boolean(), RNA_def_boolean_vector(), RNA_def_float(), RNA_def_float_color(), RNA_def_float_vector(), RNA_def_int(), wm_xr_navigation_teleport_cancel(), wm_xr_navigation_teleport_exec(), wm_xr_navigation_teleport_invoke(), wm_xr_navigation_teleport_modal(), and wm_xr_operator_sessionactive().
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 149 of file wm_xr_operators.cc.
References ED_operator_view3d_active(), OPTYPE_INTERNAL, ot, and wm_xr_session_toggle_exec().
Referenced by wm_xr_operatortypes_register().
|
static |
Definition at line 980 of file wm_xr_operators.cc.
References axis_angle_to_quat_single(), mul_qt_qtqt(), wmXrSessionState::prev_base_pose, quat_to_eul(), wmXrData::runtime, and wmXrRuntimeData::session_state.
Referenced by wm_xr_navigation_fly_modal(), and wm_xr_navigation_teleport_pose_calc().
|
static |
Definition at line 887 of file wm_xr_operators.cc.
References BLI_assert_unreachable, copy_v3_v3(), madd_v3_v3fl(), mul_v3_fl(), negate_v3_v3(), normalize_v3(), normalize_v3_v3(), project_v3_v3v3_normalized(), quat_to_mat3(), sub_v3_v3(), unit_m4(), XR_FLY_BACK, XR_FLY_CONTROLLER_FORWARD, XR_FLY_DOWN, XR_FLY_FORWARD, XR_FLY_LEFT, XR_FLY_RIGHT, XR_FLY_TURNLEFT, XR_FLY_TURNRIGHT, XR_FLY_UP, XR_FLY_VIEWER_BACK, XR_FLY_VIEWER_FORWARD, XR_FLY_VIEWER_LEFT, and XR_FLY_VIEWER_RIGHT.
Referenced by wm_xr_navigation_fly_modal().
|
static |
Definition at line 954 of file wm_xr_operators.cc.
References axis_angle_normalized_to_mat3(), BLI_assert, copy_m4_m3(), copy_m4_m4(), ELEM, invert_m4(), mul_m4_m4m4(), normalize_v3_v3(), wm_xr_navlocks_apply(), XR_FLY_TURNLEFT, and XR_FLY_TURNRIGHT.
Referenced by wm_xr_navigation_fly_modal().
|
static |
Definition at line 869 of file wm_xr_operators.cc.
References BLI_assert, BLI_time_now_seconds(), wmOperator::customdata, data, MEM_callocN(), and WM_xr_session_state_viewer_pose_rotation_get().
Referenced by wm_xr_navigation_fly_invoke().
|
static |
Definition at line 880 of file wm_xr_operators.cc.
References wmOperator::customdata, data, and MEM_SAFE_FREE.
Referenced by wm_xr_navigation_fly_cancel(), and wm_xr_navigation_fly_modal().
|
static |
Compute transformation delta for a one-handed grab interaction.
| actiondata | Contains current controller pose in world space. |
| data | Contains previous controller pose in world space. |
The delta is computed as the difference between the current and previous controller poses i.e. delta = curr * prev^-1.
Definition at line 267 of file wm_xr_operators.cc.
References copy_m4_m4(), copy_v3_v3(), data, invert_m4(), mul_m4_m4m4(), quat_to_mat4(), unit_m4(), wm_xr_navlocks_apply(), and zero_v3().
Referenced by wm_xr_navigation_grab_apply().
|
static |
Compute transformation delta for a two-handed (bimanual) grab interaction.
| actiondata | Contains current controller poses in world space. |
| data | Contains previous controller poses in world space. |
The delta is computed as the difference (delta = curr * prev^-1) between the current and previous transformations, where the transformations themselves are determined as follows:
Definition at line 319 of file wm_xr_operators.cc.
References add_v3_v3v3(), cross_v3_v3v3(), data, invert_m4(), len_v3(), mul_m4_m4m4(), mul_v3_fl(), normalize_v3_v3(), quat_to_mat3(), sub_v3_v3v3(), unit_m4(), v, and wm_xr_navlocks_apply().
Referenced by wm_xr_navigation_grab_apply().
|
static |
Definition at line 180 of file wm_xr_operators.cc.
References BLI_assert, wmOperator::customdata, and MEM_callocN().
Referenced by wm_xr_navigation_grab_invoke().
|
static |
Definition at line 187 of file wm_xr_operators.cc.
References wmOperator::customdata, data, and MEM_SAFE_FREE.
Referenced by wm_xr_navigation_grab_cancel(), and wm_xr_navigation_grab_modal().
|
static |
Definition at line 194 of file wm_xr_operators.cc.
References copy_v3_v3(), wmOperator::customdata, data, and quat_to_mat4().
Referenced by wm_xr_navigation_grab_invoke().
|
static |
Definition at line 1013 of file wm_xr_operators.cc.
References wm_xr_fly_uninit().
Referenced by WM_OT_xr_navigation_fly().
|
static |
Definition at line 1008 of file wm_xr_operators.cc.
References OPERATOR_CANCELLED.
Referenced by WM_OT_xr_navigation_fly().
|
static |
Definition at line 991 of file wm_xr_operators.cc.
References C, CTX_wm_manager(), OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, WM_event_add_modal_handler(), wm_xr_fly_init(), wm_xr_operator_test_event(), and wmWindowManager::xr.
Referenced by WM_OT_xr_navigation_fly().
|
static |
Definition at line 1018 of file wm_xr_operators.cc.
References XrSessionSettings::base_scale, BLI_assert_unreachable, BLI_time_now_seconds(), C, copy_qt_qt(), CTX_wm_manager(), wmOperator::customdata, data, ELEM, fabsf, XrSessionSettings::fly_speed, interp_v2_v2v2v2v2_cubic(), KM_PRESS, KM_RELEASE, len_v2(), mat4_to_quat(), mul_m4_m4m4(), OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, out, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), RNA_property_float_get_array(), RNA_property_is_set(), RNA_struct_find_property(), wmXrData::runtime, wmXrData::session_settings, wmXrRuntimeData::session_state, wmXrSessionState::swap_hands, U, unit_m4(), USER_XR_NAV_INVERT_ROTATION, USER_XR_NAV_SNAP_TURN, wmEvent::val, wm_xr_basenav_rotation_calc(), wm_xr_fly_compute_move(), wm_xr_fly_compute_turn(), wm_xr_fly_uninit(), wm_xr_operator_test_event(), wm_xr_pose_to_imat(), wm_xr_pose_to_mat(), WM_xr_session_state_nav_location_get(), WM_xr_session_state_nav_location_set(), WM_xr_session_state_nav_rotation_get(), WM_xr_session_state_nav_rotation_set(), WM_xr_session_state_nav_scale_get(), WM_xr_session_state_viewer_pose_location_get(), WM_xr_session_state_viewer_pose_rotation_get(), WM_xr_session_state_vignette_activate(), wmWindowManager::xr, XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_FLY_BACK, XR_FLY_CONTROLLER_FORWARD, XR_FLY_DOWN, XR_FLY_FORWARD, XR_FLY_LEFT, XR_FLY_RIGHT, XR_FLY_TURNLEFT, XR_FLY_TURNRIGHT, XR_FLY_UP, XR_FLY_VIEWER_BACK, XR_FLY_VIEWER_FORWARD, XR_FLY_VIEWER_LEFT, XR_FLY_VIEWER_RIGHT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
Referenced by WM_OT_xr_navigation_fly().
|
static |
Definition at line 459 of file wm_xr_operators.cc.
References XrSessionSettings::clip_end, data, len_v3(), mat4_to_quat(), mul_m4_m4m4(), normalize_qt(), out, wmXrData::session_settings, wm_xr_grab_compute(), wm_xr_grab_compute_bimanual(), wm_xr_pose_scale_to_imat(), wm_xr_pose_scale_to_mat(), WM_xr_session_state_nav_location_get(), WM_xr_session_state_nav_location_set(), WM_xr_session_state_nav_rotation_get(), WM_xr_session_state_nav_rotation_set(), WM_xr_session_state_nav_scale_get(), and WM_xr_session_state_nav_scale_set().
Referenced by wm_xr_navigation_grab_modal().
|
static |
Definition at line 515 of file wm_xr_operators.cc.
References copy_v3_v3(), data, and quat_to_mat4().
Referenced by wm_xr_navigation_grab_modal().
|
static |
Definition at line 433 of file wm_xr_operators.cc.
References data.
Referenced by wm_xr_navigation_grab_modal().
|
static |
Definition at line 536 of file wm_xr_operators.cc.
References wm_xr_grab_uninit().
Referenced by WM_OT_xr_navigation_grab().
|
static |
Definition at line 428 of file wm_xr_operators.cc.
References OPERATOR_CANCELLED.
Referenced by WM_OT_xr_navigation_grab().
|
static |
Definition at line 410 of file wm_xr_operators.cc.
References C, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, WM_event_add_modal_handler(), wm_xr_grab_init(), wm_xr_grab_update(), and wm_xr_operator_test_event().
Referenced by WM_OT_xr_navigation_grab().
|
static |
Definition at line 444 of file wm_xr_operators.cc.
References data.
Referenced by wm_xr_navigation_grab_modal().
|
static |
Definition at line 450 of file wm_xr_operators.cc.
References data.
Referenced by wm_xr_navigation_grab_modal().
|
static |
Definition at line 541 of file wm_xr_operators.cc.
References BLI_assert_unreachable, C, CTX_wm_manager(), wmOperator::customdata, data, KM_PRESS, KM_RELEASE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), wmEvent::val, wm_xr_grab_uninit(), wm_xr_navigation_grab_apply(), wm_xr_navigation_grab_bimanual_state_update(), wm_xr_navigation_grab_can_do_bimanual(), wm_xr_navigation_grab_is_bimanual_ending(), wm_xr_navigation_grab_is_locked(), wm_xr_operator_test_event(), WM_xr_session_state_vignette_activate(), and wmWindowManager::xr.
Referenced by WM_OT_xr_navigation_grab().
|
static |
Definition at line 1846 of file wm_xr_operators.cc.
References add_v3_v3(), C, CTX_wm_manager(), mul_qt_v3(), mul_v3_v3fl(), negate_v3(), OPERATOR_FINISHED, wmXrSessionState::prev_base_pose, project_v3_v3v3_normalized(), wmOperator::ptr, quat_to_mat3(), RNA_boolean_get(), rot, wmXrData::runtime, wmXrRuntimeData::session_state, sub_v3_v3(), unit_qt(), v, WM_xr_session_state_nav_location_get(), WM_xr_session_state_nav_location_set(), WM_xr_session_state_nav_rotation_get(), WM_xr_session_state_nav_rotation_set(), WM_xr_session_state_nav_scale_get(), WM_xr_session_state_nav_scale_set(), wmWindowManager::xr, and zero_v3().
Referenced by WM_OT_xr_navigation_reset().
|
static |
Definition at line 1953 of file wm_xr_operators.cc.
References OPERATOR_CANCELLED.
Referenced by WM_OT_xr_navigation_swap_hands().
|
static |
Definition at line 1935 of file wm_xr_operators.cc.
References C, CTX_wm_manager(), OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmXrData::runtime, wmXrRuntimeData::session_state, wmXrSessionState::swap_hands, WM_event_add_modal_handler(), wm_xr_operator_test_event(), and wmWindowManager::xr.
Referenced by WM_OT_xr_navigation_swap_hands().
|
static |
Definition at line 1958 of file wm_xr_operators.cc.
References BLI_assert_unreachable, C, CTX_wm_manager(), KM_PRESS, KM_RELEASE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmXrData::runtime, wmXrRuntimeData::session_state, wmXrSessionState::swap_hands, wmEvent::val, wm_xr_operator_test_event(), and wmWindowManager::xr.
Referenced by WM_OT_xr_navigation_swap_hands().
|
static |
Ensure normal faces the correct direction
Fall back to raycast intersecting with the ground plane.
Definition at line 1443 of file wm_xr_operators.cc.
References C, copy_v3_fl3(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, dot_v3v3(), i, madd_v3_v3fl(), madd_v3_v3v3fl(), max_ff(), mul_v3_fl(), normalize_v3(), result, wm_xr_navigation_teleport_ground_plane(), wm_xr_navigation_teleport_pose_calc(), wm_xr_raycast(), XR_MAX_RAYCASTS, XR_RAYCAST_FALLBACK, XR_RAYCAST_HIT, and XR_RAYCAST_MISS.
Referenced by wm_xr_navigation_teleport_modal().
|
static |
Definition at line 1614 of file wm_xr_operators.cc.
References wm_xr_raycast_uninit().
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 1609 of file wm_xr_operators.cc.
References OPERATOR_CANCELLED.
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 1415 of file wm_xr_operators.cc.
References i, interp_v3_v3v3(), len_v3v3(), XR_MAX_RAYCASTS, and z().
Referenced by wm_xr_navigation_teleport().
|
static |
Definition at line 1589 of file wm_xr_operators.cc.
References C, wmOperatorType::modal, OPERATOR_PASS_THROUGH, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, wmOperator::type, WM_event_add_modal_handler(), wm_xr_operator_test_event(), and wm_xr_raycast_init().
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 1619 of file wm_xr_operators.cc.
References BLI_assert_unreachable, C, CTX_wm_manager(), wmOperator::customdata, data, wmXrSessionState::is_raycast_shown, KM_PRESS, KM_RELEASE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmXrSessionState::prev_local_pose, wmOperator::ptr, RNA_boolean_get(), RNA_boolean_get_array(), RNA_float_get(), RNA_float_get_array(), wmXrData::runtime, wmXrRuntimeData::session_state, sqrt, wmEvent::val, wm_xr_navigation_teleport(), wm_xr_operator_test_event(), wm_xr_raycast_uninit(), wm_xr_raycast_update(), WM_xr_session_state_nav_location_set(), WM_xr_session_state_nav_scale_get(), wmWindowManager::xr, XR_MAX_RAYCASTS, XR_RAYCAST_FALLBACK, XR_RAYCAST_HIT, and XR_RAYCAST_MISS.
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 1372 of file wm_xr_operators.cc.
References add_v3_v3(), copy_v3_fl(), copy_v3_v3(), len_v3v3(), madd_v3_v3fl(), project_v3_v3v3_normalized(), quat_to_mat3(), sub_v3_v3(), wm_xr_basenav_rotation_calc(), WM_xr_session_state_nav_location_get(), WM_xr_session_state_nav_rotation_get(), and WM_xr_session_state_viewer_pose_location_get().
Referenced by wm_xr_navigation_teleport().
|
static |
Definition at line 227 of file wm_xr_operators.cc.
References copy_v3_v3(), mul_m4_m4m4(), and orient_mat_z_normalized().
Referenced by wm_xr_fly_compute_turn(), wm_xr_grab_compute(), and wm_xr_grab_compute_bimanual().
|
static |
Definition at line 59 of file wm_xr_operators.cc.
References C, CTX_wm_manager(), WM_xr_session_is_ready(), and wmWindowManager::xr.
Referenced by WM_OT_xr_navigation_fly(), WM_OT_xr_navigation_grab(), WM_OT_xr_navigation_reset(), WM_OT_xr_navigation_swap_hands(), and WM_OT_xr_navigation_teleport().
|
static |
Definition at line 65 of file wm_xr_operators.cc.
References BLI_assert, wmEvent::custom, wmEvent::customdata, EVT_DATA_XR, EVT_XR_ACTION, IDP_EqualsProperties(), wmOperator::properties, wmEvent::type, and wmOperator::type.
Referenced by wm_xr_navigation_fly_invoke(), wm_xr_navigation_fly_modal(), wm_xr_navigation_grab_invoke(), wm_xr_navigation_grab_modal(), wm_xr_navigation_swap_hands_invoke(), wm_xr_navigation_swap_hands_modal(), wm_xr_navigation_teleport_invoke(), and wm_xr_navigation_teleport_modal().
| void wm_xr_operatortypes_register | ( | ) |
Definition at line 2001 of file wm_xr_operators.cc.
References WM_operatortype_append(), WM_OT_xr_navigation_fly(), WM_OT_xr_navigation_grab(), WM_OT_xr_navigation_reset(), WM_OT_xr_navigation_swap_hands(), WM_OT_xr_navigation_teleport(), and WM_OT_xr_session_toggle().
Referenced by wm_operatortypes_register().
|
static |
Definition at line 801 of file wm_xr_operators.cc.
References depsgraph, params, SCE_SNAP_TARGET_ALL, SCE_SNAP_TARGET_ONLY_SELECTABLE, blender::ed::transform::snap_object_context_create(), blender::ed::transform::snap_object_context_destroy(), and blender::ed::transform::snap_object_project_ray_ex().
Referenced by wm_xr_navigation_teleport().
|
static |
Definition at line 659 of file wm_xr_operators.cc.
References data, GPU_batch_draw(), GPU_batch_preset_sphere(), GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_DEPTH_LESS_EQUAL, GPU_depth_test(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_1f(), GPU_matrix_translate_3fv(), and GPU_SHADER_3D_UNIFORM_COLOR.
Referenced by wm_xr_raycast_draw().
Definition at line 674 of file wm_xr_operators.cc.
References BLI_assert, copy_v3_fl3(), data, GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_batch_uniform_1i, GPU_batch_uniform_3fv, GPU_batch_uniform_4fv, GPU_batch_uniform_4fv_array, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_point_size(), GPU_PRIM_POINTS, GPU_SHADER_3D_UNIFORM_COLOR, GPU_SHADER_XR_RAYCAST, GPU_vertformat_attr_add(), i, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex3fv(), immVertexFormat(), normalize_v3(), pos, sub_v3_v3v3(), wm_xr_raycast_destination_draw(), XR_MAX_RAYCASTS, and XR_RAYCAST_MISS.
Referenced by wm_xr_raycast_init().
|
static |
Definition at line 725 of file wm_xr_operators.cc.
References BKE_regiontype_from_id(), BKE_spacetype_from_id(), BLI_assert, wmOperator::customdata, data, ED_region_draw_cb_activate(), MEM_callocN(), REGION_DRAW_POST_VIEW, RGN_TYPE_XR, SPACE_VIEW3D, and wm_xr_raycast_draw().
Referenced by wm_xr_navigation_teleport_invoke().
|
static |
Definition at line 746 of file wm_xr_operators.cc.
References BKE_regiontype_from_id(), BKE_spacetype_from_id(), wmOperator::customdata, data, ED_region_draw_cb_exit(), MEM_SAFE_FREE, RGN_TYPE_XR, and SPACE_VIEW3D.
Referenced by wm_xr_navigation_teleport_cancel(), and wm_xr_navigation_teleport_modal().
|
static |
Definition at line 766 of file wm_xr_operators.cc.
References copy_v3_v3(), wmOperator::customdata, data, GPU_batch_create_procedural(), GPU_PRIM_TRI_STRIP, mul_qt_v3(), wmOperator::ptr, wmXrSessionState::raycast_model, RNA_boolean_get(), RNA_float_get(), RNA_float_get_array(), RNA_int_get(), wmXrData::runtime, wmXrRuntimeData::session_state, WM_xr_session_state_nav_scale_get(), WM_xr_session_state_viewer_pose_location_get(), and WM_xr_session_state_viewer_pose_rotation_get().
Referenced by wm_xr_navigation_teleport_modal().
|
static |
Definition at line 127 of file wm_xr_operators.cc.
References C, CTX_data_main(), CTX_wm_manager(), CTX_wm_view3d(), CTX_wm_window(), View3D_Runtime::flag, NC_WM, ND_XR_DATA_CHANGED, OPERATOR_CANCELLED, OPERATOR_FINISHED, View3D::runtime, V3D_RUNTIME_XR_SESSION_ROOT, WM_event_add_notifier(), wm_xr_init(), wm_xr_session_toggle(), wm_xr_session_update_screen(), wm_xr_session_update_screen_on_exit_cb(), and wmWindowManager::xr.
Referenced by WM_OT_xr_session_toggle().
Definition at line 87 of file wm_xr_operators.cc.
References ListBase::first, View3D::flag, View3D_Runtime::flag, LISTBASE_FOREACH, NC_WM, ND_XR_DATA_CHANGED, View3D::runtime, Main::screens, SPACE_VIEW3D, V3D_RUNTIME_XR_SESSION_ROOT, V3D_XR_SESSION_MIRROR, Main::wm, WM_main_add_notifier(), WM_windows_scene_get_from_screen(), and WM_xr_session_exists().
Referenced by wm_xr_session_toggle_exec(), and wm_xr_session_update_screen_on_exit_cb().
|
static |
Definition at line 121 of file wm_xr_operators.cc.
References G_MAIN, and wm_xr_session_update_screen().
Referenced by wm_xr_session_toggle_exec().
|
static |
Definition at line 627 of file wm_xr_operators.cc.
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 630 of file wm_xr_operators.cc.
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 628 of file wm_xr_operators.cc.
Referenced by WM_OT_xr_navigation_teleport().
|
static |
Definition at line 629 of file wm_xr_operators.cc.
Referenced by WM_OT_xr_navigation_teleport().