Example #1
0
        //---------------------------------------
        // Class methods
        //---------------------------------------
        public Camera()
        {
            m_vLookAt = Vector3.Zero;
            m_vPosition = Vector3.Zero;
            m_vUp = Vector3.Up;

            m_iIDCamera = -1;

            m_fAspectRatio = 4.0f / 3.0f;
            m_fFieldOfView = MathHelper.ToRadians(45.0f);
            m_fNearPlaneDistance = 1.0f;
            m_fFarPlaneDistance = 10000.0f;

            m_eType = ECamType.ECAMERA_TYPE_INVALID;
        }
Example #2
0
 public void SetType(ECamType type)
 {
     m_eType = type;
 }
Example #3
0
        public bool Init(int ID, ECamType type, Vector3 pos, Vector3 rot)
        {
            m_iIDCamera = ID;

            m_vPosition = pos;
            m_vRotation = rot;

            m_eType = type;

            m_vLookAt = new Vector3(0.0f, 0.0f, 100.0f);

            // Set camera perspective
            m_fNearPlaneDistance = 10.0f;
            m_fFarPlaneDistance = 100000.0f;

            GraphicsDeviceManager gdm = ResourcesManager.GetInstance().GetGraphicsDeviceManager();
            m_fAspectRatio = (float)gdm.GraphicsDevice.Viewport.Width / gdm.GraphicsDevice.Viewport.Height;

            return true;
        }