/**************************************************************************** * Copyright 2019 Nreal Techonology Limited. All rights reserved. * * This file is part of NRSDK. * * https://www.nreal.ai/ * *****************************************************************************/ namespace NRKernal { using System; #if UNITY_STANDALONE_WIN using System.Runtime.InteropServices; using UnityEngine; #endif /// Manage the Total Native API. public class NativeInterface { /// Default constructor. public NativeInterface() { //Add Standalone plugin search path. #if UNITY_STANDALONE_WIN NativeApi.SetDllDirectory(System.IO.Path.Combine(Application.dataPath, "Plugins")); #endif NativeHeadTracking = new NativeHeadTracking(this); NativeTracking = new NativeTracking(this); NativeTrackableImage = new NativeTrackableImage(this); NativePlane = new NativePlane(this); NativeTrackable = new NativeTrackable(this); Configration = new NativeConfigration(this); NativeRenderring = new NativeRenderring(); } /// Gets or sets the handle of the tracking. /// The tracking handle. public UInt64 TrackingHandle { get; set; } /// Gets or sets the native head tracking. /// The native head tracking. internal NativeHeadTracking NativeHeadTracking { get; set; } /// Gets or sets the native tracking. /// The native tracking. internal NativeTracking NativeTracking { get; set; } /// Gets or sets the native trackable image. /// The native trackable image. internal NativeTrackableImage NativeTrackableImage { get; set; } /// Gets or sets the native plane. /// The native plane. internal NativePlane NativePlane { get; set; } /// Gets or sets the native trackable. /// The native trackable. internal NativeTrackable NativeTrackable { get; set; } /// Gets or sets the configration. /// The configration. internal NativeConfigration Configration { get; set; } /// Gets or sets the configration. /// The configration. internal NativeRenderring NativeRenderring { get; set; } private partial struct NativeApi { #if UNITY_STANDALONE_WIN [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool SetDllDirectory(string lpPathName); #endif } } }