• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TangoEnums类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TangoEnums的典型用法代码示例。如果您正苦于以下问题:C# TangoEnums类的具体用法?C# TangoEnums怎么用?C# TangoEnums使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TangoEnums类属于命名空间,在下文中一共展示了TangoEnums类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RenderLatestFrame

 /// <summary>
 /// Renders the latest frame.
 /// </summary>
 /// <param name="cameraId">Camera identifier.</param>
 public static void RenderLatestFrame(TangoEnums.TangoCameraId cameraId)
 {
     double timestamp = 0.0f;
     int returnValue = VideoOverlayAPI.TangoService_updateTexture(cameraId, ref timestamp);
     if (returnValue != Common.ErrorType.TANGO_SUCCESS)
     {
         Debug.Log("VideoOverlayProvider.UpdateTexture() Texture was not updated by camera!");
     }
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:13,代码来源:VideoOverlayProvider.cs


示例2: GetIntrinsics

 /// <summary>
 /// Get the camera/sensor intrinsics.
 /// </summary>
 /// <param name="cameraId">Camera identifier.</param>
 /// <param name="intrinsics">Camera intrinsics data.</param>
 public static void GetIntrinsics(TangoEnums.TangoCameraId cameraId, [Out] TangoCameraIntrinsics intrinsics)
 {
     int returnValue = VideoOverlayAPI.TangoService_getCameraIntrinsics(cameraId, intrinsics);
     
     if (returnValue != Common.ErrorType.TANGO_SUCCESS)
     {
         Debug.Log("IntrinsicsProviderAPI.TangoService_getCameraIntrinsics() failed!");
     }
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:14,代码来源:VideoOverlayProvider.cs


示例3: ConnectTexture

 /// <summary>
 /// Connects the texture.
 /// </summary>
 /// <param name="cameraId">Camera identifier.</param>
 /// <param name="textureId">Texture identifier.</param>
 public static void ConnectTexture(TangoEnums.TangoCameraId cameraId, int textureId)
 {
     int returnValue = VideoOverlayAPI.TangoService_connectTextureId(cameraId, textureId);
     
     if (returnValue != Common.ErrorType.TANGO_SUCCESS)
     {
         Debug.Log("VideoOverlayProvider.ConnectTexture() Texture was not connected to camera!");
     }
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:14,代码来源:VideoOverlayProvider.cs


示例4: ExperimentalConnectTexture

 public static void ExperimentalConnectTexture(TangoEnums.TangoCameraId cameraId, int textureId, TangoService_onUnityFrameAvailable onUnityFrameAvailable)
 {
     int returnValue = VideoOverlayAPI.TangoService_Experimental_connectTextureIdUnity(cameraId, (uint)textureId, callbackContext, onUnityFrameAvailable);
     
     if (returnValue != Common.ErrorType.TANGO_SUCCESS)
     {
         Debug.Log("VideoOverlayProvider.ConnectTexture() Texture was not connected to camera!");
     }
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:9,代码来源:VideoOverlayProvider.cs


示例5: SetCallback

		/// <summary>
		/// Sets the callback for notifications when image data is ready.
		/// </summary>
		/// <param name="cameraId">Camera identifier.</param>
		/// <param name="onImageAvailable">On image available callback handler.</param>
		public static void SetCallback(TangoEnums.TangoCameraId cameraId, TangoService_onImageAvailable onImageAvailable)
		{
			int returnValue = VideoOverlayAPI.TangoService_connectOnFrameAvailable(cameraId, callbackContext, onImageAvailable);
			if(returnValue == Tango.Common.ErrorType.TANGO_SUCCESS)
			{
				Debug.Log(CLASS_NAME + ".SetCallback() Callback was set.");
			}
			else
			{
				Debug.Log(CLASS_NAME + ".SetCallback() Callback was not set!");
			}

		}
开发者ID:gitunit,项目名称:Space-Sketchr,代码行数:18,代码来源:VideoOverlayProvider.cs


示例6: TangoService_Experimental_connectTextureIdUnity

 public static extern int TangoService_Experimental_connectTextureIdUnity(TangoEnums.TangoCameraId id, 
                                                                          uint tex, 
                                                                          IntPtr context, 
                                                                          TangoService_onUnityFrameAvailable onUnityFrameAvailable);
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:4,代码来源:VideoOverlayProvider.cs


示例7: TangoService_Experimental_connectTextureIdUnity

 public static int TangoService_Experimental_connectTextureIdUnity(
     TangoEnums.TangoCameraId id, UInt32 texture_y, UInt32 texture_Cb, UInt32 texture_Cr, 
     IntPtr context, APIOnTextureAvailable callback)
 {
     return Common.ErrorType.TANGO_SUCCESS;
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:6,代码来源:VideoOverlayProvider.cs


示例8: TangoService_getCameraIntrinsics

 public static int TangoService_getCameraIntrinsics(
     TangoEnums.TangoCameraId cameraId, [Out] TangoCameraIntrinsics intrinsics)
 {
     return Common.ErrorType.TANGO_SUCCESS;
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:5,代码来源:VideoOverlayProvider.cs


示例9: TangoService_updateTexture

 public static int TangoService_updateTexture(TangoEnums.TangoCameraId cameraId, ref double timestamp)
 {
     return Common.ErrorType.TANGO_SUCCESS;
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:4,代码来源:VideoOverlayProvider.cs


示例10: TangoService_connectOnTextureAvailable

 public static extern int TangoService_connectOnTextureAvailable(
     TangoEnums.TangoCameraId cameraId, IntPtr ContextMenu, APIOnTextureAvailable callback);
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:2,代码来源:VideoOverlayProvider.cs


示例11: TangoService_connectOnFrameAvailable

 public static int TangoService_connectOnFrameAvailable(TangoEnums.TangoCameraId cameraId,
                                                        IntPtr context,
                                                        [In,Out] TangoService_onImageAvailable onImageAvailable)
 {
     return Tango.Common.ErrorType.TANGO_SUCCESS;
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:6,代码来源:VideoOverlayProvider.cs


示例12: TangoService_connectTextureId

 public static int TangoService_connectTextureId(TangoEnums.TangoCameraId cameraId, int textureHandle)
 {
     return Tango.Common.ErrorType.TANGO_SUCCESS;
 }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:4,代码来源:VideoOverlayProvider.cs


示例13: SetCallback

 /// <summary>
 /// Connect a callback to a camera for texture updates.
 /// </summary>
 /// <param name="cameraId">
 /// The ID of the camera to connect this texture to.  Only <code>TANGO_CAMERA_COLOR</code> and
 /// <code>TANGO_CAMERA_FISHEYE</code> are supported.
 /// </param>
 /// <param name="callback">Function called when a new frame is available from the camera.</param>
 internal static void SetCallback(TangoEnums.TangoCameraId cameraId, APIOnTextureAvailable callback)
 {
     int returnValue = API.TangoService_connectOnTextureAvailable(cameraId, IntPtr.Zero, callback);
     if (returnValue == Common.ErrorType.TANGO_SUCCESS)
     {
         Debug.Log(CLASS_NAME + ".SetCallback(OnTextureAvailable) Callback was set.");
     }
     else
     {
         Debug.Log(CLASS_NAME + ".SetCallback(OnTextureAvailable) Callback was not set!");
     }
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:20,代码来源:VideoOverlayProvider.cs


示例14: ClearCallback

        /// <summary>
        /// Clear all camera callbacks.
        /// </summary>
        /// <param name="cameraId">Camera identifier.</param>
        internal static void ClearCallback(TangoEnums.TangoCameraId cameraId)
        {
            int returnValue = API.TangoService_Experimental_connectTextureIdUnity(cameraId, 0, 0, 0, 
                                                                                  IntPtr.Zero, null);
            if (returnValue == Common.ErrorType.TANGO_SUCCESS)
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Unity callback was cleared.");
            }
            else
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Unity callback was not cleared!");
            }

            returnValue = API.TangoService_connectOnFrameAvailable(cameraId, IntPtr.Zero, null);
            if (returnValue == Common.ErrorType.TANGO_SUCCESS)
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Frame callback was cleared.");
            }
            else
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Frame callback was not cleared!");
            }
            
            returnValue = API.TangoService_connectOnTextureAvailable(cameraId, IntPtr.Zero, null);
            if (returnValue == Common.ErrorType.TANGO_SUCCESS)
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Texture callback was cleared.");
            }
            else
            {
                Debug.Log(CLASS_NAME + ".ClearCallback() Texture callback was not cleared!");
            }
        }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:37,代码来源:VideoOverlayProvider.cs


示例15: _OnImageAvailable

        /// <summary>
        /// Handle the callback sent by the Tango Service
        /// when a new image is sampled.
        /// </summary>
        /// <param name="cameraId">Camera identifier.</param>
        /// <param name="callbackContext">Callback context.</param>
        /// <param name="imageBuffer">Image buffer.</param>
        protected void _OnImageAvailable(IntPtr callbackContext,
    	                                 TangoEnums.TangoCameraId cameraId, 
    	                                 TangoImageBuffer imageBuffer)
        {
            m_previousCameraId = cameraId;

            if(m_previousImageBuffer.data == null)
            {
                m_previousImageBuffer.data = new byte[imageBuffer.width * imageBuffer.height * 2];
            }

            m_previousImageBuffer.width = imageBuffer.width;
            m_previousImageBuffer.height = imageBuffer.height;
            m_previousImageBuffer.stride = imageBuffer.stride;
            m_previousImageBuffer.timestamp = imageBuffer.timestamp;
            m_previousImageBuffer.format = imageBuffer.format;
            m_previousImageBuffer.frame_number = imageBuffer.frame_number;

            Marshal.Copy(imageBuffer.data, m_previousImageBuffer.data, 0, m_previousImageBuffer.data.Length);

            m_shouldSendEvent = true;
        }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:29,代码来源:VideoOverlayListener.cs


示例16: TangoService_updateTextureExternalOes

 public static extern int TangoService_updateTextureExternalOes(
     TangoEnums.TangoCameraId cameraId, UInt32 glTextureId, out double timestamp);
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:2,代码来源:VideoOverlayProvider.cs


示例17: OnExperimentalTangoImageAvailable

    /// <summary>
    /// This will be called when a new frame is available from the camera.
    ///
    /// The first scan-line of the color image is reserved for metadata instead of image pixels.
    /// </summary>
    /// <param name="cameraId">Camera identifier.</param>
    public void OnExperimentalTangoImageAvailable(TangoEnums.TangoCameraId cameraId)
    {
        if (cameraId == TangoEnums.TangoCameraId.TANGO_CAMERA_COLOR)
        {
            m_screenUpdateTime = VideoOverlayProvider.RenderLatestFrame(TangoEnums.TangoCameraId.TANGO_CAMERA_COLOR);

            // Rendering the latest frame changes a bunch of OpenGL state.  Ensure Unity knows the current OpenGL state.
            GL.InvalidateState();
        }
    }
开发者ID:ekumenlabs,项目名称:Garkanoid,代码行数:16,代码来源:TangoARScreen.cs


示例18: TangoService_connectOnFrameAvailable

 public static extern int TangoService_connectOnFrameAvailable(
     TangoEnums.TangoCameraId cameraId, IntPtr context, 
     [In, Out] APIOnImageAvailable callback);
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:3,代码来源:VideoOverlayProvider.cs


示例19: RenderLatestFrame

        /// <summary>
        /// DEPRECATED: Update the texture that has been connected to camera referenced by TangoCameraId with the latest image
        /// from the camera.
        /// </summary>
        /// <returns>The timestamp of the image that has been pushed to the connected texture.</returns>
        /// <param name="cameraId">
        /// The ID of the camera to connect this texture to.  Only <c>TANGO_CAMERA_COLOR</c> is supported.
        /// </param>
        public static double RenderLatestFrame(TangoEnums.TangoCameraId cameraId)
        {
#if UNITY_EDITOR
            if (m_emulatedExpId_Y != null && m_emulatedExpId_CbCr != null)
            {
                m_emulatedExpId_Y.DiscardContents();
                m_emulatedExpId_CbCr.DiscardContents();
                Graphics.Blit(m_emulatedColorRenderTexture, m_emulatedExpId_Y, m_yuvFilterY);
                Graphics.Blit(m_emulatedColorRenderTexture, m_emulatedExpId_CbCr, m_yuvFilterCbCr);
            }

            return m_lastColorEmulationTime;
#else

            double timestamp = 0.0;
            int returnValue = API.TangoService_updateTexture(cameraId, ref timestamp);
            if (returnValue != Common.ErrorType.TANGO_SUCCESS)
            {
                Debug.Log("VideoOverlayProvider.UpdateTexture() Texture was not updated by camera!");
            }
            
            return timestamp;
#endif
        }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:32,代码来源:VideoOverlayProvider.cs


示例20: UpdateARScreen

        /// <summary>
        /// Update the AR screen's texture to the most recent state of the specified camera.
        /// </summary>
        /// <returns>The timestamp of the image that has been pushed to the AR screen's texture.</returns>
        /// <param name="cameraId">
        /// The ID of the camera to connect this texture to.  Only <c>TANGO_CAMERA_COLOR</c> is supported.
        /// </param>
        public static double UpdateARScreen(TangoEnums.TangoCameraId cameraId)
        {
#if UNITY_EDITOR
            if (m_emulatedARScreenTexture != null)
            {
                m_emulatedARScreenTexture.DiscardContents();
                Graphics.Blit(m_emulatedColorRenderTexture, m_emulatedARScreenTexture);
            }

            return m_lastColorEmulationTime;
#else
            double timestamp = 0.0;
            uint tex = API.TangoUnity_getArTexture();
            int returnValue = API.TangoService_updateTextureExternalOes(cameraId, tex, out timestamp);
            
            if (returnValue != Common.ErrorType.TANGO_SUCCESS)
            {
                Debug.Log("Unable to update texture. " + Environment.StackTrace);
            }

            // Rendering the latest frame changes a bunch of OpenGL state.  Ensure Unity knows the current OpenGL 
            // state.
            GL.InvalidateState();

            return timestamp;
#endif
        }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:34,代码来源:VideoOverlayProvider.cs



注:本文中的TangoEnums类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Target类代码示例发布时间:2022-05-24
下一篇:
C# TaintCallback类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap