|
Blender V5.3
|
#include <GHOST_XrSession.hh>
Public Types | |
| enum | LifeExpectancy { SESSION_KEEP_ALIVE , SESSION_DESTROY } |
Public Member Functions | |
State Queries | |
| bool | isRunning () const |
Actions | |
| bool | createActionSet (const GHOST_XrActionSetInfo &info) |
| void | destroyActionSet (const char *action_set_name) |
| bool | createActions (const char *action_set_name, uint32_t count, const GHOST_XrActionInfo *infos) |
| void | destroyActions (const char *action_set_name, uint32_t count, const char *const *action_names) |
| bool | createActionBindings (const char *action_set_name, uint32_t count, const GHOST_XrActionProfileInfo *infos) |
| void | destroyActionBindings (const char *action_set_name, uint32_t count, const char *const *action_names, const char *const *profile_paths) |
| bool | attachActionSets () |
| bool | syncActions (const char *action_set_name=nullptr) |
| bool | applyHapticAction (const char *action_set_name, const char *action_name, const char *subaction_path, const int64_t &duration, const float &frequency, const float &litude) |
| void | stopHapticAction (const char *action_set_name, const char *action_name, const char *subaction_path) |
| void * | getActionSetCustomdata (const char *action_set_name) |
| void * | getActionCustomdata (const char *action_set_name, const char *action_name) |
| uint32_t | getActionCount (const char *action_set_name) |
| void | getActionCustomdataArray (const char *action_set_name, void **r_customdata_array) |
Controller Model | |
| bool | loadControllerModel (const char *subaction_path) |
| void | unloadControllerModel (const char *subaction_path) |
| bool | updateControllerModelComponents (const char *subaction_path) |
| bool | getControllerModelData (const char *subaction_path, GHOST_XrControllerModelData &r_data) |
Create, Initialize and Destruct | |
| GHOST_XrSession (GHOST_XrContext &xr_context) | |
| ~GHOST_XrSession () | |
State Management | |
| void | start () |
| void | requestEnd () |
| LifeExpectancy | handleStateChangeEvent (const XrEventDataSessionStateChanged &lifecycle) |
Drawing | |
| bool | needsUpsideDownDrawing () const |
| void | draw (void *draw_customdata) |
Graphics Context Injection | |
Sessions need access to Ghost graphics context information. Additionally, this API allows creating contexts on the fly (created on start, destructed on end). For this, callbacks to bind (potentially create) and unbind (potentially destruct) a Ghost graphics context have to be set, which will be called on session start and end respectively. | |
| void | unbindGraphicsContext () |
Definition at line 21 of file GHOST_XrSession.hh.
| Enumerator | |
|---|---|
| SESSION_KEEP_ALIVE | |
| SESSION_DESTROY | |
Definition at line 23 of file GHOST_XrSession.hh.
| GHOST_XrSession::GHOST_XrSession | ( | GHOST_XrContext & | xr_context | ) |
Definition at line 69 of file GHOST_XrSession.cc.
| GHOST_XrSession::~GHOST_XrSession | ( | ) |
Definition at line 74 of file GHOST_XrSession.cc.
References CHECK_XR_ASSERT, and unbindGraphicsContext().
| bool GHOST_XrSession::applyHapticAction | ( | 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 874 of file GHOST_XrSession.cc.
References GHOST_XrAction::applyHapticFeedback(), find_action_set(), GHOST_XrActionSet::findAction(), and frequency.
Referenced by GHOST_XrApplyHapticAction().
| bool GHOST_XrSession::attachActionSets | ( | ) |
Definition at line 778 of file GHOST_XrSession.cc.
References CHECK_XR.
Referenced by GHOST_XrAttachActionSets().
| bool GHOST_XrSession::createActionBindings | ( | const char * | action_set_name, |
| uint32_t | count, | ||
| const GHOST_XrActionProfileInfo * | infos ) |
Definition at line 732 of file GHOST_XrSession.cc.
References GHOST_XrAction::createBinding(), find_action_set(), and GHOST_XrActionSet::findAction().
Referenced by GHOST_XrCreateActionBindings().
| bool GHOST_XrSession::createActions | ( | const char * | action_set_name, |
| uint32_t | count, | ||
| const GHOST_XrActionInfo * | infos ) |
Definition at line 698 of file GHOST_XrSession.cc.
References GHOST_XrActionSet::createAction(), and find_action_set().
Referenced by GHOST_XrCreateActions().
| bool GHOST_XrSession::createActionSet | ( | const GHOST_XrActionSetInfo & | info | ) |
Action functions to be called pre-session start. NOTE: The "destroy" functions can also be called post-session start.
Definition at line 676 of file GHOST_XrSession.cc.
Referenced by GHOST_XrCreateActionSet().
| void GHOST_XrSession::destroyActionBindings | ( | const char * | action_set_name, |
| uint32_t | count, | ||
| const char *const * | action_names, | ||
| const char *const * | profile_paths ) |
Definition at line 758 of file GHOST_XrSession.cc.
References GHOST_XrAction::destroyBinding(), find_action_set(), and GHOST_XrActionSet::findAction().
Referenced by GHOST_XrDestroyActionBindings().
| void GHOST_XrSession::destroyActions | ( | const char * | action_set_name, |
| uint32_t | count, | ||
| const char *const * | action_names ) |
Definition at line 718 of file GHOST_XrSession.cc.
References GHOST_XrActionSet::destroyAction(), and find_action_set().
Referenced by GHOST_XrDestroyActions().
| void GHOST_XrSession::destroyActionSet | ( | const char * | action_set_name | ) |
Definition at line 691 of file GHOST_XrSession.cc.
Referenced by GHOST_XrDestroyActionSet().
| void GHOST_XrSession::draw | ( | void * | draw_customdata | ) |
Definition at line 464 of file GHOST_XrSession.cc.
| uint32_t GHOST_XrSession::getActionCount | ( | const char * | action_set_name | ) |
Definition at line 939 of file GHOST_XrSession.cc.
References find_action_set(), and GHOST_XrActionSet::getActionCount().
Referenced by GHOST_XrGetActionCount().
| void * GHOST_XrSession::getActionCustomdata | ( | const char * | action_set_name, |
| const char * | action_name ) |
Definition at line 924 of file GHOST_XrSession.cc.
References find_action_set(), GHOST_XrActionSet::findAction(), and GHOST_XrAction::getCustomdata().
Referenced by GHOST_XrGetActionCustomdata().
| void GHOST_XrSession::getActionCustomdataArray | ( | const char * | action_set_name, |
| void ** | r_customdata_array ) |
Definition at line 949 of file GHOST_XrSession.cc.
References find_action_set(), and GHOST_XrActionSet::getActionCustomdataArray().
Referenced by GHOST_XrGetActionCustomdataArray().
| void * GHOST_XrSession::getActionSetCustomdata | ( | const char * | action_set_name | ) |
Definition at line 914 of file GHOST_XrSession.cc.
References find_action_set(), and GHOST_XrActionSet::getCustomdata().
Referenced by GHOST_XrGetActionSetCustomdata().
| bool GHOST_XrSession::getControllerModelData | ( | const char * | subaction_path, |
| GHOST_XrControllerModelData & | r_data ) |
Definition at line 1013 of file GHOST_XrSession.cc.
Referenced by GHOST_XrGetControllerModelData().
| GHOST_XrSession::LifeExpectancy GHOST_XrSession::handleStateChangeEvent | ( | const XrEventDataSessionStateChanged & | lifecycle | ) |
Definition at line 292 of file GHOST_XrSession.cc.
References assert, SESSION_DESTROY, and SESSION_KEEP_ALIVE.
| bool GHOST_XrSession::isRunning | ( | ) | const |
Definition at line 616 of file GHOST_XrSession.cc.
| bool GHOST_XrSession::loadControllerModel | ( | const char * | subaction_path | ) |
Controller model functions.
Definition at line 967 of file GHOST_XrSession.cc.
Referenced by GHOST_XrLoadControllerModel().
| bool GHOST_XrSession::needsUpsideDownDrawing | ( | ) | const |
Definition at line 605 of file GHOST_XrSession.cc.
| void GHOST_XrSession::requestEnd | ( | ) |
Definition at line 274 of file GHOST_XrSession.cc.
| void GHOST_XrSession::start | ( | ) |
Definition at line 217 of file GHOST_XrSession.cc.
References assert, CHECK_XR, create_reference_spaces(), GHOST_XrException::GHOST_XrException(), and GHOST_XrGraphicsBindingCreateFromType().
| void GHOST_XrSession::stopHapticAction | ( | const char * | action_set_name, |
| const char * | action_name, | ||
| const char * | subaction_path ) |
Definition at line 897 of file GHOST_XrSession.cc.
References find_action_set(), GHOST_XrActionSet::findAction(), and GHOST_XrAction::stopHapticFeedback().
Referenced by GHOST_XrStopHapticAction().
| bool GHOST_XrSession::syncActions | ( | const char * | action_set_name = nullptr | ) |
Action functions to be called post-session start.
| action_set_name | When nullptr, all attached action sets will be synced. |
Definition at line 821 of file GHOST_XrSession.cc.
References CHECK_XR, find_action_set(), GHOST_XrActionSet::getActionSet(), and GHOST_XrActionSet::updateStates().
Referenced by GHOST_XrSyncActions().
| void GHOST_XrSession::unbindGraphicsContext | ( | ) |
Definition at line 651 of file GHOST_XrSession.cc.
References GHOST_XrCustomFuncs::gpu_ctx_unbind_fn.
Referenced by ~GHOST_XrSession().
| void GHOST_XrSession::unloadControllerModel | ( | const char * | subaction_path | ) |
Definition at line 992 of file GHOST_XrSession.cc.
Referenced by GHOST_XrUnloadControllerModel().
| bool GHOST_XrSession::updateControllerModelComponents | ( | const char * | subaction_path | ) |
Definition at line 999 of file GHOST_XrSession.cc.
Referenced by GHOST_XrUpdateControllerModelComponents().