QAbstractAttribute Class

(Qt3DRender::QAbstractAttribute)
Header: #include <QAbstractAttribute>
qmake: QT += 3drender
Instantiated By: AbstractAttribute
Inherits: Qt3DCore::QNode

Public Types

enum AttributeType { VertexAttribute, IndexAttribute }
enum DataType { Byte, UnsignedByte, Short, UnsignedShort, ..., Double }

Properties

Public Functions

QAbstractAttribute(QNode *parent = Q_NULLPTR)
QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = Q_NULLPTR)
~QAbstractAttribute()
virtual QVector<QVector2D> asVector2D() const = 0
virtual QVector<QVector3D> asVector3D() const = 0
virtual QVector<QVector4D> asVector4D() const = 0
AttributeType attributeType() const
QAbstractBuffer * buffer() const
uint byteOffset() const
uint byteStride() const
uint count() const
uint dataSize() const
DataType dataType() const
uint divisor() const
virtual void dump(int count) = 0
QString name() const

Public Slots

void setAttributeType(AttributeType attributeType)
void setBuffer(QAbstractBuffer *buffer)
void setByteOffset(uint byteOffset)
void setByteStride(uint byteStride)
void setCount(uint count)
void setDataSize(uint size)
void setDataType(DataType type)
void setDivisor(uint divisor)
void setName(const QString &name)

Signals

void attributeTypeChanged(AttributeType attributeType)
void bufferChanged(QAbstractBuffer *buffer)
void byteOffsetChanged(uint byteOffset)
void byteStrideChanged(uint byteStride)
void countChanged(uint count)
void dataSizeChanged(uint dataSize)
void dataTypeChanged(DataType dataType)
void divisorChanged(uint divisor)
void nameChanged(const QString &name)
typedef QAbstractBufferPtr

Additional Inherited Members

Detailed Description

Abstract class.

Member Type Documentation

enum QAbstractAttribute::AttributeType

The type of the attribute.

Constant Value
Qt3DRender::QAbstractAttribute::VertexAttribute 0
Qt3DRender::QAbstractAttribute::IndexAttribute 1

enum QAbstractAttribute::DataType

The type of the data.

Constant Value
Qt3DRender::QAbstractAttribute::Byte 0
Qt3DRender::QAbstractAttribute::UnsignedByte 1
Qt3DRender::QAbstractAttribute::Short 2
Qt3DRender::QAbstractAttribute::UnsignedShort 3
Qt3DRender::QAbstractAttribute::Int 4
Qt3DRender::QAbstractAttribute::UnsignedInt 5
Qt3DRender::QAbstractAttribute::HalfFloat 6
Qt3DRender::QAbstractAttribute::Float 7
Qt3DRender::QAbstractAttribute::Double 8

Property Documentation

attributeType : AttributeType

Holds the attribute type.

Access functions:

AttributeType attributeType() const
void setAttributeType(AttributeType attributeType)

Notifier signal:

void attributeTypeChanged(AttributeType attributeType)

buffer : Qt3DRender::QAbstractBuffer *

Holds the buffer.

Access functions:

QAbstractBuffer * buffer() const
void setBuffer(QAbstractBuffer *buffer)

Notifier signal:

void bufferChanged(QAbstractBuffer *buffer)

byteOffset : uint

Holds the byte offset.

Access functions:

uint byteOffset() const
void setByteOffset(uint byteOffset)

Notifier signal:

void byteOffsetChanged(uint byteOffset)

byteStride : uint

Holds the byte stride.

Access functions:

uint byteStride() const
void setByteStride(uint byteStride)

Notifier signal:

void byteStrideChanged(uint byteStride)

count : uint

Holds the count.

Access functions:

uint count() const
void setCount(uint count)

Notifier signal:

void countChanged(uint count)

dataSize : uint

Holds the data size.

Access functions:

uint dataSize() const
void setDataSize(uint size)

Notifier signal:

void dataSizeChanged(uint dataSize)

dataType : DataType

Holds the data type.

Access functions:

DataType dataType() const
void setDataType(DataType type)

Notifier signal:

void dataTypeChanged(DataType dataType)

divisor : uint

Holds the divisor.

Access functions:

uint divisor() const
void setDivisor(uint divisor)

Notifier signal:

void divisorChanged(uint divisor)

name : QString

Holds the name.

Access functions:

QString name() const
void setName(const QString &name)

Notifier signal:

void nameChanged(const QString &name)

Member Function Documentation

QAbstractAttribute::QAbstractAttribute(QNode *parent = Q_NULLPTR)

Constructs a new QAbstractAttribute with parent.

QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = Q_NULLPTR)

Constructs a new QAbstractAttribute from buf of type, dataSize, count, offset, and stride with parent.

QAbstractAttribute::~QAbstractAttribute()

Destroys the abstract attribute.

[pure virtual] QVector<QVector2D> QAbstractAttribute::asVector2D() const

[pure virtual] QVector<QVector3D> QAbstractAttribute::asVector3D() const

[pure virtual] QVector<QVector4D> QAbstractAttribute::asVector4D() const

[pure virtual] void QAbstractAttribute::dump(int count)

count

Related Non-Members

typedef Qt3DRender::QAbstractBufferPtr

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/qt3drender-qabstractattribute.html