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

C# Tango.TangoApplication类代码示例

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

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



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

示例1: Start

    /// <summary>
    /// Use this for initialization.
    /// </summary>
    public void Start() 
    {
        m_tangoApplication = FindObjectOfType<TangoApplication>();
        m_tangoApplication.Register(this);

        m_uwTss.SetColumn (0, new Vector4 (1.0f, 0.0f, 0.0f, 0.0f));
        m_uwTss.SetColumn (1, new Vector4 (0.0f, 0.0f, 1.0f, 0.0f));
        m_uwTss.SetColumn (2, new Vector4 (0.0f, 1.0f, 0.0f, 0.0f));
        m_uwTss.SetColumn (3, new Vector4 (0.0f, 0.0f, 0.0f, 1.0f));

        m_cTuc.SetColumn (0, new Vector4 (1.0f, 0.0f, 0.0f, 0.0f));
        m_cTuc.SetColumn (1, new Vector4 (0.0f, -1.0f, 0.0f, 0.0f));
        m_cTuc.SetColumn (2, new Vector4 (0.0f, 0.0f, 1.0f, 0.0f));
        m_cTuc.SetColumn (3, new Vector4 (0.0f, 0.0f, 0.0f, 1.0f));

        m_triangles = new int[VERT_COUNT];
        // Assign triangles, note: this is just for visualizing point in the mesh data.
        for (int i = 0; i < VERT_COUNT; i++)
        {
            m_triangles[i] = i;
        }

        m_mesh = GetComponent<MeshFilter>().mesh;
        m_mesh.Clear();
        m_mesh.triangles = m_triangles;
        m_mesh.RecalculateBounds();
        m_mesh.RecalculateNormals();
       
    }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:32,代码来源:Pointcloud.cs


示例2: CheckForTangoApplication

 /// <summary>
 /// Check for a usable tango application component in the scene. Draw warning if 
 /// one could not be found.
 /// 
 /// Should be called first before using any other TangoPrefabInspectorHelper function
 /// during a given frame, to determine if a valid TangoApplication reference exists
 /// with which to call other TangoPrefabInspectorHelper methods.
 /// </summary>
 /// <returns><c>true</c>, if a tango application on an active GameObject can be identified, 
 /// <c>false</c> otherwise.</returns>
 /// <param name="inspectedBehaviour">Prefab behavior that's being inspected.</param>
 /// <param name="tangoApplication">Prefab inspector's reference to Tango Application, or
 /// null if no Tango Application on an active GameObject can be identified.</param>
 public static bool CheckForTangoApplication(MonoBehaviour inspectedBehaviour,
                                             ref TangoApplication tangoApplication)
 {
     if (tangoApplication == null || !tangoApplication.gameObject.activeInHierarchy)
     {
         tangoApplication = GameObject.FindObjectOfType<TangoApplication>();
     }
     
     // Note: .isActiveAndEnabled is the appropriate thing to check here because all Register() 
     // calls on existing Tango prefabs are called in Start(), which won't occur until both the
     // behaviour is enabled and the game object it is attached to is active.
     // 
     // Conversely, if any of the tango prefabs called Register() in Awake(), the correct thing
     // to check against would be .gameObject.activeInHeirarchy, since Awake is called when the
     // game object it is attached to is active, regardless of whether the behaviour itself is
     // enabled.
     if (tangoApplication == null && inspectedBehaviour.isActiveAndEnabled)
     {
         EditorGUILayout.HelpBox("Could not find an active TangoApplication component in the scene.\n\n"
                                 + "Component will not function correctly if it cannot find "
                                 + "an active TangoApplication component at runtime.",
                                 MessageType.Warning);
         return false;
     }
     
     return tangoApplication != null;
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:40,代码来源:TangoPrefabInspectorHelper.cs


示例3: Start

 /// <summary>
 /// Use this for initialization.
 /// </summary>
 public void Start()
 {
     m_marker.SetActive(false);
     m_pointCloud = FindObjectOfType<TangoPointCloud>();
     m_pointCloudFloor = FindObjectOfType<TangoPointCloudFloor>();
     m_tangoApplication = FindObjectOfType<TangoApplication>();
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:10,代码来源:TangoFloorFindingUIController.cs


示例4: Start

    /// <summary>
    /// Start this instance.
    /// </summary>
    private void Start()
    {
        Application.targetFrameRate = 60;

        m_tangoApplication = FindObjectOfType<TangoApplication>();

        if(m_tangoApplication != null)
        {
            if(AndroidHelper.IsTangoCorePresent())
            {
                // Request Tango permissions
                m_tangoApplication.RegisterPermissionsCallback(_OnTangoApplicationPermissionsEvent);
                m_tangoApplication.RequestNecessaryPermissionsAndConnect();
                m_tangoApplication.Register(this);
            }
            else
            {
                // If no Tango Core is present let's tell the user to install it!
                StartCoroutine(_InformUserNoTangoCore());
            }
        }
        else
        {
            Debug.Log("No Tango Manager found in scene.");
        }
    }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:29,代码来源:CustomTangoController.cs


示例5: Start

    // Use this for initialization
    void Start ()
    {
        // Initialize some variables
        m_tangoRotation = Quaternion.Euler(90,0,0);
        m_tangoPosition = Vector3.zero;
        m_startPosition = transform.position;
        m_tangoApplication = FindObjectOfType<TangoApplication>();
        if(m_tangoApplication != null)
        {
            // Request Tango permissions
            m_tangoApplication.RegisterPermissionsCallback(PermissionsCallback);
            m_tangoApplication.RequestNecessaryPermissionsAndConnect();
            m_tangoApplication.Register(this);
        }
        else
        {
            Debug.Log("No Tango Manager found in scene.");
        }

        m_uwTss = new Matrix4x4();
        m_uwTss.SetColumn (0, new Vector4 (1.0f, 0.0f, 0.0f, 0.0f));
        m_uwTss.SetColumn (1, new Vector4 (0.0f, 0.0f, 1.0f, 0.0f));
        m_uwTss.SetColumn (2, new Vector4 (0.0f, 1.0f, 0.0f, 0.0f));
        m_uwTss.SetColumn (3, new Vector4 (0.0f, 0.0f, 0.0f, 1.0f));
        
        m_dTuc = new Matrix4x4();
        m_dTuc.SetColumn (0, new Vector4 (1.0f, 0.0f, 0.0f, 0.0f));
        m_dTuc.SetColumn (1, new Vector4 (0.0f, 1.0f, 0.0f, 0.0f));
        m_dTuc.SetColumn (2, new Vector4 (0.0f, 0.0f, -1.0f, 0.0f));
        m_dTuc.SetColumn (3, new Vector4 (0.0f, 0.0f, 0.0f, 1.0f));


        Application.targetFrameRate = 60;

    }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:36,代码来源:PoseController.cs


示例6: _DrawMotionTrackingOptions

    /// <summary>
    /// Draw motion tracking options.
    /// </summary>
    /// <param name="tangoApplication">Tango application.</param>
    private void _DrawMotionTrackingOptions(TangoApplication tangoApplication)
    {
        tangoApplication.m_enableMotionTracking = EditorGUILayout.Toggle("Enable Motion Tracking", 
                                                                         tangoApplication.m_enableMotionTracking);
        if (tangoApplication.m_enableMotionTracking)
        {
            EditorGUI.indentLevel++;
            tangoApplication.m_motionTrackingAutoReset = EditorGUILayout.Toggle("Auto Reset", 
                                                                                tangoApplication.m_motionTrackingAutoReset);

            tangoApplication.m_enableADFLoading = EditorGUILayout.Toggle("Load ADF",
                                                                         tangoApplication.m_enableADFLoading);
            tangoApplication.m_enableAreaLearning = EditorGUILayout.Toggle("Area Learning", 
                                                                           tangoApplication.m_enableAreaLearning);

            tangoApplication.m_enableCloudADF = EditorGUILayout.Toggle("Cloud ADF", tangoApplication.m_enableCloudADF);
            if (tangoApplication.m_enableCloudADF)
            {
                tangoApplication.m_cloudApiKey = EditorGUILayout.TextField("Cloud API Key", tangoApplication.m_cloudApiKey);
            }

            EditorGUI.indentLevel--;
        }
        EditorGUILayout.Space();
    }
开发者ID:gitunit,项目名称:project-tango-poc,代码行数:29,代码来源:TangoInspector.cs


示例7: Start

 /// <summary>
 /// Start this instance.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = GetComponent<TangoApplication>();
     m_tangoApplication.Register(this);
     AndroidHelper.InitTangoUx();
     SetHoldPosture(m_holdPosture);
 }
开发者ID:gitunit,项目名称:project-tango-poc,代码行数:10,代码来源:TangoUx.cs


示例8: Start

    // Use this for initialization
    void Start()
    {
        // Prevent the screen from sleeping
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        // Initialize some variables
        m_tangoRotation = Quaternion.identity;
        m_tangoPosition = Vector3.zero;
        m_startPosition = transform.position;
        m_tangoApplication = FindObjectOfType<TangoApplication>();
        if(m_tangoApplication != null)
        {
            // Request Tango permissions
            m_tangoApplication.RegisterPermissionsCallback(PermissionsCallback);
            m_tangoApplication.RequestNecessaryPermissionsAndConnect();
            m_tangoApplication.Register(this);
        }
        else
        {
            Debug.Log("No Tango Manager found in scene.");
        }

        //sp = new SerialPort( "baka", 9600, Parity.None, 8, StopBits.One);

        //sp.Open();

        //sp.ReadTimeout = 50;
    }
开发者ID:techierajan,项目名称:spiritus-chronomatix,代码行数:29,代码来源:PoseController.cs


示例9: _DrawMotionTrackingOptions

    /// <summary>
    /// Draw motion tracking options.
    /// </summary>
    /// <param name="tangoApplication">Tango application.</param>
    private void _DrawMotionTrackingOptions(TangoApplication tangoApplication)
    {
        tangoApplication.m_enableMotionTracking = EditorGUILayout.Toggle("Enable Motion Tracking",
                                                                         tangoApplication.m_enableMotionTracking);
        if (tangoApplication.m_enableMotionTracking)
        {
            EditorGUI.indentLevel++;
            tangoApplication.m_motionTrackingAutoReset = EditorGUILayout.Toggle("Auto Reset",
                                                                                tangoApplication.m_motionTrackingAutoReset);

            tangoApplication.m_useLowLatencyIMUIntegration = EditorGUILayout.Toggle("Low Latency Pose",
                                                                                    tangoApplication.m_useLowLatencyIMUIntegration);

            tangoApplication.m_enableAreaLearning = EditorGUILayout.Toggle("Area Learning",
                                                                           tangoApplication.m_enableAreaLearning);
            if (tangoApplication.m_enableAreaLearning)
            {
                EditorGUI.indentLevel++;
                tangoApplication.m_useExperimentalADF = EditorGUILayout.Toggle("High Accuracy (Experimental)",
                                                                               tangoApplication.m_useExperimentalADF);
                EditorGUI.indentLevel--;
            }

            EditorGUI.indentLevel--;
        }
        EditorGUILayout.Space();
    }
开发者ID:BrendaManrique,项目名称:tango-examples-unity,代码行数:31,代码来源:TangoInspector.cs


示例10: Start

 /// <summary>
 /// Use this for initialization.
 /// </summary>
 private void Start() 
 {
     m_currentFPS = 0;
     m_framesSinceUpdate = 0;
     m_currentTime = 0.0f;
     m_fpsText = "FPS = Calculating";
     m_tangoApplication = FindObjectOfType<TangoApplication>();
 }
开发者ID:Jicheng-Yan,项目名称:tango-examples-unity,代码行数:11,代码来源:FPSCounter.cs


示例11: Start

 /// <summary>
 /// Unity start override function.
 /// 
 /// We register this object as a listener to the pose callbacks.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     
     if (m_tangoApplication != null)
     {
         m_tangoApplication.Register(this);
     }
 }
