Qt3DCore::QGeometry Class
class Qt3DCore::QGeometryEncapsule une géométrie. En savoir plus...
| En-tête : | #include <QGeometry> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake : | QT += 3dcore |
| En QML : | Geometry |
| Hérite de : | Qt3DCore::QNode |
| Hérité par : | Qt3DExtras::QConeGeometry, Qt3DExtras::QCuboidGeometry, Qt3DExtras::QCylinderGeometry, Qt3DExtras::QExtrudedTextGeometry, Qt3DExtras::QPlaneGeometry, Qt3DExtras::QSphereGeometry, et Qt3DExtras::QTorusGeometry |
| Statut : | Obsolète |
Cette classe est obsolète. Nous vous déconseillons fortement de l'utiliser dans du nouveau code.
Propriétés
- boundingVolumePositionAttribute : Qt3DCore::QAttribute*
- maxExtent : QVector3D
- minExtent : QVector3D
Fonctions publiques
| QGeometry(Qt3DCore::QNode *parent = nullptr) | |
| void | addAttribute(Qt3DCore::QAttribute *attribute) |
| QList<Qt3DCore::QAttribute *> | attributes() const |
| Qt3DCore::QAttribute * | boundingVolumePositionAttribute() const |
| QVector3D | maxExtent() const |
| QVector3D | minExtent() const |
| void | removeAttribute(Qt3DCore::QAttribute *attribute) |
Emplacements publics
| void | setBoundingVolumePositionAttribute(Qt3DCore::QAttribute *boundingVolumePositionAttribute) |
Signaux
| void | boundingVolumePositionAttributeChanged(Qt3DCore::QAttribute *boundingVolumePositionAttribute) |
| void | maxExtentChanged(const QVector3D &maxExtent) |
| void | minExtentChanged(const QVector3D &minExtent) |
Description détaillée
Une classe « Qt3DCore::QGeometry » sert à regrouper une liste d’objets « Qt3DCore::QAttribute » afin de former une forme géométrique que Qt3D est capable de rendre à l’aide de Qt3DCore::QGeometryRenderer. Un attribut spécial peut être défini afin de calculer le volume englobant de la forme.
Documentation des propriétés
boundingVolumePositionAttribute : Qt3DCore::QAttribute*
Contient l'attribut utilisé pour calculer le volume englobant. Le volume englobant est utilisé en interne pour la sélection des objets et le culling du cône de vision.
Si cet attribut n'est pas spécifié, le système le recherchera en utilisant le nom renvoyé par la fonction ` QAttribute::defaultPositionAttributeName`.
Fonctions d'accès :
| Qt3DCore::QAttribute * | boundingVolumePositionAttribute() const |
| void | setBoundingVolumePositionAttribute(Qt3DCore::QAttribute *boundingVolumePositionAttribute) |
Signal de notification :
| void | boundingVolumePositionAttributeChanged(Qt3DCore::QAttribute *boundingVolumePositionAttribute) |
Voir également Qt3DCore::QAttribute.
[read-only] maxExtent : QVector3D
Contient le sommet dont les coordonnées x, y et z sont les plus élevées.
Fonctions d'accès :
| QVector3D | maxExtent() const |
Signal de notification :
| void | maxExtentChanged(const QVector3D &maxExtent) |
[read-only] minExtent : QVector3D
Renvoie le sommet dont les coordonnées x, y et z sont les plus basses.
Fonctions d'accès :
| QVector3D | minExtent() const |
Signal de notification :
| void | minExtentChanged(const QVector3D &minExtent) |
Documentation des fonctions membres
[explicit] QGeometry::QGeometry(Qt3DCore::QNode *parent = nullptr)
Crée un nouvel objet QGeometry à l'aide de ` parent`.
[invokable] void QGeometry::addAttribute(Qt3DCore::QAttribute *attribute)
Ajoute un « attribute » à cette géométrie.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
QList<Qt3DCore::QAttribute *> QGeometry::attributes() const
Renvoie la liste des attributs de cette géométrie.
[invokable] void QGeometry::removeAttribute(Qt3DCore::QAttribute *attribute)
Supprime l'attribute e spécifiée de cette géométrie.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
© 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.