Updates a mesh dynamically based on the ITango3DReconstruction callbacks. The "mesh" that is updated by TangoDynamicMesh is actually a collection of children split along grid boundaries. If you want these children to draw or participate in physics, attach a MeshRenderer or MeshCollider to this object. Any generated children will get copies of the MeshRenderer or MeshCollider or both.
Inheritance: MonoBehaviour, ITango3DReconstruction
コード例 #1
0
    /// <summary>
    /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
    /// </summary>
    public void Start()
    {
        m_meshSavePath = Application.persistentDataPath + "/meshes";
        Directory.CreateDirectory(m_meshSavePath);

        m_arPoseController = FindObjectOfType <TangoARPoseController>();
        m_tangoDynamicMesh = FindObjectOfType <TangoDynamicMesh>();

        m_areaDescriptionLoaderPanel.SetActive(true);
        m_meshBuildPanel.SetActive(false);
        m_meshInteractionPanel.SetActive(false);
        m_relocalizeImage.gameObject.SetActive(false);

        // Initialize tango application.
        m_tangoApplication = FindObjectOfType <TangoApplication>();
        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
            if (AndroidHelper.IsTangoCorePresent())
            {
                m_tangoApplication.RequestPermissions();
            }

            m_bloonController.Init(m_tangoApplication);
            m_bloonController.SetOnBalloonAddedListener((marker) => {
                Debug.Log("added ballon ctrl");
//				m_markerList.Add(marker);
            });
            m_bloonController.SetOnBalloonPoppedListener((marker) => {
                Debug.Log("popped ballon ctrl");
//				m_markerList.Remove(marker);
            });
        }
    }
コード例 #2
0
 void Start()
 {
     uiElemets = GameObject.FindGameObjectsWithTag("dynamic_UI");
     setMindMapReferenceColor(0);
     markers       = new List <GameObject> ();
     m_dynamicMesh = FindObjectOfType <TangoDynamicMesh>();
     m_pointCloud  = FindObjectOfType <TangoPointCloud>();
 }
コード例 #3
0
    void Start()
    {
        _ClearButton.onClick.AddListener(OnClearClick);
        _PauseResumeButton.onClick.AddListener(OnPauseResumeClick);

        _pauseResumeText  = _PauseResumeButton.transform.GetChild(0).GetComponent <Text>();
        _tangoApplication = FindObjectOfType <TangoApplication>();
        _dynamicMesh      = FindObjectOfType <TangoDynamicMesh>();
    }
コード例 #4
0
    /// <summary>
    /// Start is used to initialize.
    /// </summary>
    public void Start()
    {
        m_tangoApplication = FindObjectOfType <TangoApplication>();
        m_dynamicMesh      = FindObjectOfType <TangoDynamicMesh>();
        m_exporter         = new Exporter();
        m_tangoCamera      = FindObjectOfType <TangoMultiCamera>();
        m_poseController   = FindObjectOfType <TangoDeltaPoseController>();
        LineRenderer lineRenderer = gameObject.AddComponent <LineRenderer>();
        Material     lineMat      = Resources.Load("Line", typeof(Material)) as Material;

        lineRenderer.material = lineMat;
        lineRenderer.SetWidth(0.01F, 0.01F);
        lineRenderer.SetVertexCount(2);
        lineRenderer.SetPosition(0, measurePointStart.transform.position);
        lineRenderer.SetPosition(1, measurePointEnd.transform.position);
    }
コード例 #5
0
    /// <summary>
    /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
    /// </summary>
    public void Start()
    {
        m_adfMeshSavePath = Application.persistentDataPath + "/ADFMeshes";

        m_arPoseController = FindObjectOfType <TangoARPoseController>();
        m_tangoDynamicMesh = FindObjectOfType <TangoDynamicMesh>();

        m_areaDescriptionLoaderPanel.SetActive(true);
        m_meshBuildPanel.SetActive(false);
        m_meshInteractionPanel.SetActive(false);
        m_relocalizeImage.gameObject.SetActive(false);

        // Initialize tango application.
        m_tangoApplication = FindObjectOfType <TangoApplication>();
        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
            if (AndroidHelper.IsTangoCorePresent())
            {
                m_tangoApplication.RequestPermissions();
            }
        }
    }
コード例 #6
0
 /// <summary>
 /// Start is used to initialize.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = FindObjectOfType <TangoApplication>();
     m_dynamicMesh      = FindObjectOfType <TangoDynamicMesh>();
     m_dynamicMesh.m_enableSelectiveMeshing = m_enableSelectiveMeshing;
 }
コード例 #7
0
 public void Start()
 {
     StartIndex    = 0;
     m_dynamicMesh = FindObjectOfType <TangoDynamicMesh>();
 }
コード例 #8
0
 /// <summary>
 /// Start is used to initialize.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = FindObjectOfType <TangoApplication>();
     m_dynamicMesh      = FindObjectOfType <TangoDynamicMesh>();
 }
コード例 #9
0
 /// <summary>
 /// Start is used to initialize.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     m_dynamicMesh = FindObjectOfType<TangoDynamicMesh>();
 }
コード例 #10
0
 /// <summary>
 /// Start is used to initialize.
 /// </summary>
 public void Start()
 {
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     m_dynamicMesh = FindObjectOfType<TangoDynamicMesh>();
     m_dynamicMesh.m_enableSelectiveMeshing = m_enableSelectiveMeshing;
 }
コード例 #11
0
    /// <summary>
    /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
    /// </summary>
    public void Start()
    {
        m_meshSavePath = Application.persistentDataPath + "/meshes";
        Directory.CreateDirectory(m_meshSavePath);

        m_arPoseController = FindObjectOfType<TangoARPoseController>();
        m_tangoDynamicMesh = FindObjectOfType<TangoDynamicMesh>();

        m_areaDescriptionLoaderPanel.SetActive(true);
        m_meshBuildPanel.SetActive(false);
        m_meshInteractionPanel.SetActive(false);
        m_relocalizeImage.gameObject.SetActive(false);

        // Initialize tango application.
        m_tangoApplication = FindObjectOfType<TangoApplication>();
        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
            if (AndroidHelper.IsTangoCorePresent())
            {
                m_tangoApplication.RequestPermissions();
            }
        }
    }