QAttribute

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

Inheritance diagram of PySide6.Qt3DCore.Qt3DCore.QAttribute

Synopsis

Functions

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

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

attributeTypeAttributeType

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

PySide6.Qt3DCore.Qt3DCore.QBuffer

See also

setBuffer()

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

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

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

uint

See also

setByteOffset()

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

byteOffsetuint

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

uint

See also

setByteStride()

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

byteStrideuint

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

uint

See also

setCount()

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

countuint

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

vertexSizeuint

The signal is emitted with vertexSize when the dataSize changes.

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

vertexBaseTypeVertexBaseType

The signal is emitted with vertexBaseType when the dataType changed.

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

str

Returns the name of the default color attribute

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

str

Returns the name of the default joint indices attribute

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

str

defaultJointIndicesAttributeName Returns the name of the default joint weights attribute

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

str

Returns the name of the default normal attribute

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

str

Returns the name of the default position attribute

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

str

Returns the name of the default tangent attribute

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

str

Returns the name of the default attribute for the second layer of texture coordinates

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

str

Returns the name of the default attribute for the third layer of texture coordinates

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

str

Returns the name of the default texture coordinate attribute

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

uint

See also

setDivisor()

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

divisoruint

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

str

See also

setName()

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

name – str

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

attributeTypeAttributeType

See also

attributeType()

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

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

See also

buffer()

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

byteOffsetuint

See also

byteOffset()

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

byteStrideuint

See also

byteStride()

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

countuint

See also

count()

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

divisoruint

See also

divisor()

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

name – str

See also

name()

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

typeVertexBaseType

See also

vertexBaseType()

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

sizeuint

See also

vertexSize()

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

VertexBaseType

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

vertexBaseTypeVertexBaseType

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

uint

See also

setVertexSize()

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

vertexSizeuint