Navigation
API > API/Plugins > API/Plugins/XRScribe
The ActionPoseManager has two primary jobs:
- ingest data from capture
- generate estimated poses/actions based on captured state + timings
When using the ActionPoseManager, we'll interact with it similarly to xrLocateSpace: give it time and spaces, and return locations. On the Action side, give it an action and sync time, and we return an action state.
Internally, we'll plan to have all managed poses in tracker-space, and convert to the different spaces as needed. This does mean we'll need to know how to convert between different spaces, even if the original capture might not tell us how to
| Name | FOpenXRActionPoseManager |
| Type | class |
| Header File | /Engine/Plugins/Runtime/XR/XRScribe/Source/XRScribe/Public/XRScribeEmulatedPoseManager.h |
| Include Path | #include "XRScribeEmulatedPoseManager.h" |
Syntax
class FOpenXRActionPoseManager
Structs
| Name | Remarks |
|---|---|
| FrameTimeHistoryEntry | |
| TActionState | |
| TActionStateHistory |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FBooleanActionState | TActionState< XrBool32 > | XRScribeEmulatedPoseManager.h | |
| FBooleanActionStateHistory | TActionStateHistory< XrBool32 > | XRScribeEmulatedPoseManager.h | |
| FFloatActionState | TActionState< float > | XRScribeEmulatedPoseManager.h | |
| FFloatActionStateHistory | TActionStateHistory< float > | XRScribeEmulatedPoseManager.h | |
| FVector2fActionState | TActionState< XrVector2f > | XRScribeEmulatedPoseManager.h | |
| FVector2fActionStateHistory | TActionStateHistory< XrVector2f > | XRScribeEmulatedPoseManager.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PoseHistorySize | const int32 | Number of poses the manager will keep available relative to 'current' pose, in order for multi-frame pose queries. | XRScribeEmulatedPoseManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddEmulatedFrameTime
(
XrTime Time, |
Add time and frame number in order to generate interpolated poses We use the frame numbers to index into a relative history of the poses, and the time for frame matching + interpolation, because LocateSpace calls only provide a time argument | XRScribeEmulatedPoseManager.h | |
bool DoesActionContainPoseHistory
(
TStaticArray< ANSICHAR, XR_MAX_ACTION_NAME_SIZE >& ActionName |
If we have a pose history for the action, then xrGetActionStatePose can tell the client that the action is active, and poses are ready to fetch | XRScribeEmulatedPoseManager.h | |
XrActionStateBoolean GetEmulatedActionStateBoolean
(
const XrActionStateGetInfo* GetInfo, |
Fetch an action state generated from the captured history, by using XrActionStateGetInfo and most recent sync time The function itself is used to designate between different action state histories (bool, float, vector2f). | XRScribeEmulatedPoseManager.h | |
XrActionStateFloat GetEmulatedActionStateFloat
(
const XrActionStateGetInfo* GetInfo, |
XRScribeEmulatedPoseManager.h | ||
XrActionStateVector2f GetEmulatedActionStateVector2f
(
const XrActionStateGetInfo* GetInfo, |
XRScribeEmulatedPoseManager.h | ||
XrSpaceLocation GetEmulatedPoseForTime
(
XrSpace LocatingSpace, |
Fetch a pose generated from the captured history, by using space handles and times generated by the emulated runtime | XRScribeEmulatedPoseManager.h | |
void OnSessionTeardown() |
Reset internal emulation state based on session teardown. | XRScribeEmulatedPoseManager.h | |
void ProcessCapturedHistories() |
Process all captured pose and action state histories at once, in order to create a unified timeline | XRScribeEmulatedPoseManager.h | |
void RegisterCapturedActions
(
const TArray< FOpenXRCreateActionPacket >& CreateActionPackets |
Register information about actions from capture file, in order to fetch action name for mapping between capture and emulation | XRScribeEmulatedPoseManager.h | |
void RegisterCapturedActionSpaces
(
const TArray< FOpenXRCreateActionSpacePacket >& CreateActionSpacePackets |
Register information about action spaces from capture file, which we need to build a history of space locations for XR devices | XRScribeEmulatedPoseManager.h | |
void RegisterCapturedActionStates
(
const TArray< FOpenXRSyncActionsPacket >& SyncActionsPackets, |
Register history of GetActionState + SyncActions calls | XRScribeEmulatedPoseManager.h | |
| Register information about paths to path strings from the capture | XRScribeEmulatedPoseManager.h | ||
void RegisterCapturedReferenceSpaces
(
const TArray< FOpenXRCreateReferenceSpacePacket >& CreateReferenceSpacePackets |
Register information about reference spaces from a capture file, in order to build a history of space locations relative to those reference spaces. | XRScribeEmulatedPoseManager.h | |
void RegisterCapturedSpaceHistories
(
const TMap< XrSpace, TArray< FOpenXRLocateSpacePacket > >& SpaceHistories |
Register history of LocateSpace calls | XRScribeEmulatedPoseManager.h | |
void RegisterCapturedWaitFrames
(
const TArray< FOpenXRWaitFramePacket >& InWaitFrameHistory |
Register information about wait frames from a capture file, in order to build a history of display times | XRScribeEmulatedPoseManager.h | |
void RegisterEmulatedAction
(
FName ActionName, |
Register emulated action. | XRScribeEmulatedPoseManager.h | |
void RegisterEmulatedActionSpace
(
TStaticArray< ANSICHAR, XR_MAX_ACTION_NAME_SIZE >& ActionName, |
Register emulated action space. | XRScribeEmulatedPoseManager.h | |
void RegisterEmulatedPath
(
FName PathString, |
Register emulated path. Manager needs this to match paths between capture and emulation. | XRScribeEmulatedPoseManager.h | |
void RegisterEmulatedReferenceSpace
(
const XrReferenceSpaceCreateInfo& CreateInfo, |
Register emulated reference space. | XRScribeEmulatedPoseManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CalculateCapturedTimeRange() |
Helper function to determine full time range of capture | XRScribeEmulatedPoseManager.h | |
bool FilterSpaceHistory
(
const TArray< FOpenXRLocateSpacePacket >& RawHistory, |
Sort and remove duplicates in history for single space | XRScribeEmulatedPoseManager.h | |
int64 GenerateReplaySliceIndexFromTime
(
XrTime EmulatedTime |
Helper function to generate index into captured history from emulated time (offset from emulated session start) | XRScribeEmulatedPoseManager.h | |
const XrActionStateBoolean GetCachedEmulatedBooleanState
(
FName ActionName |
Helper function to managed 'cached' action states, because we're only supposed to update on state changes | XRScribeEmulatedPoseManager.h | |
const XrActionStateFloat GetCachedEmulatedFloatState
(
FName ActionName |
XRScribeEmulatedPoseManager.h | ||
const XrActionStateVector2f GetCachedEmulatedVector2fState
(
FName ActionName |
XRScribeEmulatedPoseManager.h | ||
XrReferenceSpaceType GetCapturedReferenceSpaceType
(
XrSpace CapturedSpace |
Helper function to fetch underlying reference space type from opaque XrSpace handle | XRScribeEmulatedPoseManager.h | |
FName GetEmulatedActionName
(
XrAction Action |
XRScribeEmulatedPoseManager.h | ||
void ProcessCapturedActionSpaceHistory
(
const TArray< FOpenXRLocateSpacePacket >& SpaceHistory |
XRScribeEmulatedPoseManager.h | ||
void ProcessCapturedReferenceSpaceHistory
(
const TArray< FOpenXRLocateSpacePacket >& SpaceHistory |
XRScribeEmulatedPoseManager.h | ||
void SetCachedEmulatedBooleanState
(
FName ActionName, |
XRScribeEmulatedPoseManager.h | ||
void SetCachedEmulatedFloatState
(
FName ActionName, |
XRScribeEmulatedPoseManager.h | ||
void SetCachedEmulatedVector2fState
(
FName ActionName, |
XRScribeEmulatedPoseManager.h | ||
TArray< FOpenXRLocateSpacePacket > SliceFilteredSpaceHistory
(
const TArray< FOpenXRLocateSpacePacket >& FilteredHistory |
Resample the filtered history in order to ease reading poses back based on time offsets during emulation | XRScribeEmulatedPoseManager.h | |
bool ValidateSubpath
(
const TSet< FName >& ValidSubpaths, |
XRScribeEmulatedPoseManager.h | ||
bool VerifyCapturedActionSpace
(
XrSpace CapturedSpace |
Helper function to validate captured space is an action space | XRScribeEmulatedPoseManager.h |