Blender  V3.3
wm_xr_action.c File Reference
#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 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 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)
 

Function Documentation

◆ action_create()

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

◆ action_destroy()

static void action_destroy ( void val)
static

◆ 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 31 of file wm_xr_action.c.

References MEM_callocN, MEM_mallocN, 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 struct 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 385 of file wm_xr_action.c.

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

void WM_xr_action_destroy ( wmXrData xr,
const char *  action_set_name,
const char *  action_name 
)

◆ WM_xr_action_set_create()

bool WM_xr_action_set_create ( wmXrData xr,
const char *  action_set_name 
)

◆ WM_xr_action_set_destroy()

void WM_xr_action_set_destroy ( wmXrData xr,
const char *  action_set_name 
)

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

bool WM_xr_active_action_set_set ( wmXrData xr,
const char *  action_set_name,
bool  delayed 
)

◆ WM_xr_controller_pose_actions_set()

bool WM_xr_controller_pose_actions_set ( wmXrData xr,
const char *  action_set_name,
const char *  grip_action_name,
const char *  aim_action_name 
)

◆ 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 515 of file wm_xr_action.c.

References wmXrRuntimeData::context, and wmXrData::runtime.

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 534 of file wm_xr_action.c.

References wmXrRuntimeData::context, and wmXrData::runtime.

Referenced by wm_xr_session_action_states_interpret().