Qt3DCore.QTransform

Used to perform transforms on meshes. More

Inheritance diagram of PySide2.Qt3DCore.Qt3DCore.QTransform

Synopsis

Functions

Slots

Signals

Static functions

Detailed Description

The QTransform component is not shareable between multiple QEntity ‘s. The transformation is held as QVector3D scale, QQuaternion rotation and QVector3D translation components. The transformations are applied to the mesh in that order. When matrix 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 and fromAxesAndAngles can be used to set the rotation around specific axes, fromEulerAngles can be used to set the rotation based on euler angles and rotateAround 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 with parent .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromAxes(xAxis, yAxis, zAxis)
Parameters
  • xAxisQVector3D

  • yAxisQVector3D

  • zAxisQVector3D

Return type

QQuaternion

Creates a QQuaterniom definining a rotation from the axes xAxis , yAxis and zAxis .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromAxesAndAngles(axis1, angle1, axis2, angle2)
Parameters
  • axis1QVector3D

  • angle1float

  • axis2QVector3D

  • angle2float

Return type

QQuaternion

Creates a QQuaternion from axis1 , angle1 , axis2 , and angle2 . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromAxesAndAngles(axis1, angle1, axis2, angle2, axis3, angle3)
Parameters
  • axis1QVector3D

  • angle1float

  • axis2QVector3D

  • angle2float

  • axis3QVector3D

  • angle3float

Return type

QQuaternion

Creates a QQuaternion from axis1 , angle1 , axis2 , angle2 , axis3 , and angle3 . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromAxisAndAngle(axis, angle)
Parameters
  • axisQVector3D

  • anglefloat

Return type

QQuaternion

Creates a QQuaternion from axis and angle . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromAxisAndAngle(x, y, z, angle)
Parameters
  • xfloat

  • yfloat

  • zfloat

  • anglefloat

Return type

QQuaternion

Creates a QQuaternion from x , y , z , and angle . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromEulerAngles(eulerAngles)
Parameters

eulerAnglesQVector3D

Return type

QQuaternion

Creates a QQuaternion from eulerAngles . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform.fromEulerAngles(pitch, yaw, roll)
Parameters
  • pitchfloat

  • yawfloat

  • rollfloat

Return type

QQuaternion

Creates a QQuaternion from pitch , yaw , and roll . Returns the resulting QQuaternion .

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
  • pointQVector3D

  • anglefloat

  • axisQVector3D

Return type

QMatrix4x4

Creates a rotation matrix from axis and angle around point . Returns the resulting QMatrix4x4 .

static PySide2.Qt3DCore.Qt3DCore.QTransform.rotateFromAxes(xAxis, yAxis, zAxis)
Parameters
  • xAxisQVector3D

  • yAxisQVector3D

  • zAxisQVector3D

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

rotationQQuaternion

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationX()
Return type

float

See also

setRotationX()

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationXChanged(rotationX)
Parameters

rotationXfloat

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationY()
Return type

float

See also

setRotationY()

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationYChanged(rotationY)
Parameters

rotationYfloat

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationZ()
Return type

float

See also

setRotationZ()

PySide2.Qt3DCore.Qt3DCore.QTransform.rotationZChanged(rotationZ)
Parameters

rotationZfloat

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

scaleQVector3D

PySide2.Qt3DCore.Qt3DCore.QTransform.scaleChanged(scale)
Parameters

scalefloat

PySide2.Qt3DCore.Qt3DCore.QTransform.setMatrix(matrix)
Parameters

matrixQMatrix4x4

See also

matrix()

PySide2.Qt3DCore.Qt3DCore.QTransform.setRotation(rotation)
Parameters

rotationQQuaternion

See also

rotation()

PySide2.Qt3DCore.Qt3DCore.QTransform.setRotationX(rotationX)
Parameters

rotationXfloat

See also

rotationX()

PySide2.Qt3DCore.Qt3DCore.QTransform.setRotationY(rotationY)
Parameters

rotationYfloat

See also

rotationY()

PySide2.Qt3DCore.Qt3DCore.QTransform.setRotationZ(rotationZ)
Parameters

rotationZfloat

See also

rotationZ()

PySide2.Qt3DCore.Qt3DCore.QTransform.setScale(scale)
Parameters

scalefloat

See also

scale()

PySide2.Qt3DCore.Qt3DCore.QTransform.setScale3D(scale)
Parameters

scaleQVector3D

See also

scale3D()

PySide2.Qt3DCore.Qt3DCore.QTransform.setTranslation(translation)
Parameters

translationQVector3D

See also

translation()

PySide2.Qt3DCore.Qt3DCore.QTransform.translation()
Return type

QVector3D

See also

setTranslation()

PySide2.Qt3DCore.Qt3DCore.QTransform.translationChanged(translation)
Parameters

translationQVector3D

PySide2.Qt3DCore.Qt3DCore.QTransform.worldMatrix()
Return type

QMatrix4x4

Returns the world transformation matrix associated to the QTransform when referenced by a QEntity which may be part of a QEntity hierarchy.

PySide2.Qt3DCore.Qt3DCore.QTransform.worldMatrixChanged(worldMatrix)
Parameters

worldMatrixQMatrix4x4