Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.7.0, 5.15.2
Description
Qt 3D implementation doesn't support arbitrary 4x4 matrix transformations.
Even using 'matrix' property of Transform doesn't help: the class Transform supports only rotate, translate and scale transformations and the documentation doesn't reflect this artificial restriction.
Transform
Once a pre-calculated 4x4 matrix has been assigned to the Transform, it is being decomposed into a combination of scaling, translation and rotation and a new matrix is being calculated based on these three values. This makes impossible to implement perspective or skew transformations.
For a live example and more details please see the following forum link:
https://forum.qt.io/topic/68787/qt3d-transform-skew-uncompatible/
How this can be fixed:
1. Add a 'rawMatrix' property to existing Transform to tell it we're going to use pre-calculated matrix and matrix decomposition and transform properties update is not required
2. Implement additional RawTransform or MatrixTransform class that would accept only matrix and no other properties and can be used instead of Transform class.