Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > c936229ef0138f42857f36beadbeda30 > files > 1155

qt3d5-doc-5.12.2-2.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" />
<!-- qscene2d.cpp -->
  <title>QScene2D Class | Qt 3D 5.12.2</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="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-cpp.html">C++ Classes</a></td><td >QScene2D</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qt3d-index.html">Qt 5.12.2 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="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</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">QScene2D Class</h1>
<span class="small-subtitle">(<a href="qt3drender-quick-qscene2d.html">Qt3DRender::Quick::QScene2D</a>)<br/></span>
<!-- $$$QScene2D-brief -->
<p>This class enables rendering qml into a texture, which then can be used as a part of 3D scene. <a href="#details">More...</a></p>
<!-- @@@QScene2D -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;Qt3DQuickScene2D/QScene2D&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3dquickscene2d</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.9</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-qtquick-scene2d-scene2d.html">Scene2D</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qt3dcore-qnode.html">Qt3DCore::QNode</a></td></tr></table></div><ul>
<li><a href="qt3drender-quick-qscene2d-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#RenderPolicy-enum">RenderPolicy</a></b> { Continuous, SingleShot }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qt3drender-quick-qscene2d.html#item-prop">item</a></b> : QQuickItem*</li>
<li class="fn"><b><a href="qt3drender-quick-qscene2d.html#mouseEnabled-prop">mouseEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qt3drender-quick-qscene2d.html#output-prop">output</a></b> : Qt3DRender::QRenderTargetOutput*</li>
<li class="fn"><b><a href="qt3drender-quick-qscene2d.html#renderPolicy-prop">renderPolicy</a></b> : QScene2D::RenderPolicy</li>
</ul>
<ul>
<li class="fn">3 properties inherited from <a href="qt3dcore-qnode.html#properties">Qt3DCore::QNode</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#QScene2D">QScene2D</a></b>(Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#addEntity">addEntity</a></b>(Qt3DCore::QEntity *<i>entity</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;Qt3DCore::QEntity *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#entities">entities</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#mouseEnabled-prop">isMouseEnabled</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#item-prop">item</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt3DRender::QRenderTargetOutput *</td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#output-prop">output</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#removeEntity">removeEntity</a></b>(Qt3DCore::QEntity *<i>entity</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QScene2D::RenderPolicy </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#renderPolicy-prop">renderPolicy</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">13 public functions inherited from <a href="qt3dcore-qnode.html#public-functions">Qt3DCore::QNode</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#item-prop">setItem</a></b>(QQuickItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#mouseEnabled-prop">setMouseEnabled</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#output-prop">setOutput</a></b>(Qt3DRender::QRenderTargetOutput *<i>output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#renderPolicy-prop">setRenderPolicy</a></b>(QScene2D::RenderPolicy <i>policy</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 public slots inherited from <a href="qt3dcore-qnode.html#public-slots">Qt3DCore::QNode</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#item-prop">itemChanged</a></b>(QQuickItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#mouseEnabled-prop">mouseEnabledChanged</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#output-prop">outputChanged</a></b>(Qt3DRender::QRenderTargetOutput *<i>output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#renderPolicy-prop">renderPolicyChanged</a></b>(QScene2D::RenderPolicy <i>policy</i>)</td></tr>
</table></div>
<ul>
<li class="fn">4 signals inherited from <a href="qt3dcore-qnode.html#signals">Qt3DCore::QNode</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-quick-qscene2d.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">2 protected functions inherited from <a href="qt3dcore-qnode.html#protected-functions">Qt3DCore::QNode</a></li>
</ul>
<a name="details"></a>
<!-- $$$QScene2D-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>This class enables rendering qml into a texture, which then can be used as a part of 3D scene.</p>
<p>This class uses QQuickRenderControl to render the given QQuickItem into an offscreen surface, which is attached to a texture provided by the user. This allows the component to directly render into the texture without intermediate copy and the user to freely specify how the texture is used in the 3D scene.</p>
<p>The entities using the <a href="qt3drender-quick-qscene2d.html">QScene2D</a> can be associated with the class to enable interaction with the item; if an entity has a <a href="qt3drender-qobjectpicker.html">QObjectPicker</a> component, the pick events from that picker are sent to the <a href="qt3drender-quick-qscene2d.html">QScene2D</a> and converted to mouse events and finally sent to the item.</p>
</div>
<!-- @@@QScene2D -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$RenderPolicy$$$Continuous$$$SingleShot -->
<h3 class="fn" id="RenderPolicy-enum"><a name="RenderPolicy-enum"></a>enum QScene2D::<span class="name">RenderPolicy</span></h3>
<p>This enum type describes types of render policies available.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>Qt3DRender::Quick::QScene2D::Continuous</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The <a href="qt3dscene2d-module.html#scene2d">Scene2D</a> is rendering continuously. This is the default render policy.</td></tr>
<tr><td class="topAlign"><code>Qt3DRender::Quick::QScene2D::SingleShot</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The <a href="qt3dscene2d-module.html#scene2d">Scene2D</a> renders to the texture only once after which the resources allocated for rendering are released.</td></tr>
</table></div>
<!-- @@@RenderPolicy -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$item-prop$$$item$$$setItemQQuickItem*$$$itemChangedQQuickItem* -->
<h3 class="fn" id="item-prop"><a name="item-prop"></a><span class="name">item</span> : <span class="type">QQuickItem</span>*</h3>
<p>Holds the QQuickItem, which is rendered by <a href="qt3drender-quick-qscene2d.html">QScene2D</a> to the texture.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QQuickItem *</td><td class="memItemRight bottomAlign"><span class="name"><b>item</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setItem</b></span>(QQuickItem *<i>item</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>itemChanged</b></span>(QQuickItem *<i>item</i>)</td></tr>
</table></div>
<!-- @@@item -->
<!-- $$$mouseEnabled-prop$$$isMouseEnabled$$$setMouseEnabledbool$$$mouseEnabledChangedbool -->
<h3 class="fn" id="mouseEnabled-prop"><a name="mouseEnabled-prop"></a><span class="name">mouseEnabled</span> : <span class="type">bool</span></h3>
<p>Holds whether mouse events are enabled for the rendered item. The mouse events are generated from object picking events of the entities added to the <a href="qt3drender-quick-qscene2d.html">QScene2D</a>. Mouse is enabled by default.</p>
<p><b>Note: </b>Events are delayed by one frame due to object picking happening in the backend.</p><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isMouseEnabled</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMouseEnabled</b></span>(bool <i>enabled</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mouseEnabledChanged</b></span>(bool <i>enabled</i>)</td></tr>
</table></div>
<!-- @@@mouseEnabled -->
<!-- $$$output-prop$$$output$$$setOutputQt3DRender::QRenderTargetOutput*$$$outputChangedQt3DRender::QRenderTargetOutput* -->
<h3 class="fn" id="output-prop"><a name="output-prop"></a><span class="name">output</span> : <span class="type"><a href="qt3drender-qrendertargetoutput.html">Qt3DRender::QRenderTargetOutput</a></span>*</h3>
<p>Holds the <a href="qt3drender-qrendertargetoutput.html">QRenderTargetOutput</a>, which specifies where the <a href="qt3drender-quick-qscene2d.html">QScene2D</a> is rendering to.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt3DRender::QRenderTargetOutput *</td><td class="memItemRight bottomAlign"><span class="name"><b>output</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOutput</b></span>(Qt3DRender::QRenderTargetOutput *<i>output</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>outputChanged</b></span>(Qt3DRender::QRenderTargetOutput *<i>output</i>)</td></tr>
</table></div>
<!-- @@@output -->
<!-- $$$renderPolicy-prop$$$renderPolicy$$$setRenderPolicyQScene2D::RenderPolicy$$$renderPolicyChangedQScene2D::RenderPolicy -->
<h3 class="fn" id="renderPolicy-prop"><a name="renderPolicy-prop"></a><span class="name">renderPolicy</span> : <span class="type"><a href="qt3drender-quick-qscene2d.html#RenderPolicy-enum">QScene2D::RenderPolicy</a></span></h3>
<p>Holds the render policy of this <a href="qt3dscene2d-module.html#scene2d">Scene2D</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QScene2D::RenderPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>renderPolicy</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRenderPolicy</b></span>(QScene2D::RenderPolicy <i>policy</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>renderPolicyChanged</b></span>(QScene2D::RenderPolicy <i>policy</i>)</td></tr>
</table></div>
<!-- @@@renderPolicy -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QScene2D[overload1]$$$QScene2DQt3DCore::QNode* -->
<h3 class="fn" id="QScene2D"><a name="QScene2D"></a>QScene2D::<span class="name">QScene2D</span>(<span class="type"><a href="qt3dcore-qnode.html">Qt3DCore::QNode</a></span> *<i>parent</i> = nullptr)</h3>
<p>The constructor creates a new <a href="qt3drender-quick-qscene2d.html">QScene2D</a> instance with the specified <i>parent</i>.</p>
<!-- @@@QScene2D -->
<!-- $$$addEntity[overload1]$$$addEntityQt3DCore::QEntity* -->
<h3 class="fn" id="addEntity"><a name="addEntity"></a><span class="type">void</span> QScene2D::<span class="name">addEntity</span>(<span class="type"><a href="qt3dcore-qentity.html">Qt3DCore::QEntity</a></span> *<i>entity</i>)</h3>
<p>Adds an <i>entity</i> to the the <a href="qt3drender-quick-qscene2d.html">QScene2D</a> object. If the entities have <a href="qt3drender-qobjectpicker.html">QObjectPicker</a>, the pick events from that entity are sent to <a href="qt3drender-quick-qscene2d.html">QScene2D</a> and converted to mouse events.</p>
<!-- @@@addEntity -->
<!-- $$$entities[overload1]$$$entities -->
<h3 class="fn" id="entities"><a name="entities"></a><span class="type">QVector</span>&lt;<span class="type"><a href="qt3dcore-qentity.html">Qt3DCore::QEntity</a></span> *&gt; QScene2D::<span class="name">entities</span>()</h3>
<p>Retrieve entities associated with the <a href="qt3drender-quick-qscene2d.html">QScene2D</a>.</p>
<!-- @@@entities -->
<!-- $$$removeEntity[overload1]$$$removeEntityQt3DCore::QEntity* -->
<h3 class="fn" id="removeEntity"><a name="removeEntity"></a><span class="type">void</span> QScene2D::<span class="name">removeEntity</span>(<span class="type"><a href="qt3dcore-qentity.html">Qt3DCore::QEntity</a></span> *<i>entity</i>)</h3>
<p>Removes an <i>entity</i> from the the <a href="qt3drender-quick-qscene2d.html">QScene2D</a> object.</p>
<!-- @@@removeEntity -->
</div>
        </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>