QTextureMaterial Class

( Qt3DExtras::QTextureMaterial )

The QTextureMaterial provides a default implementation of a simple unlit texture material. 更多...

頭: #include <QTextureMaterial>
qmake: QT += 3dextras
Since: Qt 5.9
繼承: Qt3DRender::QMaterial

特性

公共函數

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

公共槽

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

信號

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

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

The QTextureMaterial provides a default implementation of a simple unlit texture material.

This material uses an effect with a single render pass approach. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.

特性文檔編製

alphaBlending : bool

Indicates if the alpha information coming from the diffuse property will be taken into account during rendering. Defaults to false.

訪問函數:

bool isAlphaBlendingEnabled () const
void setAlphaBlendingEnabled (bool enabled )

通知程序信號:

void alphaBlendingEnabledChanged (bool enabled )

texture : Qt3DRender::QAbstractTexture *

Holds the current texture used by the material.

訪問函數:

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

通知程序信號:

void textureChanged (Qt3DRender::QAbstractTexture * texture )

textureOffset : QVector2D

This is a utility property. It sets the translation component of the general texture transform matrix

訪問函數:

QVector2D textureOffset () const
void setTextureOffset (QVector2D textureOffset )

通知程序信號:

void textureOffsetChanged (QVector2D textureOffset )

textureTransform : QMatrix3x3

Holds the current texture transform. It is applied to texture coordinates at render time. Defaults to identity matrix.

訪問函數:

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

通知程序信號:

void textureTransformChanged (const QMatrix3x3 & textureTransform )

成員函數文檔編製

QTextureMaterial:: QTextureMaterial ( Qt3DCore::QNode * parent = nullptr)

構造新的 QTextureMaterial instance with parent object parent .

[虛擬] QTextureMaterial:: ~QTextureMaterial ()

銷毀 QTextureMaterial 實例。