예제 #1
0
        public void FindPointsProto(List <GameObject> circleList, List <Vector3> circlePositionsList)
        {
            currcloud = CloudUpdater.instance.LoadCurrentStatus();

            List <Vector3> CircleLocalPositionsList = new List <Vector3>();

            foreach (var v in circlePositionsList)
            {
                CircleLocalPositionsList.Add(currcloud.transform.worldToLocalMatrix.MultiplyPoint3x4(v));
            }

            HistogramPointSelectionThreadHandler ThreadHandle = new HistogramPointSelectionThreadHandler();

            ThreadHandle.circlePositionsList      = circlePositionsList;
            ThreadHandle.circleLocalPositionsList = CircleLocalPositionsList;
            ThreadHandle.radius    = radius;
            ThreadHandle.colorList = colorList;
            ThreadHandle.currcloud = currcloud;
            ThreadHandle.StartThread();
            SelectionThreadQueue.Enqueue(ThreadHandle);
            pointSelectionJobON = true;

            this.circleList          = circleList;
            this.circlePositionsList = circlePositionsList;

            /**
             * Mesh newmesh = currcloud.gameObject.GetComponent<MeshFilter>().mesh;
             * newmesh.colors = colors;
             * currcloud.gameObject.GetComponent<MeshFilter>().mesh = newmesh;
             * CreateCanvas(pointCountsbySections);
             * yValues = pointCountsbySections;
             **/
        }
예제 #2
0
 private void Update()
 {
     if (pointSelectionJobON)
     {
         if (SelectionThreadQueue.Count != 0)
         {
             HistogramPointSelectionThreadHandler ThreadHandle = SelectionThreadQueue.Peek();
             if (ThreadHandle.isRunning == false)
             {
                 ThreadHandle = SelectionThreadQueue.Dequeue();
                 Mesh newmesh = currcloud.gameObject.GetComponent <MeshFilter>().mesh;
                 newmesh.colors = ThreadHandle.colors;
                 currcloud.gameObject.GetComponent <MeshFilter>().mesh = newmesh;
                 pointCountsbySections = ThreadHandle.pointCountsbySections;
                 xValues              = ThreadHandle.xValues;
                 yValues              = pointCountsbySections;
                 selectedPoints       = ThreadHandle.SelectedPointsList;
                 selectedPointsColors = ThreadHandle.SelectedPointsColorList;
                 ThreadHandle.StopThread();
                 CreateCanvas(pointCountsbySections);
             }
         }
         else
         {
             pointSelectionJobON = false;
         }
     }
 }