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

Do some minor improvements to QSSGBounds3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.0.0
    • 5.15
    • Quick: 3D
    • None
    • 2
    • cd3fcd2f7c8dfb3f3958353c0a066d9ffb949773

    Description

      For unknown reason the default constructor boasts about not doing any initialization for performance reasons. Since It's not immediately clear if this is really needed, or if we should just remove the comment (this is internal documentation on an internal class), this is something to be investigate later (due to the risk of breaking existing code this late in the release).

      • Given that the default intialization of the internal QVector3D members have constexpr constructors the cost shouldn't be that bad, afaik it's not shown up in previous profilings.
      • A more concerning issue is that we might end up with code depending on the default ctor default intializing it's members, making the distinction between the default ctor and empty() less obvious and the performance promise dubious.
      • If we want and need a non-initialization path, we should should follow the same pattern as elsewhere in Qt, i.e., using Qt::Initialization.

       

      In addition to the above it would be nice if the class would store the data as a float array or as QVector3D array, making switching what's min and max very cheap (ref. the aabb intersection code).

      Attachments

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

        Activity

          People

            jokarlss Jonas Karlsson
            stromme Christian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes