private void setView(Vector3 angles, Vector3 scaleVector_moving, Vector3 scaleVector_upright, Vector3 rotVector, Vector3 position_upright, Vector3 mini_translation, int ax, int sag, int cor) { // rotate, translate, scale the projection plane ProjectionPlane.transform.localRotation = Quaternion.Euler(angles); //GameObject.Find("Anatomy").transform.position = new Vector3(0,0,1.5f); view_transform(ProjectionPlane, ax, sag, cor); ProjectionPlane.transform.localScale = scaleVector_moving; ProjectionPlane.transform.localPosition = mini_translation; if (currentScene == true) { feedbackPlane.transform.localRotation = Quaternion.Euler(angles); feedbackPlane.transform.localScale = scaleVector_moving; feedbackPlane.transform.localPosition = mini_translation; //view_transform(feedbackPlane, ax, sag, cor); Show_Random_Slice show_Random_Slice = UprightViewProjectionPlane.GetComponent <Show_Random_Slice>(); show_Random_Slice.show_random_slice(); } // rotate and translate the whole anatomy GameObject.Find("Anatomy").transform.rotation = Quaternion.Euler(rotVector); //GameObject.Find("Anatomy").transform.localScale = new Vector3(0.07f,0.07f,0.07f); //GameObject.Find("Anatomy").transform.position = new Vector3(0, 0, 1.5f); //GameObject.Find("UprightViewProjectionPlane").transform.localPosition = new Vector3(0, 0.5f, 1.5f); //GameObject.Find("UprightViewProjectionPlane").transform.localPosition = position_upright; GameObject.Find("UprightViewProjectionPlane").transform.rotation = Quaternion.Euler(new Vector3(90, 180, 0)); GameObject.Find("UprightViewProjectionPlane").transform.localScale = Vector3.Scale(originalScaleUpright, scaleVector_upright); }
// Start is called before the first frame update void Start() { //get variables from other scripts ChangerScript = sliding_plane.GetComponent <projection_plane_texture_changer>(); RandomSliceScript = static_plane.GetComponent <Show_Random_Slice>(); tex = ChangerScript.textures; stepsize = ChangerScript.stepsize; sliding_plane_material = sliding_plane.GetComponent <Renderer>().material; startColor = sliding_plane_material.color; scoreText.text = string.Format("Score: {0000}", SCORE); scoreText.color = Color.white; //Initialize Reset(); //thisRend = this.GetComponent<Renderer>(); //thisRend.material = TransparentMaterial; }