示例#1
0
        /// <summary>
        /// Creates an object of type QuaternionCamera.
        /// </summary>
        public QuaternionCamera()
        {
            _view       = new Matrix();
            _projection = new Matrix();
            _world      = new Matrix();

            _view       = Matrix.Identity;
            _projection = Matrix.Identity;
            _world      = Matrix.Identity;

            _resetTarget        = new QuaternionMovement();
            _resetStartPosition = new QuaternionMovement();

            _enableRotation = true;
            _enableMovement = true;
            _firstPerson    = true;
            _chaseCam       = false;
            _isMoving       = false;
            _curMovement    = DXViewport.QuaternionCamera.MovementType.None;

            _isResetting = false;
            _beganReset  = new DateTime(0);
            _timeToReset = DateTime.MinValue.AddSeconds(1);

            _rotateSpeed = ( float )Math.PI / 180.0f;                   // 1 degree
            _panSpeed    = 0.01f;
            _truckSpeed  = 0.1f;

            _fov         = ( float )Math.PI / 4;
            _aspectRatio = 1.333333f;
            _nearPlane   = 1.0f;
            _farPlane    = 1000.0f;
        }
示例#2
0
        /// <summary>
        /// Creates an object of type QuaternionCamera.
        /// </summary>
        public QuaternionCamera()
        {
            _view = new Matrix();
            _projection = new Matrix();
            _world = new Matrix();

            _view = Matrix.Identity;
            _projection = Matrix.Identity;
            _world = Matrix.Identity;

            _resetTarget = new QuaternionMovement();
            _resetStartPosition = new QuaternionMovement();

            _enableRotation = true;
            _enableMovement = true;
            _firstPerson = true;
            _chaseCam = false;
            _isMoving = false;
            _curMovement = DXViewport.QuaternionCamera.MovementType.None;

            _isResetting = false;
            _beganReset = new DateTime( 0 );
            _timeToReset = DateTime.MinValue.AddSeconds( 1 );

            _rotateSpeed = ( float ) Math.PI / 180.0f;	// 1 degree
            _panSpeed = 0.01f;
            _truckSpeed = 0.1f;

            _fov = ( float ) Math.PI / 4;
            _aspectRatio = 1.333333f;
            _nearPlane = 1.0f;
            _farPlane = 1000.0f;
        }