Types in wvr_scene.h and wvr_anchor.h

WVR define

  • Scene define
WVR_MAX_SEMANTIC_LABEL_NAME_SIZE

maximum size for semantic label name

  • Anchor define
WVR_MAX_SPATIAL_ANCHOR_NAME_SIZE

maximum size for anchor’s name

WVR enum

  • Scene enum
enum WVR_ScenePerceptionTarget

enumerate different scene perception types.

Values:

WVR_ScenePerceptionTarget_2dPlane = 0

Specifies to get 2d plane data.

WVR_ScenePerceptionTarget_3dObject = 1

Specifies to get 3d object data.

WVR_ScenePerceptionTarget_SceneMesh = 2

Specifies to get scene meshes of surrounding environment

WVR_ScenePerceptionTarget_Max = 0x7FFFFFFF
enum WVR_ScenePerceptionState

enumerate different scene perception state

Values:

WVR_ScenePerceptionState_Empty = 0

indicates that a perception target is not perceived

WVR_ScenePerceptionState_Observing = 1

indicates that a perception target is observing

WVR_ScenePerceptionState_Paused = 2

indicates that a perception target is paused

WVR_ScenePerceptionState_Completed = 3

indicates that a perception target is completed

WVR_ScenePerceptionState_Max = 0x7FFFFFFF
enum WVR_ScenePlaneLabel

The scene plane label.

Values:

WVR_ScenePlaneLabel_Unknown = 0

This scene plane has yet to be classified and assigned a type

WVR_ScenePlaneLabel_Floor = 1

This scene plane has classified and assigned as floor

WVR_ScenePlaneLabel_Ceiling = 2

This scene plane has classified and assigned as ceiling

WVR_ScenePlaneLabel_Wall = 3

This scene plane has classified and assigned as wall

WVR_ScenePlaneLabel_Desk = 4

This scene plane has classified and assigned as desk

WVR_ScenePlaneLabel_Couch = 5

This scene plane has classified and assigned as couch

WVR_ScenePlaneLabel_Door = 6

This scene plane has classified and assigned as door

WVR_ScenePlaneLabel_Window = 7

This scene plane has classified and assigned as window

WVR_ScenePlaneLabel_Stage = 8

This scene plane has classified and assigned as stage

WVR_ScenePlaneLabel_Max = 0x7FFFFFFF

meaning no filer and all planes are returned

enum WVR_ScenePlaneType

The scene plane type.

Values:

WVR_ScenePlaneType_Unknown = 0

This planes have yet to be classified and assigned to unknown plane type

WVR_ScenePlaneType_HorizontalUpwardFacing = 1

horizontal planes that point upward facing will be detected

WVR_ScenePlaneType_HorizontalDownwardFacing = 2

horizontal planes that point downward facing will be detected

WVR_ScenePlaneType_Vertical = 3

vertical planes will be detected

WVR_ScenePlaneType_Max = 0x7FFFFFFF

meaning no filer and all planes are returned

  • Anchor enum
enum WVR_SpatialAnchorTrackingState

enumerate different spatial anchor tracking state

Values:

WVR_SpatialAnchorTrackingState_Tracking

Tracking state; The anchor is located and its pose is valid.

WVR_SpatialAnchorTrackingState_Paused

Paused state; The system is detecting/searching the anchor and its pose is not ready.

WVR_SpatialAnchorTrackingState_Stopped

Stopped state; The anchor can not be tracked anymore, for instance it has been deleted.

WVR struct

  • Scene struct
struct WVR_Uuid

data is a 128-bit immutable universally unique identifier.

Public Members

uint8_t data[WVR_UUID_SIZE]
struct WVR_SceneMesh

scene mesh buffer identifier

Specifies the scene mesh buffer to read.

Public Members

uint64_t meshBufferId
struct WVR_Extent2Df

the 2D size of the plane’s extent

The 2D size of the plane’s extent, where width is the width of the plane along the X axis and height is the height of the plane along the Y axis.

Public Members

float width

the width of the plane along the X axis

float height

the height of the plane along the Y axis

struct WVR_ScenePlane

the scene plane information from WVR_GetScenePlanes API

The WVR_ScenePlane structure represents these information related to a scene plane.

Note: Starting from API level 16, developers can retrieve WVR_SemanticLabelName of WVR_ScenePlanes from WVR_GetScenePlanes API.

Public Members

WVR_Uuid uuid

the plane’s uuid

WVR_Uuid parentUuid

the plane’s parentUuid

uint64_t meshBufferId

the uint64_t identifier that specifies the mesh buffer of this plane

WVR_Pose_t pose

the plane’s pose

WVR_Extent2Df extent

the 2D size of the plane’s extent

WVR_ScenePlaneType planeType

the plane’s type, refer to WVR_ScenePlaneType

WVR_ScenePlaneLabel planeLabel

the plane’s label, refer to WVR_ScenePlaneLabel

WVR_SemanticLabelName semanticName

the semantic name of the plane, refer to WVR_SemanticLabelName

struct WVR_ScenePlaneFilter

the scene plane filter comprised WVR_ScenePlaneType and WVR_ScenePlaneLabel.

Developers use the WVR_ScenePlaneFilter structure to filter the scene planes.

Public Members

WVR_ScenePlaneType planeType

the plane’s type, refer to WVR_ScenePlaneType

WVR_ScenePlaneLabel planeLabel

the plane’s label, refer to WVR_ScenePlaneLabel

struct WVR_SceneMeshBuffer

the scene mesh information from WVR_GetSceneMeshes API

The WVR_SceneMeshBuffer structure represents the related information related to a scene mesh. The indexBuffer is an array of triangle indices filled in by the runtime. The triangle indices must be returned in counter-clockwise order and three indices denote one triangle.

Public Members

uint32_t vertexCapacityInput

the capacity of the vertexBuffer array, or 0 to indicate a request to retrieve the required capacity.

uint32_t vertexCountOutput

a pointer to the count of vertices

WVR_Vector3f *vertexBuffer

an array of WVR_Vector3f filled in by the runtime returns the position of vertices in the mesh component’s space.

uint32_t indexCapacityInput

the capacity of the indexBuffer array, or 0 to indicate a request to retrieve the required capacity.

uint32_t indexCountOutput

a pointer to the count of index

uint32_t *indexBuffer

an array of triangle indices filled in by the runtime, specifying the indices of the scene mesh buffer in the vertices array.

struct WVR_SemanticLabelName

Public Members

char name[WVR_MAX_SEMANTIC_LABEL_NAME_SIZE]

The semantic name of the scene component

  • Anchor struct
struct WVR_SpatialAnchorCreateInfo

The parameters to create a new spatial anchor used in WVR_CreateSpatialAnchor API.

Developers provide information to create an anchor, including pose, originModel and anchorName. Note that only WVR_PoseOriginModel_OriginOnHead and WVR_PoseOriginModel_OriginOnGround cases are supported in originModel.

Public Members

WVR_Pose_t pose

The pose is an WVR_Pose defining the position and orientation of the anchor.

WVR_PoseOriginModel originModel

The pose’s origin model, refer to WVR_PoseOriginModel

WVR_SpatialAnchorName anchorName

The name of the anchor, refer to WVR_SpatialAnchorName

struct WVR_SpatialAnchorState

returned anchor state

Public Members

WVR_SpatialAnchorTrackingState trackingState

tracking state of the input anchor, refer to WVR_SpatialAnchorTrackingState.

WVR_Pose_t pose

the pose of anchor related to originModel, refer to WVR_Pose.

WVR_SpatialAnchorName anchorName

The name of the anchor, refer to WVR_SpatialAnchorName.