[Interest] QGraphicsRotation in QGraphicsViewScene
philipp.menke at freenet.de
Wed Sep 12 20:10:54 CEST 2012
I have no Idea if it will work with QGraphicScene, but if you use
translations and rotations in R³ you have to think about the order of
them. T * R * v != R * T * v (with T = Translationmatrix, R =
Rotationmatrix and v = vector). So Try setting the position of the item
to 0|0|0, perform the rotation and translation with matrices and play
with permutating them.
On 12.09.2012 12:24, Till Oliver Knoll wrote:
> Am 12.09.2012 um 11:19 schrieb "Duan,Lin" <linduan at isoftstone.com
> <mailto:linduan at isoftstone.com>>:
>> How can I do , so it can performed as expected (first graph)?
> I think you can't: from what I understand you are trying to perform a
> rotation in 3D space, whereas QGraphicsScene/View only manage 2D (or
> "pseudo 3D" aka 2.5D, if you take the "depth" z-coordinate into
> account) objects.
> Use a "proper" 3D scene (QGLWidget) or try the new "Qt Quick3D" module!
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest