Qt3DRender.QAttribute¶
Synopsis¶
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
setDataSize
(size)def
setDataType
(type)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
()
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 usedNote
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
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
- param buf
QBuffer
- param offset
uint
- param name
unicode
- param stride
uint
- param count
uint
- param vertexSize
uint
Constructs a new
QAttribute
withparent
.Constructs a new
QAttribute
frombuf
oftype
,dataSize
,count
,offset
, andstride
withparent
.Constructs a new
QAttribute
namedname
frombuf
oftype
,dataSize
,count
,offset
, andstride
withparent
.
-
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
See also
setAttributeType()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
attributeTypeChanged
(attributeType)¶ - Parameters
attributeType –
AttributeType
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
buffer
()¶ - Return type
QBuffer
See also
setBuffer()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
bufferChanged
(buffer)¶ - Parameters
buffer –
QBuffer
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
byteOffset
()¶ - Return type
uint
See also
setByteOffset()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
byteOffsetChanged
(byteOffset)¶ - Parameters
byteOffset –
uint
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
byteStride
()¶ - Return type
uint
See also
setByteStride()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
byteStrideChanged
(byteStride)¶ - Parameters
byteStride –
uint
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
count
()¶ - Return type
uint
See also
setCount()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
countChanged
(count)¶ - Parameters
count –
uint
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
dataSizeChanged
(vertexSize)¶ - Parameters
vertexSize –
uint
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
dataTypeChanged
(vertexBaseType)¶ - Parameters
vertexBaseType –
VertexBaseType
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultColorAttributeName
()¶ - Return type
unicode
defaultColorAttributeName
Returns the name of the default color attribute
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultJointIndicesAttributeName
()¶ - Return type
unicode
defaultJointIndicesAttributeName
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
defaultNormalAttributeName
Returns the name of the default normal attribute
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultPositionAttributeName
()¶ - Return type
unicode
defaultPositionAttributeName
Returns the name of the default position attribute
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultTangentAttributeName
()¶ - Return type
unicode
defaultTangentAttributeName
Returns the name of the default tangent attribute
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultTextureCoordinate1AttributeName
()¶ - Return type
unicode
defaultTextureCoordinate1AttributeName
Returns the name of the default attribute for the second layer of texture coordinates
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultTextureCoordinate2AttributeName
()¶ - Return type
unicode
defaultTextureCoordinate2AttributeName
Returns the name of the default attribute for the third layer of texture coordinates
-
static
PySide2.Qt3DRender.Qt3DRender.QAttribute.
defaultTextureCoordinateAttributeName
()¶ - Return type
unicode
defaultTextureCoordinateAttributeName
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
divisor –
uint
-
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
attributeType –
AttributeType
See also
attributeType()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setBuffer
(buffer)¶ - Parameters
buffer –
QBuffer
See also
buffer()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setByteOffset
(byteOffset)¶ - Parameters
byteOffset –
uint
See also
byteOffset()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setByteStride
(byteStride)¶ - Parameters
byteStride –
uint
See also
byteStride()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setCount
(count)¶ - Parameters
count –
uint
See also
count()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setDataSize
(size)¶ - Parameters
size –
uint
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setDataType
(type)¶ - Parameters
type –
VertexBaseType
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setDivisor
(divisor)¶ - Parameters
divisor –
uint
See also
divisor()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setName
(name)¶ - Parameters
name – unicode
See also
name()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setVertexBaseType
(type)¶ - Parameters
type –
VertexBaseType
See also
vertexBaseType()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
setVertexSize
(size)¶ - Parameters
size –
uint
See also
vertexSize()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
vertexBaseType
()¶ - Return type
See also
setVertexBaseType()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
vertexBaseTypeChanged
(vertexBaseType)¶ - Parameters
vertexBaseType –
VertexBaseType
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
vertexSize
()¶ - Return type
uint
See also
setVertexSize()
-
PySide2.Qt3DRender.Qt3DRender.QAttribute.
vertexSizeChanged
(vertexSize)¶ - Parameters
vertexSize –
uint
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.