private void panel1_MouseUp(object sender, MouseEventArgs e) { if (mDragObject != null) { IEditorNode hPicture = (IEditorNode)mDragObject; //hPicture.Highlight(PictureNode.eHighlightOptions.Highlight_None); mDragObject = null; } if (mIsDraggingPanel) { panel1.Cursor = oldcursor; mIsDraggingPanel = false; // unproject the screen point into world space // find the cursor position on this application Point screenPoint = PointToClient(new Point(Cursor.Position.X - panel1.Location.X, Cursor.Position.Y - panel1.Location.Y)); // converts it to vec3 GlmNet.vec3 scrPt = Utilities.PointToVec3(screenPoint); GlmNet.vec3 movement = previousScrPt - scrPt; movement *= 0.1f; Camera.Instance().StrifeCamera(movement); //System.Console.WriteLine(" Cursor : " + scrPt.ToString()); //System.Console.WriteLine(" Delta : " + movement.ToString()); //System.Console.WriteLine(" Camera : " + mCamera.GetCameraPosition().ToString()); // refresh matrices... //refreshMatrices(); _mustRender = true; } }
private void panel1_MouseDown(object sender, MouseEventArgs e) { mIsDraggingPanel = true; panel1.Cursor = grabbing; // unproject the screen point into world space // find the cursor position on this application Point screenPoint = PointToClient(new Point(Cursor.Position.X - panel1.Location.X, Cursor.Position.Y - panel1.Location.Y)); // converts it to vec3 previousScrPt = Utilities.PointToVec3(screenPoint); }
public void ApplySingleLightParameters(SharpGL.OpenGL gl, ExtShaderProgram esp, GlmNet.vec3 lp) { ParameterAppliers.JOG.ApplySingleLightParameters(gl, esp, lp); }