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

Undocumented: QVector2D, QVector3D and QVector4D have qreal interfaces but use float as storage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt3D 1.0
    • 4.6.0
    • Documentation, Qt3D
    • None
    • All
    • b5076fb392894e71b44b4762d0567354ef1c8a9e

      As very clearly stated in QTBUG-8211, QVector2D, QVector3D and QVector4D store floats internally by design. This IS quite unexpected (and IMHO, hardly justifiable, but outside the scope of this bug report) and should be clearly documented. It is not mentioned once in the documentation of these classes. One would expect CLEAR warnings or at the very least, a simple "stores as float" comment somewhere...

      NOTE:
      I would suggest either saving values in both formats or have a template argument (which defaults to floats) for the storage format. Or any other solutions that might allow having an interface consistent with the internal workings of the class for those who need it. But this is outside the scope of this bug report.

      OTHER NOTE:
      Should the class be meant to be openGL/3D specific, why not put it in QTOpenGL? Yet again, outside the scope of this bug report.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sarasmit Sarah Smith (closed Nokia identity) (Inactive)
            sirmont Jean-Olivier Racine
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes