Exemplo n.º 1
0
        /// <summary>
        /// Create a survey element by making a default circle element, then creating the GLCircle, and then adding this to the parent element list.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="oSurveyPoint"></param>
        /// <param name="a_oDefaultEffect"></param>
        /// <param name="SPIndex"></param>
        private void CreateSurveyPoint(SceenElement parent, SurveyPoint oSurveyPoint, GLEffect a_oDefaultEffect, int SPIndex)
        {
            Vector3 v3SPPos = new Vector3((float)oSurveyPoint.Position.X, (float)oSurveyPoint.Position.Y, 0.0f);

            CircleElement oSurveyPointElement = new CircleElement();

            oSurveyPointElement.EntityID = oSurveyPoint.Id;

            GLCircle oSPCircle = new GLCircle(a_oDefaultEffect,
                                              v3SPPos,
                                              4.0f / m_fZoomScaler,
                                              Color.White,
                                              UIConstants.Textures.DEFAULT_TEXTURE);


            GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3SPPos,
                                                                   UIConstants.DEFAULT_TEXT_SIZE, Color.White, UIConstants.Textures.DEFAULT_GLFONT2, SPIndex.ToString());

            oSurveyPointElement._isSurveyPoint   = true;
            oSurveyPointElement.Lable            = oNameLable;
            oSurveyPointElement.Lable.Size       = UIConstants.DEFAULT_TEXT_SIZE / m_fZoomScaler; //Initial taskgroup names weren't being scaled properly for whatever reason.
            oSurveyPointElement.RealSize         = new Vector2(0.0001f, 0.0001f) / m_fZoomScaler;
            oSurveyPointElement.PrimaryPrimitive = oSPCircle;
            oSurveyPointElement.AddPrimitive(oSPCircle);
            parent.AddChildElement(oSurveyPointElement);
        }
 public SurveyPoint[] Transform(SurveyPoint[] surveyPoints)
 {
     var transformed = new SurveyPoint[surveyPoints.Length];
     Parallel.For(0, surveyPoints.Length, i => {
         transformed[i] = Transform(surveyPoints[i]);
     });
     return transformed;
 }
 private void Add(SurveyPoint surveyPoint)
 {
     var point = surveyPoint.CalibrationPoint;
     var x = point.X * ScaleFactor / _maxCoord;
     var y = point.Y * ScaleFactor / _maxCoord;
     var z = point.Z * ScaleFactor / _maxCoord;
     var visualPoint = new PointVisual3D(new Point3D(x, y, z), PointRadius);
     ViewPort.Children.Add(visualPoint);
     _points[surveyPoint] = visualPoint;
 }
        private void Add(SurveyPoint surveyPoint)
        {
            var point       = surveyPoint.CalibrationPoint;
            var x           = point.X * ScaleFactor / _maxCoord;
            var y           = point.Y * ScaleFactor / _maxCoord;
            var z           = point.Z * ScaleFactor / _maxCoord;
            var visualPoint = new PointVisual3D(new Point3D(x, y, z), PointRadius);

            ViewPort.Children.Add(visualPoint);
            _points[surveyPoint] = visualPoint;
        }
 public SurveyPoint Transform(SurveyPoint surveyPoint)
 {
     var pt = new[] {
         surveyPoint.CalibrationPoint.X,
         surveyPoint.CalibrationPoint.Y,
         surveyPoint.CalibrationPoint.Z,
     }.Subtract(new[] {
         HardIronEffect.X,
         HardIronEffect.Y,
         HardIronEffect.Z,
     });
     pt = SoftIronEffect.Multiply(pt);
     return new SurveyPoint(surveyPoint.Gx, surveyPoint.Gy, surveyPoint.Gz, pt[0], pt[1], pt[2]);
 }
 public SurveyWizard(ISurveyPointProvider surveyPointProvider)
 {
     Requires.NotNull(surveyPointProvider, "surveyPointProvider");
     _surveyPointProvider = surveyPointProvider;
     SurveyPoints = new ObservableCollection<SurveyPoint>();
     LastSurveyPoint = new SurveyPoint(
           double.MaxValue / 2,
           double.MaxValue / 2,
           double.MaxValue / 2,
           double.MaxValue / 2,
           double.MaxValue / 2,
           double.MaxValue / 2);
     _timer = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(1)
     };
     _timer.Tick += OnTimerTick;
 }
Exemplo n.º 7
0
 public SurveyWizard(ISurveyPointProvider surveyPointProvider)
 {
     Requires.NotNull(surveyPointProvider, "surveyPointProvider");
     _surveyPointProvider = surveyPointProvider;
     SurveyPoints         = new ObservableCollection <SurveyPoint>();
     LastSurveyPoint      = new SurveyPoint(
         double.MaxValue / 2,
         double.MaxValue / 2,
         double.MaxValue / 2,
         double.MaxValue / 2,
         double.MaxValue / 2,
         double.MaxValue / 2);
     _timer = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(1)
     };
     _timer.Tick += OnTimerTick;
 }
 public SurveyPointPair(int seqno, SurveyPoint point1, SurveyPoint point2)
 {
     Seqno  = seqno;
     Point1 = point1;
     Point2 = point2;
 }