内容表

上一话题

Qt3DCore.QStaticPropertyValueRemovedChangeBase

下一话题

Qt3DCore

Qt3DCore.QTransform

Used to perform transforms on meshes. 更多 …

Inheritance diagram of PySide2.Qt3DCore.Qt3DCore.QTransform

概要

槽

信号

静态函数

详细描述

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

构造新 QTransform with parent .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromAxes ( xAxis , yAxis , zAxis )
参数
  • xAxis – QVector3D

  • yAxis – QVector3D

  • zAxis – QVector3D

返回类型

QQuaternion

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

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromAxesAndAngles ( axis1 , angle1 , axis2 , angle2 )
参数
  • axis1 – QVector3D

  • angle1 – float

  • axis2 – QVector3D

  • angle2 – float

返回类型

QQuaternion

创建 QQuaternion from axis1 , angle1 , axis2 ,和 angle2 . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromAxesAndAngles ( axis1 , angle1 , axis2 , angle2 , axis3 , angle3 )
参数
  • axis1 – QVector3D

  • angle1 – float

  • axis2 – QVector3D

  • angle2 – float

  • axis3 – QVector3D

  • angle3 – float

返回类型

QQuaternion

创建 QQuaternion from axis1 , angle1 , axis2 , angle2 , axis3 ,和 angle3 . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromAxisAndAngle ( x , y , z , angle )
参数
  • x – float

  • y – float

  • z – float

  • angle – float

返回类型

QQuaternion

创建 QQuaternion from x , y , z ,和 angle . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromAxisAndAngle ( axis , angle )
参数
  • axis – QVector3D

  • angle – float

返回类型

QQuaternion

创建 QQuaternion from axis and angle . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromEulerAngles ( eulerAngles )
参数

eulerAngles – QVector3D

返回类型

QQuaternion

创建 QQuaternion from eulerAngles . Returns the resulting QQuaternion .

static PySide2.Qt3DCore.Qt3DCore.QTransform. fromEulerAngles ( pitch , yaw , roll )
参数
  • pitch – float

  • yaw – float

  • roll – float

返回类型

QQuaternion

创建 QQuaternion from pitch , yaw ,和 roll . Returns the resulting QQuaternion .

PySide2.Qt3DCore.Qt3DCore.QTransform. matrix ( )
返回类型

QMatrix4x4

另请参阅

setMatrix()

PySide2.Qt3DCore.Qt3DCore.QTransform. matrixChanged ( )
static PySide2.Qt3DCore.Qt3DCore.QTransform. rotateAround ( point , angle , axis )
参数
  • point – QVector3D

  • angle – float

  • axis – QVector3D

返回类型

QMatrix4x4

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

static PySide2.Qt3DCore.Qt3DCore.QTransform. rotateFromAxes ( xAxis , yAxis , zAxis )
参数
  • xAxis – QVector3D

  • yAxis – QVector3D

  • zAxis – QVector3D

返回类型

QMatrix4x4

Returns a rotation matrix defined from the axes xAxis , yAxis , zAxis .

PySide2.Qt3DCore.Qt3DCore.QTransform. rotation ( )
返回类型

QQuaternion

另请参阅

setRotation()

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationChanged ( rotation )
参数

rotation – QQuaternion

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationX ( )
返回类型

float

另请参阅

setRotationX()

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationXChanged ( rotationX )
参数

rotationX – float

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationY ( )
返回类型

float

另请参阅

setRotationY()

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationYChanged ( rotationY )
参数

rotationY – float

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationZ ( )
返回类型

float

另请参阅

setRotationZ()

PySide2.Qt3DCore.Qt3DCore.QTransform. rotationZChanged ( rotationZ )
参数

rotationZ – float

PySide2.Qt3DCore.Qt3DCore.QTransform. scale ( )
返回类型

float

另请参阅

setScale()

PySide2.Qt3DCore.Qt3DCore.QTransform. scale3D ( )
返回类型

QVector3D

另请参阅

setScale3D()

PySide2.Qt3DCore.Qt3DCore.QTransform. scale3DChanged ( scale )
参数

scale – QVector3D

PySide2.Qt3DCore.Qt3DCore.QTransform. scaleChanged ( scale )
参数

scale – float

PySide2.Qt3DCore.Qt3DCore.QTransform. setMatrix ( matrix )
参数

matrix – QMatrix4x4

另请参阅

matrix()

PySide2.Qt3DCore.Qt3DCore.QTransform. setRotation ( rotation )
参数

rotation – QQuaternion

另请参阅

rotation()

PySide2.Qt3DCore.Qt3DCore.QTransform. setRotationX ( rotationX )
参数

rotationX – float

另请参阅

rotationX()

PySide2.Qt3DCore.Qt3DCore.QTransform. setRotationY ( rotationY )
参数

rotationY – float

另请参阅

rotationY()

PySide2.Qt3DCore.Qt3DCore.QTransform. setRotationZ ( rotationZ )
参数

rotationZ – float

另请参阅

rotationZ()

PySide2.Qt3DCore.Qt3DCore.QTransform. setScale ( scale )
参数

scale – float

另请参阅

scale()

PySide2.Qt3DCore.Qt3DCore.QTransform. setScale3D ( scale )
参数

scale – QVector3D

另请参阅

scale3D()

PySide2.Qt3DCore.Qt3DCore.QTransform. setTranslation ( translation )
参数

translation – QVector3D

另请参阅

translation()

PySide2.Qt3DCore.Qt3DCore.QTransform. translation ( )
返回类型

QVector3D

另请参阅

setTranslation()

PySide2.Qt3DCore.Qt3DCore.QTransform. translationChanged ( translation )
参数

translation – QVector3D

PySide2.Qt3DCore.Qt3DCore.QTransform. worldMatrix ( )
返回类型

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 )
参数

worldMatrix – QMatrix4x4