Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates > by-pkgid > 6e2327ca1c896c6d674ae53117299f21 > files > 866

qtdeclarative5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwavefrontmesh.cpp -->
  <title>WavefrontMesh QML Type | Qt Quick 5.12.6</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.12</td><td ><a href="qtquick-index.html">Qt Quick</a></td><td ><a href="qtquick-qmlmodule.html">QML Types</a></td><td >WavefrontMesh QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.6 Reference Documentation</a></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="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">WavefrontMesh QML Type</h1>
<span class="subtitle"></span>
<!-- $$$WavefrontMesh-brief -->
<p>The <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a> provides a mesh based on a Wavefront .obj file. <a href="#details">More...</a></p>
<!-- @@@WavefrontMesh -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt.labs.wavefrontmesh 1.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.12</td></tr></table></div><ul>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh-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-qt-labs-wavefrontmesh-wavefrontmesh.html#lastError-prop">lastError</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneV-prop">projectionPlaneV</a></b></b> : vector3d</li>
<li class="fn"><b><b><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneW-prop">projectionPlaneW</a></b></b> : vector3d</li>
<li class="fn"><b><b><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#source-prop">source</a></b></b> : url</li>
</ul>
<!-- $$$WavefrontMesh-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a> reads the geometry from a Wavefront .obj file and generates a two-dimensional <a href="qsggeometry.html">geometry</a> from this. If the .obj file contains a three-dimensional shape, it will be orthographically projected, onto a plane. If defined, this is given by <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneV-prop">projectionPlaneV</a> and <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneW-prop">projectionPlaneW</a>. Otherwise, the first face encountered in the data will be used to determine the projection plane.</p>
<p>If the file contains texture coordinates, these will also be used. Otherwise, the vertexes of the object will be normalized and used.</p>
<p>The mesh can be used in a <a href="qml-qtquick-shadereffect.html">ShaderEffect</a> to define the shaded geometry. The geometry will be normalized before use, so the position and scale of the input objects have no impact on the result.</p>
<p><b>Note: </b>Some Wavefront exporters will change the source scene's coordinate system before exporting it. This can cause unexpected results when Qt applies the projection. If the visual results are not as you expect, try checking the export parameters and the documentation of the editor tool to see if this is the case.</p><p>For instance, the following example takes an .obj file containing a standard torus and visualizes the automatically generated texture coordinates.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qtlabs-wavefrontmesh.png" alt="" /></p></td><td ><pre class="qml">



</pre>
</td></tr>
</table></div>
<p><b>Note: </b>Since the input is a 3D torus, we need to define the projection plane. This would not be necessary when using a 2D shape as input. We use the XY plane in this case, because of the orientation of the input.</p><!-- @@@WavefrontMesh -->
<h2>Property Documentation</h2>
<!-- $$$lastError -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="lastError-prop">
<td class="tblQmlPropNode"><p>
<a name="lastError-prop"></a><span class="name">lastError</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the last error, if any, that occurred when parsing the source or building the mesh.</p>
<ul>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.NoError No error has occurred.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.InvalidSourceError The source was not recognized as a valid .obj file.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.UnsupportedFaceShapeError The faces in the source is of an unsupported type. <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a> only supports triangles and convex quads.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.UnsupportedIndexSizeError The source shape is too large. Only 16 bit indexes are supported.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.FileNotFoundError The source file was not found.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.MissingPositionAttributeError The 'qt_Vertex' attribute is missing from the shaders.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.MissingTextureCoordinateAttributeError The texture coordinate attribute in the shaders is wrongly named. Use 'qt_MultiTexCoord0'.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.MissingPositionAndTextureCoordinateAttributesError Both the 'qt_Vertex' and 'qt_MultiTexCoord0' attributes are missing from the shaders.</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.TooManyAttributesError The shaders expect too many attributes (maximum is two: Position, 'qt_Vertex', and texture coordinate, 'qt_MultiTexCoord0').</li>
<li><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a>.InvalidPlaneDefinitionError The V and W vectors in the plane cannot be null, nor parallel to each other.</li>
</ul>
</div></div><!-- @@@lastError -->
<br/>
<!-- $$$projectionPlaneV -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="projectionPlaneV-prop">
<td class="tblQmlPropNode"><p>
<a name="projectionPlaneV-prop"></a><span class="name">projectionPlaneV</span> : <span class="type"><a href="qml-vector3d.html">vector3d</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Since the Wavefront .obj format describes an object in 3D space, the coordinates have to be projected into 2D before they can be displayed in Qt Quick.</p>
<p>This will be done in <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a> by an orthographic projection onto an appropriate plane.</p>
<p>The projectionPlaneV is one of two vectors in the plane in 3D space. If either this, or <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneW-prop">projectionPlaneW</a> is set to (0, 0, 0) (the default), then the plane will be detected based on the first encountered face in the data set.</p>
<p><b>Note: </b>projectionPlaneV and <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneW-prop">projectionPlaneW</a> cannot be parallel vectors.</p></div></div><!-- @@@projectionPlaneV -->
<br/>
<!-- $$$projectionPlaneW -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="projectionPlaneW-prop">
<td class="tblQmlPropNode"><p>
<a name="projectionPlaneW-prop"></a><span class="name">projectionPlaneW</span> : <span class="type"><a href="qml-vector3d.html">vector3d</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Since the Wavefront .obj format describes an object in 3D space, the coordinates have to be projected into 2D before they can be displayed in Qt Quick.</p>
<p>This will be done in <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html">WavefrontMesh</a> by an orthographic projection onto an appropriate plane.</p>
<p>The projectionPlaneW is one of two vectors in the plane in 3D space. If either this, or <a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneV-prop">projectionPlaneV</a> is set to (0, 0, 0) (the default), then the plane will be detected based on the first encountered face in the data set.</p>
<p><b>Note: </b><a href="qml-qt-labs-wavefrontmesh-wavefrontmesh.html#projectionPlaneV-prop">projectionPlaneV</a> and projectionPlaneW cannot be parallel vectors.</p></div></div><!-- @@@projectionPlaneW -->
<br/>
<!-- $$$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>This property holds the URL of the source. This must be either a local file or in qrc. The source will be read as a Wavefront .obj file and the geometry will be updated.</p>
</div></div><!-- @@@source -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 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>