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)

Additional Inherited Members

Detailed Description

Abstract class.

Member Type Documentation

enum QAbstractAttribute::AttributeType

The type of the attribute.

ConstantValue
Qt3DRender::QAbstractAttribute::VertexAttribute0
Qt3DRender::QAbstractAttribute::IndexAttribute1

enum QAbstractAttribute::DataType

The type of the data.

ConstantValue
Qt3DRender::QAbstractAttribute::Byte0
Qt3DRender::QAbstractAttribute::UnsignedByte1
Qt3DRender::QAbstractAttribute::Short2
Qt3DRender::QAbstractAttribute::UnsignedShort3
Qt3DRender::QAbstractAttribute::Int4
Qt3DRender::QAbstractAttribute::UnsignedInt5
Qt3DRender::QAbstractAttribute::HalfFloat6
Qt3DRender::QAbstractAttribute::Float7
Qt3DRender::QAbstractAttribute::Double8

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

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