Sophie

Sophie

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

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" />
<!-- qgoochmaterial.cpp -->
  <title>QGoochMaterial 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 >QGoochMaterial</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="#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="#protected-functions">Protected Functions</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">QGoochMaterial Class</h1>
<span class="small-subtitle">(<a href="qt3dextras-qgoochmaterial.html">Qt3DExtras::QGoochMaterial</a>)<br/></span>
<!-- $$$QGoochMaterial-brief -->
<p>The <a href="qt3dextras-qgoochmaterial.html">QGoochMaterial</a> provides a material that implements the Gooch shading model, popular in CAD and CAM applications. <a href="#details">More...</a></p>
<!-- @@@QGoochMaterial -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QGoochMaterial&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3dextras</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"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qt3drender-qmaterial.html">Qt3DRender::QMaterial</a></td></tr></table></div><ul>
<li><a href="qt3dextras-qgoochmaterial-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#alpha-prop">alpha</a></b> : float</li>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#beta-prop">beta</a></b> : float</li>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#cool-prop">cool</a></b> : QColor</li>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#diffuse-prop">diffuse</a></b> : QColor</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#shininess-prop">shininess</a></b> : float</li>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#specular-prop">specular</a></b> : QColor</li>
<li class="fn"><b><a href="qt3dextras-qgoochmaterial.html#warm-prop">warm</a></b> : QColor</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">1 property inherited from <a href="qt3drender-qmaterial.html#properties">Qt3DRender::QMaterial</a></li>
<li class="fn">1 property inherited from <a href="qt3dcore-qcomponent.html#properties">Qt3DCore::QComponent</a></li>
<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="qt3dextras-qgoochmaterial.html#QGoochMaterial">QGoochMaterial</a></b>(Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#alpha-prop">alpha</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#beta-prop">beta</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#cool-prop">cool</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#diffuse-prop">diffuse</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#shininess-prop">shininess</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#specular-prop">specular</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#warm-prop">warm</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">4 public functions inherited from <a href="qt3drender-qmaterial.html#public-functions">Qt3DRender::QMaterial</a></li>
<li class="fn">2 public functions inherited from <a href="qt3dcore-qcomponent.html#public-functions">Qt3DCore::QComponent</a></li>
<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="qt3dextras-qgoochmaterial.html#alpha-prop">setAlpha</a></b>(float <i>alpha</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#beta-prop">setBeta</a></b>(float <i>beta</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#cool-prop">setCool</a></b>(const QColor &amp;<i>cool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#diffuse-prop">setDiffuse</a></b>(const QColor &amp;<i>diffuse</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#shininess-prop">setShininess</a></b>(float <i>shininess</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#specular-prop">setSpecular</a></b>(const QColor &amp;<i>specular</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#warm-prop">setWarm</a></b>(const QColor &amp;<i>warm</i>)</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="qt3drender-qmaterial.html#public-slots">Qt3DRender::QMaterial</a></li>
<li class="fn">1 public slot inherited from <a href="qt3dcore-qcomponent.html#public-slots">Qt3DCore::QComponent</a></li>
<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="qt3dextras-qgoochmaterial.html#alpha-prop">alphaChanged</a></b>(float <i>alpha</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#beta-prop">betaChanged</a></b>(float <i>beta</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#cool-prop">coolChanged</a></b>(const QColor &amp;<i>cool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#diffuse-prop">diffuseChanged</a></b>(const QColor &amp;<i>diffuse</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#shininess-prop">shininessChanged</a></b>(float <i>shininess</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#specular-prop">specularChanged</a></b>(const QColor &amp;<i>specular</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#warm-prop">warmChanged</a></b>(const QColor &amp;<i>warm</i>)</td></tr>
</table></div>
<ul>
<li class="fn">1 signal inherited from <a href="qt3drender-qmaterial.html#signals">Qt3DRender::QMaterial</a></li>
<li class="fn">3 signals inherited from <a href="qt3dcore-qcomponent.html#signals">Qt3DCore::QComponent</a></li>
<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="qt3dextras-qgoochmaterial.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qgoochmaterial.html#QGoochMaterial-1">QGoochMaterial</a></b>(Qt3DExtras::QGoochMaterialPrivate &amp;<i>dd</i>, Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr>
</table></div>
<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>
<!-- $$$QGoochMaterial-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qt3dextras-qgoochmaterial.html">QGoochMaterial</a> provides a material that implements the Gooch shading model, popular in CAD and CAM applications.</p>
<p>The Gooch lighting model uses both color and brightness to help show the curvature of 3D surfaces. This is often better than models such as Phong that rely purely upon changes in brightness. In situations such as in CAD and CAM applications where photorealism is not a goal, the Gooch shading model in conjunction with some kind of silhouette edge inking is a popular solution.</p>
<p>The Gooch lighting model is explained fully in the <a href="http://www.cs.northwestern.edu/~ago820/SIG98/abstract.html">original Gooch paper</a>. The Gooch model mixes a diffuse object color with a user-provided cool color and warm color to produce the end points of a color ramp that is used to shade the object based upon the cosine of the angle between the vector from the fragment to the light source and the fragment's normal vector. Optionally, a specular highlight can be added on top. The relative contributions to the cool and warm colors by the diffuse color are controlled by the alpha and beta properties respecitvely.</p>
<p>This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.</p>
</div>
<!-- @@@QGoochMaterial -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$alpha-prop$$$alpha$$$setAlphafloat$$$alphaChangedfloat -->
<h3 class="fn" id="alpha-prop"><a name="alpha-prop"></a><span class="name">alpha</span> : <span class="type">float</span></h3>
<p>Holds the current alpha value. The start point of the color ramp used by the Gooch shader is calculated as {c = cool + alpha * diffuse}.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> float </td><td class="memItemRight bottomAlign"><span class="name"><b>alpha</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAlpha</b></span>(float <i>alpha</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>alphaChanged</b></span>(float <i>alpha</i>)</td></tr>
</table></div>
<!-- @@@alpha -->
<!-- $$$beta-prop$$$beta$$$setBetafloat$$$betaChangedfloat -->
<h3 class="fn" id="beta-prop"><a name="beta-prop"></a><span class="name">beta</span> : <span class="type">float</span></h3>
<p>Holds the current beta value. The start point of the color ramp used by the Gooch shader is calculated as {c = warm + beta * diffuse}.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> float </td><td class="memItemRight bottomAlign"><span class="name"><b>beta</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setBeta</b></span>(float <i>beta</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>betaChanged</b></span>(float <i>beta</i>)</td></tr>
</table></div>
<!-- @@@beta -->
<!-- $$$cool-prop$$$cool$$$setCoolconstQColor&$$$coolChangedconstQColor& -->
<h3 class="fn" id="cool-prop"><a name="cool-prop"></a><span class="name">cool</span> : <span class="type">QColor</span></h3>
<p>Holds the current cool color.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>cool</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCool</b></span>(const QColor &amp;<i>cool</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>coolChanged</b></span>(const QColor &amp;<i>cool</i>)</td></tr>
</table></div>
<!-- @@@cool -->
<!-- $$$diffuse-prop$$$diffuse$$$setDiffuseconstQColor&$$$diffuseChangedconstQColor& -->
<h3 class="fn" id="diffuse-prop"><a name="diffuse-prop"></a><span class="name">diffuse</span> : <span class="type">QColor</span></h3>
<p>Holds the current diffuse color.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>diffuse</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDiffuse</b></span>(const QColor &amp;<i>diffuse</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>diffuseChanged</b></span>(const QColor &amp;<i>diffuse</i>)</td></tr>
</table></div>
<!-- @@@diffuse -->
<!-- $$$shininess-prop$$$shininess$$$setShininessfloat$$$shininessChangedfloat -->
<h3 class="fn" id="shininess-prop"><a name="shininess-prop"></a><span class="name">shininess</span> : <span class="type">float</span></h3>
<p>Holds the current shininess value. Higher values of shininess result in a smaller and brighter highlight.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> float </td><td class="memItemRight bottomAlign"><span class="name"><b>shininess</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setShininess</b></span>(float <i>shininess</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>shininessChanged</b></span>(float <i>shininess</i>)</td></tr>
</table></div>
<!-- @@@shininess -->
<!-- $$$specular-prop$$$specular$$$setSpecularconstQColor&$$$specularChangedconstQColor& -->
<h3 class="fn" id="specular-prop"><a name="specular-prop"></a><span class="name">specular</span> : <span class="type">QColor</span></h3>
<p>Holds the current specular color.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>specular</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSpecular</b></span>(const QColor &amp;<i>specular</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>specularChanged</b></span>(const QColor &amp;<i>specular</i>)</td></tr>
</table></div>
<!-- @@@specular -->
<!-- $$$warm-prop$$$warm$$$setWarmconstQColor&$$$warmChangedconstQColor& -->
<h3 class="fn" id="warm-prop"><a name="warm-prop"></a><span class="name">warm</span> : <span class="type">QColor</span></h3>
<p>Holds the current warm color.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>warm</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWarm</b></span>(const QColor &amp;<i>warm</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>warmChanged</b></span>(const QColor &amp;<i>warm</i>)</td></tr>
</table></div>
<!-- @@@warm -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGoochMaterial[overload1]$$$QGoochMaterialQt3DCore::QNode* -->
<h3 class="fn" id="QGoochMaterial"><a name="QGoochMaterial"></a>QGoochMaterial::<span class="name">QGoochMaterial</span>(<span class="type"><a href="qt3dcore-qnode.html">Qt3DCore::QNode</a></span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a new <a href="qt3dextras-qgoochmaterial.html">QGoochMaterial</a> instance with parent object <i>parent</i>.</p>
<!-- @@@QGoochMaterial -->
<!-- $$$QGoochMaterial$$$QGoochMaterialQt3DExtras::QGoochMaterialPrivate&Qt3DCore::QNode* -->
<h3 class="fn" id="QGoochMaterial-1"><a name="QGoochMaterial-1"></a><code>[protected] </code>QGoochMaterial::<span class="name">QGoochMaterial</span>(<span class="type">Qt3DExtras::QGoochMaterialPrivate</span> &amp;<i>dd</i>, <span class="type"><a href="qt3dcore-qnode.html">Qt3DCore::QNode</a></span> *<i>parent</i> = nullptr)</h3>
<p>Default constructs an instance of QGoochMaterial.</p><!-- @@@QGoochMaterial -->
</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>