Esempio n. 1
0
    // Doesn't seem to matter whether floor normal and point is constantly improved or just once in the beginning
//	void Update()
//	{
//		if(enableKinect && kinectFloorDetection && !enablePSMove)
//		{
//			updateKinectFloorData();
//		}
//	}

    public void StartFloorDetection()
    {
        if (enableKinect)
        {
            kinectFloorDetection = true;

            moveKinectCalibration = FindObjectOfType(typeof(RUISM2KCalibration)) as RUISM2KCalibration;
            if (!moveKinectCalibration)
            {
                if (sceneAnalyzer == null)
                {
                    sceneAnalyzer = new OpenNI.SceneAnalyzer((FindObjectOfType(typeof(OpenNISettingsManager))
                                                              as OpenNISettingsManager).CurrentContext.BasicContext);
                    sceneAnalyzer.StartGenerating();
                    Debug.Log("Creating sceneAnalyzer");
                }
            }
            else
            {
                StartCoroutine("attemptStartingSceneAnalyzer");
            }

            StartCoroutine("attemptUpdatingFloorNormal");
        }
        else
        {
            Debug.LogError("Kinect is not enabled! You can enable it from RUIS InputManager.");
        }
    }
Esempio n. 2
0
    void Awake()
    {
        RUISM2KCalibration calibration = FindObjectOfType(typeof(RUISM2KCalibration)) as RUISM2KCalibration;

        if (calibration.usePSMove)
        {
            gameObject.SetActive(false);
        }
    }
Esempio n. 3
0
    void Awake()
    {
        RUISM2KCalibration calibration = FindObjectOfType(typeof(RUISM2KCalibration)) as RUISM2KCalibration;

        if (!calibration.usePSMove)
        {
            gameObject.SetActive(false);
        }

        psMoveWrapper = FindObjectOfType(typeof(PSMoveWrapper)) as PSMoveWrapper;
        texture       = new Texture2D(640, 480, TextureFormat.ARGB32, false);
    }
Esempio n. 4
0
    // Doesn't seem to matter whether floor normal and point is constantly improved or just once in the beginning
    //    void Update()
    //    {
    //        if(enableKinect && kinectFloorDetection && !enablePSMove)
    //        {
    //            updateKinectFloorData();
    //        }
    //    }
    public void StartFloorDetection()
    {
        if (enableKinect)
        {
            kinectFloorDetection = true;

            moveKinectCalibration = FindObjectOfType(typeof(RUISM2KCalibration)) as RUISM2KCalibration;
            if(!moveKinectCalibration)
            {
                if(sceneAnalyzer == null)
                {
                    sceneAnalyzer = new OpenNI.SceneAnalyzer((FindObjectOfType(typeof(OpenNISettingsManager))
                                                            as OpenNISettingsManager).CurrentContext.BasicContext);
                    sceneAnalyzer.StartGenerating();
                    Debug.Log ("Creating sceneAnalyzer");
                }
            }
            else
                StartCoroutine("attemptStartingSceneAnalyzer");

            StartCoroutine("attemptUpdatingFloorNormal");
        }
        else
            Debug.LogError("Kinect is not enabled! You can enable it from RUIS InputManager.");
    }