<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qmatrix4x4.cpp --> <title>Qt 4.8: QMatrix4x4 Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qtgui.html">QtGui</a></li> <li>QMatrix4x4</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#related-non-members">Related Non-Members</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QMatrix4x4 Class Reference</h1> <!-- $$$QMatrix4x4-brief --> <p>The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space. <a href="#details">More...</a></p> <!-- @@@QMatrix4x4 --> <pre class="cpp"> <span class="preprocessor">#include <QMatrix4x4></span></pre><p>This class was introduced in Qt 4.6.</p> <ul> <li><a href="qmatrix4x4-members.html">List of all members, including inherited members</a></li> <li><a href="qmatrix4x4-qt3.html">Qt 3 support members</a></li> </ul> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4">QMatrix4x4</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4-2">QMatrix4x4</a></b> ( const qreal * <i>values</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4-3">QMatrix4x4</a></b> ( qreal <i>m11</i>, qreal <i>m12</i>, qreal <i>m13</i>, qreal <i>m14</i>, qreal <i>m21</i>, qreal <i>m22</i>, qreal <i>m23</i>, qreal <i>m24</i>, qreal <i>m31</i>, qreal <i>m32</i>, qreal <i>m33</i>, qreal <i>m34</i>, qreal <i>m41</i>, qreal <i>m42</i>, qreal <i>m43</i>, qreal <i>m44</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4-4">QMatrix4x4</a></b> ( const QGenericMatrix<N, M, qreal> & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4-6">QMatrix4x4</a></b> ( const QTransform & <i>transform</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#QMatrix4x4-7">QMatrix4x4</a></b> ( const QMatrix & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector4D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#column">column</a></b> ( int <i>index</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const qreal * </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#constData">constData</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#copyDataTo">copyDataTo</a></b> ( qreal * <i>values</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> qreal * </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#data">data</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const qreal * </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#data-2">data</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#determinant">determinant</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#fill">fill</a></b> ( qreal <i>value</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#flipCoordinates">flipCoordinates</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#frustum">frustum</a></b> ( qreal <i>left</i>, qreal <i>right</i>, qreal <i>bottom</i>, qreal <i>top</i>, qreal <i>nearPlane</i>, qreal <i>farPlane</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#inverted">inverted</a></b> ( bool * <i>invertible</i> = 0 ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#isIdentity">isIdentity</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#lookAt">lookAt</a></b> ( const QVector3D & <i>eye</i>, const QVector3D & <i>center</i>, const QVector3D & <i>up</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#map">map</a></b> ( const QPoint & <i>point</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#map-2">map</a></b> ( const QPointF & <i>point</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#map-3">map</a></b> ( const QVector3D & <i>point</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector4D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#map-4">map</a></b> ( const QVector4D & <i>point</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#mapRect">mapRect</a></b> ( const QRect & <i>rect</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#mapRect-2">mapRect</a></b> ( const QRectF & <i>rect</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#mapVector">mapVector</a></b> ( const QVector3D & <i>vector</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix3x3 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#normalMatrix">normalMatrix</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#optimize">optimize</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#ortho">ortho</a></b> ( qreal <i>left</i>, qreal <i>right</i>, qreal <i>bottom</i>, qreal <i>top</i>, qreal <i>nearPlane</i>, qreal <i>farPlane</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#ortho-2">ortho</a></b> ( const QRect & <i>rect</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#ortho-3">ortho</a></b> ( const QRectF & <i>rect</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#perspective">perspective</a></b> ( qreal <i>angle</i>, qreal <i>aspect</i>, qreal <i>nearPlane</i>, qreal <i>farPlane</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#rotate">rotate</a></b> ( qreal <i>angle</i>, const QVector3D & <i>vector</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#rotate-2">rotate</a></b> ( const QQuaternion & <i>quaternion</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#rotate-3">rotate</a></b> ( qreal <i>angle</i>, qreal <i>x</i>, qreal <i>y</i>, qreal <i>z</i> = 0.0f )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector4D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#row">row</a></b> ( int <i>index</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#scale">scale</a></b> ( const QVector3D & <i>vector</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#scale-2">scale</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#scale-3">scale</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>z</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#scale-4">scale</a></b> ( qreal <i>factor</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#setColumn">setColumn</a></b> ( int <i>index</i>, const QVector4D & <i>value</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#setRow">setRow</a></b> ( int <i>index</i>, const QVector4D & <i>value</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#setToIdentity">setToIdentity</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#toAffine">toAffine</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QGenericMatrix<N, M, qreal> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#toGenericMatrix">toGenericMatrix</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTransform </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#toTransform">toTransform</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTransform </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#toTransform-2">toTransform</a></b> ( qreal <i>distanceToPlane</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#translate">translate</a></b> ( const QVector3D & <i>vector</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#translate-2">translate</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#translate-3">translate</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>z</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#transposed">transposed</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-QVariant">operator QVariant</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-not-eq">operator!=</a></b> ( const QMatrix4x4 & <i>other</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const qreal & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-28-29">operator()</a></b> ( int <i>row</i>, int <i>column</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> qreal & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-28-29-2">operator()</a></b> ( int <i>row</i>, int <i>column</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-eq">operator*=</a></b> ( const QMatrix4x4 & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-eq-2">operator*=</a></b> ( qreal <i>factor</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2b-eq">operator+=</a></b> ( const QMatrix4x4 & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator--eq">operator-=</a></b> ( const QMatrix4x4 & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2f-eq">operator/=</a></b> ( qreal <i>divisor</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-eq-eq">operator==</a></b> ( const QMatrix4x4 & <i>other</i> ) const</td></tr> </table> <a name="related-non-members"></a> <h2>Related Non-Members</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#qFuzzyCompare-2">qFuzzyCompare</a></b> ( const QMatrix4x4 & <i>m1</i>, const QMatrix4x4 & <i>m2</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-4">operator*</a></b> ( const QMatrix4x4 & <i>m1</i>, const QMatrix4x4 & <i>m2</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-5">operator*</a></b> ( const QVector3D & <i>vector</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector3D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-6">operator*</a></b> ( const QMatrix4x4 & <i>matrix</i>, const QVector3D & <i>vector</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector4D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-7">operator*</a></b> ( const QVector4D & <i>vector</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector4D </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-8">operator*</a></b> ( const QMatrix4x4 & <i>matrix</i>, const QVector4D & <i>vector</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-9">operator*</a></b> ( const QPoint & <i>point</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-10">operator*</a></b> ( const QPointF & <i>point</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-11">operator*</a></b> ( const QMatrix4x4 & <i>matrix</i>, const QPoint & <i>point</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-12">operator*</a></b> ( const QMatrix4x4 & <i>matrix</i>, const QPointF & <i>point</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-13">operator*</a></b> ( qreal <i>factor</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2a-14">operator*</a></b> ( const QMatrix4x4 & <i>matrix</i>, qreal <i>factor</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2b-2">operator+</a></b> ( const QMatrix4x4 & <i>m1</i>, const QMatrix4x4 & <i>m2</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator--2">operator-</a></b> ( const QMatrix4x4 & <i>m1</i>, const QMatrix4x4 & <i>m2</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator--24">operator-</a></b> ( const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMatrix4x4 </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-2f-2">operator/</a></b> ( const QMatrix4x4 & <i>matrix</i>, qreal <i>divisor</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-lt-lt-25">operator<<</a></b> ( QDataStream & <i>stream</i>, const QMatrix4x4 & <i>matrix</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="qmatrix4x4.html#operator-gt-gt-15">operator>></a></b> ( QDataStream & <i>stream</i>, QMatrix4x4 & <i>matrix</i> )</td></tr> </table> <a name="details"></a> <!-- $$$QMatrix4x4-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.</p> </div> <p><b>See also </b><a href="qvector3d.html">QVector3D</a> and <a href="qgenericmatrix.html">QGenericMatrix</a>.</p> <!-- @@@QMatrix4x4 --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QMatrix4x4[overload1]$$$QMatrix4x4 --> <h3 class="fn"><a name="QMatrix4x4"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ()</h3> <p>Constructs an identity matrix.</p> <!-- @@@QMatrix4x4 --> <!-- $$$QMatrix4x4$$$QMatrix4x4constqreal* --> <h3 class="fn"><a name="QMatrix4x4-2"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ( const <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>values</i> )</h3> <p>Constructs a matrix from the given 16 floating-point <i>values</i>. The contents of the array <i>values</i> is assumed to be in row-major order.</p> <p>If the matrix has a special type (identity, translate, scale, etc), the programmer should follow this constructor with a call to <a href="qmatrix4x4.html#optimize">optimize</a>() if they wish <a href="qmatrix4x4.html">QMatrix4x4</a> to optimize further calls to <a href="qmatrix4x4.html#translate">translate</a>(), <a href="qmatrix4x4.html#scale">scale</a>(), etc.</p> <p><b>See also </b><a href="qmatrix4x4.html#copyDataTo">copyDataTo</a>() and <a href="qmatrix4x4.html#optimize">optimize</a>().</p> <!-- @@@QMatrix4x4 --> <!-- $$$QMatrix4x4$$$QMatrix4x4qrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqrealqreal --> <h3 class="fn"><a name="QMatrix4x4-3"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m11</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m12</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m13</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m14</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m21</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m22</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m23</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m24</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m31</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m32</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m33</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m34</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m41</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m42</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m43</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>m44</i> )</h3> <p>Constructs a matrix from the 16 elements <i>m11</i>, <i>m12</i>, <i>m13</i>, <i>m14</i>, <i>m21</i>, <i>m22</i>, <i>m23</i>, <i>m24</i>, <i>m31</i>, <i>m32</i>, <i>m33</i>, <i>m34</i>, <i>m41</i>, <i>m42</i>, <i>m43</i>, and <i>m44</i>. The elements are specified in row-major order.</p> <p>If the matrix has a special type (identity, translate, scale, etc), the programmer should follow this constructor with a call to <a href="qmatrix4x4.html#optimize">optimize</a>() if they wish <a href="qmatrix4x4.html">QMatrix4x4</a> to optimize further calls to <a href="qmatrix4x4.html#translate">translate</a>(), <a href="qmatrix4x4.html#scale">scale</a>(), etc.</p> <p><b>See also </b><a href="qmatrix4x4.html#optimize">optimize</a>().</p> <!-- @@@QMatrix4x4 --> <!-- $$$QMatrix4x4$$$QMatrix4x4constQGenericMatrix<N,M,qreal>& --> <h3 class="fn"><a name="QMatrix4x4-4"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ( const <span class="type"><a href="qgenericmatrix.html">QGenericMatrix</a></span><<span class="type">N</span>, <span class="type">M</span>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span>> & <i>matrix</i> )</h3> <p>Constructs a 4x4 matrix from the left-most 4 columns and top-most 4 rows of <i>matrix</i>. If <i>matrix</i> has less than 4 columns or rows, the remaining elements are filled with elements from the identity matrix.</p> <p><b>See also </b><a href="qmatrix4x4.html#toGenericMatrix">toGenericMatrix</a>().</p> <!-- @@@QMatrix4x4 --> <!-- $$$QMatrix4x4$$$QMatrix4x4constQTransform& --> <h3 class="fn"><a name="QMatrix4x4-6"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ( const <span class="type"><a href="qtransform.html">QTransform</a></span> & <i>transform</i> )</h3> <p>Constructs a 4x4 matrix from the conventional Qt 2D transformation matrix <i>transform</i>.</p> <p>If <i>transform</i> has a special type (identity, translate, scale, etc), the programmer should follow this constructor with a call to <a href="qmatrix4x4.html#optimize">optimize</a>() if they wish <a href="qmatrix4x4.html">QMatrix4x4</a> to optimize further calls to <a href="qmatrix4x4.html#translate">translate</a>(), <a href="qmatrix4x4.html#scale">scale</a>(), etc.</p> <p><b>See also </b><a href="qmatrix4x4.html#toTransform">toTransform</a>() and <a href="qmatrix4x4.html#optimize">optimize</a>().</p> <!-- @@@QMatrix4x4 --> <!-- $$$QMatrix4x4$$$QMatrix4x4constQMatrix& --> <h3 class="fn"><a name="QMatrix4x4-7"></a>QMatrix4x4::<span class="name">QMatrix4x4</span> ( const <span class="type"><a href="qmatrix.html">QMatrix</a></span> & <i>matrix</i> )</h3> <p>Constructs a 4x4 matrix from a conventional Qt 2D affine transformation <i>matrix</i>.</p> <p>If <i>matrix</i> has a special type (identity, translate, scale, etc), the programmer should follow this constructor with a call to <a href="qmatrix4x4.html#optimize">optimize</a>() if they wish <a href="qmatrix4x4.html">QMatrix4x4</a> to optimize further calls to <a href="qmatrix4x4.html#translate">translate</a>(), <a href="qmatrix4x4.html#scale">scale</a>(), etc.</p> <p><b>See also </b><a href="qmatrix4x4.html#toAffine">toAffine</a>() and <a href="qmatrix4x4.html#optimize">optimize</a>().</p> <!-- @@@QMatrix4x4 --> <!-- $$$column[overload1]$$$columnint --> <h3 class="fn"><a name="column"></a><span class="type"><a href="qvector4d.html">QVector4D</a></span> QMatrix4x4::<span class="name">column</span> ( <span class="type">int</span> <i>index</i> ) const</h3> <p>Returns the elements of column <i>index</i> as a 4D vector.</p> <p><b>See also </b><a href="qmatrix4x4.html#setColumn">setColumn</a>() and <a href="qmatrix4x4.html#row">row</a>().</p> <!-- @@@column --> <!-- $$$constData[overload1]$$$constData --> <h3 class="fn"><a name="constData"></a>const <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * QMatrix4x4::<span class="name">constData</span> () const</h3> <p>Returns a constant pointer to the raw data of this matrix.</p> <p><b>See also </b><a href="qmatrix4x4.html#data">data</a>().</p> <!-- @@@constData --> <!-- $$$copyDataTo[overload1]$$$copyDataToqreal* --> <h3 class="fn"><a name="copyDataTo"></a><span class="type">void</span> QMatrix4x4::<span class="name">copyDataTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>values</i> ) const</h3> <p>Retrieves the 16 items in this matrix and copies them to <i>values</i> in row-major order.</p> <!-- @@@copyDataTo --> <!-- $$$data[overload1]$$$data --> <h3 class="fn"><a name="data"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * QMatrix4x4::<span class="name">data</span> ()</h3> <p>Returns a pointer to the raw data of this matrix.</p> <p><b>See also </b><a href="qmatrix4x4.html#constData">constData</a>() and <a href="qmatrix4x4.html#optimize">optimize</a>().</p> <!-- @@@data --> <!-- $$$data$$$data --> <h3 class="fn"><a name="data-2"></a>const <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * QMatrix4x4::<span class="name">data</span> () const</h3> <p>Returns a constant pointer to the raw data of this matrix.</p> <p><b>See also </b><a href="qmatrix4x4.html#constData">constData</a>().</p> <!-- @@@data --> <!-- $$$determinant[overload1]$$$determinant --> <h3 class="fn"><a name="determinant"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QMatrix4x4::<span class="name">determinant</span> () const</h3> <p>Returns the determinant of this matrix.</p> <!-- @@@determinant --> <!-- $$$fill[overload1]$$$fillqreal --> <h3 class="fn"><a name="fill"></a><span class="type">void</span> QMatrix4x4::<span class="name">fill</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>value</i> )</h3> <p>Fills all elements of this matrx with <i>value</i>.</p> <!-- @@@fill --> <!-- $$$flipCoordinates[overload1]$$$flipCoordinates --> <h3 class="fn"><a name="flipCoordinates"></a><span class="type">void</span> QMatrix4x4::<span class="name">flipCoordinates</span> ()</h3> <p>Flips between right-handed and left-handed coordinate systems by multiplying the y and z co-ordinates by -1. This is normally used to create a left-handed orthographic view without scaling the viewport as <a href="qmatrix4x4.html#ortho">ortho</a>() does.</p> <p><b>See also </b><a href="qmatrix4x4.html#ortho">ortho</a>().</p> <!-- @@@flipCoordinates --> <!-- $$$frustum[overload1]$$$frustumqrealqrealqrealqrealqrealqreal --> <h3 class="fn"><a name="frustum"></a><span class="type">void</span> QMatrix4x4::<span class="name">frustum</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>left</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>right</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>bottom</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>top</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>nearPlane</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>farPlane</i> )</h3> <p>Multiplies this matrix by another that applies a perspective frustum projection for a window with lower-left corner (<i>left</i>, <i>bottom</i>), upper-right corner (<i>right</i>, <i>top</i>), and the specified <i>nearPlane</i> and <i>farPlane</i> clipping planes.</p> <p><b>See also </b><a href="qmatrix4x4.html#ortho">ortho</a>() and <a href="qmatrix4x4.html#perspective">perspective</a>().</p> <!-- @@@frustum --> <!-- $$$inverted[overload1]$$$invertedbool* --> <h3 class="fn"><a name="inverted"></a><span class="type">QMatrix4x4</span> QMatrix4x4::<span class="name">inverted</span> ( <span class="type">bool</span> * <i>invertible</i> = 0 ) const</h3> <p>Returns the inverse of this matrix. Returns the identity if this matrix cannot be inverted; i.e. <a href="qmatrix4x4.html#determinant">determinant</a>() is zero. If <i>invertible</i> is not null, then true will be written to that location if the matrix can be inverted; false otherwise.</p> <p>If the matrix is recognized as the identity or an orthonormal matrix, then this function will quickly invert the matrix using optimized routines.</p> <p><b>See also </b><a href="qmatrix4x4.html#determinant">determinant</a>() and <a href="qmatrix4x4.html#normalMatrix">normalMatrix</a>().</p> <!-- @@@inverted --> <!-- $$$isIdentity[overload1]$$$isIdentity --> <h3 class="fn"><a name="isIdentity"></a><span class="type">bool</span> QMatrix4x4::<span class="name">isIdentity</span> () const</h3> <p>Returns true if this matrix is the identity; false otherwise.</p> <p><b>See also </b><a href="qmatrix4x4.html#setToIdentity">setToIdentity</a>().</p> <!-- @@@isIdentity --> <!-- $$$lookAt[overload1]$$$lookAtconstQVector3D&constQVector3D&constQVector3D& --> <h3 class="fn"><a name="lookAt"></a><span class="type">void</span> QMatrix4x4::<span class="name">lookAt</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>eye</i>, const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>center</i>, const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>up</i> )</h3> <p>Multiplies this matrix by another that applies an <i>eye</i> position transformation. The <i>center</i> value indicates the center of the view that the <i>eye</i> is looking at. The <i>up</i> value indicates which direction should be considered up with respect to the <i>eye</i>.</p> <!-- @@@lookAt --> <!-- $$$map[overload1]$$$mapconstQPoint& --> <h3 class="fn"><a name="map"></a><span class="type"><a href="qpoint.html">QPoint</a></span> QMatrix4x4::<span class="name">map</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>point</i> ) const</h3> <p>Maps <i>point</i> by multiplying this matrix by <i>point</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#mapRect">mapRect</a>().</p> <!-- @@@map --> <!-- $$$map$$$mapconstQPointF& --> <h3 class="fn"><a name="map-2"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QMatrix4x4::<span class="name">map</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> & <i>point</i> ) const</h3> <p>Maps <i>point</i> by multiplying this matrix by <i>point</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#mapRect">mapRect</a>().</p> <!-- @@@map --> <!-- $$$map$$$mapconstQVector3D& --> <h3 class="fn"><a name="map-3"></a><span class="type"><a href="qvector3d.html">QVector3D</a></span> QMatrix4x4::<span class="name">map</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>point</i> ) const</h3> <p>Maps <i>point</i> by multiplying this matrix by <i>point</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#mapRect">mapRect</a>() and <a href="qmatrix4x4.html#mapVector">mapVector</a>().</p> <!-- @@@map --> <!-- $$$map$$$mapconstQVector4D& --> <h3 class="fn"><a name="map-4"></a><span class="type"><a href="qvector4d.html">QVector4D</a></span> QMatrix4x4::<span class="name">map</span> ( const <span class="type"><a href="qvector4d.html">QVector4D</a></span> & <i>point</i> ) const</h3> <p>Maps <i>point</i> by multiplying this matrix by <i>point</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#mapRect">mapRect</a>().</p> <!-- @@@map --> <!-- $$$mapRect[overload1]$$$mapRectconstQRect& --> <h3 class="fn"><a name="mapRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QMatrix4x4::<span class="name">mapRect</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> & <i>rect</i> ) const</h3> <p>Maps <i>rect</i> by multiplying this matrix by the corners of <i>rect</i> and then forming a new rectangle from the results. The returned rectangle will be an ordinary 2D rectangle with sides parallel to the horizontal and vertical axes.</p> <p><b>See also </b><a href="qmatrix4x4.html#map">map</a>().</p> <!-- @@@mapRect --> <!-- $$$mapRect$$$mapRectconstQRectF& --> <h3 class="fn"><a name="mapRect-2"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QMatrix4x4::<span class="name">mapRect</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> & <i>rect</i> ) const</h3> <p>Maps <i>rect</i> by multiplying this matrix by the corners of <i>rect</i> and then forming a new rectangle from the results. The returned rectangle will be an ordinary 2D rectangle with sides parallel to the horizontal and vertical axes.</p> <p><b>See also </b><a href="qmatrix4x4.html#map">map</a>().</p> <!-- @@@mapRect --> <!-- $$$mapVector[overload1]$$$mapVectorconstQVector3D& --> <h3 class="fn"><a name="mapVector"></a><span class="type"><a href="qvector3d.html">QVector3D</a></span> QMatrix4x4::<span class="name">mapVector</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i> ) const</h3> <p>Maps <i>vector</i> by multiplying the top 3x3 portion of this matrix by <i>vector</i>. The translation and projection components of this matrix are ignored.</p> <p><b>See also </b><a href="qmatrix4x4.html#map">map</a>().</p> <!-- @@@mapVector --> <!-- $$$normalMatrix[overload1]$$$normalMatrix --> <h3 class="fn"><a name="normalMatrix"></a><span class="type"><a href="qgenericmatrix.html#QMatrix3x3-typedef">QMatrix3x3</a></span> QMatrix4x4::<span class="name">normalMatrix</span> () const</h3> <p>Returns the normal matrix corresponding to this 4x4 transformation. The normal matrix is the transpose of the inverse of the top-left 3x3 part of this 4x4 matrix. If the 3x3 sub-matrix is not invertible, this function returns the identity.</p> <p><b>See also </b><a href="qmatrix4x4.html#inverted">inverted</a>().</p> <!-- @@@normalMatrix --> <!-- $$$optimize[overload1]$$$optimize --> <h3 class="fn"><a name="optimize"></a><span class="type">void</span> QMatrix4x4::<span class="name">optimize</span> ()</h3> <p>Optimize the usage of this matrix from its current elements.</p> <p>Some operations such as <a href="qmatrix4x4.html#translate">translate</a>(), <a href="qmatrix4x4.html#scale">scale</a>(), and <a href="qmatrix4x4.html#rotate">rotate</a>() can be performed more efficiently if the matrix being modified is already known to be the identity, a previous <a href="qmatrix4x4.html#translate">translate</a>(), a previous <a href="qmatrix4x4.html#scale">scale</a>(), etc.</p> <p>Normally the <a href="qmatrix4x4.html">QMatrix4x4</a> class keeps track of this special type internally as operations are performed. However, if the matrix is modified directly with operator()() or <a href="qmatrix4x4.html#data">data</a>(), then <a href="qmatrix4x4.html">QMatrix4x4</a> will lose track of the special type and will revert to the safest but least efficient operations thereafter.</p> <p>By calling optimize() after directly modifying the matrix, the programmer can force <a href="qmatrix4x4.html">QMatrix4x4</a> to recover the special type if the elements appear to conform to one of the known optimized types.</p> <p><b>See also </b><a href="qmatrix4x4.html#operator-28-29">operator</a>()(), <a href="qmatrix4x4.html#data">data</a>(), and <a href="qmatrix4x4.html#translate">translate</a>().</p> <!-- @@@optimize --> <!-- $$$ortho[overload1]$$$orthoqrealqrealqrealqrealqrealqreal --> <h3 class="fn"><a name="ortho"></a><span class="type">void</span> QMatrix4x4::<span class="name">ortho</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>left</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>right</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>bottom</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>top</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>nearPlane</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>farPlane</i> )</h3> <p>Multiplies this matrix by another that applies an orthographic projection for a window with lower-left corner (<i>left</i>, <i>bottom</i>), upper-right corner (<i>right</i>, <i>top</i>), and the specified <i>nearPlane</i> and <i>farPlane</i> clipping planes.</p> <p><b>See also </b><a href="qmatrix4x4.html#frustum">frustum</a>() and <a href="qmatrix4x4.html#perspective">perspective</a>().</p> <!-- @@@ortho --> <!-- $$$ortho$$$orthoconstQRect& --> <h3 class="fn"><a name="ortho-2"></a><span class="type">void</span> QMatrix4x4::<span class="name">ortho</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> & <i>rect</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that applies an orthographic projection for a window with boundaries specified by <i>rect</i>. The near and far clipping planes will be -1 and 1 respectively.</p> <p><b>See also </b><a href="qmatrix4x4.html#frustum">frustum</a>() and <a href="qmatrix4x4.html#perspective">perspective</a>().</p> <!-- @@@ortho --> <!-- $$$ortho$$$orthoconstQRectF& --> <h3 class="fn"><a name="ortho-3"></a><span class="type">void</span> QMatrix4x4::<span class="name">ortho</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> & <i>rect</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that applies an orthographic projection for a window with boundaries specified by <i>rect</i>. The near and far clipping planes will be -1 and 1 respectively.</p> <p><b>See also </b><a href="qmatrix4x4.html#frustum">frustum</a>() and <a href="qmatrix4x4.html#perspective">perspective</a>().</p> <!-- @@@ortho --> <!-- $$$perspective[overload1]$$$perspectiveqrealqrealqrealqreal --> <h3 class="fn"><a name="perspective"></a><span class="type">void</span> QMatrix4x4::<span class="name">perspective</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>aspect</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>nearPlane</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>farPlane</i> )</h3> <p>Multiplies this matrix by another that applies a perspective projection. The field of view will be <i>angle</i> degrees within a window with a given <i>aspect</i> ratio. The projection will have the specified <i>nearPlane</i> and <i>farPlane</i> clipping planes.</p> <p><b>See also </b><a href="qmatrix4x4.html#ortho">ortho</a>() and <a href="qmatrix4x4.html#frustum">frustum</a>().</p> <!-- @@@perspective --> <!-- $$$rotate[overload1]$$$rotateqrealconstQVector3D& --> <h3 class="fn"><a name="rotate"></a><span class="type">void</span> QMatrix4x4::<span class="name">rotate</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>, const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i> )</h3> <p>Multiples this matrix by another that rotates coordinates through <i>angle</i> degrees about <i>vector</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>() and <a href="qmatrix4x4.html#translate">translate</a>().</p> <!-- @@@rotate --> <!-- $$$rotate$$$rotateconstQQuaternion& --> <h3 class="fn"><a name="rotate-2"></a><span class="type">void</span> QMatrix4x4::<span class="name">rotate</span> ( const <span class="type"><a href="qquaternion.html">QQuaternion</a></span> & <i>quaternion</i> )</h3> <p>Multiples this matrix by another that rotates coordinates according to a specified <i>quaternion</i>. The <i>quaternion</i> is assumed to have been normalized.</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>(), <a href="qmatrix4x4.html#translate">translate</a>(), and <a href="qquaternion.html">QQuaternion</a>.</p> <!-- @@@rotate --> <!-- $$$rotate$$$rotateqrealqrealqrealqreal --> <h3 class="fn"><a name="rotate-3"></a><span class="type">void</span> QMatrix4x4::<span class="name">rotate</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>z</i> = 0.0f )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that rotates coordinates through <i>angle</i> degrees about the vector (<i>x</i>, <i>y</i>, <i>z</i>).</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>() and <a href="qmatrix4x4.html#translate">translate</a>().</p> <!-- @@@rotate --> <!-- $$$row[overload1]$$$rowint --> <h3 class="fn"><a name="row"></a><span class="type"><a href="qvector4d.html">QVector4D</a></span> QMatrix4x4::<span class="name">row</span> ( <span class="type">int</span> <i>index</i> ) const</h3> <p>Returns the elements of row <i>index</i> as a 4D vector.</p> <p><b>See also </b><a href="qmatrix4x4.html#setRow">setRow</a>() and <a href="qmatrix4x4.html#column">column</a>().</p> <!-- @@@row --> <!-- $$$scale[overload1]$$$scaleconstQVector3D& --> <h3 class="fn"><a name="scale"></a><span class="type">void</span> QMatrix4x4::<span class="name">scale</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i> )</h3> <p>Multiplies this matrix by another that scales coordinates by the components of <i>vector</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#translate">translate</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@scale --> <!-- $$$scale$$$scaleqrealqreal --> <h3 class="fn"><a name="scale-2"></a><span class="type">void</span> QMatrix4x4::<span class="name">scale</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that scales coordinates by the components <i>x</i>, and <i>y</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#translate">translate</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@scale --> <!-- $$$scale$$$scaleqrealqrealqreal --> <h3 class="fn"><a name="scale-3"></a><span class="type">void</span> QMatrix4x4::<span class="name">scale</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>z</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that scales coordinates by the components <i>x</i>, <i>y</i>, and <i>z</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#translate">translate</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@scale --> <!-- $$$scale$$$scaleqreal --> <h3 class="fn"><a name="scale-4"></a><span class="type">void</span> QMatrix4x4::<span class="name">scale</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that scales coordinates by the given <i>factor</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#translate">translate</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@scale --> <!-- $$$setColumn[overload1]$$$setColumnintconstQVector4D& --> <h3 class="fn"><a name="setColumn"></a><span class="type">void</span> QMatrix4x4::<span class="name">setColumn</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qvector4d.html">QVector4D</a></span> & <i>value</i> )</h3> <p>Sets the elements of column <i>index</i> to the components of <i>value</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#column">column</a>() and <a href="qmatrix4x4.html#setRow">setRow</a>().</p> <!-- @@@setColumn --> <!-- $$$setRow[overload1]$$$setRowintconstQVector4D& --> <h3 class="fn"><a name="setRow"></a><span class="type">void</span> QMatrix4x4::<span class="name">setRow</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qvector4d.html">QVector4D</a></span> & <i>value</i> )</h3> <p>Sets the elements of row <i>index</i> to the components of <i>value</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#row">row</a>() and <a href="qmatrix4x4.html#setColumn">setColumn</a>().</p> <!-- @@@setRow --> <!-- $$$setToIdentity[overload1]$$$setToIdentity --> <h3 class="fn"><a name="setToIdentity"></a><span class="type">void</span> QMatrix4x4::<span class="name">setToIdentity</span> ()</h3> <p>Sets this matrix to the identity.</p> <p><b>See also </b><a href="qmatrix4x4.html#isIdentity">isIdentity</a>().</p> <!-- @@@setToIdentity --> <!-- $$$toAffine[overload1]$$$toAffine --> <h3 class="fn"><a name="toAffine"></a><span class="type"><a href="qmatrix.html">QMatrix</a></span> QMatrix4x4::<span class="name">toAffine</span> () const</h3> <p>Returns the conventional Qt 2D affine transformation matrix that corresponds to this matrix. It is assumed that this matrix only contains 2D affine transformation elements.</p> <p><b>See also </b><a href="qmatrix4x4.html#toTransform">toTransform</a>().</p> <!-- @@@toAffine --> <!-- $$$toGenericMatrix[overload1]$$$toGenericMatrix --> <h3 class="fn"><a name="toGenericMatrix"></a><span class="type"><a href="qgenericmatrix.html">QGenericMatrix</a></span><<span class="type">N</span>, <span class="type">M</span>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span>> QMatrix4x4::<span class="name">toGenericMatrix</span> () const</h3> <p>Constructs a NxM generic matrix from the left-most N columns and top-most M rows of this 4x4 matrix. If N or M is greater than 4, then the remaining elements are filled with elements from the identity matrix.</p> <!-- @@@toGenericMatrix --> <!-- $$$toTransform[overload1]$$$toTransform --> <h3 class="fn"><a name="toTransform"></a><span class="type"><a href="qtransform.html">QTransform</a></span> QMatrix4x4::<span class="name">toTransform</span> () const</h3> <p>Returns the conventional Qt 2D transformation matrix that corresponds to this matrix.</p> <p>The returned <a href="qtransform.html">QTransform</a> is formed by simply dropping the third row and third column of the <a href="qmatrix4x4.html">QMatrix4x4</a>. This is suitable for implementing orthographic projections where the z co-ordinate should be dropped rather than projected.</p> <p><b>See also </b><a href="qmatrix4x4.html#toAffine">toAffine</a>().</p> <!-- @@@toTransform --> <!-- $$$toTransform$$$toTransformqreal --> <h3 class="fn"><a name="toTransform-2"></a><span class="type"><a href="qtransform.html">QTransform</a></span> QMatrix4x4::<span class="name">toTransform</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>distanceToPlane</i> ) const</h3> <p>Returns the conventional Qt 2D transformation matrix that corresponds to this matrix.</p> <p>If <i>distanceToPlane</i> is non-zero, it indicates a projection factor to use to adjust for the z co-ordinate. The value of 1024 corresponds to the projection factor used by <a href="qtransform.html#rotate">QTransform::rotate</a>() for the x and y axes.</p> <p>If <i>distanceToPlane</i> is zero, then the returned <a href="qtransform.html">QTransform</a> is formed by simply dropping the third row and third column of the <a href="qmatrix4x4.html">QMatrix4x4</a>. This is suitable for implementing orthographic projections where the z co-ordinate should be dropped rather than projected.</p> <p><b>See also </b><a href="qmatrix4x4.html#toAffine">toAffine</a>().</p> <!-- @@@toTransform --> <!-- $$$translate[overload1]$$$translateconstQVector3D& --> <h3 class="fn"><a name="translate"></a><span class="type">void</span> QMatrix4x4::<span class="name">translate</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i> )</h3> <p>Multiplies this matrix by another that translates coordinates by the components of <i>vector</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@translate --> <!-- $$$translate$$$translateqrealqreal --> <h3 class="fn"><a name="translate-2"></a><span class="type">void</span> QMatrix4x4::<span class="name">translate</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that translates coordinates by the components <i>x</i>, and <i>y</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@translate --> <!-- $$$translate$$$translateqrealqrealqreal --> <h3 class="fn"><a name="translate-3"></a><span class="type">void</span> QMatrix4x4::<span class="name">translate</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>z</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies this matrix by another that translates coordinates by the components <i>x</i>, <i>y</i>, and <i>z</i>.</p> <p><b>See also </b><a href="qmatrix4x4.html#scale">scale</a>() and <a href="qmatrix4x4.html#rotate">rotate</a>().</p> <!-- @@@translate --> <!-- $$$transposed[overload1]$$$transposed --> <h3 class="fn"><a name="transposed"></a><span class="type">QMatrix4x4</span> QMatrix4x4::<span class="name">transposed</span> () const</h3> <p>Returns this matrix, transposed about its diagonal.</p> <!-- @@@transposed --> <!-- $$$operator QVariant[overload1]$$$operator QVariant --> <h3 class="fn"><a name="operator-QVariant"></a>QMatrix4x4::<span class="name">operator QVariant</span> () const</h3> <p>Returns the matrix as a <a href="qvariant.html">QVariant</a>.</p> <!-- @@@operator QVariant --> <!-- $$$operator!=[overload1]$$$operator!=constQMatrix4x4& --> <h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QMatrix4x4::<span class="name">operator!=</span> ( const <span class="type">QMatrix4x4</span> & <i>other</i> ) const</h3> <p>Returns true if this matrix is not identical to <i>other</i>; false otherwise. This operator uses an exact floating-point comparison.</p> <!-- @@@operator!= --> <!-- $$$operator()[overload1]$$$operator()intint --> <h3 class="fn"><a name="operator-28-29"></a>const <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> & QMatrix4x4::<span class="name">operator()</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> ) const</h3> <p>Returns a constant reference to the element at position (<i>row</i>, <i>column</i>) in this matrix.</p> <p><b>See also </b><a href="qmatrix4x4.html#column">column</a>() and <a href="qmatrix4x4.html#row">row</a>().</p> <!-- @@@operator() --> <!-- $$$operator()$$$operator()intint --> <h3 class="fn"><a name="operator-28-29-2"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> & QMatrix4x4::<span class="name">operator()</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> )</h3> <p>Returns a reference to the element at position (<i>row</i>, <i>column</i>) in this matrix so that the element can be assigned to.</p> <p><b>See also </b><a href="qmatrix4x4.html#optimize">optimize</a>(), <a href="qmatrix4x4.html#setColumn">setColumn</a>(), and <a href="qmatrix4x4.html#setRow">setRow</a>().</p> <!-- @@@operator() --> <!-- $$$operator*=[overload1]$$$operator*=constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-eq"></a><span class="type">QMatrix4x4</span> & QMatrix4x4::<span class="name">operator*=</span> ( const <span class="type">QMatrix4x4</span> & <i>other</i> )</h3> <p>Multiplies the contents of <i>other</i> by this matrix.</p> <!-- @@@operator*= --> <!-- $$$operator*=$$$operator*=qreal --> <h3 class="fn"><a name="operator-2a-eq-2"></a><span class="type">QMatrix4x4</span> & QMatrix4x4::<span class="name">operator*=</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i> )</h3> <p>This is an overloaded function.</p> <p>Multiplies all elements of this matrix by <i>factor</i>.</p> <!-- @@@operator*= --> <!-- $$$operator+=[overload1]$$$operator+=constQMatrix4x4& --> <h3 class="fn"><a name="operator-2b-eq"></a><span class="type">QMatrix4x4</span> & QMatrix4x4::<span class="name">operator+=</span> ( const <span class="type">QMatrix4x4</span> & <i>other</i> )</h3> <p>Adds the contents of <i>other</i> to this matrix.</p> <!-- @@@operator+= --> <!-- $$$operator-=[overload1]$$$operator-=constQMatrix4x4& --> <h3 class="fn"><a name="operator--eq"></a><span class="type">QMatrix4x4</span> & QMatrix4x4::<span class="name">operator-=</span> ( const <span class="type">QMatrix4x4</span> & <i>other</i> )</h3> <p>Subtracts the contents of <i>other</i> from this matrix.</p> <!-- @@@operator-= --> <!-- $$$operator/=[overload1]$$$operator/=qreal --> <h3 class="fn"><a name="operator-2f-eq"></a><span class="type">QMatrix4x4</span> & QMatrix4x4::<span class="name">operator/=</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>divisor</i> )</h3> <p>This is an overloaded function.</p> <p>Divides all elements of this matrix by <i>divisor</i>.</p> <!-- @@@operator/= --> <!-- $$$operator==[overload1]$$$operator==constQMatrix4x4& --> <h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QMatrix4x4::<span class="name">operator==</span> ( const <span class="type">QMatrix4x4</span> & <i>other</i> ) const</h3> <p>Returns true if this matrix is identical to <i>other</i>; false otherwise. This operator uses an exact floating-point comparison.</p> <!-- @@@operator== --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> <!-- $$$qFuzzyCompare$$$qFuzzyCompareconstQMatrix4x4&constQMatrix4x4& --> <h3 class="fn"><a name="qFuzzyCompare-2"></a><span class="type">bool</span> <span class="name">qFuzzyCompare</span> ( const <span class="type">QMatrix4x4</span> & <i>m1</i>, const <span class="type">QMatrix4x4</span> & <i>m2</i> )</h3> <p>Returns true if <i>m1</i> and <i>m2</i> are equal, allowing for a small fuzziness factor for floating-point comparisons; false otherwise.</p> <!-- @@@qFuzzyCompare --> <!-- $$$operator*$$$operator*constQMatrix4x4&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-4"></a><span class="type">QMatrix4x4</span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>m1</i>, const <span class="type">QMatrix4x4</span> & <i>m2</i> )</h3> <p>Returns the product of <i>m1</i> and <i>m2</i>.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQVector3D&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-5"></a><span class="type"><a href="qvector3d.html">QVector3D</a></span> <span class="name">operator*</span> ( const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Returns the result of transforming <i>vector</i> according to <i>matrix</i>, with the matrix applied post-vector.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQMatrix4x4&constQVector3D& --> <h3 class="fn"><a name="operator-2a-6"></a><span class="type"><a href="qvector3d.html">QVector3D</a></span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, const <span class="type"><a href="qvector3d.html">QVector3D</a></span> & <i>vector</i> )</h3> <p>Returns the result of transforming <i>vector</i> according to <i>matrix</i>, with the matrix applied pre-vector.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQVector4D&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-7"></a><span class="type"><a href="qvector4d.html">QVector4D</a></span> <span class="name">operator*</span> ( const <span class="type"><a href="qvector4d.html">QVector4D</a></span> & <i>vector</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Returns the result of transforming <i>vector</i> according to <i>matrix</i>, with the matrix applied post-vector.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQMatrix4x4&constQVector4D& --> <h3 class="fn"><a name="operator-2a-8"></a><span class="type"><a href="qvector4d.html">QVector4D</a></span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, const <span class="type"><a href="qvector4d.html">QVector4D</a></span> & <i>vector</i> )</h3> <p>Returns the result of transforming <i>vector</i> according to <i>matrix</i>, with the matrix applied pre-vector.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQPoint&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-9"></a><span class="type"><a href="qpoint.html">QPoint</a></span> <span class="name">operator*</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>point</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Returns the result of transforming <i>point</i> according to <i>matrix</i>, with the matrix applied post-point.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQPointF&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-10"></a><span class="type"><a href="qpointf.html">QPointF</a></span> <span class="name">operator*</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> & <i>point</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Returns the result of transforming <i>point</i> according to <i>matrix</i>, with the matrix applied post-point.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQMatrix4x4&constQPoint& --> <h3 class="fn"><a name="operator-2a-11"></a><span class="type"><a href="qpoint.html">QPoint</a></span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>point</i> )</h3> <p>Returns the result of transforming <i>point</i> according to <i>matrix</i>, with the matrix applied pre-point.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQMatrix4x4&constQPointF& --> <h3 class="fn"><a name="operator-2a-12"></a><span class="type"><a href="qpointf.html">QPointF</a></span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> & <i>point</i> )</h3> <p>Returns the result of transforming <i>point</i> according to <i>matrix</i>, with the matrix applied pre-point.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*qrealconstQMatrix4x4& --> <h3 class="fn"><a name="operator-2a-13"></a><span class="type">QMatrix4x4</span> <span class="name">operator*</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Returns the result of multiplying all elements of <i>matrix</i> by <i>factor</i>.</p> <!-- @@@operator* --> <!-- $$$operator*$$$operator*constQMatrix4x4&qreal --> <h3 class="fn"><a name="operator-2a-14"></a><span class="type">QMatrix4x4</span> <span class="name">operator*</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i> )</h3> <p>Returns the result of multiplying all elements of <i>matrix</i> by <i>factor</i>.</p> <!-- @@@operator* --> <!-- $$$operator+$$$operator+constQMatrix4x4&constQMatrix4x4& --> <h3 class="fn"><a name="operator-2b-2"></a><span class="type">QMatrix4x4</span> <span class="name">operator+</span> ( const <span class="type">QMatrix4x4</span> & <i>m1</i>, const <span class="type">QMatrix4x4</span> & <i>m2</i> )</h3> <p>Returns the sum of <i>m1</i> and <i>m2</i>.</p> <!-- @@@operator+ --> <!-- $$$operator-$$$operator-constQMatrix4x4&constQMatrix4x4& --> <h3 class="fn"><a name="operator--2"></a><span class="type">QMatrix4x4</span> <span class="name">operator-</span> ( const <span class="type">QMatrix4x4</span> & <i>m1</i>, const <span class="type">QMatrix4x4</span> & <i>m2</i> )</h3> <p>Returns the difference of <i>m1</i> and <i>m2</i>.</p> <!-- @@@operator- --> <!-- $$$operator-$$$operator-constQMatrix4x4& --> <h3 class="fn"><a name="operator--24"></a><span class="type">QMatrix4x4</span> <span class="name">operator-</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>This is an overloaded function.</p> <p>Returns the negation of <i>matrix</i>.</p> <!-- @@@operator- --> <!-- $$$operator/$$$operator/constQMatrix4x4&qreal --> <h3 class="fn"><a name="operator-2f-2"></a><span class="type">QMatrix4x4</span> <span class="name">operator/</span> ( const <span class="type">QMatrix4x4</span> & <i>matrix</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>divisor</i> )</h3> <p>Returns the result of dividing all elements of <i>matrix</i> by <i>divisor</i>.</p> <!-- @@@operator/ --> <!-- $$$operator<<$$$operator<<QDataStream&constQMatrix4x4& --> <h3 class="fn"><a name="operator-lt-lt-25"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & <span class="name">operator<<</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>stream</i>, const <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Writes the given <i>matrix</i> to the given <i>stream</i> and returns a reference to the stream.</p> <p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p> <!-- @@@operator<< --> <!-- $$$operator>>$$$operator>>QDataStream&QMatrix4x4& --> <h3 class="fn"><a name="operator-gt-gt-15"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & <span class="name">operator>></span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>stream</i>, <span class="type">QMatrix4x4</span> & <i>matrix</i> )</h3> <p>Reads a 4x4 matrix from the given <i>stream</i> into the given <i>matrix</i> and returns a reference to the stream.</p> <p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p> <!-- @@@operator>> --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> 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.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> 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. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>