Beispiel #1
0
        public override void OnMouseDown(int int_0, int int_1, int int_2, int int_3)
        {
            IPoint point = Utils3D.XYToPoint(this._plugin.SceneGraph, int_2, int_3);

            if (point != null)
            {
                point.Z = this.isurface_0.GetElevation(point);
                FlyByUtils.AddFlyByGraphic(this._plugin.SceneGraph, point, FlyByUtils.FlyByElementType.FLYBY_ANCHORS, System.Drawing.Color.Red, System.Drawing.Color.Red, System.Drawing.Color.Red, System.Drawing.Color.Red, false);
                Utils3D.FlashLocation3D(this._plugin.SceneGraph, point);
                if (this.ipointCollection_0 == null)
                {
                    this.ipointCollection_0 = new Polyline();
                }
                object value = Missing.Value;
                this.ipointCollection_0.AddPoint(point, ref value, ref value);
                if (this.ipointCollection_0.PointCount > 1)
                {
                    IPolyline polyline = (this.ipointCollection_0 as IClone).Clone() as IPolyline;
                    Utils3D.MakeZMAware(polyline, true);
                    double maxSegmentLength = polyline.Length / 50.0;
                    if (this.ipointCollection_0.PointCount > 2)
                    {
                        polyline.Smooth(0.0);
                        polyline.Densify(maxSegmentLength, 0.0);
                    }
                    FlyByUtils.AddFlyByGraphic(this._plugin.SceneGraph, polyline, FlyByUtils.FlyByElementType.FLYBY_PATH, System.Drawing.Color.Red, System.Drawing.Color.Red, System.Drawing.Color.Red, System.Drawing.Color.Red, true);
                }
            }
        }