- Qt 5.5
- Qt3D Module
- C++ Classes
- AssimpParser
- Qt 5.5.1 Reference Documentation

# AssimpParser Class

(Qt3D::AssimpParser)

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

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

- List of all members, including inherited members

## Public Functions

| AssimpParser()
| ~AssimpParser()
bool | isExtensionSupported(const QUrl & source) const
QEntity * | node(const QString & id)
QEntity * | scene(const QString & id = QString())
void | setSource(const QUrl & source)

## 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.

### bool AssimpParser::isExtensionSupported(const QUrl & source) const

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

### QEntity * AssimpParser::node(const QString & id)

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

### QEntity * AssimpParser::scene(const QString & id = QString())

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.

### void AssimpParser::setSource(const QUrl & source)

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