October3d55/M/PICOOpenXR/Source/ThirdParty/openxr/pico_scene_capture_creation.h

208 lines
8.7 KiB
C

//
// Created by Admin on 2024/3/11.
//
#ifndef PICOXRRUNTIME_PICO_SCENE_CAPTURE_CREATION_H
#define PICOXRRUNTIME_PICO_SCENE_CAPTURE_CREATION_H
#include "pico_spatial_sensing.h"
/**
* XrStructureType : 1200396000 ~ 1200396999
*/
#ifdef __cplusplus
extern "C" {
#endif
#define XR_PICO_scene_capture_creation 1
#define XR_PICO_scene_capture_creation_SPEC_VERSION 1
#define XR_PICO_SCENE_CAPTURE_CREATION_EXTENSION_NAME "XR_PICO_scene_capture_creation"
static const XrStructureType XR_TYPE_SYSTEM_SCENE_CAPTURE_CREATION_PROPERTIES_PICO = (XrStructureType)1200396000;
typedef struct XrSystemSceneCaptureCreationPropertiesPICO {
XrStructureType type;
void* next;
XrBool32 supportsSceneCaptureCreation;
} XrSystemSceneCaptureCreationPropertiesPICO;
static const XrStructureType XR_TYPE_SPATIAL_ENTITY_COMPONENT_SET_INFO_PICO = (XrStructureType) 1200396001;
typedef struct XrSpatialEntityComponentSetInfoPICO {
XrStructureType type;//XR_TYPE_SPATIAL_ENTITY_COMPONENT_SET_INFO_PICO
const void* next;
XrSpatialEntityComponentTypePICO componentType;
XrSpatialEntityComponentDataBaseHeaderPICO* componentInfo;
} XrSpatialEntityComponentSetInfoPICO;
//TODO: remove the below enum and event
typedef enum XrSpatialMapMemLimitedReasonPICO {
XR_SPATIAL_MAP_MEMORY_LIMITED_UNKNOWN_PICO = 0,
XR_SPATIAL_MAP_COUNT_LIMITED_PICO = 1,
XR_SPATIAL_SINGLE_MAP_MEMORY_LIMITED_PICO = 2,
XR_SPATIAL_TOTAL_MAP_MEMORY_LIMITED_PICO = 3,
XR_SPATIAL_MAP_MEMORY_LIMITED_MAX_ENUM_PICO = 0x7FFFFFFF
} XrSpatialMapMemLimitedReasonPICO;
static const XrStructureType XR_TYPE_EVENT_DATA_SPATIAL_MAP_MEMORY_LIMITED_PICO = (XrStructureType) 1200396002; // first-party only, no extension number
typedef struct XrEventDataSpatialMapMemLimitedPICO{
XrStructureType type;//XR_TYPE_EVENT_DATA_SPATIAL_MAP_MEMORY_LIMITED_PICO
const void* next;
XrSpatialMapMemLimitedReasonPICO reason;
} XrEventDataSpatialMapMemLimitedPICO;
typedef enum XrSpatialMapSizeLimitedReasonPICO {
XR_SPATIAL_MAP_SIZE_LIMITED_UNKNOWN_PICO = 0,
XR_SPATIAL_MAP_QUANTITY_LIMITED_PICO = 1,
XR_SPATIAL_SINGLE_MAP_SIZE_LIMITED_PICO = 2,
XR_SPATIAL_TOTAL_MAP_SIZE_LIMITED_PICO = 3,
XR_SPATIAL_MAP_SIZE_LIMITED_MAX_ENUM_PICO = 0x7FFFFFFF
} XrSpatialMapSizeLimitedReasonPICO;
static const XrStructureType XR_TYPE_EVENT_DATA_SPATIAL_MAP_SIZE_LIMITED_PICO = (XrStructureType) 1200396003; // first-party only, no extension number
typedef struct XrEventDataSpatialMapSizeLimitedPICO{
XrStructureType type;//XR_TYPE_EVENT_DATA_SPATIAL_MAP_SIZE_LIMITED_PICO
const void* next;
XrSpatialMapSizeLimitedReasonPICO reason;
} XrEventDataSpatialMapSizeLimitedPICO;
typedef XrResult (XRAPI_PTR * PFN_xrSetSpatialEntityComponentPICO )(
XrAnchorPICO anchor,
XrSpatialEntityComponentSetInfoPICO* setInfo);
typedef XrResult (XRAPI_PTR * PFN_xrNotifySceneCaptureCompletionPICO )(XrSenseDataProviderPICO provider);
typedef struct XrAnchorEntityLoadFilterBaseHeaderBD{
XrStructureType type;
const void* next;
} XrAnchorEntityLoadFilterBaseHeaderBD;
static const XrStructureType XR_TYPE_ANCHOR_ENTITY_LOAD_INFO_BD = (XrStructureType) 1200396004;
typedef struct XrAnchorEntityLoadInfoBD{
XrStructureType type;//XR_TYPE_ANCHOR_ENTITY_LOAD_INFO_BD
const void* next;
uint32_t maxResult;
XrDuration timeout;
XrPersistLocationBD location; //Persist location(local or remote)
const XrAnchorEntityLoadFilterBaseHeaderBD* include;
const XrAnchorEntityLoadFilterBaseHeaderBD* exclude;
} XrAnchorEntityLoadInfoBD;
static const XrStructureType XR_TYPE_ANCHOR_ENTITY_LOAD_UUID_FILTER_BD = (XrStructureType) 1200396005;
typedef struct XrAnchorEntityLoadUuidFilterBD{
XrStructureType type;//XR_TYPE_ANCHOR_ENTITY_LOAD_UUID_FILTER_BD
const void* next;
uint32_t uuidCount;
XrUuidEXT* uuidList;
} XrAnchorEntityLoadUuidFilterBD;
static const XrStructureType XR_TYPE_ANCHOR_ENTITY_LOAD_COMPONENT_FILTER_BD = (XrStructureType) 1200396006;
typedef struct XrAnchorEntityLoadComponentFilterBD{
XrStructureType type;//XR_TYPE_ANCHOR_ENTITY_LOAD_COMPONENT_FILTER_BD
const void* next;
XrAnchorComponentTypeFlagsBD typeFlags;
} XrAnchorEntityLoadComponentFilterBD;
static const XrStructureType XR_TYPE_EVENT_DATA_ANCHOR_ENTITY_LOADED_BD = (XrStructureType) 1200396007;
typedef struct XrEventDataAnchorEntityLoadedBD{
XrStructureType type;//XR_TYPE_EVENT_DATA_ANCHOR_ENTITY_LOADED_BD
const void* next;
XrAsyncTaskIdBD taskId;
XrResult result;
uint32_t count;
XrPersistLocationBD location; //Persist location(local or remote)
} XrEventDataAnchorEntityLoadedBD;
static const XrStructureType XR_TYPE_ANCHOR_ENTITY_LOAD_RESULT_BD = (XrStructureType) 1200396008;
typedef struct XrAnchorEntityLoadResultBD {
XrStructureType type;//XR_TYPE_ANCHOR_ENTITY_LOAD_RESULT_BD
const void* next;
XrAnchorEntityBD anchor;
XrUuidEXT uuid;
} XrAnchorEntityLoadResultBD;
static const XrStructureType XR_TYPE_ANCHOR_ENTITY_LOAD_RESULTS_BD = (XrStructureType) 1200396009;
typedef struct XrAnchorEntityLoadResultsBD {
XrStructureType type;//XR_TYPE_ANCHOR_ENTITY_LOAD_RESULTS_BD
const void* next;
uint32_t resultCapacityInput;
uint32_t resultCountOutput;
XrAnchorEntityLoadResultBD* results;
} XrAnchorEntityLoadResultsBD;
// TODO: 按照 bd_spatial_scene.h 修改 是否需要在执行的里面增加参数XrAsyncTaskIdBD* taskId
static const XrStructureType XR_TYPE_ANCHOR_UNPERSIST_UUID_INFO_PICO = (XrStructureType) 1200396010;
typedef struct XrAnchorUnpersistUuidInfoPICO{
XrStructureType type;//XR_TYPE_ANCHOR_UNPERSIST_UUID_INFO_PICO
const void* next;
uint32_t uuidCount; //unpersist uuid count
XrUuidEXT* uuidList; //unpersis uuid list
XrPersistLocationBD location; //Persist location(local or remote)
} XrAnchorUnpersistUuidInfoPICO;
typedef XrResult (XRAPI_PTR *PFN_xrUnpersistAnchorByUuidAsyncPICO) (
XrSenseDataProviderPICO provider,
XrFutureEXT* future,
const XrAnchorUnpersistUuidInfoPICO* info);
static const XrStructureType XR_TYPE_UNPERSIST_ANCHOR_BY_UUID_COMPLETION_PICO = (XrStructureType) 1200396011;
typedef struct XrUnpersistAnchorByUUIDCompletionPICO{
XrStructureType type;//XR_TYPE_UNPERSIST_ANCHOR_BY_UUID_COMPLETION_PICO
XrResult futureResult;
} XrUnpersistAnchorByUUIDCompletionPICO;
typedef XrResult (XRAPI_PTR *PFN_xrUnpersistAnchorByUuidCompletePICO) (
XrSession session,
XrFutureEXT future,
XrUnpersistAnchorByUUIDCompletionPICO* completion);
typedef XrResult (XRAPI_PTR *PFN_xrLoadAnchorEntityBD) (
XrSession session,
const XrAnchorEntityLoadInfoBD* info,
XrAsyncTaskIdBD* taskId);
typedef XrResult (XRAPI_PTR *PFN_xrGetAnchorEntityLoadResultsBD) (
XrSession session,
XrAsyncTaskIdBD taskId,
XrAnchorEntityLoadResultsBD* results);
#ifndef XR_NO_PROTOTYPES
#ifdef XR_EXTENSION_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrSetSpatialEntityComponentPICO(
XrAnchorPICO anchor,
XrSpatialEntityComponentSetInfoPICO* setInfo);
XRAPI_ATTR XrResult XRAPI_CALL xrNotifySceneCaptureCompletionPICO(XrSenseDataProviderPICO provider);
XRAPI_ATTR XrResult XRAPI_CALL xrUnpersistAnchorByUuidAsyncPICO (
XrSenseDataProviderPICO provider,
XrFutureEXT* future,
const XrAnchorUnpersistUuidInfoPICO* info);
XRAPI_ATTR XrResult XRAPI_CALL xrUnpersistAnchorByUuidCompletePICO (
XrSession session,
XrFutureEXT future,
XrUnpersistAnchorByUUIDCompletionPICO* completion);
XRAPI_ATTR XrResult XRAPI_CALL xrLoadAnchorEntityBD(
XrSession session,
const XrAnchorEntityLoadInfoBD* createInfo,
XrAsyncTaskIdBD* taskId);
XRAPI_ATTR XrResult XRAPI_CALL xrGetAnchorEntityLoadResultsBD(
XrSession session,
XrAsyncTaskIdBD taskId,
XrAnchorEntityLoadResultsBD* results);
#endif /* XR_EXTENSION_PROTOTYPES */
#endif /* !XR_NO_PROTOTYPES */
#ifdef __cplusplus
}
#endif
#endif //PICOXRRUNTIME_PICO_SCENE_CAPTURE_CREATION_H