Ejemplo n.º 1
0
 public void UIUpdate()
 {
     Subspaces.make_subspaces();
     Subspaces.make_AllOutline();
     yess   = true; yessplus = true;
     update = true;
 }
 ///////////////////
 public void UIUpdate()
 {
     Subspaces.make_subspaces();
     Subspaces.make_AllOutline();
     yess = true; yessplus = true;
     //update = true;
     //detectedImageCount = 0;
     ////////////////////
 }
Ejemplo n.º 3
0
    public void PerformManipulationComplete()
    {
        List <Vector3> neighbors  = new List <Vector3>();
        Vector3        currentPos = this.transform.localPosition;

        neighbors = Subspaces.findNeighbors(currentPos);
        newPos    = neighborSelect(neighbors);
        inLerp    = true;
    }
Ejemplo n.º 4
0
 public override void OnDisabled()
 {
     GameEvents.onTimeWarpRateChanged.Remove(WarpEvents.OnTimeWarpChanged);
     ClientSubspaceList.Clear();
     Subspaces.Clear();
     _currentSubspace            = int.MinValue;
     SkipSubspaceProcess         = false;
     WaitingSubspaceIdFromServer = false;
     SyncedToLastSubspace        = false;
 }
Ejemplo n.º 5
0
 public void Refresh()
 {
     CurrentPlayers.Clear();
     CurrentVessels.Clear();
     Subspaces.Clear();
     StartTime = TimeContext.StartTime;
     CurrentPlayers.AddRange(ServerContext.Clients.Values.Select(v => v.PlayerName));
     CurrentVessels.AddRange(VesselStoreSystem.CurrentVessels.Values.Select(v => new VesselInfo(v)));
     Subspaces.AddRange(WarpContext.Subspaces.Values);
     BytesUsed = Environment.WorkingSet;
 }
Ejemplo n.º 6
0
 public double GetSubspaceTime(int subspace)
 {
     return(TimeSyncerSystem.Singleton.Synced && Subspaces.ContainsKey(subspace)
         ? TimeSyncerSystem.Singleton.GetServerClock() + Subspaces[subspace]
         : 0);
 }
Ejemplo n.º 7
0
    public void smokey_minimize()
    {
        //showLayers();

        Subspaces.smokey_min();
        Subspaces.layered_min();
        Subspaces.PCP_min();
        Subspaces.SP_min();
        Subspaces.SP2_min();


        Transform myMap = GameObject.Instantiate(SmokeyController.Elayers[3]) as Transform;

        myMap.parent        = TrackableMonitor.mTrackableBehaviour.transform;
        myMap.localRotation = Quaternion.identity;
        myMap.localScale    = new Vector3(0.12f, 0.1f, 0.01f);
        myMap.Rotate(90f, 0f, 0f);
        myMap.localPosition = new Vector3(2.6f, -0.02f, -1.1f);
        myMap.gameObject.SetActive(true);


        Transform bipartite = GameObject.Instantiate(SmokeyController.Elayers[26]) as Transform;

        bipartite.parent        = TrackableMonitor.mTrackableBehaviour.transform;
        bipartite.localRotation = Quaternion.identity;
        bipartite.localScale    = new Vector3(0.21f, 0.23f, 0.01f);
        bipartite.Rotate(90f, 0f, 0f);
        bipartite.localPosition = new Vector3(2.6f, -0.02f, -3.59f);
        bipartite.gameObject.SetActive(true);

        var text1 = Instantiate(textPrefab);

        text1.parent        = TrackableMonitor.mTrackableBehaviour.transform;
        text1.localPosition = new Vector3(4.57f, 0.1f, -0.32f);
        text1.localScale    = new Vector3(0.1f, 0.1f, 0.001f);
        text1.localRotation = Quaternion.Euler(270, 0, 0);
        text1.Rotate(180, 0, 0);
        text1.gameObject.SetActive(true);
        TextMesh theText1 = text1.transform.GetComponent <TextMesh>();

        theText1.text = "Visualizations";
        Color32 greyColour = new Color32(0xA5, 0xFF, 0xF0, 0xFF);

        theText1.color     = greyColour;
        theText1.fontStyle = FontStyle.Bold;

        var text2 = Instantiate(textPrefab);

        text2.parent        = TrackableMonitor.mTrackableBehaviour.transform;
        text2.localPosition = new Vector3(2f, 0.1f, -0.32f);
        text2.localScale    = new Vector3(0.1f, 0.1f, 0.001f);
        text2.localRotation = Quaternion.Euler(270, 0, 0);
        text2.Rotate(180, 0, 0);
        text2.gameObject.SetActive(true);
        TextMesh theText2 = text2.transform.GetComponent <TextMesh>();

        theText2.text      = "Derived Information";
        theText2.color     = greyColour;
        theText2.fontStyle = FontStyle.Bold;

        var text3 = Instantiate(textPrefab);

        text3.parent        = TrackableMonitor.mTrackableBehaviour.transform;
        text3.localPosition = new Vector3(-0.21f, 0.1f, -0.32f);
        text3.localScale    = new Vector3(0.1f, 0.1f, 0.001f);
        text3.localRotation = Quaternion.Euler(270, 0, 0);
        text3.Rotate(180, 0, 0);
        text3.gameObject.SetActive(true);
        TextMesh theText3 = text3.transform.GetComponent <TextMesh>();

        theText3.text      = "Data Components";
        theText3.color     = greyColour;
        theText3.fontStyle = FontStyle.Bold;

        bulletPoints.make(blackPrefab, textPrefab);
    }
