Beispiel #1
0
 public void InitLinkCloud(bool forcenew = true)
 {
     if (forcenew)
     {
         grctrl       = null;
         lastgenmodel = graphSceneE.gen_none;
     }
     CreateGrcGos();
 }
Beispiel #2
0
        void initVals()
        {
            graphScene     = graphSceneE.gen_campus;
            markerNodeSize = 0.18f;
            //Debug.Log("linkRadius:" + linkRadius + " linkNodeSize:" + linkNodeSize);
            mappars      = new MapGenParameters();
            LinkFLoor    = new Range(0, 0);
            nodesvisible = true;

            linkTrans = GetLinkTransInitial();
            var lopt = lvisOptions.GetInitial();

            SetLinkAndNodeVisibility(lopt.ToString());
            graphGenOptions.GetInitial();
            InitNodeColorOverrides();
            //Debug.Log("Initial ggo get:" + graphGenOptions.Get());
            //Debug.Log("Initial ggo getInitial:" + graphGenOptions.GetInitial());
            //Debug.Log("Initial ggo get:" + graphGenOptions.Get());
        }
Beispiel #3
0
        public void GenLinkCloud(graphSceneE graphScene, GraphGenerationModeE genmode)
        {
            this.graphScene = graphScene;
            grctrl          = GetGraphCtrl();
            var mm = new LcMapMaker(grctrl, mappars);

            grctrl.maxRanHeight = LinkFLoor.max;
            grctrl.minRanHeight = LinkFLoor.min;


            mm.maxVoiceKeywords = this.maxVoiceKeywords;
            mm.AddGraphToLinkCloud(graphScene, genmode);
            nVoiceKeywords = mm.nVoiceKeywords;
            if (CanGetHeights())
            {
                AddLongLat();
            }
            else
            {
                sman.needsLifted = true;
            }
            lastgenmodel = graphScene;
            sman.RequestRefresh("LinkCloudMan-GenLinkCloud");
        }
Beispiel #4
0
        public void AddGraphToLinkCloud(graphSceneE graphScene, GraphGenerationModeE genMode)
        {
            grc.maxRanHeight = LinkFloor.max;
            grc.minRanHeight = LinkFloor.min;
            switch (graphScene)
            {
            case graphSceneE.gen_circ:
            {
                //Debug.Log("globpar " + glopar.nlat + " " + glopar.nlng + " _" + glopar.height);
                CreateCircPoints(npoints: circpar.npoints, rad: circpar.radius, heit: circpar.height);
                break;
            }

            case graphSceneE.gen_sphere:
            {
                Debug.Log("globpar " + globpar.nlat + " " + globpar.nlng + " _" + globpar.height);
                CreateSpherePoints(nlng: globpar.nlat, nlat: globpar.nlng, rad: globpar.height, heit: globpar.height);
                break;
            }

            case graphSceneE.gen_campus:
            {
                switch (genMode)
                {
                case GraphGenerationModeE.GenFromCode:
                    //lmd.CreatePointsForB11();
                    //lmd.CreatePointsForB19();
                    //lmd.CreatePointsForB40();
                    //lmd.CreatePointsForB43();
                    //lmd.CreatePointsForB43RoomsFloor1();
                    //lmd.CreatePointsForB99();
                    //lmd.CreatePointsForBredwB();
                    //lmd.CreatePointsForBredwB3floor(height: 9, bldname: "BldRWB");
                    //lmd.CreatePointsForBsx();

                    lmd.createPointsFor_msft_b11();
                    lmd.createPointsFor_msft_b19();
                    lmd.createPointsFor_msft_b40();
                    lmd.createPointsFor_msft_b43();
                    lmd.createPointsFor_msft_b43_f1();
                    lmd.createPointsFor_msft_b99();
                    lmd.createPointsFor_msft_bredwb();
                    lmd.createPointsFor_msft_bredwb_f3();
                    lmd.createPointsFor_msft_bsx();
                    //lmd.createPointsFor_msft_campus();
                    lmd.CreateGraphForOsmImport_msft();

                    AddRedwestCalibrationMarkers();
                    var template = grc.gm.addprefix("rm");
                    addVoiceKeywords(template);
                    addRedwestB3names(template);
                    break;

                case GraphGenerationModeE.ReadFromFile:
                    CreateLinksFromRegionFiles("msft");
                    break;
                }
                GenCampusGarageLinks();
                grc.AddLinkByNodeName("bRWB-f01-lobby", "rwb-f03-rm3999");        // stairway (sort of)
                break;
            }

            case graphSceneE.gen_b43_1:
            {
                lmd.CreatePointsForB43RoomsFloor1();
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("US-043-1", 7266, 3599, rot, trn);
                break;
            }

            case graphSceneE.gen_b43_2:
            {
                lmd.CreatePointsForB43RoomsFloor1();
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("US-043-2", 7266, 3599, rot, trn);
                break;
            }

            case graphSceneE.gen_b43_3:
            {
                lmd.CreatePointsForB43RoomsFloor1();
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("US-043-3", 7266, 3599, rot, trn);
                break;
            }

            case graphSceneE.gen_b43_4:
            {
                lmd.CreatePointsForB43RoomsFloor1();
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("US-043-4", 7266, 3599, rot, trn);
                break;
            }

            case graphSceneE.gen_bho:
            {
                CreatePointsForBho();
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("DE-BHO-4", 7266, 4223, rot, trn, scalefak: 1 / 2.086667f);
                break;
            }

            case graphSceneE.gen_b43_1p2:
            {
                lmd.CreatePointsForB43RoomsFloor1();
                lmd.CreatePointsForB43RoomsFloor2();
                grc.AddLinkByNodeName("f01-wp-c01", "f02-wp-c03");
                grc.AddLinkByNodeName("f01-wp-c12", "f02-wp-c13");
                break;
            }

            case graphSceneE.gen_redwb_3:
            {
                lmd.CreatePointsForBredwB3floor();
                var sca = new Vector3(10.294f, 1, 10.004f);
                var rot = new Vector3(0, -90, 0);
                var trn = new Vector3(35.42f, 0, -8.72f);
                grc.floorMan.SetMaterialPlane("US-RDB-3", 5255, 5099, sca, rot, trn);
                break;
            }

            case graphSceneE.gen_small:
            {
                CreatePointsSmall();
                break;
            }

            case graphSceneE.gen_eb12:
            {
                switch (genMode)
                {
                case GraphGenerationModeE.GenFromCode:
                    //lmd.CreatePointsForEb12streets1();
                    //lmd.CreatePointsForEb12resident1();
                    //lmd.CreatePointsForEb12streets2();
                    //lmd.CreatePointsForEb12retail();
                    //lmd.CreatePointsForEb12resident2();
                    lmd.CreateGraphForOsmImport_eb12();
                    //lmd.createPointsFor_eb12_streets();
                    lmd.createPointsFor_eb12_resident();
                    lmd.createPointsFor_eb12_retail();
                    break;

                case GraphGenerationModeE.ReadFromFile:
                    CreateLinksFromRegionFiles("eb12");
                    break;
                }
                CreateEb12GarageLinks();
                break;
            }

            case graphSceneE.gen_tukwila:
            {
                CreatePointsForTukwila();
                break;
            }

            case graphSceneE.gen_dublin:
            {
                CreatePointsForDublin();
                CreateGarageLinks("MsDublin1", "dub-oso02", "dub-dw01",
                                  d_order: connectOrderE.dec, d_exit: exitDirE.back, d_len: 5f,
                                  w_order: connectOrderE.inc, w_exit: exitDirE.back, w_len: 5f);

                break;
            }
            }
        }