![]() ![]() The QGraphicsRotation class implements a correct mathematical rotation. Note: the Qt::YAxis rotation for QTransform is inverted from the correct mathematical rotation in 3D space. ![]() void QGraphicsRotation:: setAxis( Qt::Axis axis)Ĭonvenience function to set the axis to axis. Reimplements: QGraphicsTransform::applyTo(QMatrix4x4 *matrix) const. ![]() void QGraphicsRotation:: applyTo( QMatrix4x4 * matrix) const QGraphicsRotation:: ~QGraphicsRotation()ĭestroys the graphics rotation. Note: Notifier signal for property origin. This signal is emitted whenever the origin has changed. This signal is emitted whenever the axis of the object changes. Note: Notifier signal for property angle. This signal is emitted whenever the angle has changed. rotation 90° clockwise about the origin 12) x y S U X T S U X T rotation 180° about the origin 13) x y V Z T V Z T rotation 180° about the origin 14) x y H Y T H Y T rotation 180° about the origin-2-Create your own worksheets like this one with Infinite Pre-Algebra. Member Function Documentation QGraphicsRotation:: QGraphicsRotation( QObject * parent = nullptr)Ĭonstructs a new QGraphicsRotation with the given parent. See also QGraphicsTransform, QGraphicsItem::setRotation(), and QTransform::rotate(). If several rotations are performed in succession, they will not behave as expected unless they were all around the Z axis. Note: the final rotation is the combined effect of a rotation in 3D space followed by a projection back to 2D. For animation purposes it may also be useful to provide rotation angles exceeding (-360, 360) degrees, for instance to animate how an item rotates several times. This value also be negative, indicating a counter-clockwise rotation. The angle property provides the number of degrees to rotate the item clockwise around the origin. The origin is the point that the item is rotated around (i.e., it stays fixed relative to the parent as the rest of the item is rotated). QGraphicsRotation provides certain parameters to help control how the rotation should be applied. The angle property, which is provided by QGraphicsRotation, now describes the number of degrees to rotate around this axis. By default the axis is (0, 0, 1) i.e., rotation around the Z axis. You can provide the desired axis by assigning a QVector3D to the axis property or by passing a member if Qt::Axis to the setAxis convenience function. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |