Exemple #1
0
        void Awake()
        {
            if (Instance != null)
            {
                throw new UnityException("Only one instance of SenseToolkitManager in a scene is allowed.");
            }
            Instance = this;

            // sets default options
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.Face)
            {
                ModuleCUID = PXCMFaceModule.CUID
            });
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.Hand)
            {
                ModuleCUID = PXCMHandModule.CUID
            });
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.Object)
            {
                ModuleCUID = PXCMTracker.CUID
            });
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.VideoColorStream));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.VideoDepthStream));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.VideoIRStream));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.PointCloud));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.UVMap));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.Speech));
            _senseOptions.Add(new SenseOption(SenseOption.SenseOptionID.VideoSegmentation)
            {
                ModuleCUID = PXCM3DSeg.CUID
            });
        }
    //PXCMSenseManager


    #endregion

    

    // Use this for initialization
    void Start () {
        systemAdmin = SystemAdmin.Instance;   //システムインスタンス(シングルトン)の生成
        //scoreManager = ScoreManager.Instance;


        RSManager = GameObject.Find("SenseManager");
        STKManager = RSManager.GetComponent<SenseToolkitManager>();
        MainCam = GameObject.Find("ImageCam").GetComponent<Camera>();

        _lefthand_gobj = new GameObject[5];
        _lefthand_gobj[0] = GameObject.Find("first_left_wrist");
        _lefthand_gobj[1] = GameObject.Find("first_left_index-tip");
        _lefthand_gobj[2] = GameObject.Find("first_left_thumb-tip");
        _lefthand_gobj[3] = GameObject.Find("first_left_middle-tip");
        _lefthand_gobj[4] = GameObject.Find("first_left_pinky-tip");

        NRinitialize();     //基底遷移アルゴリズムによる加速度計算用配列の初期化
        ACFinitialize();    //自己相関関数計算用配列の初期化


        particle_finger = new GameObject[5];
        heart_particle_gobj = Resources.Load("Prehab/Hearts") as GameObject;
        groundLightsBase = Resources.Load("Prehab/groundLightsBase") as GameObject;
        star_particle_gobj = Resources.Load("Prehab/Stars") as GameObject;
        Conf = Resources.Load("Prehab/Confetti") as GameObject;
        RainbowBallBase = Resources.Load("Prehab/RainbowBallBase") as GameObject;
        shieldBase = Resources.Load("Prehab/shieldBase") as GameObject;


        generateParticle(heart_particle_gobj, 0, true);
    }
        void Awake()
        {
            if (Instance != null)
            {
                throw new UnityException("Only one instance of SenseToolkitManager in a scene is allowed.");
            }
            Instance = this;

            // sets default options
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.Face){ ModuleCUID = PXCMFaceModule.CUID } );
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.Hand){ ModuleCUID = PXCMHandModule.CUID } );
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.Object){ ModuleCUID = PXCMTracker.CUID } );
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.VideoColorStream));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.VideoDepthStream));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.VideoIRStream));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.PointCloud));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.UVMap));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.Speech));
            _senseOptions.Add( new SenseOption(SenseOption.SenseOptionID.VideoSegmentation){ModuleCUID = PXCM3DSeg.CUID} );
        }