public bool Frame()
        {
            // Do the input frame processing if Escapsewas pressed then Exit.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the graphics object.Position
            if (!Graphics.Frame())
            {
                return(false);
            }

            // Finally render the graphics to the screen.
            if (!Graphics.Render())
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        public bool Frame()
        {
            // Read the user input.
            if (!DApplication.Input.Frame() || DApplication.Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the application object.
            if (!DApplication.Frame(Timer.FrameTime))
            {
                return(false);
            }

            return(true);
        }
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Finally render the graphics to the screen.
            if (!Graphics.Frame())
            {
                return(false);
            }

            // Finally render the graphics to the screen.
            if (!Graphics.Render())
            {
                return(false);
            }

            return(true);
        }
Beispiel #4
0
        public bool Frame()
        {
            // Read the user input.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame input processing.
            if (!HandleInput(Timer.FrameTime))
            {
                return(false);
            }

            // Get the view point position/rotation.
            // Do the frame processing for the graphics object.
            if (!Graphics.Frame(Position.PositionX, Position.PositionY, Position.PositionZ, Position.RotationX, Position.RotationY, Position.RotationZ, Timer.FrameTime))
            {
                return(false);
            }

            return(true);
        }
Beispiel #5
0
        public bool Frame()
        {
            // Do the input frame processing
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the graphics object.
            if (!Graphics.Frame())
            {
                return(false);
            }

            return(true);
        }
Beispiel #6
0
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (!App.Input.Frame() || App.Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the applicatioin object.
            if (!App.Frame())
            {
                return(false);
            }

            return(true);
        }
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Performance Logging.
            Graphics.Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Graphics.Timer.FrameTime);
                if (Graphics.Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the graphics object.mouseX, mouseY, Input.PressedKeyss
            if (!Graphics.Frame())
            {
                return(false);
            }

            // Finally render the graphics to the screen.   mouseX, mouseY
            if (!Graphics.Render())
            {
                return(false);
            }

            return(true);
        }
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Set the frame time for calculating the updated position.
            Position.FrameTime = Timer.FrameTime;

            // Check if the left or right arrow key has been pressed, if so rotate the camera accordingly.
            bool keydown = Input.IsLeftArrowPressed();

            Position.TurnLeft(keydown);
            keydown = Input.IsRightArrowPressed();
            Position.TurnRight(keydown);
            keydown = Input.IsUpArrowPressed();
            Position.LookUp(keydown);
            keydown = Input.IsDownArrowPressed();
            Position.LookDown(keydown);

            // Do the frame processing for the graphics object.
            if (!Graphics.Frame(Position))
            {
                return(false);
            }

            // Finally render the graphics to the screen.
            if (!Graphics.Render())
            {
                return(false);
            }

            return(true);
        }
        public bool Frame()
        {
            if (Input.IsKeyDown(Keys.Escape))
            {
                return(false);
            }

            Graphics.Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Graphics.Timer.FrameTime);
                if (Graphics.Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            return(Graphics.Frame());
        }
Beispiel #10
0
        public bool Frame()
        {
            // Do the input frame processing
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            //// Set the frame time for calculating the updated position.
            Position.FrameTime = Timer.FrameTime;

            // Handle the input.
            bool keydown = Input.IsLeftArrowPressed();

            Position.MoveLeft(keydown);
            keydown = Input.IsRightArrowPressed();
            Position.MoveRight(keydown);

            // Get the view point position/rotation.
            SharpDX.Vector3 currentViewPort = new SharpDX.Vector3(Position.PositionX, Position.PositionY, Position.PositionZ);

            // Do the frame processing for the graphics object.
            if (!Graphics.Frame(currentViewPort.X, currentViewPort.Y, currentViewPort.Z))
            {
                return(false);
            }

            return(true);
        }
Beispiel #11
0
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // The following Rotates the entire scenes around the speakers.
            // Get current positions of each secondarySound in 3dSpace.
            SharpDX.Vector3 SoundBufferPosition = Sound._3DSecondarySoundBuffer.Position;
            // Create a reset Matreix in the o,o,o home position.
            SharpDX.Matrix rotationMatrix = SharpDX.Matrix.Identity;
            // Rotate it slightly.
            rotationMatrix = SharpDX.Matrix.RotationY(0.0002f);
            // And apply that rotation towards each coordinate for each secondarySoundBuffer being played in 3D space.
            SharpDX.Vector3 rotatedCoordinates = SharpDX.Vector3.TransformCoordinate(SoundBufferPosition, rotationMatrix);
            // And assign back the rotated coordinates to each Secondary Soundbuffer that will now been roated.
            Sound._3DSecondarySoundBuffer.Position = rotatedCoordinates;

            // Finally render the graphics to the screen.
            if (!Graphics.Render())
            {
                return(false);
            }

            return(true);
        }
        public bool Frame()
        {
            // Check if the user pressed escape and wants to exit the application.
            if (Input.IsKeyDown(Keys.Escape))
            {
                return(false);
            }

            // Performance Logging.
            Graphics.Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Graphics.Timer.FrameTime);
                if (Graphics.Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame processing for the graphics object.
            return(Graphics.Frame());
        }
        public bool Frame()
        {
            // Read the user input.
            if (!Input.Frame() || Input.IsEscapePressed())
            {
                return(false);
            }

            // Update the system stats.
            Timer.Frame2();
            if (DPerfLogger.IsTimedTest)
            {
                DPerfLogger.Frame(Timer.FrameTime);
                if (Timer.CumulativeFrameTime >= DPerfLogger.TestTimeInSeconds * 1000)
                {
                    return(false);
                }
            }

            // Do the frame input processing.
            if (!HandleMovementInput(Timer.FrameTime))
            {
                return(false);
            }

            // Update the scene lighting.
            UpdateLighting();

            // Render the graphics.
            if (!Render())
            {
                return(false);
            }

            return(true);
        }