Transform QML Type | Qt 3D 5.15.19 (original) (raw)
Used to perform transforms on meshes. More...
Properties
- ****matrix** : matrix4x4
- ****rotation** : quaternion
- ****rotationX** : real
- ****rotationY** : real
- ****rotationZ** : real
- ****scale** : real
- ****scale3D** : vector3d
- ****translation** : vector3d
Methods
- quaternion ****fromAxesAndAngles**(vector3d axis1, real angle1, vector3d axis2, real angle2, vector3d axis3, real angle3)
- quaternion ****fromAxesAndAngles**(vector3d axis1, real angle1, vector3d axis2, real angle2)
- quaternion ****fromAxisAndAngle**(real x, real y, real z, real angle)
- quaternion ****fromAxisAndAngle**(vector3d axis, real angle)
- quaternion ****fromEulerAngles**(real pitch, real yaw, real roll)
- quaternion ****fromEulerAngles**(vector3d eulerAngles)
- matrix4x4 ****rotateAround**(vector3d point, real angle, vector3d axis)
Detailed Description
The Transform component is not shareable between multiple Entity's. The transformation is held as vector3d scale, quaternion rotation and vector3d translation components. The transformations are applied to the mesh in that order. When Transform::matrix property is set, it is decomposed to these transform components and corresponding transform signals are emitted.
Several helper functions are provided to set up the Transform; 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.
Property Documentation
Holds the matrix4x4 of the transform.
Note: When the matrix property is set, it is decomposed to translation, rotation and scale components.
Holds the rotation of the transform as quaternion.
Holds the x rotation of the transform as Euler angle.
Holds the y rotation of the transform as Euler angle.
Holds the z rotation of the transform as Euler angle.
Holds the uniform scale of the transform. If the scale has been set with scale3D, holds the x value only.
Holds the scale of the transform as vector3d.
Holds the translation of the transform as vector3d.
Method Documentation
Creates a quaternion from axis1, angle1, axis2, angle2, axis3, and angle3. Returns the resulting quaternion.
Creates a quaternion from axis1, angle1, axis2, and angle2. Returns the resulting quaternion.
Creates a quaternion from x, y, z, and angle. Returns the resulting quaternion.
Creates a quaternion from axis and angle. Returns the resulting quaternion.
Creates a quaternion from pitch, yaw, and roll. Returns the resulting quaternion.
Creates a quaternion from eulerAngles. Returns the resulting quaternion.
Creates a rotation matrix from axis and angle around point relative to local origin. Returns the resulting matrix4x4.
© 2025 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.