예제 #1
0
        public void InterpolateHeight(Int32 count)
        {
            Point2Ds curPoint2Ds = new Point2Ds();
            Point2Ds point2Ds    = new Point2Ds();

            for (int i = 0; i < m_point3Ds.Count; i++)
            {
                curPoint2Ds.Add(new Point2D(m_point3Ds[i].X, m_point3Ds[i].Y));
                GeoCardinal geoCardinal = new GeoCardinal(curPoint2Ds);
                GeoLine     geoLine     = geoCardinal.ConvertToLine(count);
                double      dLength     = geoLine.Length;
                Point2D     point2D     = new Point2D(dLength, m_point3Ds[i].Z);
                point2Ds.Add(point2D);
            }

            GeoCardinal geoCardinalHeight = new GeoCardinal(point2Ds);
            GeoLine     geoLineHeight     = geoCardinalHeight.ConvertToLine(count);

            for (Int32 i = 0; i < m_point3DsAll.Count; i++)
            {
                Point3D point3D = new Point3D(m_point3DsAll[i].X, m_point3DsAll[i].Y, geoLineHeight[0][i].Y);
                m_point3DsAll[i] = point3D;
            }

            Int32 indexLine = scontrol.Scene.TrackingLayer.IndexOf("line");

            m_geoLine3D.SetEmpty();
            m_geoLine3D.AddPart(m_point3DsAll);

            if (indexLine > 0)
            {
                scontrol.Scene.TrackingLayer.Set(indexLine, m_geoLine3D);
            }
            else
            {
                scontrol.Scene.TrackingLayer.Add(m_geoLine3D, "line");
            }

            SetPointStyle3D(m_index.ToString(), true);

            m_flyManager.Routes.Remove(0);
            m_flyManager.Routes.Add(GetRoute());
        }
예제 #2
0
        private void SetGeoLine3DToTrackingLayer(Point2Ds point2Ds, Int32 count)
        {
            Int32 index = scontrol.Scene.TrackingLayer.IndexOf("line");

            GeoCardinal geoCardinal = new GeoCardinal(point2Ds);
            GeoLine     geoLine     = geoCardinal.ConvertToLine(count);

            if (m_geoLine3D.Length > 0)
            {
                m_geoLine3D.RemovePart(0);
            }
            m_geoLine3D.AddPart(ConvertPoint2DsToPoint3Ds(geoLine[0]));

            if (index > 0)
            {
                scontrol.Scene.TrackingLayer.Set(index, m_geoLine3D);
            }
            else
            {
                scontrol.Scene.TrackingLayer.Add(m_geoLine3D, "line");
            }
        }