开发者ID:ekumenlabs,项目名称:Garkanoid,代码行数:14,代码来源:RelocalizingOverlay.cs


示例12: Start

 /// <summary>
 /// Use this for initialization.
 /// </summary>
 private void Start()
 {
     m_currentFPS = 0;
     m_framesSinceUpdate = 0;
     m_currentTime = 0.0f;
     m_FPSText = "FPS = Calculating";
     m_label = new Rect((Screen.width * 0.025f) - 50, (Screen.height * 0.96f) - 25, 600.0f, 50.0f);
     m_tangoApplication = FindObjectOfType<TangoApplication>();
 }
开发者ID:JeffPinkston,项目名称:tango-examples-unity,代码行数:12,代码来源:AreaLearningFPSCounter.cs


示例13: Start

 // Use this for initialization
 void Start()
 {
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     m_btnGuiText.text = "Start";
     m_btnGuiText.color = m_txtStartColour;
     ColorBlock cb = m_btnStartStop.colors;
     cb.normalColor = m_btnStartColour;
     m_btnStartStop.colors = cb;
 }
开发者ID:broostar,项目名称:youvebeentangoed,代码行数:10,代码来源:PointMeshGUI.cs


示例14: Start

 /// <summary>
 /// Unity Start() callback, we set up some initial values here.
 /// </summary>
 void Start () 
 {
     m_currentFPS = 0;
     m_framesSinceUpdate = 0;
     m_currentTime = 0.0f;
     m_FPSText = "FPS = Calculating";
     m_label = new Rect(Screen.width * 0.025f - 50, Screen.height * 0.96f - 25, 600.0f, 50.0f);
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();
 }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:13,代码来源:GUIController.cs


