Qt3DRender.QAttribute

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

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QAttribute

Synopsis

Functions

Slots

Signals

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 PySide2.Qt3DRender.Qt3DRender.QAttribute([parent=None])

PySide2.Qt3DRender.Qt3DRender.QAttribute(buf, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])

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

param parent

QNode

param vertexBaseType

VertexBaseType

param buf

QBuffer

param offset

uint

param name

unicode

param stride

uint

param count

uint

param vertexSize

uint

Constructs a new QAttribute with parent .

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 .

PySide2.Qt3DRender.Qt3DRender.QAttribute.AttributeType

The type of the attribute.

Constant

Description

Qt3DRender.QAttribute.VertexAttribute

Qt3DRender.QAttribute.IndexAttribute

Qt3DRender.QAttribute.DrawIndirectAttribute

PySide2.Qt3DRender.Qt3DRender.QAttribute.VertexBaseType

The type of the data.

Constant

Description

Qt3DRender.QAttribute.Byte

Qt3DRender.QAttribute.UnsignedByte

Qt3DRender.QAttribute.Short

Qt3DRender.QAttribute.UnsignedShort

Qt3DRender.QAttribute.Int

Qt3DRender.QAttribute.UnsignedInt

Qt3DRender.QAttribute.HalfFloat

Qt3DRender.QAttribute.Float

Qt3DRender.QAttribute.Double

PySide2.Qt3DRender.Qt3DRender.QAttribute.attributeType()
Return type

AttributeType

PySide2.Qt3DRender.Qt3DRender.QAttribute.attributeTypeChanged(attributeType)
Parameters

attributeTypeAttributeType

PySide2.Qt3DRender.Qt3DRender.QAttribute.buffer()
Return type

QBuffer

See also

setBuffer()

PySide2.Qt3DRender.Qt3DRender.QAttribute.bufferChanged(buffer)
Parameters

bufferQBuffer

PySide2.Qt3DRender.Qt3DRender.QAttribute.byteOffset()
Return type

uint

See also

setByteOffset()

PySide2.Qt3DRender.Qt3DRender.QAttribute.byteOffsetChanged(byteOffset)
Parameters

byteOffsetuint

PySide2.Qt3DRender.Qt3DRender.QAttribute.byteStride()
Return type

uint

See also

setByteStride()

PySide2.Qt3DRender.Qt3DRender.QAttribute.byteStrideChanged(byteStride)
Parameters

byteStrideuint

PySide2.Qt3DRender.Qt3DRender.QAttribute.count()
Return type

uint

See also

setCount()

PySide2.Qt3DRender.Qt3DRender.QAttribute.countChanged(count)
Parameters

countuint

PySide2.Qt3DRender.Qt3DRender.QAttribute.dataSizeChanged(vertexSize)
Parameters

vertexSizeuint

PySide2.Qt3DRender.Qt3DRender.QAttribute.dataTypeChanged(vertexBaseType)
Parameters

vertexBaseTypeVertexBaseType

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultColorAttributeName()
Return type

unicode

Returns the name of the default color attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultJointIndicesAttributeName()
Return type

unicode

Returns the name of the default joint indices attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultJointWeightsAttributeName()
Return type

unicode

defaultJointIndicesAttributeName Returns the name of the default joint weights attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultNormalAttributeName()
Return type

unicode

Returns the name of the default normal attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultPositionAttributeName()
Return type

unicode

Returns the name of the default position attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultTangentAttributeName()
Return type

unicode

Returns the name of the default tangent attribute

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultTextureCoordinate1AttributeName()
Return type

unicode

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

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultTextureCoordinate2AttributeName()
Return type

unicode

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

static PySide2.Qt3DRender.Qt3DRender.QAttribute.defaultTextureCoordinateAttributeName()
Return type

unicode

Returns the name of the default texture coordinate attribute

PySide2.Qt3DRender.Qt3DRender.QAttribute.divisor()
Return type

uint

See also

setDivisor()

PySide2.Qt3DRender.Qt3DRender.QAttribute.divisorChanged(divisor)
Parameters

divisoruint

PySide2.Qt3DRender.Qt3DRender.QAttribute.name()
Return type

unicode

See also

setName()

PySide2.Qt3DRender.Qt3DRender.QAttribute.nameChanged(name)
Parameters

name – unicode

PySide2.Qt3DRender.Qt3DRender.QAttribute.setAttributeType(attributeType)
Parameters

attributeTypeAttributeType

See also

attributeType()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setBuffer(buffer)
Parameters

bufferQBuffer

See also

buffer()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setByteOffset(byteOffset)
Parameters

byteOffsetuint

See also

byteOffset()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setByteStride(byteStride)
Parameters

byteStrideuint

See also

byteStride()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setCount(count)
Parameters

countuint

See also

count()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setDataSize(size)
Parameters

sizeuint

Note

This function is deprecated.

PySide2.Qt3DRender.Qt3DRender.QAttribute.setDataType(type)
Parameters

typeVertexBaseType

Note

This function is deprecated.

PySide2.Qt3DRender.Qt3DRender.QAttribute.setDivisor(divisor)
Parameters

divisoruint

See also

divisor()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setName(name)
Parameters

name – unicode

See also

name()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setVertexBaseType(type)
Parameters

typeVertexBaseType

See also

vertexBaseType()

PySide2.Qt3DRender.Qt3DRender.QAttribute.setVertexSize(size)
Parameters

sizeuint

See also

vertexSize()

PySide2.Qt3DRender.Qt3DRender.QAttribute.vertexBaseType()
Return type

VertexBaseType

PySide2.Qt3DRender.Qt3DRender.QAttribute.vertexBaseTypeChanged(vertexBaseType)
Parameters

vertexBaseTypeVertexBaseType

PySide2.Qt3DRender.Qt3DRender.QAttribute.vertexSize()
Return type

uint

See also

setVertexSize()

PySide2.Qt3DRender.Qt3DRender.QAttribute.vertexSizeChanged(vertexSize)
Parameters

vertexSizeuint