In questa pagina

Qt3DRender::QMesh Class

class Qt3DRender::QMesh

Un caricatore di mesh personalizzato. Per saperne di più...

Intestazione: #include <Qt3DRender/QMesh>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
In QML: Mesh
Eredita da: Qt3DRender::QGeometryRenderer
Stato: Obsoleta

Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.

Tipi pubblici

enum Status { None, Loading, Ready, Error }

Proprietà

Funzioni pubbliche

QMesh(Qt3DCore::QNode *parent = nullptr)
QString meshName() const
QUrl source() const
Qt3DRender::QMesh::Status status() const

Slot pubblici

void setMeshName(const QString &meshName)
void setSource(const QUrl &source)

Segnali

void meshNameChanged(const QString &meshName)
void sourceChanged(const QUrl &source)
void statusChanged(Qt3DRender::QMesh::Status status)

Descrizione dettagliata

Carica i dati della mesh da file esterni in vari formati. Qt3DRender::QMesh carica i dati in un'unica mesh.

In Qt3D 5.9, QMesh supporta i seguenti formati:

  • Wavefront OBJ
  • Formato triangolare di Stanford PLY
  • STL (STereoLithography)

QMesh supporterà anche il seguente formato se l’SDK è installato e il plugin fbx geometry loader è stato compilato e individuato:

  • Autodesk FBX

Se si desidera caricare un'intera scena composta da diversi oggetti, è preferibile utilizzare invece l'Qt3DRender::QSceneLoader.

Vedi anche Qt3DRender::QSceneLoader.

Documentazione sui tipi di membri

enum QMesh::Status

Questa enumerazione identifica lo stato dello shader utilizzato.

CostanteValoreDescrizione
Qt3DRender::QMesh::None0Alla mesh sorgente non è stata ancora assegnata una sorgente
Qt3DRender::QMesh::Loading1La geometria della mesh è in fase di caricamento
Qt3DRender::QMesh::Ready2La geometria della mesh è stata caricata con successo
Qt3DRender::QMesh::Error3Si è verificato un errore durante il caricamento della mesh

Documentazione delle proprietà

meshName : QString

Contiene il nome della mesh.

Funzioni di accesso:

QString meshName() const
void setMeshName(const QString &meshName)

Segnale di notifica:

void meshNameChanged(const QString &meshName)

source : QUrl

Contiene l'URL source del file contenente la mesh personalizzata.

Funzioni di accesso:

QUrl source() const
void setSource(const QUrl &source)

Segnale di notifica:

void sourceChanged(const QUrl &source)

[read-only] status : Status

Contiene lo stato del caricamento della mesh.

Funzioni di accesso:

Qt3DRender::QMesh::Status status() const

Segnale di notifica:

void statusChanged(Qt3DRender::QMesh::Status status)

Vedi anche Qt3DRender::QMesh::Status.

Documentazione delle funzioni membro

[explicit] QMesh::QMesh(Qt3DCore::QNode *parent = nullptr)

Crea un nuovo QMesh con un parent.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.