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

projectionMatrix and projectionType of Qt3D Camera are linked

    XMLWordPrintable

    Details

    • Commits:
      2831c495233338403b31348393e785055700541b, 72eb3f86cb1a5a4758e570b396e5638df66caebf

      Description

      Camera component has projectionMatrix and projectionType. These two are linked so that setting a type to something changes projectionMatrix and setting projectionMatrix sets projectionType to CustomProjection.

      When both properties are bound in QML, the one bound later (ie. the order of these properties in a QML file) determines which one gets used initially. For example, both of these result in a different outcome (when myProjectionType != CustomProjection):

      Camera {
       projectionMatrix: myProjectionMatrix
       projectionType: myProjectionType
      }
      Camera {
       projectionType: myProjectionType
       projectionMatrix: myProjectionMatrix
      }
      

      Why both of these would be bound at the same time could be because user is presented with an ability to change projection at runtime.

      However, this link between these properties should be documented. This nice comment can be found in qcameralens.cpp, but it is not found in documentation:

      /*!
       * Sets the project matrix to \a projectionMatrix.
       *
       * \note This will set the projection type to Qt3DRender::QCameraLens::CustomProjection and thus
       * ignore all other camera parameters that might have been specified.
       */
      

      This alone would already give an idea that these properties are linked.

        Attachments

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

          Activity

            People

            • Assignee:
              paulwicking Paul Wicking
              Reporter:
              poikelin Joni Poikelin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes