<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qsceneloader.cpp --> <title>SceneLoader QML Type | Qt 3D 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-core-qmlmodule.html">QML Types</a></td><td >SceneLoader QML Type</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#methods">Methods</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">SceneLoader QML Type</h1> <span class="subtitle"></span> <!-- $$$SceneLoader-brief --> <p>Provides the facility to load an existing Scene <a href="#details">More...</a></p> <!-- @@@SceneLoader --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt3D.Render 2.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.7</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qt3d-render-sceneloader.html"><a href="qt3drender-qsceneloader.html">QSceneLoader</a></td></tr></table></div><ul> <li><a href="qml-qt3d-render-sceneloader-members.html">List of all members, including inherited members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><b><a href="qml-qt3d-render-sceneloader.html#source-prop">source</a></b></b> : url</li> <li class="fn"><b><b><a href="qml-qt3d-render-sceneloader.html#status-prop">status</a></b></b> : enumeration</li> </ul> <a name="methods"></a> <h2 id="methods">Methods</h2> <ul> <li class="fn">Entity <b><b><a href="qml-qt3d-render-sceneloader.html#component-method">component</a></b></b>(string <i>entityName</i>, enumeration <i>componentType</i>)</li> <li class="fn">Entity <b><b><a href="qml-qt3d-render-sceneloader.html#entity-method">entity</a></b></b>(string <i>entityName</i>)</li> <li class="fn">list <b><b><a href="qml-qt3d-render-sceneloader.html#entityNames-method">entityNames</a></b></b>()</li> </ul> <!-- $$$SceneLoader-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>Given a 3D source file, the <a href="qml-qt3d-render-sceneloader.html">SceneLoader</a> will try to parse it and build a tree of Entity objects with proper <a href="qt3drender-geometry.html#geometryrenderer">GeometryRenderer</a>, Transform and Material components.</p> <p>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.</p> <p>As the name implies, <a href="qml-qt3d-render-sceneloader.html">SceneLoader</a> loads a complete scene subtree. If you wish to load a single piece of geometry, you should rather use the Mesh instead.</p> <p><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a> internally relies on the use of plugins to support a wide variety of 3D file formats. <a href="http://www.assimp.org/main_features_formats.html">Here</a> is a list of formats that are supported by Qt3D.</p> <p><b>Note: </b>this component shouldn't be shared among several Entity instances. Undefined behavior will result.</p><p><b>See also </b><a href="qml-qt3d-render-mesh.html">Mesh</a> and <a href="qt3drender-geometry.html#geometryrenderer">GeometryRenderer</a>.</p> <!-- @@@SceneLoader --> <h2>Property Documentation</h2> <!-- $$$source --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="source-prop"> <td class="tblQmlPropNode"><p> <a name="source-prop"></a><span class="name">source</span> : <span class="type">url</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the url to the source to be loaded.</p> </div></div><!-- @@@source --> <br/> <!-- $$$status --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="status-prop"> <td class="tblQmlPropNode"><p> <a name="status-prop"></a><span class="qmlreadonly">[read-only] </span><span class="name">status</span> : <span class="type">enumeration</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the status of scene loading.</p> <ul> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.None</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.Loading</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.Ready</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.Error</li> </ul> <p><b>See also </b><a href="qt3drender-qsceneloader.html#Status-enum">Qt3DRender::QSceneLoader::Status</a>.</p> </div></div><!-- @@@status --> <br/> <h2>Method Documentation</h2> <!-- $$$component --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="component-method"> <td class="tblQmlFuncNode"><p> <a name="component-method"></a><span class="type"><a href="qml-qt3d-core-entity.html">Entity</a></span> <span class="name">component</span>(<span class="type">string</span> <i>entityName</i>, <span class="type">enumeration</span> <i>componentType</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Returns a component matching <i>componentType</i> of a loaded entity with an <i>objectName</i> matching the <i>entityName</i>. 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.</p> <ul> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.UnknownComponent Unknown component type</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.GeometryRendererComponent <a href="qt3drender-qgeometryrenderer.html">Qt3DRender::QGeometryRenderer</a> component</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.TransformComponent <a href="qt3dcore-qtransform.html">Qt3DCore::QTransform</a> component</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.MaterialComponent <a href="qt3drender-qmaterial.html">Qt3DRender::QMaterial</a> component</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.LightComponent <a href="qt3drender-qabstractlight.html">Qt3DRender::QAbstractLight</a> component</li> <li><a href="qml-qt3d-render-sceneloader.html">SceneLoader</a>.CameraLensComponent <a href="qt3drender-qcameralens.html">Qt3DRender::QCameraLens</a> component</li> </ul> <p><b>See also </b><a href="qt3drender-qsceneloader.html#ComponentType-enum">Qt3DRender::QSceneLoader::ComponentType</a>.</p> </div></div><!-- @@@component --> <br/> <!-- $$$entity --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="entity-method"> <td class="tblQmlFuncNode"><p> <a name="entity-method"></a><span class="type"><a href="qml-qt3d-core-entity.html">Entity</a></span> <span class="name">entity</span>(<span class="type">string</span> <i>entityName</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Returns a loaded entity with the <code>objectName</code> matching the <i>entityName</i> 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.</p> </div></div><!-- @@@entity --> <br/> <!-- $$$entityNames --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="entityNames-method"> <td class="tblQmlFuncNode"><p> <a name="entityNames-method"></a><span class="type">list</span> <span class="name">entityNames</span>()</p></td></tr> </table></div> </div><div class="qmldoc"><p>Returns a list of the <code>objectNames</code> of the loaded entities.</p> </div></div><!-- @@@entityNames --> <br/> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p> </div> </body> </html>