QTextureMaterial Class

class Qt3DExtras::QTextureMaterial

QTextureMaterial は、単純なアンライトテクスチャマテリアルのデフォルト実装を提供します。詳細...

ヘッダー #include <QTextureMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
を継承する: 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)

詳細説明

このマテリアルは、シングルレンダーパスアプローチのエフェクトを使用します。技法はOpenGL 2、OpenGL 3以上、OpenGL ES 2用に提供されています。

プロパティ ドキュメント

alphaBlending : bool

diffuse プロパティから得られるアルファ情報をレンダリング時に考慮するかどうかを示します。デフォルトは false です。

アクセス関数

bool isAlphaBlendingEnabled() const
void setAlphaBlendingEnabled(bool enabled)

通知シグナル:

void alphaBlendingEnabledChanged(bool enabled)

texture : Qt3DRender::QAbstractTexture*

マテリアルで使用されている現在のテクスチャを保持します。

アクセス関数:

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

通知シグナル:

void textureChanged(Qt3DRender::QAbstractTexture *texture)

textureOffset : QVector2D

これはユーティリティ・プロパティです。一般的なテクスチャ変換行列の平行移動成分を設定します。

アクセス関数です:

QVector2D textureOffset() const
void setTextureOffset(QVector2D textureOffset)

通知シグナル

void textureOffsetChanged(QVector2D textureOffset)

textureTransform : QMatrix3x3

現在のテクスチャ変換を保持します。レンダリング時にテクスチャ座標に適用されます。デフォルトは同一行列です。

アクセス関数:

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

通知シグナル:

void textureTransformChanged(const QMatrix3x3 &textureTransform)

メンバ関数 ドキュメント

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

親オブジェクトparent を持つ新しい QTextureMaterial インスタンスを構築します。

[virtual noexcept] QTextureMaterial::~QTextureMaterial()

QTextureMaterial インスタンスを破棄します。

© 2025 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.