Qt3DCore.QTransform¶
Used to perform transforms on meshes. More…
Synopsis¶
Functions¶
Slots¶
def
setMatrix
(matrix)def
setRotation
(rotation)def
setRotationX
(rotationX)def
setRotationY
(rotationY)def
setRotationZ
(rotationZ)def
setScale3D
(scale)def
setScale
(scale)def
setTranslation
(translation)
Signals¶
def
matrixChanged
()def
rotationChanged
(rotation)def
rotationXChanged
(rotationX)def
rotationYChanged
(rotationY)def
rotationZChanged
(rotationZ)def
scale3DChanged
(scale)def
scaleChanged
(scale)def
translationChanged
(translation)
Static functions¶
def
fromAxes
(xAxis, yAxis, zAxis)def
fromAxesAndAngles
(axis1, angle1, axis2, angle2)def
fromAxesAndAngles
(axis1, angle1, axis2, angle2, axis3, angle3)def
fromAxisAndAngle
(axis, angle)def
fromAxisAndAngle
(x, y, z, angle)def
fromEulerAngles
(eulerAngles)def
fromEulerAngles
(pitch, yaw, roll)def
rotateAround
(point, angle, axis)def
rotateFromAxes
(xAxis, yAxis, zAxis)
Detailed Description¶
The
QTransform
component is not shareable between multipleQEntity
‘s. The transformation is held asQVector3D
scale,QQuaternion
rotation andQVector3D
translation components. The transformations are applied to the mesh in that order. Whenmatrix
property is set, it is decomposed to these transform components and corresponding signals are emitted.Several helper functions are provided to set up the
QTransform
;fromAxisAndAngle
andfromAxesAndAngles
can be used to set the rotation around specific axes,fromEulerAngles
can be used to set the rotation based on euler angles androtateAround
can be used to rotate the object around specific point relative to local origin.
-
class
PySide2.Qt3DCore.Qt3DCore.
QTransform
([parent=None])¶ - param parent
QNode
Constructs a new
QTransform
withparent
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromAxes
(xAxis, yAxis, zAxis)¶ - Parameters
xAxis –
QVector3D
yAxis –
QVector3D
zAxis –
QVector3D
- Return type
QQuaternion
Creates a QQuaterniom definining a rotation from the axes
xAxis
,yAxis
andzAxis
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromAxesAndAngles
(axis1, angle1, axis2, angle2)¶ - Parameters
axis1 –
QVector3D
angle1 –
float
axis2 –
QVector3D
angle2 –
float
- Return type
QQuaternion
Creates a
QQuaternion
fromaxis1
,angle1
,axis2
, andangle2
. Returns the resultingQQuaternion
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromAxesAndAngles
(axis1, angle1, axis2, angle2, axis3, angle3) - Parameters
axis1 –
QVector3D
angle1 –
float
axis2 –
QVector3D
angle2 –
float
axis3 –
QVector3D
angle3 –
float
- Return type
QQuaternion
Creates a
QQuaternion
fromaxis1
,angle1
,axis2
,angle2
,axis3
, andangle3
. Returns the resultingQQuaternion
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromAxisAndAngle
(axis, angle)¶ - Parameters
axis –
QVector3D
angle –
float
- Return type
QQuaternion
Creates a
QQuaternion
fromaxis
andangle
. Returns the resultingQQuaternion
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromAxisAndAngle
(x, y, z, angle) - Parameters
x –
float
y –
float
z –
float
angle –
float
- Return type
QQuaternion
Creates a
QQuaternion
fromx
,y
,z
, andangle
. Returns the resultingQQuaternion
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromEulerAngles
(eulerAngles)¶ - Parameters
eulerAngles –
QVector3D
- Return type
QQuaternion
Creates a
QQuaternion
fromeulerAngles
. Returns the resultingQQuaternion
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
fromEulerAngles
(pitch, yaw, roll) - Parameters
pitch –
float
yaw –
float
roll –
float
- Return type
QQuaternion
Creates a
QQuaternion
frompitch
,yaw
, androll
. Returns the resultingQQuaternion
.
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
matrix
()¶ - Return type
QMatrix4x4
See also
setMatrix()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
matrixChanged
()¶
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotateAround
(point, angle, axis)¶ - Parameters
point –
QVector3D
angle –
float
axis –
QVector3D
- Return type
QMatrix4x4
Creates a rotation matrix from
axis
andangle
aroundpoint
. Returns the resultingQMatrix4x4
.
-
static
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotateFromAxes
(xAxis, yAxis, zAxis)¶ - Parameters
xAxis –
QVector3D
yAxis –
QVector3D
zAxis –
QVector3D
- Return type
QMatrix4x4
Returns a rotation matrix defined from the axes
xAxis
,yAxis
,zAxis
.
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotation
()¶ - Return type
QQuaternion
See also
setRotation()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationChanged
(rotation)¶ - Parameters
rotation –
QQuaternion
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationX
()¶ - Return type
float
See also
setRotationX()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationXChanged
(rotationX)¶ - Parameters
rotationX –
float
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationY
()¶ - Return type
float
See also
setRotationY()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationYChanged
(rotationY)¶ - Parameters
rotationY –
float
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationZ
()¶ - Return type
float
See also
setRotationZ()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
rotationZChanged
(rotationZ)¶ - Parameters
rotationZ –
float
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
scale
()¶ - Return type
float
See also
setScale()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
scale3D
()¶ - Return type
QVector3D
See also
setScale3D()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
scale3DChanged
(scale)¶ - Parameters
scale –
QVector3D
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
scaleChanged
(scale)¶ - Parameters
scale –
float
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setMatrix
(matrix)¶ - Parameters
matrix –
QMatrix4x4
See also
matrix()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setRotation
(rotation)¶ - Parameters
rotation –
QQuaternion
See also
rotation()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setRotationX
(rotationX)¶ - Parameters
rotationX –
float
See also
rotationX()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setRotationY
(rotationY)¶ - Parameters
rotationY –
float
See also
rotationY()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setRotationZ
(rotationZ)¶ - Parameters
rotationZ –
float
See also
rotationZ()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setScale
(scale)¶ - Parameters
scale –
float
See also
scale()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setScale3D
(scale)¶ - Parameters
scale –
QVector3D
See also
scale3D()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
setTranslation
(translation)¶ - Parameters
translation –
QVector3D
See also
translation()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
translation
()¶ - Return type
QVector3D
See also
setTranslation()
-
PySide2.Qt3DCore.Qt3DCore.QTransform.
translationChanged
(translation)¶ - Parameters
translation –
QVector3D
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.