Example #1
0
        public Camera(float fov, float ar, float nearPlane, float farPlane)
        {
            Position = Vector3.Zero;
            Velocity = Vector3.Zero;
            Projection = Matrix.CreatePerspectiveFieldOfView(
                    fov, ar, nearPlane, farPlane);
            Position = Vector3.Up;
            Target = Vector3.Zero;
            Up = Vector3.Forward;
            Fwd = Vector3.Down;

            Range = new CameraRange()
            {
                Position = new PositionRange3()
                {
                    Min = Vector3.Zero,
                    Max = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue)
                },
                Theta = new AngularRange3()
                {
                    Azimuth = new AngularRange()
                    {
                        Min = 0f,
                        Max = MathHelper.TwoPi
                    },
                    Altitude = new AngularRange()
                    {
                        Min = -MathHelper.PiOver2,
                        Max = MathHelper.PiOver2
                    }
                }
            };

            Theta = SetTheta(Position);
        }
Example #2
0
        public Camera(float fov, float ar, float nearPlane, float farPlane)
        {
            Position   = Vector3.Zero;
            Velocity   = Vector3.Zero;
            Projection = Matrix.CreatePerspectiveFieldOfView(
                fov, ar, nearPlane, farPlane);
            Position = Vector3.Up;
            Target   = Vector3.Zero;
            Up       = Vector3.Forward;
            Fwd      = Vector3.Down;

            Range = new CameraRange()
            {
                Position = new PositionRange3()
                {
                    Min = Vector3.Zero,
                    Max = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue)
                },
                Theta = new AngularRange3()
                {
                    Azimuth = new AngularRange()
                    {
                        Min = 0f,
                        Max = MathHelper.TwoPi
                    },
                    Altitude = new AngularRange()
                    {
                        Min = -MathHelper.PiOver2,
                        Max = MathHelper.PiOver2
                    }
                }
            };

            Theta = SetTheta(Position);
        }