PySide6.Qt3DCore.Qt3DCore.QAttribute¶
- class QAttribute¶
- Defines an attribute and how data should be read from a - QBuffer. More…- Synopsis¶- Properties¶- Methods¶- def - __init__()
- def - attributeType()
- def - buffer()
- def - byteOffset()
- def - byteStride()
- def - count()
- def - divisor()
- def - name()
- def - vertexBaseType()
- def - vertexSize()
 - Slots¶
- def - setBuffer()
- def - setByteOffset()
- def - setByteStride()
- def - setCount()
- def - setDivisor()
- def - setName()
- def - setVertexSize()
 - Signals¶
- def - bufferChanged()
- def - countChanged()
- def - divisorChanged()
- def - nameChanged()
 - Static functions¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - 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 - class AttributeType¶
- The type of the attribute. - Constant - Description - Qt3DCore.QAttribute.VertexAttribute - Qt3DCore.QAttribute.IndexAttribute - Qt3DCore.QAttribute.DrawIndirectAttribute 
 - class 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 
 - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property attributeTypeᅟ: Qt3DCore.QAttribute.AttributeType¶
 - Holds the attribute type. - Access functions:
 - Holds the buffer. - Access functions:
- Signal - bufferChanged()
 
 - property byteOffsetᅟ: int¶
 - Holds the byte offset. - Access functions:
 - property byteStrideᅟ: int¶
 - Holds the byte stride. - Access functions:
 - property countᅟ: int¶
 - Holds the count. - Access functions:
- Signal - countChanged()
 
 - property defaultColorAttributeNameᅟ: str¶
 - Access functions:
 - property defaultJointIndicesAttributeNameᅟ: str¶
 - Access functions:
 - property defaultJointWeightsAttributeNameᅟ: str¶
 - Access functions:
 - property defaultNormalAttributeNameᅟ: str¶
 - Access functions:
 - property defaultPositionAttributeNameᅟ: str¶
 - Access functions:
 - property defaultTangentAttributeNameᅟ: str¶
 - Access functions:
 - property defaultTextureCoordinate1AttributeNameᅟ: str¶
 - Access functions:
 - property defaultTextureCoordinate2AttributeNameᅟ: str¶
 - Access functions:
 - property defaultTextureCoordinateAttributeNameᅟ: str¶
 - Access functions:
 - property divisorᅟ: int¶
 - Holds the divisor. - Access functions:
 - property nameᅟ: str¶
 - Holds the name. - Access functions:
- Signal - nameChanged()
 
 - property vertexBaseTypeᅟ: Qt3DCore.QAttribute.VertexBaseType¶
 - Holds the data type. - Access functions:
 - property vertexSizeᅟ: int¶
 - Holds the data size, it can only be 1 to 4 units (scalars and vectors), 9 units (3x3 matrices) or 16 units (4x4 matrices). - Access functions:
 - __init__([parent=None])¶
- Parameters:
- parent – - QNode
 
 - Constructs a new - QAttributewith- parent.- __init__(buf, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])
- Parameters:
- buf – - QBuffer
- vertexBaseType – - VertexBaseType
- vertexSize – int 
- count – int 
- offset – int 
- stride – int 
- parent – - QNode
 
 
 - Constructs a new - QAttributefrom- bufof- type,- dataSize,- count,- offset, and- stridewith- parent.- __init__(buf, name, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])
- Parameters:
- buf – - QBuffer
- name – str 
- vertexBaseType – - VertexBaseType
- vertexSize – int 
- count – int 
- offset – int 
- stride – int 
- parent – - QNode
 
 
 - Constructs a new - QAttributenamed- namefrom- bufof- type,- dataSize,- count,- offset, and- stridewith- parent.- attributeType()¶
- Return type:
- AttributeType
 - See also - setAttributeType()
 - Getter of property - attributeTypeᅟ.- attributeTypeChanged(attributeType)¶
- Parameters:
- attributeType – - AttributeType
 
 - Notification signal of property - attributeTypeᅟ.- buffer()¶
- Return type:
- QBuffer
 - See also - setBuffer()
 - Getter of property - bufferᅟ.- bufferChanged(buffer)¶
- Parameters:
- buffer – - QBuffer
 
 - Notification signal of property - bufferᅟ.- byteOffset()¶
- Return type:
- int 
 - See also - setByteOffset()
 - Getter of property - byteOffsetᅟ.- byteOffsetChanged(byteOffset)¶
- Parameters:
- byteOffset – int 
 
 - Notification signal of property - byteOffsetᅟ.- byteStride()¶
- Return type:
- int 
 - See also - setByteStride()
 - Getter of property - byteStrideᅟ.- byteStrideChanged(byteStride)¶
