Ejemplo n.º 1
0
        }                              // nicht nötig

        /// <summary>
        /// Tastendruck auf Maus
        /// </summary>
        /// <param name="e">Mouse Event Argument</param>
        public void MouseButton(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point3 pos   = new Point3(-Cam.X, -Cam.Y, -Cam.Z + 0.1f);
                Point3 look  = new Point3(1, 0, 0);
                Point3 zAxes = new Point3(0, 0, 1);
                Point3 yAxes = new Point3(0, 1, 0);
                Matrix rot1  = new Matrix();
                Matrix rot2  = new Matrix();
                rot1.RotMatrix(Cam.angleZ + 90, zAxes);
                rot2.RotMatrix(Cam.angleX - 90, yAxes);
                Matrix rotRes = MMAth.MatDotMat(rot1, rot2);
                look = MMAth.MatDotPoint(rotRes, look);
                _Shots.Add(new Shot(Cam, look, 1f, 0.0f, 0.0f, 0.5f));
            }
        }