QAttribute Class
class Qt3DCore::QAttributeヘッダー | #include <Qt3DCore/QAttribute> |
CMakeの | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake | QT += 3dcore |
QML で | Attribute |
を継承しています: | Qt3DCore::QNode |
ステータス | 非推奨 |
パブリックな型
enum | AttributeType { VertexAttribute, IndexAttribute, DrawIndirectAttribute } |
enum | VertexBaseType { Byte, UnsignedByte, Short, UnsignedShort, Int, …, Double } |
プロパティ
|
|
パブリック機能
QAttribute(Qt3DCore::QNode *parent = nullptr) | |
QAttribute(Qt3DCore::QBuffer *buf, Qt3DCore::QAttribute::VertexBaseType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, Qt3DCore::QNode *parent = nullptr) | |
QAttribute(Qt3DCore::QBuffer *buf, const QString &name, Qt3DCore::QAttribute::VertexBaseType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, Qt3DCore::QNode *parent = nullptr) | |
Qt3DCore::QAttribute::AttributeType | attributeType() const |
Qt3DCore::QBuffer * | buffer() const |
uint | byteOffset() const |
uint | byteStride() const |
uint | count() const |
uint | divisor() const |
QString | name() const |
Qt3DCore::QAttribute::VertexBaseType | vertexBaseType() const |
uint | vertexSize() const |
パブリックスロット
void | setAttributeType(Qt3DCore::QAttribute::AttributeType attributeType) |
void | setBuffer(Qt3DCore::QBuffer *buffer) |
void | setByteOffset(uint byteOffset) |
void | setByteStride(uint byteStride) |
void | setCount(uint count) |
void | setDivisor(uint divisor) |
void | setName(const QString &name) |
void | setVertexBaseType(Qt3DCore::QAttribute::VertexBaseType type) |
void | setVertexSize(uint size) |
シグナル
void | attributeTypeChanged(Qt3DCore::QAttribute::AttributeType attributeType) |
void | bufferChanged(Qt3DCore::QBuffer *buffer) |
void | byteOffsetChanged(uint byteOffset) |
void | byteStrideChanged(uint byteStride) |
void | countChanged(uint count) |
void | dataSizeChanged(uint vertexSize) |
void | dataTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType) |
void | divisorChanged(uint divisor) |
void | nameChanged(const QString &name) |
void | vertexBaseTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType) |
void | vertexSizeChanged(uint vertexSize) |
静的パブリックメンバー
QString | defaultColorAttributeName() |
QString | defaultJointIndicesAttributeName() |
QString | defaultJointWeightsAttributeName() |
QString | defaultNormalAttributeName() |
QString | defaultPositionAttributeName() |
QString | defaultTangentAttributeName() |
QString | defaultTextureCoordinate1AttributeName() |
QString | defaultTextureCoordinate2AttributeName() |
QString | defaultTextureCoordinateAttributeName() |
関連する非メンバー
詳細説明
アトリビュートには3つのタイプがある。
- VertexAttribute頂点ごとに読み込むデータを定義する。
- IndexAttributeインデックス化された描画コールを使用する場合に、頂点インデックスを定義するために使用します。
- DrawIndirectAttribute間接的な描画コールを使用する場合に使用する DrawIndirect バッファを指定するために使用します。
注意: アトリビュートがDrawIndirectAttribute 型の場合、count、stride、offset のみが関連します。
独自のアトリビュートを指定する場合、QAttribute::defaultPositionAttributeName() のようなヘルパーを使用してアトリビュートに名前を付けると、ジオメトリがピッキングや、Qt3DExtras モジュールで提供されるさまざまなマテリアルと互換性が保たれます。
QBufferも参照して ください。
メンバ型のドキュメント
enum QAttribute::AttributeType
属性のタイプ。
定数 | 値 |
---|---|
Qt3DCore::QAttribute::VertexAttribute | 0 |
Qt3DCore::QAttribute::IndexAttribute | 1 |
Qt3DCore::QAttribute::DrawIndirectAttribute | 2 |
enum QAttribute::VertexBaseType
データの型。
定数 | 値 |
---|---|
Qt3DCore::QAttribute::Byte | 0 |
Qt3DCore::QAttribute::UnsignedByte | 1 |
Qt3DCore::QAttribute::Short | 2 |
Qt3DCore::QAttribute::UnsignedShort | 3 |
Qt3DCore::QAttribute::Int | 4 |
Qt3DCore::QAttribute::UnsignedInt | 5 |
Qt3DCore::QAttribute::HalfFloat | 6 |
Qt3DCore::QAttribute::Float | 7 |
Qt3DCore::QAttribute::Double | 8 |
プロパティの説明
attributeType : AttributeType
属性タイプを保持します。
アクセス関数:
Qt3DCore::QAttribute::AttributeType | attributeType() const |
void | setAttributeType(Qt3DCore::QAttribute::AttributeType attributeType) |
通知シグナル
void | attributeTypeChanged(Qt3DCore::QAttribute::AttributeType attributeType) |
buffer : Qt3DCore::QBuffer*
バッファを保持する。
アクセス関数:
Qt3DCore::QBuffer * | buffer() const |
void | setBuffer(Qt3DCore::QBuffer *buffer) |
通知シグナル:
void | bufferChanged(Qt3DCore::QBuffer *buffer) |
byteOffset : uint
バイトオフセットを保持します。
アクセス関数:
uint | byteOffset() const |
void | setByteOffset(uint byteOffset) |
通知シグナル:
void | byteOffsetChanged(uint byteOffset) |
byteStride : uint
バイト列を保持する。
アクセス関数:
uint | byteStride() const |
void | setByteStride(uint byteStride) |
通知シグナル:
void | byteStrideChanged(uint byteStride) |
count : uint
カウントを保持します。
アクセス機能:
uint | count() const |
void | setCount(uint count) |
通知シグナル
void | countChanged(uint count) |
divisor : uint
除数を保持します。
アクセス関数:
uint | divisor() const |
void | setDivisor(uint divisor) |
通知シグナル
void | divisorChanged(uint divisor) |
name : QString
名前を保持します。
アクセス機能:
QString | name() const |
void | setName(const QString &name) |
通知シグナル
void | nameChanged(const QString &name) |
vertexBaseType : VertexBaseType
データ型を保持します。
アクセス関数:
Qt3DCore::QAttribute::VertexBaseType | vertexBaseType() const |
void | setVertexBaseType(Qt3DCore::QAttribute::VertexBaseType type) |
通知シグナル:
void | vertexBaseTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType) |
vertexSize : uint
1~4単位(スカラーとベクトル)、9単位(3x3行列)、16単位(4x4行列)のみ。
アクセス関数:
uint | vertexSize() const |
void | setVertexSize(uint size) |
通知シグナル:
void | vertexSizeChanged(uint vertexSize) |
メンバ関数ドキュメント
[explicit]
QAttribute::QAttribute(Qt3DCore::QNode *parent = nullptr)
新しい QAttribute をparent で構築します。
[explicit]
QAttribute::QAttribute(Qt3DCore::QBuffer *buf, Qt3DCore::QAttribute::VertexBaseType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, Qt3DCore::QNode *parent = nullptr)
type,dataSize,count,offset,stride のbuf とparent から新しい QAttribute を構築する。
[explicit]
QAttribute::QAttribute(Qt3DCore::QBuffer *buf, const QString &name, Qt3DCore::QAttribute::VertexBaseType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, Qt3DCore::QNode *parent = nullptr)
type,dataSize,count,offset, およびstride のbuf から、parent を用いてname という新しい QAttribute を構築する。
[signal]
void QAttribute::dataSizeChanged(uint vertexSize)
dataSizeが変更されると、vertexSize 。
[signal]
void QAttribute::dataTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType)
このシグナルは、dataTypeが変更されたときにvertexBaseType 。
[static invokable]
QString QAttribute::defaultColorAttributeName()
QAttribute::defaultColorAttributeName デフォルトの色属性名を返します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
注意 : defaultColorAttributeName プロパティのゲッター関数です。
[static]
QString QAttribute::defaultJointIndicesAttributeName()
QAttribute::defaultJointIndicesAttributeName デフォルトの関節指標属性の名前を返します。
注意: defaultJointIndicesAttributeName プロパティのゲッター関数です。
[static]
QString QAttribute::defaultJointWeightsAttributeName()
QAttribute::defaultJointIndicesAttributeName デフォルトジョイントウェイト属性の名前を返します。
注: defaultJointWeightsAttributeName プロパティのゲッター関数です。
[static invokable]
QString QAttribute::defaultNormalAttributeName()
QAttribute::defaultNormalAttributeName デフォルトの通常属性の名前を返します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
注釈 defaultNormalAttributeName プロパティのゲッター関数です。
[static invokable]
QString QAttribute::defaultPositionAttributeName()
QAttribute::defaultPositionAttributeName デフォルトの位置属性名を返します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
注釈 defaultPositionAttributeName プロパティのゲッター関数です。
[static invokable]
QString QAttribute::defaultTangentAttributeName()
QAttribute::defaultTangentAttributeName デフォルトの接線属性の名前を返します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
注意 : defaultTangentAttributeName プロパティのゲッター関数です。
[static]
QString QAttribute::defaultTextureCoordinate1AttributeName()
QAttribute::defaultTextureCoordinate1AttributeName テクスチャ座標の 2 階層目のデフォルト属性の名前を返します。
注: プロパティdefaultTextureCoordinate1AttributeNameのゲッター関数です。
[static]
QString QAttribute::defaultTextureCoordinate2AttributeName()
QAttribute::defaultTextureCoordinate2AttributeName テクスチャ座標の 3 階層目のデフォルト属性の名前を返します。
注: プロパティdefaultTextureCoordinate2AttributeNameのゲッター関数です。
[static invokable]
QString QAttribute::defaultTextureCoordinateAttributeName()
QAttribute::defaultTextureCoordinateAttributeName デフォルトのテクスチャ座標属性名を返します。
注意: この関数は、メタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
注 : defaultTextureCoordinateAttributeName プロパティのゲッター関数です。
© 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.