Exemple #1
0
 internal static bool TryAcquireLatestImageBuffer(ref NativeImage nativeImage)
 {
     if (nativeImage.planeInfos == null)
     {
         nativeImage.planeInfos = new List <ImageData.PlaneInfo>();
     }
     return(TangoDevice.Internal_TryAcquireLatestImageBuffer(nativeImage.planeInfos, out nativeImage.width, out nativeImage.height, out nativeImage.format, out nativeImage.timestampNs, out nativeImage.planeData, out nativeImage.nativePtr, out nativeImage.metadata));
 }
Exemple #2
0
 internal static bool TryGetLatestPointCloud(ref PointCloudData pointCloudData)
 {
     if (pointCloudData.points == null)
     {
         pointCloudData.points = new List <Vector4>();
     }
     pointCloudData.points.Clear();
     return(TangoDevice.TryGetLatestPointCloudInternal(pointCloudData.points, out pointCloudData.version, out pointCloudData.timestamp));
 }
Exemple #3
0
 internal static bool TryGetLatestImageData(ref ImageData image)
 {
     if (image.planeData == null)
     {
         image.planeData = new List <byte>();
     }
     if (image.planeInfos == null)
     {
         image.planeInfos = new List <ImageData.PlaneInfo>();
     }
     image.planeData.Clear();
     return(TangoDevice.TryGetLatestImageDataInternal(image.planeData, image.planeInfos, out image.width, out image.height, out image.format, out image.timestampNs, out image.metadata));
 }
Exemple #4
0
 internal static bool Connect(TangoConfig config)
 {
     string[] boolKeys;
     bool[]   boolValues;
     TangoDevice.CopyDictionaryToArrays <bool>(config.m_boolParams, out boolKeys, out boolValues);
     string[] intKeys;
     int[]    intValues;
     TangoDevice.CopyDictionaryToArrays <int>(config.m_intParams, out intKeys, out intValues);
     string[] longKeys;
     long[]   longValues;
     TangoDevice.CopyDictionaryToArrays <long>(config.m_longParams, out longKeys, out longValues);
     string[] doubleKeys;
     double[] doubleValues;
     TangoDevice.CopyDictionaryToArrays <double>(config.m_doubleParams, out doubleKeys, out doubleValues);
     string[] stringKeys;
     string[] stringValues;
     TangoDevice.CopyDictionaryToArrays <string>(config.m_stringParams, out stringKeys, out stringValues);
     return(TangoDevice.Connect(boolKeys, boolValues, intKeys, intValues, longKeys, longValues, doubleKeys, doubleValues, stringKeys, stringValues));
 }
Exemple #5
0
 private static void OnBackgroundRendererChanged()
 {
     TangoDevice.SetBackgroundMaterial(TangoDevice.m_BackgroundRenderer.backgroundMaterial);
     TangoDevice.SetRenderMode(TangoDevice.m_BackgroundRenderer.mode);
 }
Exemple #6
0
 internal static void ReleaseImageBuffer(IntPtr imageBufferNativePtr)
 {
     TangoDevice.Internal_ReleaseImageBuffer(imageBufferNativePtr);
 }
Exemple #7
0
 internal static void ReleasePointCloud(IntPtr pointCloudNativePtr)
 {
     TangoDevice.Internal_ReleasePointCloud(pointCloudNativePtr);
 }
Exemple #8
0
 internal static bool TryAcquireLatestPointCloud(ref NativePointCloud pointCloud)
 {
     return(TangoDevice.Internal_TryAcquireLatestPointCloud(out pointCloud.version, out pointCloud.timestamp, out pointCloud.numPoints, out pointCloud.points, out pointCloud.nativePtr));
 }