Nesta página

Attribute QML Type

Define um atributo e como os dados devem ser lidos de um Buffer. Mais...

Import Statement: import Qt3D.Core 2.12
In C++: QAttribute
Status: Deprecated

Esse tipo está obsoleto. Recomendamos enfaticamente que não seja utilizado em código novo.

Descrição detalhada

Existem 3 tipos de atributos.

  • VertexAttribute: usado para definir dados a serem lidos por vértice
  • IndexAttribute: usado para definir índices de vértices quando forem utilizadas chamadas de desenho indexadas
  • DrawIndirectAttribute: usado para especificar o buffer DrawIndirect a ser utilizado quando forem utilizadas chamadas de desenho indiretas

Observação: quando um atributo é do tipo DrawIndirectAttribute, apenas count, stride e offset são relevantes.

Ao fornecer seus próprios atributos, pode fazer sentido nomear seu atributo usando auxiliares como QAttribute::defaultPositionAttributeName(), pois isso garantirá que sua geometria seja compatível com a seleção e com os diversos materiais fornecidos no módulo Qt3DExtras.

© 2026 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.