Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-25840

QRotationReading enhanced with new presentations

    XMLWordPrintable

Details

    Description

      QRotationSensor's QRotationReading should be enhanced with new presentations: Quaternion and Transformation matrix
      Euler angles (current x, y, z) suffer from Gimbal lock effect, quaternions and rotation matrix / transformation matrix are free from the effect. Quaternions and matrixes are used in games, which one is more optimal depends on the purpose, e.g. quaternions are more suited for SLERP and geodesic distance:
      A.) QQuaternion QRotationReading::quaterion() OR
      B.) qreal[] QRotationReading::quaternion() //array size is 4, less overhead in reading values
      + conversion utility: static QQuaternion QRotationSensor::quaternion(qreal[])
      A.) QMatrix4x4 QRotationReading::transformationMatrix(); OR
      B.) qreal[] QRotationReading::::transformationMatrix()
      + conversion utility: static QMatrix4x4 QRotationSensor::transformationMatrix(qreal[]);

      Instead or in addition to the transformation matrix (qreal[16]) also rotation matrix (qreal[9]) could be provided.

      Transformation vs. rotation matrix
      Pros: Ready made Qt Core class with plenty of operations (rotate, translate, scale + normal, ortho, perspective, toAffine..)
      Cons: GUI dependency, rotation + translation included , which cannot be got reliably -> needs to be zeros -> needless overhead compared to qreal[9]

      Attachments

        For Gerrit Dashboard: QTBUG-25840
        # Subject Branch Project Status CR V

        Activity

          People

            lpotter Lorn Potter
            alex Alex (closed Nokia identity) (Inactive)
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes