QMesh Class

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 }

Public Functions

QMesh(Qt3DCore::QNode *parent = nullptr)

Detailed Description

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.

ConstantValueDescription
Qt3DRender::QMesh::None0A source mesh hasn't been assigned a source yet
Qt3DRender::QMesh::Loading1The mesh geometry is loading
Qt3DRender::QMesh::Ready2The mesh geometry was successfully loaded
Qt3DRender::QMesh::Error3An error occurred while loading the mesh

Member Function Documentation

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

Constructs a new QMesh with parent.