<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qtextureimagedata.cpp --> <title>QTextureImageData Class | Qt 3D 5.9</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.9</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-cpp.html">C++ Classes</a></td><td >QTextureImageData</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public 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">QTextureImageData Class</h1> <span class="small-subtitle">(<a href="qt3drender-qtextureimagedata.html">Qt3DRender::QTextureImageData</a>)<br/></span> <!-- $$$QTextureImageData-brief --> <p><a href="qt3drender-qtextureimagedata.html">QTextureImageData</a> stores data representing a texture. <a href="#details">More...</a></p> <!-- @@@QTextureImageData --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QTextureImageData></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3drender</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.5</td></tr></table></div><ul> <li><a href="qt3drender-qtextureimagedata-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#QTextureImageData">QTextureImageData</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#cleanup">cleanup</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#data">data</a></b>(int <i>layer</i> = 0, int <i>face</i> = 0, int <i>mipmapLevel</i> = 0) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#depth">depth</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#faces">faces</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QOpenGLTexture::TextureFormat </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#format">format</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#height">height</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#isCompressed">isCompressed</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#layers">layers</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#mipLevels">mipLevels</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QOpenGLTexture::PixelFormat </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#pixelFormat">pixelFormat</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QOpenGLTexture::PixelType </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#pixelType">pixelType</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setData">setData</a></b>(const QByteArray &<i>data</i>, int <i>blockSize</i>, bool <i>isCompressed</i> = false)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setDepth">setDepth</a></b>(int <i>depth</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setFaces">setFaces</a></b>(int <i>faces</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setFormat">setFormat</a></b>(QOpenGLTexture::TextureFormat <i>format</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setHeight">setHeight</a></b>(int <i>height</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setImage">setImage</a></b>(const QImage &<i>image</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setLayers">setLayers</a></b>(int <i>layers</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setMipLevels">setMipLevels</a></b>(int <i>mipLevels</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setPixelFormat">setPixelFormat</a></b>(QOpenGLTexture::PixelFormat <i>pixelFormat</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setPixelType">setPixelType</a></b>(QOpenGLTexture::PixelType <i>pixelType</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setTarget">setTarget</a></b>(QOpenGLTexture::Target <i>target</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#setWidth">setWidth</a></b>(int <i>width</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QOpenGLTexture::Target </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#target">target</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#width">width</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextureImageData &</td><td class="memItemRight bottomAlign"><b><a href="qt3drender-qtextureimagedata.html#operator-eq">operator=</a></b>(const QTextureImageData &<i>other</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QTextureImageData-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p><a href="qt3drender-qtextureimagedata.html">QTextureImageData</a> stores data representing a texture.</p> </div> <!-- @@@QTextureImageData --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QTextureImageData[overload1]$$$QTextureImageData --> <h3 class="fn" id="QTextureImageData"><a name="QTextureImageData"></a>QTextureImageData::<span class="name">QTextureImageData</span>()</h3> <p>Constructs a new <a href="qt3drender-qtextureimagedata.html">Qt3DRender::QTextureImageData</a>.</p> <!-- @@@QTextureImageData --> <!-- $$$cleanup[overload1]$$$cleanup --> <h3 class="fn" id="cleanup"><a name="cleanup"></a><span class="type">void</span> QTextureImageData::<span class="name">cleanup</span>()</h3> <p>Remove stored texture data and return the object to its initial state</p> <!-- @@@cleanup --> <!-- $$$data[overload1]$$$dataintintint --> <h3 class="fn" id="data"><a name="data"></a><span class="type">QByteArray</span> QTextureImageData::<span class="name">data</span>(<span class="type">int</span> <i>layer</i> = 0, <span class="type">int</span> <i>face</i> = 0, <span class="type">int</span> <i>mipmapLevel</i> = 0) const</h3> <p>Returns the raw image data for the texture at layer <i>layer</i>, face <i>face</i> and mipmapLevel <i>mipmapLevel</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setData">setData</a>().</p> <!-- @@@data --> <!-- $$$depth[overload1]$$$depth --> <h3 class="fn" id="depth"><a name="depth"></a><span class="type">int</span> QTextureImageData::<span class="name">depth</span>() const</h3> <p>Returns the depth of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setDepth">setDepth</a>().</p> <!-- @@@depth --> <!-- $$$faces[overload1]$$$faces --> <h3 class="fn" id="faces"><a name="faces"></a><span class="type">int</span> QTextureImageData::<span class="name">faces</span>() const</h3> <p>Returns the number of faces in the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setFaces">setFaces</a>().</p> <!-- @@@faces --> <!-- $$$format[overload1]$$$format --> <h3 class="fn" id="format"><a name="format"></a><span class="type">QOpenGLTexture::TextureFormat</span> QTextureImageData::<span class="name">format</span>() const</h3> <p>Returns the format of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setFormat">setFormat</a>().</p> <!-- @@@format --> <!-- $$$height[overload1]$$$height --> <h3 class="fn" id="height"><a name="height"></a><span class="type">int</span> QTextureImageData::<span class="name">height</span>() const</h3> <p>Returns the height of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setHeight">setHeight</a>().</p> <!-- @@@height --> <!-- $$$isCompressed[overload1]$$$isCompressed --> <h3 class="fn" id="isCompressed"><a name="isCompressed"></a><span class="type">bool</span> QTextureImageData::<span class="name">isCompressed</span>() const</h3> <p>Returns true if the stored texture is in a compressed format</p> <!-- @@@isCompressed --> <!-- $$$layers[overload1]$$$layers --> <h3 class="fn" id="layers"><a name="layers"></a><span class="type">int</span> QTextureImageData::<span class="name">layers</span>() const</h3> <p>Returns the number of layers in the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setLayers">setLayers</a>().</p> <!-- @@@layers --> <!-- $$$mipLevels[overload1]$$$mipLevels --> <h3 class="fn" id="mipLevels"><a name="mipLevels"></a><span class="type">int</span> QTextureImageData::<span class="name">mipLevels</span>() const</h3> <p>Returns the number of mip levels in the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setMipLevels">setMipLevels</a>().</p> <!-- @@@mipLevels --> <!-- $$$pixelFormat[overload1]$$$pixelFormat --> <h3 class="fn" id="pixelFormat"><a name="pixelFormat"></a><span class="type">QOpenGLTexture::PixelFormat</span> QTextureImageData::<span class="name">pixelFormat</span>() const</h3> <p>Returns the pixel format of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setPixelFormat">setPixelFormat</a>().</p> <!-- @@@pixelFormat --> <!-- $$$pixelType[overload1]$$$pixelType --> <h3 class="fn" id="pixelType"><a name="pixelType"></a><span class="type">QOpenGLTexture::PixelType</span> QTextureImageData::<span class="name">pixelType</span>() const</h3> <p>Returns the pixel type of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setPixelType">setPixelType</a>().</p> <!-- @@@pixelType --> <!-- $$$setData[overload1]$$$setDataconstQByteArray&intbool --> <h3 class="fn" id="setData"><a name="setData"></a><span class="type">void</span> QTextureImageData::<span class="name">setData</span>(const <span class="type">QByteArray</span> &<i>data</i>, <span class="type">int</span> <i>blockSize</i>, <span class="type">bool</span> <i>isCompressed</i> = false)</h3> <p>Store the data <i>data</i> with blocksize <i>blockSize</i> and if the data to be stored is compressed <i>isCompressed</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#data">data</a>().</p> <!-- @@@setData --> <!-- $$$setDepth[overload1]$$$setDepthint --> <h3 class="fn" id="setDepth"><a name="setDepth"></a><span class="type">void</span> QTextureImageData::<span class="name">setDepth</span>(<span class="type">int</span> <i>depth</i>)</h3> <p>Sets the depth to <i>depth</i>. <i>setDepth</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#depth">depth</a>().</p> <!-- @@@setDepth --> <!-- $$$setFaces[overload1]$$$setFacesint --> <h3 class="fn" id="setFaces"><a name="setFaces"></a><span class="type">void</span> QTextureImageData::<span class="name">setFaces</span>(<span class="type">int</span> <i>faces</i>)</h3> <p>Sets the faces to <i>faces</i>. <i>setFaces</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#faces">faces</a>().</p> <!-- @@@setFaces --> <!-- $$$setFormat[overload1]$$$setFormatQOpenGLTexture::TextureFormat --> <h3 class="fn" id="setFormat"><a name="setFormat"></a><span class="type">void</span> QTextureImageData::<span class="name">setFormat</span>(<span class="type">QOpenGLTexture::TextureFormat</span> <i>format</i>)</h3> <p>Sets the format to <i>format</i>. <i></i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#format">format</a>().</p> <!-- @@@setFormat --> <!-- $$$setHeight[overload1]$$$setHeightint --> <h3 class="fn" id="setHeight"><a name="setHeight"></a><span class="type">void</span> QTextureImageData::<span class="name">setHeight</span>(<span class="type">int</span> <i>height</i>)</h3> <p>Sets the height to <i>height</i>. <i>setHeight</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#height">height</a>().</p> <!-- @@@setHeight --> <!-- $$$setImage[overload1]$$$setImageconstQImage& --> <h3 class="fn" id="setImage"><a name="setImage"></a><span class="type">void</span> QTextureImageData::<span class="name">setImage</span>(const <span class="type">QImage</span> &<i>image</i>)</h3> <p>Copies the image <i>image</i> as raw data within this object</p> <!-- @@@setImage --> <!-- $$$setLayers[overload1]$$$setLayersint --> <h3 class="fn" id="setLayers"><a name="setLayers"></a><span class="type">void</span> QTextureImageData::<span class="name">setLayers</span>(<span class="type">int</span> <i>layers</i>)</h3> <p>Sets the layers to <i>layers</i>. <i>setLayers</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#layers">layers</a>().</p> <!-- @@@setLayers --> <!-- $$$setMipLevels[overload1]$$$setMipLevelsint --> <h3 class="fn" id="setMipLevels"><a name="setMipLevels"></a><span class="type">void</span> QTextureImageData::<span class="name">setMipLevels</span>(<span class="type">int</span> <i>mipLevels</i>)</h3> <p>Sets the mip levels to <i>mipLevels</i>. <i>setMipLevels</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#mipLevels">mipLevels</a>().</p> <!-- @@@setMipLevels --> <!-- $$$setPixelFormat[overload1]$$$setPixelFormatQOpenGLTexture::PixelFormat --> <h3 class="fn" id="setPixelFormat"><a name="setPixelFormat"></a><span class="type">void</span> QTextureImageData::<span class="name">setPixelFormat</span>(<span class="type">QOpenGLTexture::PixelFormat</span> <i>pixelFormat</i>)</h3> <p>Sets the pixel format to <i>pixelFormat</i>. <i>setPixelFormat</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#pixelFormat">pixelFormat</a>().</p> <!-- @@@setPixelFormat --> <!-- $$$setPixelType[overload1]$$$setPixelTypeQOpenGLTexture::PixelType --> <h3 class="fn" id="setPixelType"><a name="setPixelType"></a><span class="type">void</span> QTextureImageData::<span class="name">setPixelType</span>(<span class="type">QOpenGLTexture::PixelType</span> <i>pixelType</i>)</h3> <p>Sets the pixel type to <i>pixelType</i> <i>setPixelType</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#pixelType">pixelType</a>().</p> <!-- @@@setPixelType --> <!-- $$$setTarget[overload1]$$$setTargetQOpenGLTexture::Target --> <h3 class="fn" id="setTarget"><a name="setTarget"></a><span class="type">void</span> QTextureImageData::<span class="name">setTarget</span>(<span class="type">QOpenGLTexture::Target</span> <i>target</i>)</h3> <p>Sets the target to <i>target</i>. <i>target</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#target">target</a>().</p> <!-- @@@setTarget --> <!-- $$$setWidth[overload1]$$$setWidthint --> <h3 class="fn" id="setWidth"><a name="setWidth"></a><span class="type">void</span> QTextureImageData::<span class="name">setWidth</span>(<span class="type">int</span> <i>width</i>)</h3> <p>Sets the width to <i>width</i>. <i>setWidth</i></p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#width">width</a>().</p> <!-- @@@setWidth --> <!-- $$$target[overload1]$$$target --> <h3 class="fn" id="target"><a name="target"></a><span class="type">QOpenGLTexture::Target</span> QTextureImageData::<span class="name">target</span>() const</h3> <p>Returns the target for the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setTarget">setTarget</a>().</p> <!-- @@@target --> <!-- $$$width[overload1]$$$width --> <h3 class="fn" id="width"><a name="width"></a><span class="type">int</span> QTextureImageData::<span class="name">width</span>() const</h3> <p>Returns the width of the stored texture</p> <p><b>See also </b><a href="qt3drender-qtextureimagedata.html#setWidth">setWidth</a>().</p> <!-- @@@width --> <!-- $$$operator=[overload1]$$$operator=constQTextureImageData& --> <h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qt3drender-qtextureimagedata.html#QTextureImageData">QTextureImageData</a></span> &QTextureImageData::<span class="name">operator=</span>(const <span class="type"><a href="qt3drender-qtextureimagedata.html#QTextureImageData">QTextureImageData</a></span> &<i>other</i>)</h3> <p>Copy-assignment operator.</p><!-- @@@operator= --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 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>