- Parameters:
- byteStride – int 
 
 - Notification signal of property - byteStrideᅟ.- count()¶
- Return type:
- int 
 - See also - setCount()
 - Getter of property - countᅟ.- countChanged(count)¶
- Parameters:
- count – int 
 
 - Notification signal of property - countᅟ.- dataSizeChanged(vertexSize)¶
- Parameters:
- vertexSize – int 
 
 - The signal is emitted with - vertexSizewhen the dataSize changes.- dataTypeChanged(vertexBaseType)¶
- Parameters:
- vertexBaseType – - VertexBaseType
 
 - The signal is emitted with - vertexBaseTypewhen the dataType changed.- static defaultColorAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultColorAttributeName Returns the name of the default color attribute - Getter of property - defaultColorAttributeNameᅟ.- static defaultJointIndicesAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultJointIndicesAttributeName Returns the name of the default joint indices attribute - Getter of property - defaultJointIndicesAttributeNameᅟ.- static defaultJointWeightsAttributeName()¶
- Return type:
- str 
 
 - defaultJointIndicesAttributeNameReturns the name of the default joint weights attribute- Getter of property - defaultJointWeightsAttributeNameᅟ.- static defaultNormalAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultNormalAttributeName Returns the name of the default normal attribute - Getter of property - defaultNormalAttributeNameᅟ.- static defaultPositionAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultPositionAttributeName Returns the name of the default position attribute - Getter of property - defaultPositionAttributeNameᅟ.- static defaultTangentAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultTangentAttributeName Returns the name of the default tangent attribute - Getter of property - defaultTangentAttributeNameᅟ.- static defaultTextureCoordinate1AttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultTextureCoordinate1AttributeName Returns the name of the default attribute for the second layer of texture coordinates - Getter of property - defaultTextureCoordinate1AttributeNameᅟ.- static defaultTextureCoordinate2AttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultTextureCoordinate2AttributeName Returns the name of the default attribute for the third layer of texture coordinates - Getter of property - defaultTextureCoordinate2AttributeNameᅟ.- static defaultTextureCoordinateAttributeName()¶
- Return type:
- str 
 
 - QAttribute::defaultTextureCoordinateAttributeName Returns the name of the default texture coordinate attribute - Getter of property - defaultTextureCoordinateAttributeNameᅟ.- divisor()¶
- Return type:
- int 
 - See also - setDivisor()
 - Getter of property - divisorᅟ.- divisorChanged(divisor)¶
- Parameters:
- divisor – int 
 
 - Notification signal of property - divisorᅟ.- name()¶
- Return type:
- str 
 - See also - setName()
 - Getter of property - nameᅟ.- nameChanged(name)¶
- Parameters:
- name – str 
 
 - Notification signal of property - nameᅟ.- setAttributeType(attributeType)¶
- Parameters:
- attributeType – - AttributeType
 - See also - attributeType()
 - Setter of property - attributeTypeᅟ.- setBuffer(buffer)¶
- Parameters:
- buffer – - QBuffer
 - See also - buffer()
 - Setter of property - bufferᅟ.- setByteOffset(byteOffset)¶
- Parameters:
- byteOffset – int 
 - See also - byteOffset()
 - Setter of property - byteOffsetᅟ.- setByteStride(byteStride)¶
- Parameters:
- byteStride – int 
 - See also - byteStride()
 - Setter of property - byteStrideᅟ.- setCount(count)¶
- Parameters:
- count – int 
 - See also - count()
 - Setter of property - countᅟ.- setDivisor(divisor)¶
- Parameters:
- divisor – int 
 - See also - divisor()
 - Setter of property - divisorᅟ.- setName(name)¶
- Parameters:
- name – str 
 - See also - name()
 - Setter of property - nameᅟ.- setVertexBaseType(type)¶
- Parameters:
- type – - VertexBaseType
 - See also - vertexBaseType()
 - Setter of property - vertexBaseTypeᅟ.- setVertexSize(size)¶
- Parameters:
- size – int 
 - See also - vertexSize()
 - Setter of property - vertexSizeᅟ.- vertexBaseType()¶
- Return type:
- VertexBaseType
 - See also - setVertexBaseType()
 - Getter of property - vertexBaseTypeᅟ.- vertexBaseTypeChanged(vertexBaseType)¶
- Parameters:
- vertexBaseType – - VertexBaseType
 
 - Notification signal of property - vertexBaseTypeᅟ.- vertexSize()¶
- Return type:
- int 
 - See also - setVertexSize()
 - Getter of property - vertexSizeᅟ.- vertexSizeChanged(vertexSize)¶
- Parameters:
- vertexSize – int 
 
 - Notification signal of property - vertexSizeᅟ.