Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.2
-
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 |
227490,3 | Doc: Add note about projectionMatrix effect on projectionType in QML | 5.11 | qt/qt3d | Status: MERGED | +2 | 0 |
227680,2 | Doc: Add note about projectionMatrix effect on projectionType in QML | 5.9 | qt/qt3d | Status: MERGED | +2 | 0 |