SixDegreesSDK_advanced.h

Version: 6D.ai Beta SDK 0.20.0
Includes: <ARKit/ARKit.h>

Last Updated: Tuesday, Feb 5, 2019

Introduction

This file is part of the 6D.ai Beta SDK and is not licensed for commercial use.

The 6D.ai Beta SDK can not be copied and/or distributed without the express permission of 6degrees.xyz Inc.

Contact developers@6d.ai for licensing requests.



Functions

SixDegreesSDK_GetARKitSession

Returns the ARKit Session object managed by the SDK. Optional ARKit features enabled by SixDegreesSDK_InitializeWithConfig() are accessible through this object.

SixDegreesSDK_GetARKitTransform

Populates poseDataOut with a column-major 4x4 matrix describing the transform from ARKit to world coordinates.

SixDegreesSDK_InitializeWithConfig

Initializes ARKit and the SDK's internal states using the Metal pipeline. Call this first!


SixDegreesSDK_GetARKitSession


Returns the ARKit Session object managed by the SDK. Optional ARKit features enabled by SixDegreesSDK_InitializeWithConfig() are accessible through this object.

ARSession* SixDegreesSDK_GetARKitSession(
    void);  
Return Value

the ARSession pointer of the object managed by the SDK, null if none available.

Discussion

the ARSession pointer gives access, through the current ARFrame, to ARAnchor objects like planes and images, optionally enabled with SixDegreesSDK_InitializeWithConfig().

Users should not change the delegate object or start and stop the session.

This API call is made available for expert users.


SixDegreesSDK_GetARKitTransform


Populates poseDataOut with a column-major 4x4 matrix describing the transform from ARKit to world coordinates.

void SixDegreesSDK_GetARKitTransform(
    float *transformDataOut,
    int bufferSize);  
Parameters
transformDataOut

pointer to the first element a float array of size 16.

bufferSize

must be 16.

Discussion

Like ARKit, world coordinates assume Y is up (aligned with gravity), X is right and Z towards the user, relatively to the orientation of the device the first time the map was created.

Use the output of this method to transform native ARKit transforms and coordinates (for instance, ARAnchor objects) to 6D.ai world coordinates.

This API call is made available for expert users.


SixDegreesSDK_InitializeWithConfig


Initializes ARKit and the SDK's internal states using the Metal pipeline. Call this first!

  bool SixDegreesSDK_InitializeWithConfig(
    ARWorldTrackingConfiguration *configuration);  
Parameters
configuration

optional pointer to the ARWorldTrackingConfiguration object for ARKit. The following configuration options are required: - video format must be a multiple of 16:9 - autofocus must be disabled - world alignment must be ARWorldAlignmentGravity 6D will use a default configuration if the parameter is null.

Return Value

true if the SDK is initializing, false if there is a problem (check the logs).

Discussion

Most other API calls in this SDK will not work until you call this. Call only once!

This API call returns early, use SixDegreesSDK_IsInitialized() to monitor initialization progress.

Initialization will fail if the current device is not supported. Use SixDegreesSDK_IsDeviceSupported() to check that the device is supported.

This API call is made available for expert users, others should use SixDegreesSDK_Initialize().


Macro Definitions

API_ADVANCED_METHOD

API_ADVANCED_METHOD


 #define API_ADVANCED_METHOD FOUNDATION_EXPORT __attribute__((visibility ("default")))