private void RotateNegativeZ(object sender, EventArgs e) { cubeZ -= 5; labelCrZ.Text = cubeZ.ToString(); YLScsDrawing.Drawing3d.Quaternion q = new YLScsDrawing.Drawing3d.Quaternion(); q.FromAxisAngle(new YLScsDrawing.Drawing3d.Vector3d(0, 0, 1), -5 * Math.PI / 180.0); cub.RotateAt(cub.Center, q); GetLocalAxis(); Invalidate(); }
private void RotatePositiveX(object sender, EventArgs e) { cubeX += 5; labelCrX.Text = cubeX.ToString(); YLScsDrawing.Drawing3d.Quaternion q = new YLScsDrawing.Drawing3d.Quaternion(); q.FromAxisAngle(new YLScsDrawing.Drawing3d.Vector3d(1, 0, 0), 5 * Math.PI / 180.0); cub.RotateAt(cub.Center, q); GetLocalAxis(); Invalidate(); }