//----------------------------------------------------------------------------------------------

        public virtual void UpdateCamera()
        {
            float rele = m_pitch;
            float razi = m_yaw;

            IndexedQuaternion rot = new IndexedQuaternion(m_cameraUp, razi);
            
            IndexedVector3 eyePos = new IndexedVector3();
            eyePos[m_forwardAxis] = m_cameraDistance;

            IndexedVector3 forward = eyePos;
            if (forward.LengthSquared() < MathUtil.SIMD_EPSILON)
            {
                forward = new IndexedVector3(0,0,-1);
            }
            IndexedVector3 right = IndexedVector3.Cross(m_cameraUp, IndexedVector3.Normalize(forward));
            IndexedQuaternion roll = new IndexedQuaternion(right, -rele);
            rot.Normalize();
            roll.Normalize();

            IndexedMatrix m1 = IndexedMatrix.CreateFromQuaternion(rot);
            IndexedMatrix m2 = IndexedMatrix.CreateFromQuaternion(roll);
            IndexedMatrix m3 = m1 * m2;


            //eyePos = new IndexedVector3(Vector3.Transform(eyePos.ToVector3(),(rot * roll)));
            //eyePos = new IndexedVector3(eyePos, (rot * roll));
            eyePos = m3 * eyePos;

            //m_cameraTargetPosition = m_cameraPosition + eyePos;
            m_cameraPosition = eyePos;

            m_cameraPosition += m_cameraTargetPosition;

            if (m_glutScreenWidth == 0 && m_glutScreenHeight == 0)
                return;

            m_lookAt = IndexedMatrix.CreateLookAt(m_cameraPosition, m_cameraTargetPosition, m_cameraUp);
            Matrix t = Matrix.CreateLookAt(m_cameraPosition.ToVector3(), m_cameraTargetPosition.ToVector3(), m_cameraUp.ToVector3());
            Matrix t2 = m_lookAt.ToMatrix();

            if (t != t2)
            {
                int ibreak2 = 0;
            }


            int ibreak = 0;
        }