public void EndFlight() { this.bool_0 = false; ISceneGraph sceneGraph = this._plugin.SceneGraph; IPoint point = new Point(); System.Drawing.Rectangle rectangle = default(System.Drawing.Rectangle); if (ToolSceneFly.GetClientRect(this._plugin.ActiveViewer.hWnd, ref rectangle) != 0) { object obj; object obj2; sceneGraph.Locate(sceneGraph.ActiveViewer, rectangle.Right / 2, rectangle.Bottom / 2, esriScenePickMode.esriScenePickAll, true, out point, out obj, out obj2); } ICamera camera = this._plugin.Camera; if (point != null) { camera.Target = point; camera.Observer = this.ipoint_0; } camera.RollAngle = 0.0; camera.PropertiesChanged(); ToolSceneFly.SetCursor(this.cursor_1.Handle.ToInt32()); this.int_0 = 0; }
public void StartFlight() { this.bool_0 = true; IEnvelope extent = this._plugin.SceneGraph.Extent; if (!extent.IsEmpty) { double num; double num2; double num3; double num4; extent.QueryCoords(out num, out num2, out num3, out num4); if (num3 - num > num4 - num2) { this.double_0 = (num3 - num) / 100.0; } else { this.double_0 = (num4 - num2) / 100.0; } ICamera camera = this._plugin.Camera; this.ipoint_0 = camera.Observer; this.ipoint_1 = camera.Target; double num5 = this.ipoint_1.X - this.ipoint_0.X; double num6 = this.ipoint_1.Y - this.ipoint_0.Y; double num7 = this.ipoint_1.Z - this.ipoint_0.Z; this.double_2 = Math.Atan(num7 / Math.Sqrt(num5 * num5 + num6 * num6)); this.double_3 = Math.Atan(num6 / num5); this.double_1 = Math.Sqrt(num5 * num5 + num6 * num6 + num7 * num7); ToolSceneFly.SetCursor(this.cursor_1.Handle.ToInt32()); this.Flight(); } }