Qt3DCore::QAttribute Class
class Qt3DCore::QAttribute속성을 정의하고, 데이터가 ` QBuffer`에서 어떻게 읽혀야 하는지를 지정합니다. 더 보기...
| 헤더: | #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) |
[read-only] defaultColorAttributeName : const QString
이 속성은 기본 색상 속성의 이름을 저장합니다.
기본 색상 속성의 이름을 반환합니다: "vertexColor".
액세스 함수:
| QString | defaultColorAttributeName() | [see note below] |
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[read-only] defaultJointIndicesAttributeName : const QString
이 속성은 기본 조인트 인덱스 속성의 이름을 저장합니다.
기본 조인트 인덱스 속성의 이름을 반환합니다: "vertexJointIndices".
액세스 함수:
| QString | defaultJointIndicesAttributeName() |
[read-only] defaultJointWeightsAttributeName : const QString
이 속성은 기본 조인트 가중치 속성의 이름을 저장합니다.
기본 조인트 가중치 속성의 이름을 반환합니다: "vertexJointWeights".
액세스 함수:
| QString | defaultJointWeightsAttributeName() |
[read-only] defaultNormalAttributeName : const QString
이 속성은 기본 노멀 속성의 이름을 저장합니다.
기본 노멀 속성의 이름인 "vertexNormal"을 반환합니다.
액세스 함수:
| QString | defaultNormalAttributeName() | [see note below] |
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[read-only] defaultPositionAttributeName : const QString
이 속성은 기본 위치 속성의 이름을 저장합니다.
기본 위치 속성의 이름을 반환합니다: "vertexPosition".
액세스 함수:
| QString | defaultPositionAttributeName() | [see note below] |
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[read-only] defaultTangentAttributeName : const QString
이 속성은 기본 탄젠트 속성의 이름을 저장합니다.
기본 탄젠트 속성의 이름을 반환합니다: "vertexTangent".
액세스 함수:
| QString | defaultTangentAttributeName() | [see note below] |
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[read-only] defaultTextureCoordinate1AttributeName : const QString
이 속성은 텍스처 좌표의 두 번째 레이어에 대한 기본 속성의 이름을 저장합니다.
텍스처 좌표의 두 번째 레이어에 대한 기본 속성의 이름을 반환합니다: "vertexTexCoord1".
액세스 함수:
| QString | defaultTextureCoordinate1AttributeName() |
[read-only] defaultTextureCoordinate2AttributeName : const QString
이 속성은 텍스처 좌표의 세 번째 레이어에 대한 기본 속성의 이름을 저장합니다.
텍스처 좌표의 세 번째 레이어에 대한 기본 속성의 이름을 반환합니다: "vertexTexCoord2".
액세스 함수:
| QString | defaultTextureCoordinate2AttributeName() |
[read-only] defaultTextureCoordinateAttributeName : const QString
이 속성은 기본 텍스처 좌표 속성의 이름을 저장합니다.
기본 텍스처 좌표 속성의 이름을 반환합니다: "vertexTexCoord".
액세스 함수:
| QString | defaultTextureCoordinateAttributeName() | [see note below] |
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
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)
parent 를 사용하여 새로운 QAttribute 객체를 생성합니다.
[explicit] QAttribute::QAttribute(Qt3DCore::QBuffer *buf, Qt3DCore::QAttribute::VertexBaseType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, Qt3DCore::QNode *parent = nullptr)
buf 의 type, dataSize, count, offset, stride 을 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 텍스처 좌표의 두 번째 레이어에 대한 기본 속성의 이름을 반환합니다.
참고: defaultTextureCoordinate1AttributeName 속성에 대한게터 함수입니다.
[static] QString QAttribute::defaultTextureCoordinate2AttributeName()
QAttribute::defaultTextureCoordinate2AttributeName 텍스처 좌표의 세 번째 레이어에 대한 기본 속성의 이름을 반환합니다.
참고: defaultTextureCoordinate2AttributeName 속성에 대한게터 함수입니다.
[static invokable] QString QAttribute::defaultTextureCoordinateAttributeName()
QAttribute::defaultTextureCoordinateAttributeName 기본 텍스처 좌표 속성의 이름을 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
참고: defaultTextureCoordinateAttributeName 속성에 대한게터 함수입니다.
© 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.