//initialization untied from dio manager public void Initialize() { EnableMoveCameraInside(); EnableMoveCameraOutside(); bt1.name = "floraYfauna"; bt2.name = "superficies"; bt3.name = "mitigaciones"; bt4.name = "estructuras"; NegativeAllButtons(); mostrarCategoria = false; primerMovimiento = false; if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "useMouse")) { posInicialMouse = Input.mousePosition; } initialPlaneAction = () => { DisableMoveCameraInside(); DisableMoveCameraOutside(); }; finalPlaneAction = () => { EnableMoveCameraInside(); EnableMoveCameraOutside(); }; }
public void LoadInstances() { InterfaceManager.Instance.leapMotionManager.leapMotionRig = leapMotionRig; string Scope = ProfileManager.Instance.currentEvaluationScope; if (GLPlayerPrefs.GetBool(Scope, "useMouse")) { Debug.Log("entre al LoadInstance del PlaneVisualization"); InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRayCategories( InterfaceManager.Instance.mouseManager.screenPointToRay, VisualizationManager.Instance.planeVisualization.actualVisualization) ); } if (GLPlayerPrefs.GetBool(Scope, "useTouchScreen")) { Debug.Log("Entre al LoadInstance del PlanceVisualization con la interfaz touch"); InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRayCategories( InterfaceManager.Instance.touchScreenManager.screenPointToRay, VisualizationManager.Instance.planeVisualization.actualVisualization) ); } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion") && !GLPlayerPrefs.GetBool(Scope, "useOcculusRift")) { leapHandController.gameObject.SetActive(true); } }
public void CheckInterfaces() //*NOTE: INICIALIZA LOS SERVICIOS DE LA INTERAFAZ { Scope = ProfileManager.Instance.currentEvaluationScope; useEmotivInsight = GLPlayerPrefs.GetBool(Scope, "UseEmotivInsight"); Debug.Log("Use emotiv:" + GLPlayerPrefs.GetBool(Scope, "UseEmotivInsight").ToString()); if (useEmotivInsight) //*NOTE: CHEQUEA SI LA INTERFAZ EFECTIVAMENTE SE VA A UTILIZAR { emotivControl.gameObject.SetActive(true); emotivControl.StartEmotivInsight(); } else { NegateEmotivInsight(); emotivControl.gameObject.SetActive(false); } useNeuroSky = GLPlayerPrefs.GetBool(Scope, "UseNeuroSkyMindwave"); Debug.Log("Use neurosky:" + GLPlayerPrefs.GetBool(Scope, "UseNeuroSkyMindwave").ToString()); if (useNeuroSky) { neuroSkyControl.gameObject.SetActive(true); neuroSkyControl.StartNeuroSkyData(); } else { NegateNeuroSky(); neuroSkyControl.gameObject.SetActive(false); } }
public void LoadProfilePreferences() { useEmotiv.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseEmotivInsight"); useNeuroSky.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseNeuroSkyMindwave"); useEyeTribe.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseTheEyeTribe"); useMouse.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseMouse"); if (useEmotiv.isOn) { useNeuroSky.interactable = false; } if (useNeuroSky.isOn) { useEmotiv.interactable = false; } if (useEyeTribe.isOn) { useMouse.interactable = false; } if (useMouse.isOn) { useEyeTribe.interactable = false; } emotivDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "EmotivInsightDataPath"); neuroskyDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "NeuroSkyMindwaveDataPath"); eyeTribeDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "TheEyeTribeDataPath"); }
public void LeapMotionRecognition() { Scope = ProfileManager.Instance.currentEvaluationScope; if (!GLPlayerPrefs.GetBool(Scope, "useLeapMotion") || (GLPlayerPrefs.GetBool(Scope, "useLeapMotion") && GLPlayerPrefs.GetBool(Scope, "useOcculusRift"))) { } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion")) { } }
public override void SetGrabableObjectConfiguration(DIOController grabableObject, int id) { //DELETE THIS change to new archtecture if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "usePitchGrab")) { grabableObject.pitchGrabObject.pinchDetectorLeft = InteractionManager.Instance.pitchGrabManager.pinchDetectorLeft; grabableObject.pitchGrabObject.pinchDetectorRight = InteractionManager.Instance.pitchGrabManager.pinchDetectorRight; } grabableObject.Initialize(this, id); }
private void SetVariables() { useLeapMotion = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrab = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGlove = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystick = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); kinectInput = GLPlayerPrefs.GetBool(Scope, "KinectInput"); mouseInput = GLPlayerPrefs.GetBool(Scope, "MouseInput"); bgiiesMode = GLPlayerPrefs.GetBool(Scope, "BGIIESMode"); if (bgiiesMode) { visualizationPlane = true; } else { visualizationPlane = false; } csvCreatorPath = GLPlayerPrefs.GetString(Scope, "OutputFolderPath"); /*unityOpenGlove.leftComDevice = GLPlayerPrefs.GetString(Scope, "LeftCom"); * unityOpenGlove.rightComDevice = GLPlayerPrefs.GetString(Scope, "RightCom"); */ loadImageController.Initialize(this); loadImageController.images = Convert.ToInt32(GLPlayerPrefs.GetString(Scope, "PlaneImageAmount")); loadImageController.LoadImageBehaviour.pathImageAssets = GLPlayerPrefs.GetString(Scope, "PlaneImageFolderPath"); //loadImageController.LoadImageBehaviour.pathSmall = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); loadImageController.LoadImageBehaviour.pathSmall = ""; loadImageController.LoadImageBehaviour.filename = GLPlayerPrefs.GetString(Scope, "PlaneImagePrefix"); GameObject ev = GameObject.FindGameObjectWithTag("EventSystem"); StandaloneInputModule standInput = ev.GetComponent <StandaloneInputModule>(); LeapInputModule leapInput = ev.GetComponent <LeapInputModule>(); if (useLeapMotion) { standInput.enabled = false; leapInput.enabled = true; } if (bgiiesMode) { standInput.enabled = true; leapInput.enabled = false; } OnValidate(); }
public void OnDetected() { //Debug.Log ("Entre al OnDetected"); if (!_isLookPointerOn) { //Debug.Log ("El valor de islookPointerOn en OnDetected es:" + _isLookPointerOn); _isLookPointerOn = true; //DELETE THIS untie bgiiesmode if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.LookPointerEnter(this); if (InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.actualPitchGrabObject == null) { //DELETE THIS re-tie button panel //DioManager.buttonPanel.EnableZoomIn(); } } else if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "TIIESMode")) { //Debug.Log ("Entre al lookpointerEnter del tiies del OnDetected"); InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.LookPointerEnter(this); } else { InformationObjectManager.Instance.planeImages.lookPointerInstance.LookPointerEnter(this); //DELETE THIS the button panel is still unimplemented. Regardless it only enables/disables the buttons //DioManager.buttonPanel.EnableAccept(); /* * if (InformationObjectManager.Instance.planeImages.lookPointerInstance.actualPitchGrabObject == null) * DioManager.buttonPanel.EnableZoomIn();*/ } } else { //DELETE THIS untie bgiies mode if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.LookPointerStay(this); } else if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "TIIESMode")) { //Debug.Log("Entre al lookpointerStay del tiies del OnDetected"); InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.LookPointerStay(this); } else { InformationObjectManager.Instance.planeImages.lookPointerInstance.LookPointerStay(this); } } }
public void UpdateCurrentObject() { Debug.Log("El valor de currentInterfaceDropdown es:" + currentInterfaceDropdown.value); string Scope = ProfileManager.Instance.currentEvaluationScope; if (!GLPlayerPrefs.GetBool(Scope, "use" + MOTIONSManager.Instance.interfacesWithInputNames[currentInterfaceDropdown.value])) { popUp.LaunchPopUpMessage("Interface not active", "Caution: The selected interface is not selected as being active for the evaluation"); } interfacesConfigurationArray[lastInterfaceUsed].SetActive(false); interfacesConfigurationArray[currentInterfaceDropdown.value].SetActive(true); lastInterfaceUsed = currentInterfaceDropdown.value; }
public void LoadInterfaces() { string Scope = ProfileManager.Instance.currentEvaluationScope; for (int i = 0; i < MOTIONSManager.Instance.interfacesWithInputNames.Length; i++) { if (GLPlayerPrefs.GetBool(Scope, "use" + MOTIONSManager.Instance.interfacesWithInputNames[i])) { interfacesWithInput[i].SetActive(true); ; } } }
public void ShowAllInterfacesOnUse() { string allInterfacesList = ""; string Scope = ProfileManager.Instance.currentEvaluationScope; foreach (string s in MOTIONSManager.Instance.interfacesNames) { if (GLPlayerPrefs.GetBool(Scope, "use" + s)) { allInterfacesList = allInterfacesList + s + "\n"; } } fullListScrollView.LaunchScrollDown("Interfaces selected for evaluation", allInterfacesList); }
public void InitializeManager() { scope = ProfileManager.Instance.currentEvaluationScope; useBITalino = GLPlayerPrefs.GetBool(scope, "UseBITalino"); Debug.Log("Use BITalino:" + GLPlayerPrefs.GetBool(scope, "UseBITalino").ToString()); if (useBITalino) { BITalinoCtrl.Instance.InitializeBITalino(); } else { NegateBITalino(); } initialized = true; }
public void LeapMotionRecognition() { Scope = ProfileManager.Instance.currentEvaluationScope; Debug.Log("Entre al leapMotionRecognition del leapmotionmanager"); if (!GLPlayerPrefs.GetBool(Scope, "useLeapMotion") || (GLPlayerPrefs.GetBool(Scope, "useLeapMotion") && GLPlayerPrefs.GetBool(Scope, "useOcculusRift"))) { Debug.Log("Entre al if del useLeapMotiongame falso"); //leapHandController.gameObject.SetActive (true); } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion")) { Debug.Log("Entre al if del useLeapMotion true"); //leapHandController.gameObject.SetActive (false); } }
public void SelectThisVisualization() { string Scope = ProfileManager.Instance.currentEvaluationScope; GLPlayerPrefs.SetString(Scope, "CurrentVisualization", visualizationName); visualizationController.UpdateCurrentSelectedVisualizationText(); ActionManager.Instance.UpdateVisualizationActionNames(sphereVisualizationActionsNames); //DELETE THIS GLPlayerPrefs.SetBool(Scope, "BGIIESMode", false); GLPlayerPrefs.SetBool(Scope, "TIIESMode", false); bool wea = GLPlayerPrefs.GetBool(Scope, "BGIIESMode"); bool wea2 = GLPlayerPrefs.GetBool(Scope, "TIIESMode"); Debug.Log("el booleano de bgiiesMode es:" + wea); Debug.Log("el booleano de tiiesmode es:" + wea2); }
private void OnEnable() { bool useEmotiv = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseEmotivInsight"); if (!useEmotiv) { emotivButton.interactable = false; } else { emotivButton.interactable = true; } bool useNeuroSky = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseNeuroSkyMindwave"); if (!useNeuroSky) { neuroskyButton.interactable = false; } else { neuroskyButton.interactable = true; } bool useEyeTribe = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseTheEyeTribe"); if (!useEyeTribe) { eyetribeButton.interactable = false; } else { eyetribeButton.interactable = true; } bool useKinect = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "KinectInput"); if (!useKinect) { kinectButton.interactable = false; } else { kinectButton.interactable = true; } }
public void ShowAllPairedActions() { string allActionsList = ""; string Scope = ProfileManager.Instance.currentEvaluationScope; foreach (string s in MOTIONSManager.Instance.interfacesWithInputNames) { if (GLPlayerPrefs.GetBool(Scope, "use" + s)) { foreach (string a in GLPlayerPrefs.GetStringArray(Scope, s + "SummaryActions")) { allActionsList = allActionsList + a + "\n"; } } } fullListScrollView.LaunchScrollDown("Mapped actions list", allActionsList); }
public void SetVariables() { Scope = ProfileManager.Instance.currentEvaluationScope; useLeapMotionToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); if (useLeapMotionToggle.isOn) { usePitchGrabToggle.enabled = true; usePitchGrabToggle.enabled = true; usePitchGrabToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); } if (!(useLeapMotionToggle.isOn && useJoystickToggle.isOn) || !(mouseInput.isOn && kinectInput.isOn)) useUnityOpenGlove.interactable = false; useJoystickToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); useUnityOpenGlove.isOn = GLPlayerPrefs.GetBool(Scope, "useUnityOpenGlove"); kinectInput.isOn = GLPlayerPrefs.GetBool(Scope, "KinectInput"); mouseInput.isOn = GLPlayerPrefs.GetBool(Scope, "MouseInput"); if (GLPlayerPrefs.GetBool(Scope, "BGIIESMode")) modeDropDown.value = 1; else modeDropDown.value = 0; if (GLPlayerPrefs.GetBool(Scope, "visualizationPlane")) visualization.value = 1; else visualization.value = 0; dataOutputText.text = GLPlayerPrefs.GetString(Scope, "DataOutput"); userIdText.text = GLPlayerPrefs.GetInt(Scope, "UserID").ToString(); imagesText.text = GLPlayerPrefs.GetString(Scope, "Images"); folderImageAssetText.text = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); //folderSmallText.text = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); fileNameText.text = GLPlayerPrefs.GetString(Scope, "FileName"); groupPathText.text = GLPlayerPrefs.GetString(Scope, "GroupPath"); testDropdown.value = GLPlayerPrefs.GetInt(Scope, "Test"); }
public void LeapMotionRecognition() { Scope = ProfileManager.Instance.currentEvaluationScope; bool leapmotion = GLPlayerPrefs.GetBool(Scope, "useLeapMotion"); Debug.Log("El booleano de leapmotion es:" + leapmotion); if (!GLPlayerPrefs.GetBool(Scope, "useLeapMotion")) { leapSpace.SetActive(false); } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion") && GLPlayerPrefs.GetBool(Scope, "useOcculusRift")) { leapSpace.SetActive(true); } }
public void LoadInstances() { InterfaceManager.Instance.leapMotionManager.leapMotionRig = leapMotionRig; //DestroyObject(this.gameObject); //Here are the interactions asigned, given the chosen visualization. They're in this script to // relieve a bit of the work already done in each individual visualization manager, which is already large. string Scope = ProfileManager.Instance.currentEvaluationScope; if (GLPlayerPrefs.GetBool(Scope, "useMouse")) { InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRay( InterfaceManager.Instance.mouseManager.screenPointToRay, VisualizationManager.Instance.sphereVisualization.actualVisualization) ); } if (GLPlayerPrefs.GetBool(Scope, "useOcculusRift")) { InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRay( Camera.main.transform.position, Camera.main.transform.TransformDirection(Vector3.forward), VisualizationManager.Instance.sphereVisualization.actualVisualization) ); } if (GLPlayerPrefs.GetBool(Scope, "useTouchScreen")) { Debug.Log("Entre al LoadInstance del PlanceVisualization con la interfaz touch"); InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRayCategories( InterfaceManager.Instance.touchScreenManager.screenPointToRay, VisualizationManager.Instance.planeVisualization.actualVisualization) ); } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion")) { leapHandController.gameObject.SetActive(true); Debug.Log("entre al LoadInstance del PlaneVisualization del TIIESVisualization con la opcion leapmotion"); InteractionManager.Instance.updateList.Add(() => InteractionManager.Instance.raycastingSpherePlane.CreateRayCategories( InterfaceManager.Instance.leapMotionManager.screenPointToRay, VisualizationManager.Instance.planeVisualization.actualVisualization) ); } }
public void InitializeManager(DIOManager fatherDioManager) { dioManager = fatherDioManager; Scope = ProfileManager.Instance.currentEvaluationScope; _useEyetribe = GLPlayerPrefs.GetBool(Scope, "UseTheEyeTribe"); Debug.Log("Use eyetribe:" + GLPlayerPrefs.GetBool(Scope, "UseTheEyeTribe").ToString()); _useMouse = GLPlayerPrefs.GetBool(Scope, "UseMouse"); Debug.Log("Use mouse:" + GLPlayerPrefs.GetBool(Scope, "UseMouse").ToString()); if (_useEyetribe) { GazeCamera.Instance.Initialize(); } else { NegateEyeTribe(); } initialized = true; }
public override void Initialize(LoadImagesController loadImagesController) { groupImageCsvPath = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "PlaneImageGroupFilePath"); base.Initialize(loadImagesController); //DELETE THIS bgiies mode can't exist if (!GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { GenerateImageGroupDictionary(); GenerateTestGroups(); GenerateOrganizedItemList(); } else { GenerateImageGroupDictionaryToBgiies(); GenerateTestGroupsToBgiies(); } }
private void SetVariables() { useLeapMotion = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrab = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGlove = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystick = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); csvCreatorPath = GLPlayerPrefs.GetString(Scope, "DataOutput"); unityOpenGlove.leftComDevice = GLPlayerPrefs.GetString(Scope, "LeftCom"); unityOpenGlove.rightComDevice = GLPlayerPrefs.GetString(Scope, "RightCom"); loadImageController.Initialize(this); loadImageController.images = Convert.ToInt32(GLPlayerPrefs.GetString(Scope, "Images")); loadImageController.LoadImageBehaviour.pathImageAssets = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); loadImageController.LoadImageBehaviour.pathSmall = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); loadImageController.LoadImageBehaviour.filename = GLPlayerPrefs.GetString(Scope, "FileName"); OnValidate(); }
public void Awake() { useLeapMotionToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrabToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGloveToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystickToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); dataOutputText.text = GLPlayerPrefs.GetString(Scope, "DataOutput"); leftComText.text = GLPlayerPrefs.GetString(Scope, "LeftCom"); rightComText.text = GLPlayerPrefs.GetString(Scope, "RightCom"); userIdText.text = GLPlayerPrefs.GetInt(Scope, "PersonId").ToString(); imagesText.text = GLPlayerPrefs.GetString(Scope, "Images"); folderImageAssetText.text = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); folderSmallText.text = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); fileNameText.text = GLPlayerPrefs.GetString(Scope, "FileName"); groupPathText.text = GLPlayerPrefs.GetString(Scope, "GroupPath"); testDropdown.value = GLPlayerPrefs.GetInt(Scope, "Test"); }
public void OnUnDetect() { //Debug.Log ("Entre al OnUnDetect"); if (_isLookPointerOn) { //Debug.Log ("El valor de islookPointerOn en OnUnDetected es:" + _isLookPointerOn); if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.LookPointerExit(this); if (InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.actualPitchGrabObject == null) { _isLookPointerOn = false; } //DioManager.buttonPanel.DisableZoomIn(); } else if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "TIIESMode")) { //Debug.Log ("Entre al lookPointerExit del OnUnDetect"); InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.LookPointerExit(this); if (InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.actualPitchGrabObject == null) { //Debug.Log ("Entre al islookPointerOn = false"); _isLookPointerOn = false; } } else { InformationObjectManager.Instance.planeImages.lookPointerInstance.LookPointerExit(this); if (InformationObjectManager.Instance.planeImages.lookPointerInstance.actualPitchGrabObject == null) { _isLookPointerOn = false; //DELETE THIS tie to button panel when reimplemented //DioManager.buttonPanel.DisableAccept(); } //DioManager.buttonPanel.DisableZoomIn(); } } }
//The script that these objects hold will, upon enable, try to stablish a connection with their target service. //This action (try to stablish a connection) should occur under two circumstances: // 1) The device is going to be used in a scene. // 2) The device is going to be configured. //The InterfaceManager has a function that activates all the objects set to be used in an evaluation (OnNewScene function) to fulfill case one. //To fulfill case two, upon entering configuration of each device, the button to open the configuration should access the InterfaceManager, the manager of the // device group and the specific device itself to try to stablish a connection. /// <summary> /// Activates objects of device managers to stablish a connection with their services. If the device belongs to a group, it will ask the group to check. /// </summary> public void OnNewScene() { Scope = ProfileManager.Instance.currentEvaluationScope; //List of devices that do not belong to a group if (GLPlayerPrefs.GetBool(Scope, "useMouse")) { mouseManager.gameObject.SetActive(true); } if (GLPlayerPrefs.GetBool(Scope, "useTouchScreen")) { touchScreenManager.gameObject.SetActive(true); } if (GLPlayerPrefs.GetBool(Scope, "useLeapMotion")) { leapMotionManager.gameObject.SetActive(true); } //List of groups of devices that are asked to check eegManager.CheckInterfaces(); }
// Use this for initialization public void Awake() { Instance = this; DontDestroyOnLoad(this); //If there are no profiles found in the systems registry, it creates a new array of names. This is because there is no default value for arrays, but there are for all other data types used. if (!GLPlayerPrefs.GetBool(profileManagerScope, "RegistryFound")) { string[] aux = new string[1]; aux[0] = "Default Profile"; GLPlayerPrefs.SetStringArray(profileManagerScope, "ProfileNamesList", aux); GLPlayerPrefs.SetBool(profileManagerScope, "RegistryFound", true); aux = new string[1]; aux[0] = "Default Evaluation"; GLPlayerPrefs.SetStringArray("Default Profile", "EvaluationNamesList", aux); } profiles = GLPlayerPrefs.GetStringArray(profileManagerScope, "ProfileNamesList"); currentProfile = GLPlayerPrefs.GetInt(profileManagerScope, "CurrentProfile"); profileScope = profiles[currentProfile]; currentEvaluation = GLPlayerPrefs.GetInt(profileScope, "CurrentEvaluation"); evaluations = GLPlayerPrefs.GetStringArray(profileScope, "EvaluationNamesList"); currentEvaluationScope = profileScope + evaluations[currentEvaluation]; MOTIONSManager.Instance.initializeCsv(); }
public void Initialize(DIOController fatherDioController, int id) { _id = id; if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UsePitchGrab") && (pinchDetectorLeft == null || pinchDetectorRight == null)) { Debug.LogWarning( "Both Pinch Detectors of the LeapRTS component must be assigned. This component has been disabled."); enabled = false; return; } dioController = fatherDioController; enabled = true; isSelected = false; isClone = false; if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { isSelectedCat1 = isSelectedCat2 = isSelectedCat3 = isSelectedCat4 = false; } else { //DELETE THIS untie from DIOManager //hapticDetector.Initialize(fatherDioController.DioManager); } objectMeshRender = GetComponent <MeshRenderer>(); var pinchControl = new GameObject("DIO Anchor"); _anchor = pinchControl.transform; _anchor.transform.parent = transform.parent; transform.parent = _anchor; isPinched = false; _isLookPointerOn = false; }
private void OnEnable() { Scope = ProfileManager.Instance.currentEvaluationScope; key = "use" + interfaceName; instance.isOn = GLPlayerPrefs.GetBool(Scope, key); }
public IEnumerator LoadFolderImages(List <DIOController> listOfDio) { var tuple = _loadImageBehaviour.TextureFormatGetter(); string fileSuffix = tuple.First; TextureFormat textureFormat = tuple.Second; string indexSuffix; string fullFilename; WWW www; Texture2D texTmp; PitchGrabObject pitchGrabObject; while (true) { if (_imagesLoaded == images) { break; } //DELETE THIS if (!GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { indexSuffix = _loadImageBehaviour.FormattedIndex(); } else { if (_imagesLoaded.ToString().Length == 1) { indexSuffix = "00" + _imagesLoaded.ToString(); } else if (_imagesLoaded.ToString().Length == 2) { indexSuffix = "0" + _imagesLoaded.ToString(); } else { indexSuffix = _imagesLoaded.ToString(); } } if (!_loadImageBehaviour.ValidationOfIndex(indexSuffix)) { continue; } fullFilename = _loadImageBehaviour.pathPrefix + _loadImageBehaviour.pathImageAssets + _loadImageBehaviour.filename + indexSuffix + fileSuffix; www = new WWW(fullFilename); texTmp = new Texture2D(1024, 1024, textureFormat, false); www.LoadImageIntoTexture(texTmp); pitchGrabObject = listOfDio[_imagesLoaded].pitchGrabObject; pitchGrabObject.InitializeMaterial(texTmp); pitchGrabObject.SetId(_loadImageBehaviour.filename + indexSuffix + fileSuffix); _imagesLoaded++; yield return(new WaitForEndOfFrame()); } _loadImageBehaviour.EndAction(); }
public void CastRayCategories(Ray ray, int currentVisualizationId) { //Debug.DrawLine(_ray.origin, _ray.direction * maxDistance, Color.red); if (Physics.Raycast(ray, out _raycastHit, maxDistance, ignoredLayerMask)) { //Debug.Log ("Entre al if del raycast del leapmotion"); var posiblePitcheGrabObject = _raycastHit.transform.gameObject.GetComponent <PitchGrabObject>(); if (posiblePitcheGrabObject == null) { return; } if (GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { if (!VisualizationManager.Instance.planeVisualization.panelBgiies.mostrarCategoria) { if (posiblePitcheGrabObject.dioController.visualizationController.id != currentVisualizationId) { if (_actualPitchGrabObject != null) { //Debug.Log ("LLegue al antes del _ActualPitchGrabObject.OnUnDetect() del bgieesmode"); _actualPitchGrabObject.OnUnDetect(); //funcion para ignorar las imagenes que se encuentren en otras vistas } return; } } } if (_actualPitchGrabObject == null) { _actualPitchGrabObject = posiblePitcheGrabObject; //en una primera instancia actualPitch es null, la primera vez que toca una foto valida toma el valor de posiblePitch RegisterRay(_actualPitchGrabObject); } else { if (_actualPitchGrabObject.idName != posiblePitcheGrabObject.idName) //si actualPitch no coincide con posiblePitch se actualiza actualPitch { //Debug.Log ("LLegue al antes del _ActualPitchGrabObject.OnUnDetect() antes del _ActualPitchGrab OnDetected"); _actualPitchGrabObject.OnUnDetect(); // actualPitch se hace null _actualPitchGrabObject = posiblePitcheGrabObject; //se le asigna el valor de posiblePitch RegisterRay(_actualPitchGrabObject); } } //Debug.Log ("LLegue al antes del _ActualPitchGrabObject.OnDetected()"); _actualPitchGrabObject.OnDetected(); //activa el MARCAR de buttonPanel y activa LookPointerStay que aplica ZoomIn(iluminar foto) } else { if (_actualPitchGrabObject == null) { return; } //Debug.Log ("LLegue al antes del _ActualPitchGrabObject.OnUnDetect() despues del _ActualPitchGrab OnDetected"); _actualPitchGrabObject.OnUnDetect(); //si actualPitch no era nulo se hace null } }