/// <summary> /// Default ctor /// </summary> public Scene3DControl() { InitializeComponent(); Scene = new Scene3D(); Drag = new DragBallNavigator(this); ViewerConfig = new GLViewerConfig(); ViewerConfig.LoadDefault(); }
public void Apply(DragBallNavigator dragball) { Translation.X += dragball.Pane.X / 2; Translation.Y += dragball.Pane.Y / 2; Scale /= dragball.Zoom; Rotation += dragball.Angle.X / 4; }
public void Copy(DragBallNavigator other) { Data = other.Data; }
private void CorrectionMatrix_Load(object sender, EventArgs e) { try { if (File.Exists(QuickFileName)) ProcessScanData(ScanDataIO.Read(QuickFileName)); EnableLaser(true); } catch { EnableLaser(false); } Drag = new DragBallNavigator(PreviewPanel); Drag.Init(); this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Selectable , true); typeof(Panel).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, PreviewPanel, new object[] { true }); PreviewPanel.TabStop = true; this.MouseWheel += Drag.MouseWheel; }