Inheritance: MonoBehaviour, ITangoLifecycle
Exemple #1
0
    /// <summary>
    /// Unity Start function.
    ///
    /// We find and assign pose controller and tango applicaiton, and register this class to callback events.
    /// </summary>
    public void Start()
    {
        m_poseController   = FindObjectOfType <TangoARPoseController>();
        m_tangoApplication = FindObjectOfType <TangoApplication>();

        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
        }
    }
Exemple #2
0
        // Unity function.
        void Start()
        {
            player = FindObjectOfType <TangoARPoseController>();

            if (player == null)
            {
                Debug.LogAssertion("TangoARPoseController not found");
            }

            Construct();
        }
 /// <summary>
 /// Unity Start() callback, we set up some initial values here.
 /// </summary>
 public void Start()
 {
     m_currentFPS          = 0;
     m_framesSinceUpdate   = 0;
     m_currentTime         = 0.0f;
     m_fpsText             = "FPS = Calculating";
     m_tangoApplication    = FindObjectOfType <TangoApplication>();
     m_tangoPose           = FindObjectOfType <TangoARPoseController>();
     m_arCameraPostProcess = FindObjectOfType <ARCameraPostProcess>();
     m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();
 }
Exemple #4
0
 public override void OnInit()
 {
     //直接可以拿到,但是为了使用方便
     m_tangoApplication = TangoService.Instance.m_tangoApplication;
     //这里采用一个引用
     m_poseController = TangoService.Instance.m_poseController;
     if (m_tangoApplication != null)
     {
         m_tangoApplication.Register(this);
     }
     base.OnInit();
 }
    public void Start()
    {
        m_tangoApplication    = FindObjectOfType <TangoApplication>();
        m_tangoPose           = FindObjectOfType <TangoARPoseController>();
        m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();

        m_tangoApplication.Register(this);

        for (int i = 0; i < _Selectables.Length; i++)
        {
            Debug.Log(_Selectables[i]._SelectableType.ToString() + " " + i);
            _selectablesMap.Add(_Selectables[i]._SelectableType, i);
        }
    }
Exemple #6
0
    /// <summary>
    /// Inspector GUI event for immediate-mode Editor GUI.
    /// </summary>
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        TangoARPoseController inspectedObject = (TangoARPoseController)target;

        if (TangoPrefabInspectorHelper.CheckForTangoApplication(inspectedObject, ref m_tangoApplication))
        {
            TangoPrefabInspectorHelper.CheckMotionTrackingPermissions(m_tangoApplication);

            TangoPrefabInspectorHelper.CheckAreaDescriptionPermissions(m_tangoApplication,
                                                                       inspectedObject.m_useAreaDescriptionPose);
        }
    }
    /// <summary>
    /// Unity Start function.
    ///
    /// We find and assign pose controller and tango application, and register this class to callback events.
    /// </summary>
    public void Start()
    {
        admin = adminToggle.isOn;
        if (!admin)
        {
            adminGUI.SetActive(false);
        }
        m_poseController   = FindObjectOfType <TangoARPoseController>();
        m_tangoApplication = FindObjectOfType <TangoApplication>();

        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
        }
    }
    /// <summary>
    /// Unity Start function.
    ///
    /// We find and assign pose controller and tango application, and register this class to callback events.
    /// </summary>
    public void Start()
    {
        // get main senzors
        m_poseController   = FindObjectOfType <TangoARPoseController>();
        m_tangoApplication = FindObjectOfType <TangoApplication>();
        // values initialize
        m_connectMarkers = new ARMarker[2];
        m_markerList     = new Dictionary <int, GameObject>();
        graph            = new Graph();

        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
        }
    }
    //Unity Start() callback, we set up some initial values here.
    public void Start()
    {
        m_currentFPS        = 0;
        m_framesSinceUpdate = 0;
        m_currentTime       = 0.0f;
        m_fpsText           = "FPS = Calculating";

        m_tangoApplication    = FindObjectOfType <TangoApplication>();
        m_tangoPose           = FindObjectOfType <TangoARPoseController>();
        m_arCameraPostProcess = FindObjectOfType <ARCameraPostProcess>();
        m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();


        //show screenshot icon after a screenshot
        screenshotPic = GameObject.Find("screenshotPic");
        this.screenshotPic.SetActive(false);
    }
    /// <summary>
    /// Unity Start function.
    ///
    /// We find and assign pose controller and tango application, and register this class to callback events.
    /// </summary>
    public void Start()
    {
        m_poseController   = FindObjectOfType <TangoARPoseController>();
        m_tangoApplication = FindObjectOfType <TangoApplication>();

        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);

            m_bloonController.Init(m_tangoApplication);
            m_bloonController.SetOnBalloonAddedListener((marker) => {
                m_markerList.Add(marker);
            });
            m_bloonController.SetOnBalloonPoppedListener((marker) => {
                m_markerList.Remove(marker);
            });
        }
    }
