AssimpParser Class | Qt 3D 5.6

Qt 5.6 | Qt 3D | C++ Classes | AssimpParser

Qt 5.6.2 Reference Documentation

# AssimpParser Class

(Qt3DRender::AssimpParser)

Provides a generic way of loading various 3D assets format into a Qt3D scene. More...

Header: | #include <AssimpParser>
qmake: | QT += 3drender
Since: | Qt 5.5
Inherits: | QAbstractSceneParser

- List of all members, including inherited members

## Public Functions

| AssimpParser()
| ~AssimpParser()

## Reimplemented Public Functions

virtual bool | isExtensionSupported(const QUrl &source) const
virtual Qt3DCore::QEntity * | node(const QString &id)
virtual Qt3DCore::QEntity * | scene(const QString &id = QString())
virtual void | setSource(const QUrl &source)

- 6 public functions inherited from Qt3DRender::QAbstractSceneParser
- 31 public functions inherited from QObject

### Additional Inherited Members

- 2 properties inherited from Qt3DRender::QAbstractSceneParser
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from Qt3DRender::QAbstractSceneParser
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 3 protected functions inherited from Qt3DRender::QAbstractSceneParser
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

Provides a generic way of loading various 3D assets format into a Qt3D scene.

It should be noted that Assimp aiString is explicitly defined to be UTF-8.

See also GLTFParser.

## Member Function Documentation

### AssimpParser::AssimpParser()

Constructor. Initializes a new instance of AssimpParser.

### AssimpParser::~AssimpParser()

Destructor. Cleans the parser properly before destroying it.

### `[virtual]` bool AssimpParser::isExtensionSupported(const QUrl &source) const

Reimplemented from QAbstractSceneParser::isExtensionSupported().

Returns `true` if the extension of source is supported by the assimp parser.

### `[virtual]` Qt3DCore::QEntity *AssimpParser::node(const QString &id)

Reimplemented from QAbstractSceneParser::node().

Returns a Node from the scene identified by id. Returns `Q_NULLPTR` if the node was not found.

### `[virtual]` Qt3DCore::QEntity *AssimpParser::scene(const QString &id = QString())

Reimplemented from QAbstractSceneParser::scene().

Returns a Entity node which is the root node of the scene node specified by id. If id is empty, the scene is assumed to be the root node of the scene.

Returns `Q_NULLPTR` if id was specified but no node matching it was found.

### `[virtual]` void AssimpParser::setSource(const QUrl &source)

Reimplemented from QAbstractSceneParser::setSource().

Sets the source used by the parser to load the asset file. If the file is valid, this will trigger parsing of the file.