QJoint Class | Qt 3D 5.12.7

Qt 5.12 | Qt 3D | C++ Classes | QJoint

Qt 5.12.7 Reference Documentation

# QJoint Class

(Qt3DCore::QJoint)

Used to transforms parts of skinned meshes. More...

Header: | #include <QJoint>
qmake: | QT += 3dcore
Since: | Qt 5.10
Instantiated By: | Joint
Inherits: | Qt3DCore::QNode

- List of all members, including inherited members
- Obsolete members

## Properties

- inverseBindMatrix : QMatrix4x4
- name : QString
- rotation : QQuaternion
- rotationX : float

- rotationY : float
- rotationZ : float
- scale : QVector3D
- translation : QVector3D

- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| QJoint(Qt3DCore::QNode *parent = nullptr)
void | addChildJoint(Qt3DCore::QJoint *joint)
QVector<Qt3DCore::QJoint *> | childJoints() const
QMatrix4x4 | inverseBindMatrix() const
QString | name() const
void | removeChildJoint(Qt3DCore::QJoint *joint)
QQuaternion | rotation() const
float | rotationX() const
float | rotationY() const
float | rotationZ() const
QVector3D | scale() const
QVector3D | translation() const

- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Public Slots

void | setInverseBindMatrix(const QMatrix4x4 &inverseBindMatrix)
void | setName(const QString &name)
void | setRotation(const QQuaternion &rotation)
void | setRotationX(float rotationX)
void | setRotationY(float rotationY)
void | setRotationZ(float rotationZ)
void | setScale(const QVector3D &scale)
void | setToIdentity()
void | setTranslation(const QVector3D &translation)

- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject

## Signals

void | inverseBindMatrixChanged(const QMatrix4x4 &inverseBindMatrix)
void | nameChanged(const QString &name)
void | rotationChanged(const QQuaternion &rotation)
void | rotationXChanged(float rotationX)
void | rotationYChanged(float rotationY)
void | rotationZChanged(float rotationZ)
void | scaleChanged(const QVector3D &scale)
void | translationChanged(const QVector3D &translation)

- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Static Public Members

const QMetaObject | staticMetaObject

- 9 static public members inherited from QObject

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

## Detailed Description

Used to transforms parts of skinned meshes.

The QJoint node is used to build skeletons as part of the skinned mesh support in Qt 3D. A joint can be transformed by way of its scale, rotation and translation properties. Any mesh vertices that are bound to the joint will have their transformations updated accordingly.

## Property Documentation

### inverseBindMatrix : QMatrix4x4

Holds the inverse bind matrix of the joint. This is used to transform vertices from model space into the space of this joint so they can subsequently be multiplied by the joint's global transform to perform the skinning operation.

Access functions:

QMatrix4x4 | inverseBindMatrix() const
void | setInverseBindMatrix(const QMatrix4x4 &inverseBindMatrix)

Notifier signal:

void | inverseBindMatrixChanged(const QMatrix4x4 &inverseBindMatrix)

### name : QString

Access functions:

QString | name() const
void | setName(const QString &name)

Notifier signal:

void | nameChanged(const QString &name)

### rotation : QQuaternion

Holds the rotation of the joint as QQuaternion.

Access functions:

QQuaternion | rotation() const
void | setRotation(const QQuaternion &rotation)

Notifier signal:

void | rotationChanged(const QQuaternion &rotation)

### rotationX : float

Holds the x rotation of the joint as an Euler angle.

Access functions:

float | rotationX() const
void | setRotationX(float rotationX)

Notifier signal:

void | rotationXChanged(float rotationX)

### rotationY : float

Holds the y rotation of the joint as an Euler angle.

Access functions:

float | rotationY() const
void | setRotationY(float rotationY)

Notifier signal:

void | rotationYChanged(float rotationY)

### rotationZ : float

Holds the z rotation of the joint as an Euler angle.

Access functions:

float | rotationZ() const
void | setRotationZ(float rotationZ)

Notifier signal:

void | rotationZChanged(float rotationZ)

### scale : QVector3D

Holds the scale of the joint.

Access functions:

QVector3D | scale() const
void | setScale(const QVector3D &scale)

Notifier signal:

void | scaleChanged(const QVector3D &scale)

### translation : QVector3D

Holds the translation of the joint as QVector3D.

Access functions:

QVector3D | translation() const
void | setTranslation(const QVector3D &translation)

Notifier signal:

void | translationChanged(const QVector3D &translation)

## Member Function Documentation

### QJoint::QJoint(Qt3DCore::QNode *parent = nullptr)

Constructs a new QJoint with parent.

### void QJoint::addChildJoint(Qt3DCore::QJoint *joint)

Adds joint as a child of this joint. If joint has no parent, then this joint takes ownership of it. Child joints are in the coordinate system of their parent joint.

### QVector<Qt3DCore::QJoint *> QJoint::childJoints() const

The vector of joints this joint has as children.

### QString QJoint::name() const

Returns the name of the joint.

Note: Getter function for property name.

See also setName().

### void QJoint::removeChildJoint(Qt3DCore::QJoint *joint)

Removes joint from this joint's list of children. The child joint is not destroyed.

### `[slot]` void QJoint::setToIdentity()

Sets the transform matrix for this joint to the identity matrix.