IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

SceneLoader QML Type

Provides the facility to load an existing Scene.

This type was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

SceneLoader QML Type

  • Import Statement: import Qt3D.Render 2.4

  • Since:: Qt 5.7

  • Inherits:: Component

  • Instantiates:: QSceneLoader

Detailed Description

Given a 3D source file, the SceneLoader will try to parse it and build a tree of Entity objects with proper GeometryRenderer, Transform and Material components.

The loader will try to determine the best material to be used based on the properties of the model file. If you wish to use a custom material, you will have to traverse the tree and replace the default associated materials with yours.

As the name implies, SceneLoader loads a complete scene subtree. If you wish to load a single piece of geometry, you should rather use the Mesh instead.

SceneLoader internally relies on the use of plugins to support a wide variety of 3D file formats. Here is a list of formats that are supported by Qt3D.

this component shouldn't be shared among several Entity instances. Undefined behavior will result.

See Also

Property Documentation

 

source : url

Holds the url to the source to be loaded.

[read-only] status : enumeration

Holds the status of scene loading.

See Also

Method Documentation

 

Entity component(string entityName, enumeration componentType)

Returns a component matching componentType of a loaded entity with an objectName matching the entityName. If the entity has multiple matching components, the first match in the component list of the entity is returned. If there is no match, an undefined item is returned.

See Also

Entity entity(string entityName)

Returns a loaded entity with the objectName matching the entityName parameter. If multiple entities have the same name, it is undefined which one of them is returned, but it will always be the same one.

list entityNames()

Returns a list of the objectNames of the loaded entities.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+