1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qabstractskeleton.h"
5#include "qabstractskeleton_p.h"
6
7QT_BEGIN_NAMESPACE
8
9namespace Qt3DCore {
10
11QAbstractSkeletonPrivate::QAbstractSkeletonPrivate()
12 : Qt3DCore::QNodePrivate()
13 , m_type(Skeleton)
14 , m_jointCount(0)
15{
16}
17
18/*!
19 \internal
20 */
21const QAbstractSkeletonPrivate *QAbstractSkeletonPrivate::get(const QAbstractSkeleton *q)
22{
23 return q->d_func();
24}
25
26/*!
27 \internal
28 */
29QAbstractSkeletonPrivate *QAbstractSkeletonPrivate::get(QAbstractSkeleton *q)
30{
31 return q->d_func();
32}
33
34/*!
35 \qmltype AbstractSkeleton
36 \inqmlmodule Qt3D.Core
37 \inherits Node
38 \instantiates Qt3DCore::QAbstractSkeleton
39 \since 5.10
40 \brief A skeleton contains the joints for a skinned mesh.
41
42 Do not use this class directly. You should use SkeletonLoader if loading
43 skeleton data from a file (most likely) or Skeleton if creating the
44 skeleton and skinned mesh data yourself (mainly for people creating
45 editors or tooling).
46*/
47
48/*!
49 \class Qt3DCore::QAbstractSkeleton
50 \inmodule Qt3DCore
51 \inherits Qt3DCore::QNode
52 \since 5.10
53 \brief A skeleton contains the joints for a skinned mesh.
54
55 Do not use this class directly. You should use QSkeletonLoader if loading
56 skeleton data from a file (most likely) or QSkeleton if creating the
57 skeleton and skinned mesh data yourself (mainly for people creating
58 editors or tooling).
59*/
60
61/*! \internal */
62QAbstractSkeleton::QAbstractSkeleton(QAbstractSkeletonPrivate &dd, Qt3DCore::QNode *parent)
63 : Qt3DCore::QNode(dd, parent)
64{
65}
66
67/*! \internal */
68QAbstractSkeleton::~QAbstractSkeleton()
69{
70}
71
72/*!
73 \property Qt3DCore::QAbstractSkeleton::jointCount
74
75 Holds the number of joints contained in the skeleton
76*/
77int QAbstractSkeleton::jointCount() const
78{
79 Q_D(const QAbstractSkeleton);
80 return d->m_jointCount;
81}
82
83void QAbstractSkeletonPrivate::setJointCount(int jointCount)
84{
85 Q_Q(QAbstractSkeleton);
86 if (m_jointCount == jointCount)
87 return;
88 m_jointCount = jointCount;
89 const bool block = q->blockNotifications(block: true);
90 emit q->jointCountChanged(jointCount);
91 q->blockNotifications(block);
92}
93
94} // namespace Qt3DCore
95
96QT_END_NAMESPACE
97
98#include "moc_qabstractskeleton.cpp"
99

source code of qt3d/src/core/transforms/qabstractskeleton.cpp