QAttribute

Defines an attribute and how data should be read from a QBuffer . More

Inheritance diagram of PySide6.Qt3DCore.Qt3DCore.QAttribute

Synopsis

Functions

Slots

Signals

Static functions

Detailed Description

There are 3 types of attributes.

  • VertexAttribute : used to define data to be read on a per vertex basis

  • IndexAttribute : used to define vertex indices when indexed draw calls are to be used

  • DrawIndirectAttribute : used to specify the DrawIndirect buffer to be used when indirect draw calls are to be used

Note

when an attribute is of type DrawIndirectAttribute , only count, stride and offset are relevant.

When providing your own attributes, it may make sense to name your attribute using helpers such as defaultPositionAttributeName() as that will ensure your geometry will be compatible with picking and the various materials provided in the Qt3DExtras module.

See also

QBuffer

class PySide6.Qt3DCore.Qt3DCore.QAttribute(buf, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])

PySide6.Qt3DCore.Qt3DCore.QAttribute(buf, name, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])

PySide6.Qt3DCore.Qt3DCore.QAttribute([parent=None])

Parameters

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

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

Constructs a new QAttribute with parent.

PySide6.Qt3DCore.Qt3DCore.QAttribute.AttributeType

The type of the attribute.

Constant

Description

Qt3DCore.QAttribute.VertexAttribute

Qt3DCore.QAttribute.IndexAttribute

Qt3DCore.QAttribute.DrawIndirectAttribute

PySide6.Qt3DCore.Qt3DCore.QAttribute.VertexBaseType

The type of the data.

Constant

Description

Qt3DCore.QAttribute.Byte

Qt3DCore.QAttribute.UnsignedByte

Qt3DCore.QAttribute.Short

Qt3DCore.QAttribute.UnsignedShort

Qt3DCore.QAttribute.Int

Qt3DCore.QAttribute.UnsignedInt

Qt3DCore.QAttribute.HalfFloat

Qt3DCore.QAttribute.Float

Qt3DCore.QAttribute.Double

PySide6.Qt3DCore.Qt3DCore.QAttribute.attributeType()
Return type

AttributeType

Holds the attribute type.

PySide6.Qt3DCore.Qt3DCore.QAttribute.attributeTypeChanged(attributeType)
Parameters

attributeTypeAttributeType

PySide6.Qt3DCore.Qt3DCore.QAttribute.buffer()
Return type

PySide6.Qt3DCore.Qt3DCore.QBuffer

Holds the buffer.

PySide6.Qt3DCore.Qt3DCore.QAttribute.bufferChanged(buffer)
Parameters

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffset()
Return type

uint

Holds the byte offset.

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffsetChanged(byteOffset)
Parameters

byteOffsetuint

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStride()
Return type

uint

Holds the byte stride.

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStrideChanged(byteStride)
Parameters

byteStrideuint

PySide6.Qt3DCore.Qt3DCore.QAttribute.count()
Return type

uint

Holds the count.

PySide6.Qt3DCore.Qt3DCore.QAttribute.countChanged(count)
Parameters

countuint

PySide6.Qt3DCore.Qt3DCore.QAttribute.dataSizeChanged(vertexSize)
Parameters

vertexSizeuint

PySide6.Qt3DCore.Qt3DCore.QAttribute.dataTypeChanged(vertexBaseType)
Parameters

vertexBaseTypeVertexBaseType

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultColorAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointIndicesAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointWeightsAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultNormalAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultPositionAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTangentAttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate1AttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate2AttributeName()
Return type

str

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinateAttributeName()
Return type

str

PySide6.Qt3DCore.Qt3DCore.QAttribute.divisor()
Return type

uint

Holds the divisor.

PySide6.Qt3DCore.Qt3DCore.QAttribute.divisorChanged(divisor)
Parameters

divisoruint

PySide6.Qt3DCore.Qt3DCore.QAttribute.name()
Return type

str

Holds the name.

PySide6.Qt3DCore.Qt3DCore.QAttribute.nameChanged(name)
Parameters

name – str

PySide6.Qt3DCore.Qt3DCore.QAttribute.setAttributeType(attributeType)
Parameters

attributeTypeAttributeType

Holds the attribute type.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setBuffer(buffer)
Parameters

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

Holds the buffer.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteOffset(byteOffset)
Parameters

byteOffsetuint

Holds the byte offset.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteStride(byteStride)
Parameters

byteStrideuint

Holds the byte stride.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setCount(count)
Parameters

countuint

Holds the count.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setDivisor(divisor)
Parameters

divisoruint

Holds the divisor.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setName(name)
Parameters

name – str

Holds the name.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexBaseType(type)
Parameters

typeVertexBaseType

Holds the data type.

PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexSize(size)
Parameters

sizeuint

Holds the data size, it can only be 1 to 4 units (scalars and vectors), 9 units (3x3 matrices) or 16 units (4x4 matrices).

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseType()
Return type

VertexBaseType

Holds the data type.

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseTypeChanged(vertexBaseType)
Parameters

vertexBaseTypeVertexBaseType

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSize()
Return type

uint

Holds the data size, it can only be 1 to 4 units (scalars and vectors), 9 units (3x3 matrices) or 16 units (4x4 matrices).

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSizeChanged(vertexSize)
Parameters

vertexSizeuint