示例15: Start

    /// @cond
    /// <summary>
    /// Use this for initialization.
    /// </summary>
    public void Start()
    {
        m_pointCloud = FindObjectOfType<TangoPointCloud>();
        m_tangoApplication = FindObjectOfType<TangoApplication>();

        // All child objects are disabled until the floor is found.
        foreach (Transform t in transform)
        {
            t.gameObject.SetActive(false);
        }
    }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:15,代码来源:TangoPointCloudFloor.cs


示例16: OnEnable

    /// <summary>
    /// Raises the enable event.
    /// </summary>
    private void OnEnable()
    {
        m_tangoApplication = (TangoApplication)target;

        // Fixup the old state of TangoApplication before there were two checkboxes.  If only m_enableVideoOverlay was
        // set, then that meant to use the Byte Buffer method.
        if (m_tangoApplication.m_enableVideoOverlay && !m_tangoApplication.m_videoOverlayUseByteBufferMethod
            && !m_tangoApplication.m_videoOverlayUseTextureIdMethod)
        {
            m_tangoApplication.m_videoOverlayUseByteBufferMethod = true;
        }
    }
开发者ID:stetro,项目名称:project-tango-poc,代码行数:15,代码来源:TangoInspector.cs


示例17: Start

 void Start () {
     tangoApplication = FindObjectOfType<TangoApplication>();
     if(tangoApplication != null) {
         if(AndroidHelper.IsTangoCorePresent()) {
             // Request Tango permissions
             tangoApplication.RegisterPermissionsCallback(_OnTangoApplicationPermissionsEvent);
             tangoApplication.RequestNecessaryPermissionsAndConnect();
         }
     } else {
         Debug.Log("No Tango Manager found in scene.");
     }
 }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:12,代码来源:TangoInitializer.cs


示例18: Start

    // Use this for initialization
    void Start () {
        Statics.currentTangoState = TangoPoseStates.Connecting;

        tangoApplication = FindObjectOfType<TangoApplication>();
        if (tangoApplication == null) {
            tangoApplication = FindObjectOfType<TangoApplication>();
        }
        tangoApplication.InitProviders(Statics.curADFId);
        tangoApplication.Register(this);
        tangoApplication.ConnectToService();

        startingRotation = transform.rotation;
    }
开发者ID:GulfstreamPD,项目名称:tango-examples-unity,代码行数:14,代码来源:CustomPoseController.cs


示例19: CheckMotionTrackingPermissions

 /// <summary>
 /// Checks whether motion tracking permissions are selected and draws a warning if they are not.
 /// </summary>
 /// <returns><c>true</c>, if motion tracking permissions are enabled, <c>false</c> otherwise.</returns>
 /// <param name="tangoApplication">Prefab inspector's reference to Tango Application.</param>
 public static bool CheckMotionTrackingPermissions(TangoApplication tangoApplication)
 {
     bool hasPermissions = tangoApplication.m_enableMotionTracking;
     
     if (!hasPermissions)
     {
         EditorGUILayout.HelpBox("This component needs motion tracking to be enabled in "
                                 + "TangoApplication to function.",
                                 MessageType.Warning);
     }
     
     return hasPermissions;
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:18,代码来源:TangoPrefabInspectorHelper.cs


示例20: _DrawMotionTrackingOptions

    /// <summary>
    /// Draw motion tracking options.
    /// </summary>
    /// <param name="tangoApplication">Tango application.</param>
    private void _DrawMotionTrackingOptions(TangoApplication tangoApplication)
    {
        tangoApplication.m_enableMotionTracking = EditorGUILayout.Toggle(
            "Enable Motion Tracking", tangoApplication.m_enableMotionTracking);
        if (tangoApplication.m_enableMotionTracking)
        {
            ++EditorGUI.indentLevel;
            tangoApplication.m_motionTrackingAutoReset = EditorGUILayout.Toggle(
                "Auto Reset", tangoApplication.m_motionTrackingAutoReset);
            --EditorGUI.indentLevel;
        }

        EditorGUILayout.Space();
    }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:18,代码来源:TangoInspector.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Tango.TangoPoseData类代码示例发布时间:2022-05-26
下一篇:
C# jsch.Session类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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