reckfellENGINE

OpenXRSpatialComponentData

Spatial snapshot data: OpenXRSpatialComponentData.

On this page
class OpenXRSpatialComponentDataReckfellSharpInherits RefCounted

Native component-data container for QuerySnapshot, not a tracker, game Entity or ready geometry. OpenXRSpatialQueryResultData must be first in a query array; other components use the same row indices. Validate component support, successful query and row state before reading.

SetCapacity allocates memory rather than device data. Query-result GetCapacity reports allocated array length and can be nonzero without any query. Never consume stale storage after a failed/incomplete query. Final output counts are not separately public between the two passes; changing runtime result counts was not tested.

Buffer getters need the same live snapshot. Copy needed arrays/strings before FreeSpatialSnapshot or the end of a borrowed capability callback. Never double-free that snapshot; keep owned containers alive through use. Raw poses are not ready GlobalTransform values and do not automatically apply WorldOrigin/reference frame/WorldScale.

The base requires backend overrides for component type, allocation and output header. An empty base returns MAX_ENUM sentinel and adds no capability. C# virtual type/capacity dispatch was executed; custom native headers were not.

Integration guide. Eleven Windows XR-off checks covered metadata/capacity/virtual dispatch without reading unfilled memory. Real snapshots, buffer values, pose/UUID/marker decoding, headsets and export remain untested. Engine unchanged.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

OpenXRSpatialComponentDataConstructor
# OpenXRSpatialComponentData
C#
public OpenXRSpatialComponentData();

Creates a caller-owned RefCounted query-data container with empty buffers. Performs no QuerySnapshot and receives no device data. SetCapacity allocates without filling rows. Keep owned containers alive through native query use; do not dispose provider-owned resources.

Methods5

GetComponentTypelong
# GetComponentType
C#
public long GetComponentType();

Native spatial-component type as long. Concrete classes return their type; the base and OpenXRSpatialQueryResultData return MAX_ENUM sentinel and are not ordinary component filters. A type establishes neither runtime support nor filled buffers.

Returns long

Native spatial-component type as long. Concrete classes return their type; the base and OpenXRSpatialQueryResultData return MAX_ENUM sentinel and are not ordinary component filters. A type establishes neither runtime support nor filled buffers.

SetCapacityvoid
# SetCapacity
C#
public void SetCapacity(uint capacity);

Changes storage capacity without querying data or creating spatial entities. QuerySnapshot sets matching component capacity from its initial count pass. Manual calls prepare backend buffers but do not make them readable; do not treat content as valid after resizing. Never resize during native use.

Parameters
NameTypeDefault
capacityuint—
capacity

Changes storage capacity without querying data or creating spatial entities. QuerySnapshot sets matching component capacity from its initial count pass. Manual calls prepare backend buffers but do not make them readable; do not treat content as valid after resizing. Never resize during native use.

_GetComponentTypeulong
# _GetComponentType
C#
public virtual ulong _GetComponentType();

Backend virtual hook returning a correct XrSpatialComponentTypeEXT as ulong. GetComponentType dispatches through the native bridge; C# override dispatch was executed. Inventing a numeric type adds no runtime capability. Ordinary applications should use existing concrete components.

Returns ulong

Backend virtual hook returning a correct XrSpatialComponentTypeEXT as ulong. GetComponentType dispatches through the native bridge; C# override dispatch was executed. Inventing a numeric type adds no runtime capability. Ordinary applications should use existing concrete components.

_GetStructureDataulong
# _GetStructureData
C#
public virtual ulong _GetStructureData(ulong next);

Backend virtual hook returning a native output-structure address with pNext linked to the supplied next. Header, buffers and counts must be valid/alive during the query. The ulong is a pointer, not a RID. Never call/return arbitrary addresses; custom native layout was not tested.

Parameters
NameTypeDefault
nextulong—
next

Next native output-structure address or zero, not a RID. Structures/buffers require live storage and correct layout.

Returns ulong

Backend virtual hook returning a native output-structure address with pNext linked to the supplied next. Header, buffers and counts must be valid/alive during the query. The ulong is a pointer, not a RID. Never call/return arbitrary addresses; custom native layout was not tested.

_SetCapacityvoid
# _SetCapacity
C#
public virtual void _SetCapacity(uint capacity);

Backend virtual allocation hook. Provide storage for the requested capacity and correct native pointers/counts in your structure; zero releases/clears logical slots. Allocation supplies no runtime data. C# capacity dispatch was tested without a custom native header layout/allocation.

Parameters
NameTypeDefault
capacityuint—
capacity

Changes storage capacity without querying data or creating spatial entities. QuerySnapshot sets matching component capacity from its initial count pass. Manual calls prepare backend buffers but do not make them readable; do not treat content as valid after resizing. Never resize during native use.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.