In questa pagina

Qt3DExtras::QTextureMaterial Class

class Qt3DExtras::QTextureMaterial

QTextureMaterial fornisce un'implementazione predefinita di un semplice materiale con texture non illuminata. Per saperne di più...

Intestazione: #include <qtexturematerial.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
Eredita da: Qt3DRender::QMaterial
Stato: Obsoleta

Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.

Proprietà

Funzioni pubbliche

QTextureMaterial(Qt3DCore::QNode *parent = nullptr)
virtual ~QTextureMaterial()
bool isAlphaBlendingEnabled() const
Qt3DRender::QAbstractTexture *texture() const
QVector2D textureOffset() const
QMatrix3x3 textureTransform() const

Slot pubblici

void setAlphaBlendingEnabled(bool enabled)
void setTexture(Qt3DRender::QAbstractTexture *texture)
void setTextureOffset(QVector2D textureOffset)
void setTextureTransform(const QMatrix3x3 &matrix)

Segnali

void alphaBlendingEnabledChanged(bool enabled)
void textureChanged(Qt3DRender::QAbstractTexture *texture)
void textureOffsetChanged(QVector2D textureOffset)
void textureTransformChanged(const QMatrix3x3 &textureTransform)

Descrizione dettagliata

Questo materiale utilizza un effetto basato su un unico passaggio di rendering. Sono fornite tecniche per OpenGL 2, OpenGL 3 o versioni successive, nonché per OpenGL ES 2.

Documentazione delle proprietà

alphaBlending : bool

Indica se le informazioni alfa provenienti dalla proprietà "diffuse" verranno prese in considerazione durante il rendering. Il valore predefinito è false.

Funzioni di accesso:

bool isAlphaBlendingEnabled() const
void setAlphaBlendingEnabled(bool enabled)

Segnale del notificatore:

void alphaBlendingEnabledChanged(bool enabled)

texture : Qt3DRender::QAbstractTexture*

Contiene la texture attualmente utilizzata dal materiale.

Funzioni di accesso:

Qt3DRender::QAbstractTexture *texture() const
void setTexture(Qt3DRender::QAbstractTexture *texture)

Segnale di notifica:

void textureChanged(Qt3DRender::QAbstractTexture *texture)

textureOffset : QVector2D

Si tratta di una proprietà di utilità. Imposta la componente di traslazione della matrice di trasformazione generale della texture

Funzioni di accesso:

QVector2D textureOffset() const
void setTextureOffset(QVector2D textureOffset)

Segnale di notifica:

void textureOffsetChanged(QVector2D textureOffset)

textureTransform : QMatrix3x3

Contiene la trasformazione corrente della texture. Viene applicata alle coordinate della texture in fase di rendering. Il valore predefinito è la matrice identità.

Funzioni di accesso:

QMatrix3x3 textureTransform() const
void setTextureTransform(const QMatrix3x3 &matrix)

Segnale di notifica:

void textureTransformChanged(const QMatrix3x3 &textureTransform)

Documentazione delle funzioni membro

[explicit] QTextureMaterial::QTextureMaterial(Qt3DCore::QNode *parent = nullptr)

Crea una nuova istanza di QTextureMaterial con oggetto padre parent.

[virtual noexcept] QTextureMaterial::~QTextureMaterial()

Elimina l'istanza di QTextureMaterial.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.