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 |
상태: | Deprecated |
공용 유형
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 유형인 경우 카운트, 보폭, 오프셋만 관련이 있습니다.
자체 속성을 제공할 때는 QAttribute::defaultPositionAttributeName()와 같은 헬퍼를 사용하여 속성 이름을 지정하면 지오메트리가 선택 및 Qt3DExtras 모듈에서 제공하는 다양한 재질과 호환되므로 유용할 수 있습니다.
QBuffer 를참조하십시오 .
멤버 유형 문서
enum QAttribute::AttributeType
속성의 유형입니다.
Constant | 값 |
---|---|
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)
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)
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)
데이터 사이즈가 변경되면 vertexSize 으로 신호가 전송됩니다.
[signal]
void QAttribute::dataTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType)
데이터 유형이 변경되면 vertexBaseType 으로 신호가 전송됩니다.
[static invokable]
QString QAttribute::defaultColorAttributeName()
QAttribute::defaultColorAttributeName 기본 색상 속성의 이름을 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
참고: defaultColorAttributeName 속성에 대한 게터 함수입니다.
[static]
QString QAttribute::defaultJointIndicesAttributeName()
QAttribute::defaultJointIndicesAttributeName 기본 조인트 인덱스 속성의 이름을 반환합니다.
참고: 기본 조인트 인덱스 어트리뷰트 이름 프로퍼티에 대한 겟터 함수입니다.
[static]
QString QAttribute::defaultJointWeightsAttributeName()
QAttribute::defaultJointIndicesAttributeName 기본 조인트 가중치 속성의 이름을 반환합니다.
참고: 기본 조인트 웨이트 어트리뷰트 이름 프로퍼티에 대한 겟터 함수입니다.
[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 을 참조하세요.
참고: 기본 탄젠트 어트리뷰트 이름 프로퍼티에 대한 게터 함수입니다.
[static]
QString QAttribute::defaultTextureCoordinate1AttributeName()
QAttribute::defaultTextureCordinate1AttributeName 텍스처 좌표의 두 번째 레이어에 대한 기본 어트리뷰트의 이름을 반환합니다.
참고: defaultTextureCoordinate1AttributeName 프로퍼티에 대한 겟터 함수입니다.
[static]
QString QAttribute::defaultTextureCoordinate2AttributeName()
QAttribute::defaultTextureCordinate2AttributeName 텍스처 좌표의 세 번째 레이어에 대한 기본 어트리뷰트의 이름을 반환합니다.
참고: defaultTextureCoordinate2AttributeName 프로퍼티에 대한 겟터 함수입니다.
[static invokable]
QString QAttribute::defaultTextureCoordinateAttributeName()
QAttribute::defaultTextureCoordinateAttributeName 기본 텍스처 좌표 어트리뷰트의 이름을 반환합니다.
참고: 이 함수는 메타 오브젝트 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.
참고: 기본 텍스처 좌표 어트리뷰트 이름 프로퍼티에 대한 게터 함수입니다.
© 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.