Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Marker-Based Scene Alignment APIs (AIO)

LBSS provides several application programming interfaces (APIs) to assist in Marker-Based Scene Alignment.
Note:

These APIs can only be used with compatible All-in-One (AIO) VR applications developed using the VIVE Wave VR SDK. For APIs designed for use with PC VR applications, see Marker-Based Scene Alignment APIs (PC VR).

Configure marker ID and dictionary

Configures the marker ID and dictionary for one or two ArUco markers. Scene alignment only starts after users scan the secondary marker when configuring two markers.

One ArUco marker

In this sample, the marker ID is 66, and the marker size is 0.280. This marker size value corresponds to a marker measuring 280 millimeters on each side.
string polling_value;
        string key = "‍PLAYER00InitMA"‍;
        key += "‍{\"‍marker1\"‍: {\"‍id\"‍: 66,\"‍behavior\"‍: 0,\"‍size\"‍: 0.280}}"‍;
        uint RETURN_SIZE = 256;
        IntPtr value = Marshal.AllocHGlobal(new IntPtr(RETURN_SIZE));
        Interop.WVR_GetParameters(WVR_DeviceType.WVR_DeviceType_HMD, Marshal.StringToHGlobalAnsi(key), value, RETURN_SIZE);
        polling_value = Marshal.PtrToStringAnsi(value);
        Marshal.FreeCoTaskMem(value);
        if(string.Compare(polling_value, "‍InitMAErr"‍) == 0) 
								// Handles the case where initialization failed. Check the configuration string to determine the cause of the error and write the appropriate error handling code.
        {
            // Write your error handling code here.
        }

Two ArUco markers

In this sample, the marker IDs are 66 and 88 and both marker sizes are 0.280.
string polling_value;
        string key = "‍PLAYER00InitMA"‍;
        key += "‍{\"‍marker1\"‍: {\"‍id\"‍: 66,\"‍behavior\"‍: 0,\"‍size\"‍: 0.280,\"‍isMainMarker\"‍: true,\"‍pairMarkerID\"‍: 88},\"‍marker2\"‍: {\"‍id\"‍: 88,\"‍behavior\"‍: 0,\"‍size\"‍: 0.280,\"‍isMainMarker\"‍: false,\"‍pairMarkerID\"‍: 66}}"‍;
        uint RETURN_SIZE = 256;
        IntPtr value = Marshal.AllocHGlobal(new IntPtr(RETURN_SIZE));
        Interop.WVR_GetParameters(WVR_DeviceType.WVR_DeviceType_HMD, Marshal.StringToHGlobalAnsi(key), value, RETURN_SIZE);
        polling_value = Marshal.PtrToStringAnsi(value);
        Marshal.FreeCoTaskMem(value);
        if(string.Compare(polling_value, "‍InitMAErr"‍) == 0) 
								// Handles the case where initialization failed. Check the configuration string to determine the cause of the error and write the appropriate error handling code.
        {
            // Write your error handling code here.
        }

Retain alignment

Keeps alignment results intact if you change environmental settings or switch VR apps.

key = "‍ClearRecenterXform"‍;
        Interop.WVR_SetParameters(WVR_DeviceType.WVR_DeviceType_HMD, Marshal.StringToHGlobalAnsi(key));
        // This clears the recenter transform for the headset and other tracking devices or objects. You can also manage each device separately, but this is not necessary for most applications.
Submit
Thank you! Your feedback helps others to see the most helpful information.