QMesh 類

( Qt3DRender::QMesh )

A custom mesh loader. 更多...

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

特性

公共函數

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

公共槽

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

信號

void meshNameChanged (const QString & meshName )
void sourceChanged (const QUrl & source )

保護函數

QMesh (QMeshPrivate & dd , Qt3DCore::QNode * parent = nullptr)

額外繼承成員

詳細描述

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 .

特性文檔編製

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 )

成員函數文檔編製

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

Default constructs an instance of QMesh.

[protected] QMesh:: QMesh ( QMeshPrivate & dd , Qt3DCore::QNode * parent = nullptr)

Copy constructor.