SceneLoader QML Type
Provides the facility to load an existing Scene More...
|Import Statement:||import Qt3D.Render 2.0|
- Entity component(string entityName, enumeration componentType)
- Entity entity(string entityName)
- list entityNames()
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.
Note: this component shouldn't be shared among several Entity instances. Undefined behavior will result.
source : url
Holds the url to the source to be loaded.
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.
- SceneLoader.UnknownComponent Unknown component type
- SceneLoader.GeometryRendererComponent Qt3DRender::QGeometryRenderer component
- SceneLoader.TransformComponent Qt3DCore::QTransform component
- SceneLoader.MaterialComponent Qt3DRender::QMaterial component
- SceneLoader.LightComponent Qt3DRender::QAbstractLight component
- SceneLoader.CameraLensComponent Qt3DRender::QCameraLens component
See also Qt3DRender::QSceneLoader::ComponentType.
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.
© 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.