summaryrefslogtreecommitdiffstats
path: root/src/core/transforms
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-06 19:22:07 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-08-10 10:41:40 +0000
commit490fc79f93afa30fc2a6f38b0c3f605b317ae359 (patch)
tree6b7f89c528406852e3dd705a90054389e305e110 /src/core/transforms
parenta6d0a8c1b93544eeb11cad4da0e86e8d117f6b5b (diff)
Change scale property of QJoint to QVector3D
Seems to be the norm for joints. Change-Id: I98d786b64153b09e2cd06e9d525f6c80f6372316 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/transforms')
-rw-r--r--src/core/transforms/qjoint.cpp10
-rw-r--r--src/core/transforms/qjoint.h8
-rw-r--r--src/core/transforms/qjoint_p.h4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/transforms/qjoint.cpp b/src/core/transforms/qjoint.cpp
index 0601ac02f..ca5f6dff0 100644
--- a/src/core/transforms/qjoint.cpp
+++ b/src/core/transforms/qjoint.cpp
@@ -53,7 +53,7 @@ QJointPrivate::QJointPrivate()
: QNodePrivate()
, m_rotation()
, m_translation()
- , m_scale(1.0f)
+ , m_scale(1.0f, 1.0f, 1.0f)
{
}
@@ -72,7 +72,7 @@ QJointPrivate::QJointPrivate()
*/
/*!
- \qmlproperty real Joint::scale
+ \qmlproperty vector3d Joint::scale
Holds the uniform scale of the joint.
*/
@@ -118,9 +118,9 @@ QJoint::~QJoint()
/*!
\property Qt3DCore::QJoint::scale
- Holds the uniform scale of the joint.
+ Holds the scale of the joint.
*/
-float QJoint::scale() const
+QVector3D QJoint::scale() const
{
Q_D(const QJoint);
return d->m_scale;
@@ -148,7 +148,7 @@ QVector3D QJoint::translation() const
return d->m_translation;
}
-void QJoint::setScale(float scale)
+void QJoint::setScale(const QVector3D &scale)
{
Q_D(QJoint);
if (scale == d->m_scale)
diff --git a/src/core/transforms/qjoint.h b/src/core/transforms/qjoint.h
index 913716380..35b559f59 100644
--- a/src/core/transforms/qjoint.h
+++ b/src/core/transforms/qjoint.h
@@ -55,7 +55,7 @@ class QJointPrivate;
class QT3DCORESHARED_EXPORT QJoint : public QNode
{
Q_OBJECT
- Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
+ Q_PROPERTY(QVector3D scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QQuaternion rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(QVector3D translation READ translation WRITE setTranslation NOTIFY translationChanged)
@@ -63,7 +63,7 @@ public:
explicit QJoint(Qt3DCore::QNode *parent = nullptr);
~QJoint();
- float scale() const;
+ QVector3D scale() const;
QQuaternion rotation() const;
QVector3D translation() const;
@@ -72,12 +72,12 @@ public:
QVector<QJoint *> childJoints() const;
public Q_SLOTS:
- void setScale(float scale);
+ void setScale(const QVector3D &scale);
void setRotation(const QQuaternion &rotation);
void setTranslation(const QVector3D &translation);
Q_SIGNALS:
- void scaleChanged(float scale);
+ void scaleChanged(const QVector3D &scale);
void rotationChanged(const QQuaternion &rotation);
void translationChanged(const QVector3D &translation);
diff --git a/src/core/transforms/qjoint_p.h b/src/core/transforms/qjoint_p.h
index 021824b28..35915a7dd 100644
--- a/src/core/transforms/qjoint_p.h
+++ b/src/core/transforms/qjoint_p.h
@@ -69,7 +69,7 @@ public:
QVector<QJoint *> m_childJoints;
QQuaternion m_rotation;
QVector3D m_translation;
- float m_scale;
+ QVector3D m_scale;
};
struct QJointData
@@ -77,7 +77,7 @@ struct QJointData
QNodeIdVector childJointIds;
QQuaternion rotation;
QVector3D translation;
- float scale;
+ QVector3D scale;
};
} // namespace Qt3DCore