1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef ASSIMPUTILS_H
5#define ASSIMPUTILS_H
6
7#include <QtCore/qglobal.h>
8#include <QtQuick3DUtils/private/qssgmesh_p.h>
9
10struct aiScene;
11struct aiMesh;
12
13QT_BEGIN_NAMESPACE
14
15class QString;
16
17namespace AssimpUtils
18{
19
20using BoneIndexMap = QHash<QString, qint32>;
21using MeshList = QVector<const aiMesh *>;
22
23QSSGMesh::Mesh generateMeshData(const aiScene &scene,
24 const MeshList &meshes,
25 bool useFloatJointIndices,
26 bool generateLevelsOfDetail,
27 float normalMergeAngle,
28 float normalSplitAngle,
29 QString &errorString);
30
31}
32
33inline size_t qHash(const QVector3D &vector, size_t seed = 0) {
34 if (vector.isNull())
35 return seed;
36 return qHashBits(p: &vector, size: sizeof(float) * 3, seed);
37}
38
39QT_END_NAMESPACE
40
41#endif // ASSIMPUTILS_H
42

source code of qtquick3d/src/plugins/assetimporters/assimp/assimputils.h