Пример #1
0
 public void Load(StreamReader sr)
 {
     myP1.Load(sr);
     myP2.Load(sr);
 }
Пример #2
0
        public void Load(System.IO.StreamReader sr)
        {
            clsPoint3d p1;

            //var version = myPGLoadedVersion.Split('.');
            //var nLoadedVersionMajor = version.Count() >= 1 ? Convert.ToInt32(version[0]) : 0;
            //var nLoadedVersionMinor = version.Count() >= 2 ? Convert.ToInt32(version[1]) : 0;

            while (sr.EndOfStream == false)
            {
                var myLine = sr.ReadLine();
                if (myLine == "END_MARKER_POINT_SETTINGS")
                {
                    break;
                }
                if (myLine.IndexOf(",") > -1)
                {
                    var mySplit = myLine.Split(',');
                    if (mySplit.GetUpperBound(0) == 1)
                    {
                        if (mySplit[0] == "MarkerID")
                        {
                            myMarkerID = Convert.ToInt32(mySplit[1]);
                        }
                        if (mySplit[0] == "SeenFromMarkerID")
                        {
                            mySeenFromMarkerID = Convert.ToInt32(mySplit[1]);
                        }
                        if (mySplit[0] == "SeenFromMarkerIDs")
                        {
                            mySeenFromMarkerIDs.Add(Convert.ToInt32(mySplit[1]));
                        }
                        if (mySplit[0] == "ActualMarkerID")
                        {
                            myActualMarkerID = Convert.ToInt32(mySplit[1]);
                        }
                        if (mySplit[0] == "VerticalVectorX")
                        {
                            if (myVerticalVect == null)
                            {
                                myVerticalVect = new clsPoint3d();
                            }
                            myVerticalVect.X = Convert.ToDouble(mySplit[1]);
                        }
                        if (mySplit[0] == "VerticalVectorY")
                        {
                            if (myVerticalVect == null)
                            {
                                myVerticalVect = new clsPoint3d();
                            }
                            myVerticalVect.Y = Convert.ToDouble(mySplit[1]);
                        }
                        if (mySplit[0] == "VerticalVectorZ")
                        {
                            if (myVerticalVect == null)
                            {
                                myVerticalVect = new clsPoint3d();
                            }
                            myVerticalVect.Z = Convert.ToDouble(mySplit[1]);
                        }
                        if (mySplit[0] == "BulkheadHeight")
                        {
                            BulkheadHeight = Convert.ToDouble(mySplit[1]);
                        }
                        if (mySplit[0] == "Confirmed")
                        {
                            _confirmed = (mySplit[1] == "1");
                        }
                    }
                }
            }

            if (mySeenFromMarkerIDs.Contains(mySeenFromMarkerID) == false)
            {
                mySeenFromMarkerIDs.Add(mySeenFromMarkerID);
            }

            myOrigin.Load(sr);
            myEndXAxis.Load(sr);
            myEndYAxis.Load(sr);
            myPoint.Load(sr);
            VX.Load(sr);
            VY.Load(sr);
            VZ.Load(sr);

            var n = Convert.ToInt32(sr.ReadLine());

            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                myCameraPoints.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                mySeenFromCameraPoints.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                myPts1.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                myPts2.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                myPts3.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                GyroData.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                LastGyroData.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                AccelData.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                p1 = new clsPoint3d();
                p1.Load(sr);
                LastAccelData.Add(p1);
            }

            n = Convert.ToInt32(sr.ReadLine());
            for (var i = 1; i <= n; i++)
            {
                var myHistoricPoint = new clsMarkerPoint();
                myHistoricPoint.Load(sr);
                myHistory.Add(myHistoricPoint);
            }
        }