public OpenTKControl() { InitializeComponent(); if (!DesignMode) { Paint += new PaintEventHandler(OpenTKControl_Paint); Load += new EventHandler(OpenTKControl_Load); Resize += new EventHandler(OpenTKControl_Resize); MouseMove += new MouseEventHandler(OpenTKControl_MouseMove); MouseDown += new MouseEventHandler(OpenTKControl_MouseDown); MouseUp += new MouseEventHandler(OpenTKControl_MouseUp); DragEnter += new DragEventHandler(OpenTKControl_DragEnter); DragDrop += new DragEventHandler(OpenTKControl_DragDrop); MouseWheel += new MouseEventHandler(OpenTKControl_MouseWheel); } SnapValue = 0.25f; SnapValueRotation = (float)(Math.PI / 8.0); Instance = this; }
void openTKControl_OnSelectObject(object sender, OpenTKControl.SelectObjectEvent e) { SelectObject(e.SelectedObject); }
void openTKControl_OnSceneLoaded(object sender, OpenTKControl.SceneLoadedEvent e) { sceneControl.LoadScene(e.Scene); }
void openTKControl_OnObjectRemoved(object sender, OpenTKControl.ObjectRemovedEvent e) { sceneControl.RefreshScene(); }