Ejemplo n.º 8
0
 public void hide_subspaces()
 {
     Subspaces.hide_subspaces();
 }
Ejemplo n.º 9
0
 public void show_subspaces()
 {
     Subspaces.show_subspaces();
 }
Ejemplo n.º 10
0
 public void highlightem()
 {
     Subspaces.Highlight();
 }
Ejemplo n.º 11
0
 void Update()
 {
     if (yessplus == true)
     {
         sub.transform.parent        = all_targets[detectedImageCount].transform;
         sub.transform.localPosition = new Vector3(0, -0.3f, 4);
         sub.transform.localRotation = Quaternion.Euler(90, 0, 0);
         yessplus = false;
     }
     if (yess == true)
     {
         oldFocusedObject = FocusedObject;
         oldDirection     = newDirection;
         oldPosition      = newPosition;
         sub.GetComponent <TextMesh>().text = (Camera.main.transform.position - difference).ToString() + '\n' + Camera.main.transform.up + '\n' + Camera.main.transform.forward;
         if (Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out hitInfo))
         {
             FocusedObject = hitInfo.collider.gameObject;
             if (FocusedObject != oldFocusedObject)
             {
                 focusedobjectName = FocusedObject.name;
                 print(FocusedObject.name);
             }
         }
         else
         {
             FocusedObject     = null;
             focusedobjectName = "none";
         }
         newPosition  = Camera.main.transform.position - difference;
         newDirection = Camera.main.transform.forward;
         if (newPosition != oldPosition)
         {
             writer.WriteLine(focusedobjectName + "," + newPosition.ToString() + "," + Camera.main.transform.position + "," + difference + "," + Camera.main.transform.forward + ',' + Camera.main.transform.up + ',' + Time.time);
         }
         if (newDirection != oldDirection)
         {
             writer.WriteLine(focusedobjectName + "," + newPosition.ToString() + "," + Camera.main.transform.position + "," + difference + "," + Camera.main.transform.forward + ',' + Camera.main.transform.up + ',' + Time.time);
         }
     }
     if (update == true)
     {
         CheckUI();
         update = false;
     }
     if (Input.GetKeyDown("m"))
     {
         Subspaces.merge_spaces();
     }
     if (Input.GetKeyDown("1"))
     {
         writer.WriteLine("TRIAL 1");
         ModelInstantiator.hideAll();
         for (int i = 0; i < AllbatchCounts[0]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 1;
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("2"))
     {
         writer.WriteLine("TRIAL 2");
         ModelInstantiator.hideAll();
         for (int i = AllbatchCounts[0]; i < AllbatchCounts[1]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 2;
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("3"))
     {
         writer.WriteLine("TRIAL 3");
         ModelInstantiator.hideAll();
         for (int i = AllbatchCounts[1]; i < AllbatchCounts[2]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 3;
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("4"))
     {
         writer.WriteLine("TRIAL 4");
         ModelInstantiator.hideAll();
         for (int i = AllbatchCounts[2]; i < AllbatchCounts[3]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 4;
         LayeredMapping.hideOthers(3);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("5"))
     {
         writer.WriteLine("TRIAL 5");
         ModelInstantiator.hideAll();
         for (int i = AllbatchCounts[3]; i < AllbatchCounts[4]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 5;
         LayeredMapping.hideOthers(6);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("6"))
     {
         writer.WriteLine("TRIAL 6");
         ModelInstantiator.hideAll();
         for (int i = AllbatchCounts[4]; i < AllbatchCounts[5]; i++)
         {
             allHabitats[i].SetActive(true);
             LayeredHabitats[i].SetActive(true);
         }
         activeData = 6;
         LayeredMapping.hideOthers(10);
         ENVmds.hideScatter();
     }
     if (Input.GetKeyDown("7"))
     {
         writer.WriteLine("TRIAL 7");
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         ENVmds.read1();
     }
     if (Input.GetKeyDown("8"))
     {
         writer.WriteLine("TRIAL 8");
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         ENVmds.read2();
     }
     if (Input.GetKeyDown("9"))
     {
         writer.WriteLine("TRIAL 9");
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         ENVmds.read3();
     }
     if (Input.GetKeyDown("0"))
     {
         writer.WriteLine("TRIAL 10");
         DeleteAllENV();
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         makeENVlayer(1);
         makeENVlayer(0);
         makeENVlayer(3);
     }
     if (Input.GetKeyDown("-"))
     {
         writer.WriteLine("TRIAL 11");
         DeleteAllENV();
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         makeENVlayer(4);
         makeENVlayer(5);
         makeENVlayer(6);
         makeENVlayer(7);
         makeENVlayer(10);
         makeENVlayer(2);
     }
     if (Input.GetKeyDown("="))
     {
         writer.WriteLine("TRIAL 12");
         DeleteAllENV();
         LayeredMapping.hideOthers(0);
         ENVmds.hideScatter();
         makeENVlayer(10);
         makeENVlayer(9);
         makeENVlayer(8);
         makeENVlayer(15);
         makeENVlayer(17);
         makeENVlayer(20);
         makeENVlayer(21);
         makeENVlayer(11);
         makeENVlayer(22);
         makeENVlayer(23);
     }
     if (Input.GetKeyDown("b"))
     {
         ParallelCoordInstantiator.delete();
     }
     if (Input.GetKeyDown("z"))
     {
         //Subspaces.Highlight();
         //initHistory();
         //for (int i = 0; i < allHabitats.Count; i++)
         //{
         //    allHabitats[i].SetActive(true);
         //    //LayeredHabitats[i].SetActive(true);
         //}
     }
 }
    void Update()
    {
        if (Input.GetKeyDown("l"))
        {
            sub.GetComponent <TextMesh>().color = Color.green;
            difference = Camera.main.transform.position;
            yessplus   = true;
        }
        if (yessplus == true)
        {
            sub.transform.parent        = all_targets[detectedImageCount].transform;
            sub.transform.localPosition = new Vector3(0, -0.3f, 2);
            sub.transform.localRotation = Quaternion.Euler(90, 0, 0);
            yessplus       = false;
            subspaceWeight = true;
        }
        if (yess == true)
        {
            oldFocusedObject = FocusedObject;
            oldDirection     = newDirection;
            oldPosition      = newPosition;
            //sub.GetComponent<TextMesh>().text = (Camera.main.transform.position - difference).ToString();
            sub.GetComponent <TextMesh>().text = (Camera.main.transform.position - difference).ToString() + '\n' + Camera.main.transform.forward;
            if (Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out hitInfo))
            {
                FocusedObject = hitInfo.collider.gameObject;
                if (FocusedObject != oldFocusedObject)
                {
                    focusedobjectName = FocusedObject.name;
                    //print(FocusedObject.name);
                }
            }
            else
            {
                FocusedObject     = null;
                focusedobjectName = "none";
            }
            newPosition  = Camera.main.transform.position - difference;
            newDirection = Camera.main.transform.forward;
            if (newPosition != oldPosition)
            {
                //writer.WriteLine(focusedobjectName + "," + newPosition.ToString() + "," + Camera.main.transform.position + "," + difference + "," + Camera.main.transform.forward + ',' + Time.time);
            }
            if (newDirection != oldDirection)
            {
                //writer.WriteLine(focusedobjectName + "," + newPosition.ToString() + "," + Camera.main.transform.position + "," + difference + "," + Camera.main.transform.forward + ',' + Time.time);
            }
        }
        if (update == true)
        {
            CheckUI();
            update = false;
        }

        if (Input.GetKeyDown("m"))
        {
            Subspaces.merge_spaces();
        }
        if (Input.GetKeyDown("1"))
        {
            ModelInstantiator.hideAll();
            //for (int i = 0; i < allHabitats.Count; i++)
            //{
            //    allHabitats[i].SetActive(false);
            //    LayeredHabitats[i].SetActive(false);
            //}
            for (int i = 0; i < AllbatchCounts[0]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 1;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.dataList1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("2"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[0]; i < AllbatchCounts[1]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 2;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Reptile1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("3"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[1]; i < AllbatchCounts[2]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 3;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.algae1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("4"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[2]; i < AllbatchCounts[3]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 4;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Amphibian1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("5"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[3]; i < AllbatchCounts[4]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 5;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Fish1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("6"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[4]; i < AllbatchCounts[5]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 6;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Mammal1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("7"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[5]; i < AllbatchCounts[6]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 7;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Bird1);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("8"))

        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[6]; i < AllbatchCounts[7]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 8;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Plant11);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("9"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[7]; i < AllbatchCounts[8]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 9;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Plant21);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("0"))
        {
            ModelInstantiator.hideAll();
            for (int i = AllbatchCounts[8]; i < AllbatchCounts[9]; i++)
            {
                allHabitats[i].SetActive(true);
                LayeredHabitats[i].SetActive(true);
            }
            activeData = 10;
            ParallelCoordInstantiator.delete();
            DataManager.LoadEnvData("species_parallel_allSpecies", 49, ServerStream.Plant31);
            displayParallelCoord();
        }
        if (Input.GetKeyDown("b"))
        {
            ParallelCoordInstantiator.delete();
        }
        if (Input.GetKeyDown("z"))
        {
            //Subspaces.Highlight();
            //initHistory();
            //for (int i = 0; i < allHabitats.Count; i++)
            //{
            //    allHabitats[i].SetActive(true);
            //    //LayeredHabitats[i].SetActive(true);
            //}
        }
    }
Ejemplo n.º 13
0
 void OnSelect()
 {
     Subspaces.space_tap(ID);
 }