6#include <QtQuick3DAssetUtils/private/qssgscenedesc_p.h>
7#include <QtQuick3DAssetUtils/private/qssgqmlutilities_p.h>
8#include <QtQuick3DAssetUtils/private/qssgrtutilities_p.h>
9#include <QtQuick3DAssetImport/private/qssgassetimportmanager_p.h>
10#include <QtQuick3DRuntimeRender/private/qssgrenderbuffermanager_p.h>
11#include <QtCore/qmimedatabase.h>
94 if (m_source == newSource)
119 if (!extensions.isEmpty())
129 for (
const auto &
t :
types) {
140 static QList<QMimeType> mimeTypes;
141 if (!mimeTypes.isEmpty())
147 for (
const auto &ext : extensions) {
161 if (
auto *
model = qobject_cast<const QQuick3DModel *>(node)) {
163 for (
const QVector3D point :
b.bounds.toQSSGBoxPoints()) {
166 accBounds.bounds = {
p,
p };
168 accBounds.bounds.include(
p);
171 for (
auto *
child : node->childItems())
175template<
typename Func>
180 for (
auto *
child :
obj->childItems()) {
181 if (
auto *
model = qobject_cast<QQuick3DModel *>(
child))
187void QQuick3DRuntimeLoader::loadSource()
235 m_assetId =
scene.id;
236 m_boundsDirty =
true;
237 m_instancingChanged = m_instancing !=
nullptr;
243void QQuick3DRuntimeLoader::updateModels()
245 if (m_instancingChanged) {
247 model->setInstancing(m_instancing);
248 model->setInstanceRoot(m_imported);
250 m_instancingChanged =
false;
261 return m_errorString;
272void QQuick3DRuntimeLoader::calculateBounds()
274 if (!m_imported || !m_boundsDirty)
279 m_boundsDirty =
false;
286 that->calculateBounds();
287 return that->m_bounds;
300 if (m_instancing == newInstancing)
304 newInstancing, m_instancing);
306 m_instancing = newInstancing;
307 m_instancingChanged =
true;
QList< QMimeType > mimeTypesForFileName(const QString &fileName) const
Returns the MIME types for the file name fileName.
The QQmlContext class defines a context within a QML engine.
\inmodule QtQuick3D \inherits QQuick3DObject
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
QQuick3DNode(QQuick3DNode *parent=nullptr)
\qmltype Node \inherits Object3D \inqmlmodule QtQuick3D
static void attachWatcher(Context *context, Setter setter, Object3D *newO, Object3D *oldO)
Attach a object-destroyed-watcher to an object that's not owned.
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
bool isComponentComplete() const
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
QList< QMimeType > supportedMimeTypes
QQuick3DInstancing * instancing
QStringList supportedExtensions
QQuick3DRuntimeLoader(QQuick3DNode *parent=nullptr)
\qmltype RuntimeLoader \inherits Node \inqmlmodule QtQuick3D.AssetUtils
void setSource(const QUrl &newSource)
void setInstancing(QQuick3DInstancing *newInstancing)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void errorStringChanged()
QList< QSSGAssetImporterPluginInfo > getImporterPluginInfos() const
Q_ALWAYS_INLINE void setEmpty()
Sets empty to true.
static void unregisterMeshData(const QString &assetId)
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
void clear()
Resets the content of the QUrl.
The QVector3D class represents a vector or vertex in 3D space.
Q_QUICK3DASSETUTILS_EXPORT QQuick3DNode * createScene(QQuick3DNode &parent, const QSSGSceneDesc::Scene &scene)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
T qobject_cast(QObject *object)
\variable QObject::staticMetaObject
GLboolean GLboolean GLboolean b
GLsizei GLenum GLenum * types
QQmlContext * qmlContext(const QObject *obj)
static void boxBoundsRecursive(const QQuick3DNode *baseNode, const QQuick3DNode *node, QQuick3DBounds3 &accBounds)
static void applyToModels(QQuick3DObject *obj, Func &&lambda)
static QUrl resolvedUrl(const QUrl &url, const QQmlRefPointer< QQmlContextData > &context)
#define QStringLiteral(str)
QSqlQueryModel * model
[16]