コード例 #1
0
        public static VRGestureSettings CreateGestureSettingsAsset()
        {
            VRGestureSettings instance = CreateInstance <VRGestureSettings>();

            AssetDatabase.CreateAsset(instance, Config.SETTINGS_FILE_PATH);
            return(instance);
        }
コード例 #2
0
ファイル: GestureRecognizer.cs プロジェクト: alisiamartz/lift
        //Load a SavedRecognizer from a file
        public void Load(string filename)
        {
            gestureSettings = Utils.GetGestureSettings();
            NeuralNetworkStub stub = Utils.ReadNeuralNetworkStub(filename);

            outputs = stub.gestures;
            BuildOutputDictionary();
            neuralNet = new NeuralNetwork(stub.numInput, stub.numHidden, stub.numOutput);
            neuralNet.SetWeights(stub.weights);
        }
コード例 #3
0
        void OnEnable()
        {
            gestureSettings = Utils.GetGestureSettings();

            rig = VRGestureRig.GetPlayerRig(gestureSettings.playerID);

            GestureRecognizer.GestureDetectedEvent      += OnGestureDetected;
            GestureRecognizer.GestureRejectedEvent      += OnGestureRejected;
            VRGestureUIPanelManager.OnPanelFocusChanged += PanelFocusChanged;
            //VRControllerUIInput.OnVRGuiHitChanged += VRGuiHitChanged;
        }
コード例 #4
0
 void GetSetGestureSettings()
 {
     if (Utils.GetGestureSettings() == null)
     {
         gestureSettings = CreateGestureSettingsAsset();
     }
     else
     {
         gestureSettings = Utils.GetGestureSettings();
     }
 }
コード例 #5
0
        public override void Init()
        {
            base.Init();

            if (gestureSettings == null)
            {
                gestureSettings = Utils.GetGestureSettings();
            }
            if (tutorial == null)
            {
                tutorial = GetComponentInParent <GettingStartedTutorial>();
            }
        }
コード例 #6
0
        // INIT
        void Start()
        {
            gestureSettings = Utils.GetGestureSettings();

            galleryPosition = new Vector3(0, 90, 0);

            canvasGroup = GetComponent <CanvasGroup>();

            galleryStartPosition = transform.position;

            vrGestureUI = transform.parent.GetComponent <VRGestureUI>();

            galleryRB = GetComponent <Rigidbody>();

            galleryState = GestureGalleryState.NotVisible;

            GetHands();
        }
コード例 #7
0
        new public void Awake()
        {
            base.Awake();

            gestureSettings = Utils.GetGestureSettings();

            if (gestureSettings.stateInitial == VRGestureUIState.ReadyToDetect)
            {
                initialPanel = "Detect Menu";
            }

            // initialize initial panel focused
            if (gestureSettings.neuralNets.Count <= 0)
            {
                FocusPanel("No Neural Net Menu");
            }
            else
            {
                FocusPanel(initialPanel);
            }
        }
コード例 #8
0
        // EVENTS

        void OnEnable()
        {
            VRGestureUIPanelManager.OnPanelFocusChanged += PanelFocusChanged;
            gestureSettings = Utils.GetGestureSettings();
        }