Exemple #11
0
    /// <summary>
    /// Unity Start function.
    ///
    /// We find and assign pose controller and tango application, and register this class to callback events.
    /// </summary>
    public void Start()
    {
        Debug.Log("In Game Controller Online");
        m_poseController   = FindObjectOfType <TangoARPoseController>();
        m_tangoApplication = FindObjectOfType <TangoApplication>();
        // m_markPrefabs = MarkerManager.GetComponent<MarkerManager>().GetMarkerModels();
        _appearMode = GlobalManagement.appearMode;

        if (m_tangoApplication != null)
        {
            m_tangoApplication.Register(this);
        }

        buildingOnBoardingA  = GlobalManagement.BuildingView.GetComponent <BuildingOnboardingController>()._onboardingA;
        buildingOnBoardingB  = GlobalManagement.BuildingView.GetComponent <BuildingOnboardingController>()._onboardingB;
        buildingOnBoardingC  = GlobalManagement.BuildingView.GetComponent <BuildingOnboardingController>()._onboardingC;
        buildingRenderToggle = GlobalManagement.BuildingView.GetComponent <BuildingOnboardingController>()._renderToggle;
    }
Exemple #12
0
    /// <summary>
    /// Unity Start() callback, we set up some initial values here.
    /// </summary>
    public void Start()
    {
        m_currentFPS          = 0;
        m_framesSinceUpdate   = 0;
        m_currentTime         = 0.0f;
        m_fpsText             = "FPS = Calculating";
        m_tangoApplication    = FindObjectOfType <TangoApplication>();
        m_tangoPose           = FindObjectOfType <TangoARPoseController>();
        m_arCameraPostProcess = FindObjectOfType <ARCameraPostProcess>();
        m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();

        m_tangoApplication.Register(this);

        #region Cfd
        _cfdManager = new CfdSceneManagerV2();
        _cfdManager.DefaultMaterial     = defaultMaterial;
        _cfdManager.VertexColorMaterial = vertexColorMaterial;
        _cfdManager.CfdShader           = shader;
        _cfdManager.Start();
        #endregion
    }
Exemple #13
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();
            }
        }
    }
    /// <summary>
    /// Unity Start() callback, we set up some initial values here.
    /// </summary>
    public void Start()
    {
        m_currentFPS = 0;
        m_framesSinceUpdate = 0;
        m_currentTime = 0.0f;
        m_fpsText = "FPS = Calculating";
        m_tangoApplication = FindObjectOfType<TangoApplication>();
        m_tangoPose = FindObjectOfType<TangoARPoseController>();
        m_arCameraPostProcess = FindObjectOfType<ARCameraPostProcess>();
        m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();

        m_tangoApplication.Register(this);
    }
 /// <summary>
 /// Unity Start function.
 /// 
 /// We find and assign pose controller and tango applicaiton, and register this class to callback events.
 /// </summary>
 public void Start()
 {
     m_poseController = FindObjectOfType<TangoARPoseController>();
     m_tangoApplication = FindObjectOfType<TangoApplication>();
     
     if (m_tangoApplication != null)
     {
         m_tangoApplication.Register(this);
     }
 }
 /// <summary>
 /// Unity Start() callback, we set up some initial values here.
 /// </summary>
 public 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_tangoPose = FindObjectOfType<TangoARPoseController>();
     m_tangoServiceVersion = TangoApplication.GetTangoServiceVersion();
 }
    /// <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();
            }
        }
    }