QMesh Class
(Qt3DRender::QMesh)A custom mesh loader. More...
Header: | #include <Qt3DRender/QMesh> |
qmake: | QT += 3drender |
Instantiated By: | Mesh |
Inherits: | Qt3DRender::QGeometryRenderer |
Public Types
enum | Status { None, Loading, Ready, Error } |
Properties
- 11 properties inherited from Qt3DRender::QGeometryRenderer
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QMesh(Qt3DCore::QNode *parent = nullptr) | |
QString | meshName() const |
QUrl | source() const |
Qt3DRender::QMesh::Status | status() const |
- 13 public functions inherited from Qt3DRender::QGeometryRenderer
- 2 public functions inherited from Qt3DCore::QComponent
- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject
Public Slots
void | setMeshName(const QString &meshName) |
void | setSource(const QUrl &source) |
- 11 public slots inherited from Qt3DRender::QGeometryRenderer
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | meshNameChanged(const QString &meshName) |
void | sourceChanged(const QUrl &source) |
void | statusChanged(Qt3DRender::QMesh::Status status) |
- 11 signals inherited from Qt3DRender::QGeometryRenderer
- 3 signals inherited from Qt3DCore::QComponent
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Additional Inherited Members
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
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 instead.
See also Qt3DRender::QSceneLoader.
Member Type Documentation
enum QMesh::Status
This enum identifies the status of shader used.
Constant | Value | Description |
---|---|---|
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 |
Property Documentation
meshName : QString
Holds the name of the mesh.
Access functions:
QString | meshName() const |
void | setMeshName(const QString &meshName) |
Notifier signal:
void | meshNameChanged(const QString &meshName) |
source : QUrl
Holds the source url to the file containing the custom mesh.
Access functions:
QUrl | source() const |
void | setSource(const QUrl &source) |
Notifier signal:
void | sourceChanged(const QUrl &source) |
status : const Status
Holds the status of the mesh loading.
Access functions:
Qt3DRender::QMesh::Status | status() const |
Notifier signal:
void | statusChanged(Qt3DRender::QMesh::Status status) |
See also Qt3DRender::QMesh::Status.
Member Function Documentation
QMesh::QMesh(Qt3DCore::QNode *parent = nullptr)
Constructs a new QMesh with parent.
© 2019 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.