Esempio n. 1
0
        public void RecreateProjectionMatrix()
        {
            (int width, int height) = WindowManager.Inst.Size;
            float aspectRatio = ((float)width) / height;

            projectionMatrix = Matrix4.CreatePerspectiveFieldOfView((float)Mathmatics.ConvertToRadians(FOV), aspectRatio, NearPlane, FarPlane);
        }
Esempio n. 2
0
        public void MoveDirectionBased(Vector3d movement)
        {
            Vector3d toAdd = (Quaternion.FromEulerAngles(0, (float)Mathmatics.ConvertToRadians(-Rotation.Y), 0) * (Vector3)movement);

            Position += toAdd;
        }