QMesh 類

( Qt3DRender::QMesh )

A custom mesh loader. 更多...

頭: #include <Qt3DRender/QMesh>
qmake: QT += 3drender
實例化: Mesh
繼承: Qt3DRender::QGeometryRenderer

公共類型

enum Status { None, Loading, Ready, Error }

特性

公共函數

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

公共槽

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

信號

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

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

A custom mesh loader.

Loads mesh data from external files in a variety of formats. Qt3DRender::QMesh loads data into a single mesh.

In Qt3D 5.9, QMesh supports the following formats:

  • Wavefront OBJ
  • Stanford Triangle Format PLY
  • STL (STereoLithography)

QMesh will also support the following format if the SDK is installed and the fbx geometry loader plugin is built and found:

  • Autodesk FBX

If you wish to load an entire scene made of several objects, you should rather use the Qt3DRender::QSceneLoader 代替。

另請參閱 Qt3DRender::QSceneLoader .

成員類型文檔編製

enum QMesh:: Status

This enum identifies the status of shader used.

常量 描述
Qt3DRender::QMesh::None 0 A source mesh hasn't been assigned a source yet
Qt3DRender::QMesh::Loading 1 The mesh geometry is loading
Qt3DRender::QMesh::Ready 2 The mesh geometry was successfully loaded
Qt3DRender::QMesh::Error 3 An error occurred while loading the mesh

特性文檔編製

meshName : QString

Holds the name of the mesh.

訪問函數:

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

通知程序信號:

void meshNameChanged (const QString & meshName )

source : QUrl

保持 source url to the file containing the custom mesh.

訪問函數:

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

通知程序信號:

void sourceChanged (const QUrl & source )

status : const Status

Holds the status of the mesh loading.

訪問函數:

Qt3DRender::QMesh::Status status () const

通知程序信號:

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

另請參閱 Qt3DRender::QMesh::Status .

成員函數文檔編製

QMesh:: QMesh ( Qt3DCore::QNode * parent = nullptr)

構造新的 QMesh with parent .