QAttribute#
Defines an attribute and how data should be read from a QBuffer
. More…
Synopsis#
Properties#
Functions#
def
attributeType
()def
buffer
()def
byteOffset
()def
byteStride
()def
count
()def
divisor
()def
name
()def
vertexBaseType
()def
vertexSize
()
Slots#
def
setAttributeType
(attributeType)def
setBuffer
(buffer)def
setByteOffset
(byteOffset)def
setByteStride
(byteStride)def
setCount
(count)def
setDivisor
(divisor)def
setName
(name)def
setVertexBaseType
(type)def
setVertexSize
(size)
Signals#
def
attributeTypeChanged
(attributeType)def
bufferChanged
(buffer)def
byteOffsetChanged
(byteOffset)def
byteStrideChanged
(byteStride)def
countChanged
(count)def
dataSizeChanged
(vertexSize)def
dataTypeChanged
(vertexBaseType)def
divisorChanged
(divisor)def
nameChanged
(name)def
vertexBaseTypeChanged
(vertexBaseType)def
vertexSizeChanged
(vertexSize)
Static functions#
def
defaultColorAttributeName
()def
defaultNormalAttributeName
()def
defaultPositionAttributeName
()def
defaultTangentAttributeName
()
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
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:
vertexBaseType –
VertexBaseType
vertexSize –
uint
count –
uint
name – str
stride –
uint
offset –
uint
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
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
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.attributeType: AttributeType#
Holds the attribute type.
- Access functions:
setAttributeType
(attributeType)Signal
attributeTypeChanged
(attributeType)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.buffer: PySide6.Qt3DCore.Qt3DCore.QBuffer#
Holds the buffer.
- Access functions:
buffer
()setBuffer
(buffer)Signal
bufferChanged
(buffer)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffset: uint#
Holds the byte offset.
- Access functions:
byteOffset
()setByteOffset
(byteOffset)Signal
byteOffsetChanged
(byteOffset)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.byteStride: uint#
Holds the byte stride.
- Access functions:
byteStride
()setByteStride
(byteStride)Signal
byteStrideChanged
(byteStride)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.count: uint#
Holds the count.
- Access functions:
count
()setCount
(count)Signal
countChanged
(count)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultColorAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointIndicesAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointWeightsAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultNormalAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultPositionAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTangentAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate1AttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate2AttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinateAttributeName: str#
- Access functions:
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.divisor: uint#
Holds the divisor.
- Access functions:
divisor
()setDivisor
(divisor)Signal
divisorChanged
(divisor)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.name: str#
Holds the name.
- Access functions:
name
()setName
(name)Signal
nameChanged
(name)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseType: VertexBaseType#
Holds the data type.
- Access functions:
setVertexBaseType
(type)Signal
vertexBaseTypeChanged
(vertexBaseType)
- property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSize: 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).
- Access functions:
vertexSize
()setVertexSize
(size)Signal
vertexSizeChanged
(vertexSize)
- 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:
See also
Getter of property attributeType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.attributeTypeChanged(attributeType)#
- Parameters:
attributeType –
AttributeType
Notification signal of property attributeType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.buffer()#
- Return type:
See also
Getter of property buffer
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.bufferChanged(buffer)#
- Parameters:
buffer –
PySide6.Qt3DCore.Qt3DCore.QBuffer
Notification signal of property buffer
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffset()#
- Return type:
uint
See also
Getter of property byteOffset
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffsetChanged(byteOffset)#
- Parameters:
byteOffset –
uint
Notification signal of property byteOffset
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStride()#
- Return type:
uint
See also
Getter of property byteStride
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStrideChanged(byteStride)#
- Parameters:
byteStride –
uint
Notification signal of property byteStride
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.count()#
- Return type:
uint
See also
Getter of property count
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.countChanged(count)#
- Parameters:
count –
uint
Notification signal of property count
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.dataSizeChanged(vertexSize)#
- Parameters:
vertexSize –
uint
The signal is emitted with vertexSize
when the dataSize changes.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.dataTypeChanged(vertexBaseType)#
- Parameters:
vertexBaseType –
VertexBaseType
The signal is emitted with vertexBaseType
when the dataType changed.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultColorAttributeName()#
- Return type:
str
QAttribute::defaultColorAttributeName Returns the name of the default color attribute
Getter of property defaultColorAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointIndicesAttributeName()#
- Return type:
str
QAttribute::defaultJointIndicesAttributeName Returns the name of the default joint indices attribute
Getter of property defaultJointIndicesAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointWeightsAttributeName()#
- Return type:
str
defaultJointIndicesAttributeName
Returns the name of the default joint weights attribute
Getter of property defaultJointWeightsAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultNormalAttributeName()#
- Return type:
str
QAttribute::defaultNormalAttributeName Returns the name of the default normal attribute
Getter of property defaultNormalAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultPositionAttributeName()#
- Return type:
str
QAttribute::defaultPositionAttributeName Returns the name of the default position attribute
Getter of property defaultPositionAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTangentAttributeName()#
- Return type:
str
QAttribute::defaultTangentAttributeName Returns the name of the default tangent attribute
Getter of property defaultTangentAttributeName
.
- static PySide6.Qt3DCore.Qt3DCore.QAttribute.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 PySide6.Qt3DCore.Qt3DCore.QAttribute.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 PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinateAttributeName()#
- Return type:
str
QAttribute::defaultTextureCoordinateAttributeName Returns the name of the default texture coordinate attribute
Getter of property defaultTextureCoordinateAttributeName
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.divisor()#
- Return type:
uint
See also
Getter of property divisor
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.divisorChanged(divisor)#
- Parameters:
divisor –
uint
Notification signal of property divisor
.
Getter of property name
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.nameChanged(name)#
- Parameters:
name – str
Notification signal of property name
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setAttributeType(attributeType)#
- Parameters:
attributeType –
AttributeType
See also
Setter of property attributeType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setBuffer(buffer)#
- Parameters:
buffer –
PySide6.Qt3DCore.Qt3DCore.QBuffer
See also
Setter of property buffer
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteOffset(byteOffset)#
- Parameters:
byteOffset –
uint
See also
Setter of property byteOffset
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteStride(byteStride)#
- Parameters:
byteStride –
uint
See also
Setter of property byteStride
.
Setter of property count
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setDivisor(divisor)#
- Parameters:
divisor –
uint
See also
Setter of property divisor
.
Setter of property name
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexBaseType(type)#
- Parameters:
type –
VertexBaseType
See also
Setter of property vertexBaseType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexSize(size)#
- Parameters:
size –
uint
See also
Setter of property vertexSize
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseType()#
- Return type:
See also
Getter of property vertexBaseType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseTypeChanged(vertexBaseType)#
- Parameters:
vertexBaseType –
VertexBaseType
Notification signal of property vertexBaseType
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSize()#
- Return type:
uint
See also
Getter of property vertexSize
.
- PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSizeChanged(vertexSize)#
- Parameters:
vertexSize –
uint
Notification signal of property vertexSize
.