Пример #1
0
    public void onAdjustParam()
    {
        if (obj == null || !obj.gameObject.activeSelf)
        {
            return;
        }

        if (type == 1)
        {
            if (hightlightTog)
            {
                obj.GetComponent <pointCloud> ().ChangeColor(hightColor, highlightMin, highlightMax, filterType);
            }
            else
            {
                //obj.GetComponent<pointCloud> ().ChangeColor (getColorFromUI(), -1, 99999, 0);
            }
            if (scaleTog)
            {
                obj.GetComponent <pointCloud> ().ChangeScale(scaleVal);
            }
            else
            {
                //obj.GetComponent<pointCloud> ().ChangeScale (100);
            }
        }
        if (type == 2)
        {
            List <KeyFrameC> kfList = CppInterface.GetKFList(id);
            if (hightlightTog)
            {
                obj.GetComponent <KFListObj> ().ChangeColors(hightColor, highlightMin, highlightMax, filterType);
            }
            else
            {
                //obj.GetComponent<KFListObj> ().ChangeColors (getColorFromUI() , -1, 99999, filterType);
            }
            obj.GetComponent <KFListObj> ().ShowTraj(lineModeTog, lineColor);
            if (connectLineTog)
            {
                obj.GetComponent <KFListObj> ().ClearKFConnection();
                for (int i = 0; i < kfList.Count; i++)
                {
                    ShowKFConnect(i);
                }
            }
            else
            {
                obj.GetComponent <KFListObj> ().ClearKFConnection();
            }
            if (scaleTog)
            {
                obj.GetComponent <KFListObj> ().changeScale(scaleVal);
            }
            else
            {
                //obj.GetComponent<KFListObj> ().changeScale (100);
            }
        }
    }
Пример #2
0
 public void ShowObj(bool val, int scale = 100)
 {
     if (menuObj == null && val == true)
     {
         initMenu();
     }
     if (obj == null && val == true)
     {
         if (type == 1)
         {
             obj = pointCloud.create(CppInterface.GetMPList(id));
         }
         if (type == 2)
         {
             obj = KFListObj.create(CppInterface.GetKFList(id), ListId).transform;
         }
         if (type == 3)
         {
             RdSegData = CppInterface.GetRSList(id);
             if (showCount > RdSegData.Count || showCount <= 0)
             {
                 showCount = RdSegData.Count;
             }
             obj = RoadMesh.create(RdSegData.GetRange(0, showCount)).transform;
         }
         if (type == 5)
         {
             ChannelInfo img     = ChannelInfo.getChannel(5, id);
             ChannelInfo feature = ChannelInfo.getChannel(4, id);
             if (img != null)
             {
                 commonObj.mMainUI.updateFrameDisplay(img, feature);
             }
         }
         if (type == 6)
         {
             List <TraficSign> tmp = CppInterface.GetTSList(id);
             if (showCount >= 0 && showCount < tmp.Count)
             {
                 tmp.RemoveRange(showCount, tmp.Count - showCount);
             }
             obj = TraficSignMesh.create(tmp).transform;
         }
         if (type == 7)
         {
             List <ActMapPoint> tmp = CppInterface.GetAMPList(id);
             obj = ActMPMesh.create(tmp);
         }
     }
     if (obj != null)
     {
         obj.gameObject.SetActive(val);
         if (val)
         {
             transform.Find("Text").GetComponent <Text> ().color = getColorFromUI();
         }
         else
         {
             transform.Find("Text").GetComponent <Text> ().color = new Color32(0, 0, 0, 255);
         }
     }
 }