Blender V4.3
wm_xr_action.cc File Reference
#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 wmXrActionSetaction_set_create (const char *action_set_name)
 
static void action_set_destroy (void *val)
 
static wmXrActionSetaction_set_find (wmXrData *xr, const char *action_set_name)
 
static wmXrActionaction_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 wmXrActionaction_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)
 

Function Documentation

◆ action_create()

◆ action_destroy()

◆ action_find()

static wmXrAction * action_find ( wmXrData * xr,
const char * action_set_name,
const char * action_name )
static

◆ action_set_create()

static wmXrActionSet * action_set_create ( const char * action_set_name)
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().

◆ action_set_destroy()

static void action_set_destroy ( void * val)
static

◆ action_set_find()

static wmXrActionSet * action_set_find ( wmXrData * xr,
const char * action_set_name )
static

◆ WM_xr_action_binding_create()

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 )

◆ WM_xr_action_binding_destroy()

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.

◆ WM_xr_action_create()

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 )

◆ WM_xr_action_destroy()

◆ WM_xr_action_set_create()

bool WM_xr_action_set_create ( wmXrData * xr,
const char * action_set_name )

◆ WM_xr_action_set_destroy()

◆ WM_xr_action_state_get()

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 )

◆ WM_xr_active_action_set_set()

◆ WM_xr_controller_pose_actions_set()

◆ WM_xr_haptic_action_apply()

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().

◆ WM_xr_haptic_action_stop()

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().