Sophie

Sophie

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

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" />
<!-- qquickparticleaffector.cpp -->
  <title>Affector 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 >Affector 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="#signals">Signals</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">Affector QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Affector-brief -->
<p>Applies alterations to the attributes of logical particles at any point in their lifetime. <a href="#details">More...</a></p>
<!-- @@@Affector -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick.Particles 2.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-particles-age.html">Age</a>, <a href="qml-qtquick-particles-attractor.html">Attractor</a>, <a href="qml-qtquick-particles-friction.html">Friction</a>, <a href="qml-qtquick-particles-gravity.html">Gravity</a>, <a href="qml-qtquick-particles-groupgoal.html">GroupGoal</a>, <a href="qml-qtquick-particles-spritegoal.html">SpriteGoal</a>, <a href="qml-qtquick-particles-turbulence.html">Turbulence</a>, and <a href="qml-qtquick-particles-wander.html">Wander</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-particles-affector-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-qtquick-particles-affector.html#enabled-prop">enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#groups-prop">groups</a></b></b> : list&lt;string&gt;</li>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#once-prop">once</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#shape-prop">shape</a></b></b> : Shape</li>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#system-prop">system</a></b></b> : ParticleSystem</li>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#whenCollidingWith-prop">whenCollidingWith</a></b></b> : list&lt;string&gt;</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-particles-affector.html#affected-signal">affected</a></b></b>(real <i>x</i>,  real <i>y</i>)</li>
</ul>
<!-- $$$Affector-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>The base Affector does not alter any attributes, but can be used to emit a signal when a particle meets certain conditions.</p>
<p>If an affector has a defined size, then it will only affect particles within its size and position on screen.</p>
<p>Affectors have different performance characteristics to the other particle system elements. In particular, they have some simplifications to try to maintain a simulation at real-time or faster. When running a system with Affectors, irregular frame timings that grow too large ( &gt; one second per frame) will cause the Affectors to try and cut corners with a faster but less accurate simulation. If the system has multiple affectors the order in which they are applied is not guaranteed, and when simulating larger time shifts they will simulate the whole shift each, which can lead to different results compared to smaller time shifts.</p>
<p>Accurate simulation for large numbers of particles (hundreds) with multiple affectors may be possible on some hardware, but on less capable hardware you should expect small irregularties in the simulation as simulates with worse granularity.</p>
<!-- @@@Affector -->
<h2>Property Documentation</h2>
<!-- $$$enabled -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="enabled-prop">
<td class="tblQmlPropNode"><p>
<a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If enabled is set to false, this affector will not affect any particles.</p>
<p>Usually this is used to conditionally turn an affector on or off.</p>
<p>Default value is true.</p>
</div></div><!-- @@@enabled -->
<br/>
<!-- $$$groups -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="groups-prop">
<td class="tblQmlPropNode"><p>
<a name="groups-prop"></a><span class="name">groups</span> : <span class="type">list</span>&lt;<span class="type">string</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Which logical particle groups will be affected.</p>
<p>If empty, it will affect all particles.</p>
</div></div><!-- @@@groups -->
<br/>
<!-- $$$once -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="once-prop">
<td class="tblQmlPropNode"><p>
<a name="once-prop"></a><span class="name">once</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If once is set to true, this affector will only affect each particle once in their lifetimes. If the affector normally simulates a continuous effect over time, then it will simulate the effect of one second of time the one instant it affects the particle.</p>
<p>Default value is false.</p>
</div></div><!-- @@@once -->
<br/>
<!-- $$$shape -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="shape-prop">
<td class="tblQmlPropNode"><p>
<a name="shape-prop"></a><span class="name">shape</span> : <span class="type"><a href="qml-qtquick-shapes-shape.html">Shape</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If a size has been defined, the shape property can be used to affect a non-rectangular area.</p>
</div></div><!-- @@@shape -->
<br/>
<!-- $$$system -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="system-prop">
<td class="tblQmlPropNode"><p>
<a name="system-prop"></a><span class="name">system</span> : <span class="type"><a href="qml-qtquick-particles-particlesystem.html">ParticleSystem</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This is the system which will be affected by the element. If the Affector is a direct child of a <a href="qml-qtquick-particles-particlesystem.html">ParticleSystem</a>, it will automatically be associated with it.</p>
</div></div><!-- @@@system -->
<br/>
<!-- $$$whenCollidingWith -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="whenCollidingWith-prop">
<td class="tblQmlPropNode"><p>
<a name="whenCollidingWith-prop"></a><span class="name">whenCollidingWith</span> : <span class="type">list</span>&lt;<span class="type">string</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If any logical particle groups are specified here, then the affector will only be triggered if the particle being examined intersects with a particle of one of these groups.</p>
<p>This is different from the groups property. The groups property selects which particles might be examined, and if they meet other criteria (including being within the bounds of the Affector, modified by shape) then they will be tested again to see if they intersect with a particles from one of the particle groups in whenCollidingWith.</p>
<p>By default, no groups are specified.</p>
</div></div><!-- @@@whenCollidingWith -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$affected -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="affected-signal">
<td class="tblQmlFuncNode"><p>
<a name="affected-signal"></a><span class="name">affected</span>(<span class="type">real</span> <i>x</i>,  <span class="type">real</span> <i>y</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when a particle is selected to be affected. It will not be emitted if a particle is considered by the Affector but not actually altered in any way.</p>
<p>In the special case where an Affector has no possible effect (e.g&#x2e; Affector {}), this signal will be emitted for all particles being considered if you connect to it. This allows you to execute arbitrary code in response to particles (use the Affector::onAffectParticles signal handler if you want to execute code which affects the particles themselves). As this executes JavaScript code per particle, it is not recommended to use this signal with a high-volume particle system.</p>
<p>x,y is the particle's current position.</p>
<p>The corresponding handler is <code>onAffected</code>.</p>
</div></div><!-- @@@affected -->
<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>