void Start() { slice = textures.Length / 2; // view = 1; IMixedRealitySceneSystem check = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); sizeLimits = AnatomyObject.GetComponent <BoxCollider>().bounds.size; midPosition = AnatomyObject.transform.position; currentScene = check.IsContentLoaded("GameScene"); originalScaleUpright = GameObject.Find("UprightViewProjectionPlane").transform.localScale; ax_foo(); // get a specific slice and apply as texture Texture2D texture = (Texture2D)textures[slice]; projectionplanematerial.mainTexture = texture; DownKeyPressed = false; UpKeyPressed = false; if (sceneName != "EducationalScene") { return; } AudioSource[] audios = GetComponents <AudioSource>(); lungsSource = audios[0]; heartSource = audios[1]; bowelSource = audios[2]; bladderSource = audios[3]; heartSource.enabled = false; bladderSource.enabled = false; lungsSource.enabled = false; bowelSource.enabled = false; // define organ limits // Lungs (20 - 340) Heart(170 - 290) Bowel(350 - 700) Bladder(695 - 775) lungsStart = textures.Length - textures.Length * (20 / dicomSlices); lungsEnd = textures.Length - textures.Length * (340 / dicomSlices); lungsMin = (float)(lungsStart + 0.3 * (lungsEnd - lungsStart)); lungsMax = (float)(lungsMin + 0.4 * (lungsEnd - lungsStart)); heartStart = textures.Length - textures.Length * (170 / dicomSlices); heartEnd = textures.Length - textures.Length * (290 / dicomSlices); heartMin = (float)(heartStart + 0.3 * (heartEnd - heartStart)); heartMax = (float)(heartMin + 0.4 * (heartEnd - heartStart)); bowelStart = textures.Length - textures.Length * (350 / dicomSlices); bowelEnd = textures.Length - textures.Length * (700 / dicomSlices); bowelMin = (float)(bowelStart + 0.3 * (bowelEnd - bowelStart)); bowelMax = (float)(bowelMin + 0.4 * (bowelEnd - bowelStart)); bladderStart = textures.Length - textures.Length * (695 / dicomSlices); bladderEnd = textures.Length - textures.Length * (775 / dicomSlices); bladderMin = (float)(bladderStart + 0.3 * (bladderEnd - bladderStart)); bladderMax = (float)(bladderMin + 0.4 * (bladderEnd - bladderStart)); }
private async void Load() { IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); if (!sceneSystem.IsContentLoaded(StartSceneName)) { await sceneSystem.LoadContent(StartSceneName, LoadSceneMode.Single); } }