Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > c936229ef0138f42857f36beadbeda30 > files > 269

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" />
<!-- qabstractraycaster.cpp -->
  <title>AbstractRayCaster QML Type | 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-qml.html">QML Types</a></td><td >AbstractRayCaster QML Type</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="#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">AbstractRayCaster QML Type</h1>
<span class="subtitle"></span>
<!-- $$$AbstractRayCaster-brief -->
<p>An abstract base class for ray casting in 3d scenes. <a href="#details">More...</a></p>
<!-- @@@AbstractRayCaster -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt3D.Render 2.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.11</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qt3d-render-abstractraycaster.html"><a href="qt3drender-qabstractraycaster.html">QAbstractRayCaster</a></td></tr></table></div><ul>
<li><a href="qml-qt3d-render-abstractraycaster-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-abstractraycaster.html#filterMode-prop">filterMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qt3d-render-abstractraycaster.html#hits-prop">hits</a></b></b> : array</li>
<li class="fn"><b><b><a href="qml-qt3d-render-abstractraycaster.html#runMode-prop">runMode</a></b></b> : enumeration</li>
</ul>
<!-- $$$AbstractRayCaster-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p><a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a> is an abstract base class for casting rays into a 3d scene. <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a> can not be directly instantiated, but rather through its subclasses. QAbstractRayCaster specifies common properties for all ray casters, such as run mode and layer handling, while leaving the actual ray casting details to the subclasses.</p>
<p>Ray castings differs from picking (using <a href="qml-qt3d-render-objectpicker.html">ObjectPicker</a>) in that it does not require mouse events to trigger.</p>
<p>By default, the instances of <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a> are disabled. When enabled, the specified ray will be tested for intersecting objects at every frame. The <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a>.hits property will be updated with the results of the ray casting, even if no objects are found.</p>
<p>The Qt3D.Render::PickingSettings can be used to control the ray casting, such as which primitives are tested and how the results are returned.</p>
<p>Furthermore, Qt3D.Render::Layer components can be used to control how entities, or entity sub-graphs, react to ray casting.</p>
<p>Note: components derived from <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a> should not be shared amount multiple entities.</p>
<p><b>See also </b><a href="qml-qt3d-render-raycaster.html">Qt3D.Render::RayCaster</a>, <a href="qml-qt3d-render-screenraycaster.html">Qt3D.Render::ScreenRayCaster</a>, <a href="qml-qt3d-render-objectpicker.html">Qt3D.Render::ObjectPicker</a>, and <a href="qml-qt3d-render-pickingsettings.html">Qt3D.Render::PickingSettings</a>.</p>
<!-- @@@AbstractRayCaster -->
<h2>Property Documentation</h2>
<!-- $$$filterMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="filterMode-prop">
<td class="tblQmlPropNode"><p>
<a name="filterMode-prop"></a><span class="name">filterMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds the filter mode specifying the entities to select for ray casting tests.</p>
<p>The default value is <code>AbstractRayCaster.AcceptMatchingLayers</code>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>AcceptAnyMatchingLayers</code></td><td class="topAlign">Accept entities that reference one or more <a href="qml-qt3d-render-layer.html">Layer</a> objects added to this <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a>. This is the default</td></tr>
<tr><td class="topAlign"><code>AcceptAllMatchingLayers</code></td><td class="topAlign">Accept entities that reference all the <a href="qml-qt3d-render-layer.html">Layer</a> objects added to this <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a></td></tr>
<tr><td class="topAlign"><code>DiscardAnyMatchingLayers</code></td><td class="topAlign">Discard entities that reference one or more <a href="qml-qt3d-render-layer.html">Layer</a> objects added to this <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a></td></tr>
<tr><td class="topAlign"><code>DiscardAllMatchingLayers</code></td><td class="topAlign">Discard entities that reference all <a href="qml-qt3d-render-layer.html">Layer</a> objects added to this <a href="qml-qt3d-render-abstractraycaster.html">AbstractRayCaster</a></td></tr>
</table></div>
</div></div><!-- @@@filterMode -->
<br/>
<!-- $$$hits -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="hits-prop">
<td class="tblQmlPropNode"><p>
<a name="hits-prop"></a><span class="name">hits</span> : <span class="type">array</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds the results of last ray casting test as an array of javascript objects. The fields defined on the objects are defined below.</p>
<pre class="cpp">

  {
      type <span class="comment">// enum value of RayCasterHit.HitType</span>
      entity <span class="comment">// entity that was intersected</span>
      distance <span class="comment">// distance from ray origin to intersection</span>
      localIntersection<span class="operator">.</span>x: <span class="comment">// coordinate of intersection in the entity's coordinate system</span>
      localIntersection<span class="operator">.</span>y
      localIntersection<span class="operator">.</span>z
      worldIntersection<span class="operator">.</span>x <span class="comment">// coordinate of intersection in the model's coordinate system</span>
      worldIntersection<span class="operator">.</span>y
      worldIntersection<span class="operator">.</span>z
      primitiveIndex <span class="comment">// index of the primitive (triangle, line, point) that was intersected;</span>
                     <span class="comment">// (undefined if the picking mode is set to bounding volume)</span>
      vertex1Index <span class="comment">// index of the first point of the triangle or line that was intersected</span>
                   <span class="comment">// (undefined if the picking mode is set to bounding volume or points)</span>
      vertex2Index <span class="comment">// index of the second point of the triangle or line that was intersected</span>
                   <span class="comment">// (undefined if the picking mode is set to bounding volume or points)</span>
      vertex3Index <span class="comment">// index of the second point of the triangle that was intersected</span>
                   <span class="comment">// (undefined if the picking mode is set to bounding volume, points or lines)</span>
  }

</pre>
<p>Note that even if successive tests return the exact same results (or empty results), a change notification will be emitted at every test.</p>
</div></div><!-- @@@hits -->
<br/>
<!-- $$$runMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="runMode-prop">
<td class="tblQmlPropNode"><p>
<a name="runMode-prop"></a><span class="name">runMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Holds the run mode controlling how often ray casting tests are performed.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>Continuous</code></td><td class="topAlign">Ray casting is performed at every frame as long as the component is enabled.</td></tr>
<tr><td class="topAlign"><code>SingleShot</code></td><td class="topAlign">Ray casting is done once then the component disables itself. This is the default</td></tr>
</table></div>
</div></div><!-- @@@runMode -->
<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>