Qt3DExtras::QSphereGeometry Class
class Qt3DExtras::QSphereGeometryLa classe QSphereGeometry permet de créer une sphère dans l'espace 3D. En savoir plus...
| En-tête : | #include <Qt3DExtras/QSphereGeometry> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake : | QT += 3dextras |
| En QML : | SphereGeometry |
| Hérite de : | Qt3DCore::QGeometry |
| Statut : | Obsolète |
Cette classe est obsolète. Nous déconseillons fortement de l'utiliser dans du nouveau code.
Propriétés
|
|
Fonctions publiques
| QSphereGeometry(Qt3DCore::QNode *parent = nullptr) | |
| bool | generateTangents() const |
| Qt3DCore::QAttribute * | indexAttribute() const |
| Qt3DCore::QAttribute * | normalAttribute() const |
| Qt3DCore::QAttribute * | positionAttribute() const |
| float | radius() const |
| int | rings() const |
| int | slices() const |
| Qt3DCore::QAttribute * | tangentAttribute() const |
| Qt3DCore::QAttribute * | texCoordAttribute() const |
| void | updateIndices() |
| void | updateVertices() |
Emplacements publics
| void | setGenerateTangents(bool gen) |
| void | setRadius(float radius) |
| void | setRings(int rings) |
| void | setSlices(int slices) |
Signaux
| void | generateTangentsChanged(bool generateTangents) |
| void | radiusChanged(float radius) |
| void | ringsChanged(int rings) |
| void | slicesChanged(int slices) |
Description détaillée
La classe QSphereGeometry est principalement utilisée en interne par l'QSphereMesh, mais peut également être utilisée dans des sous-classes personnalisées d'Qt3DRender::QGeometryRenderer.
Documentation des propriétés
generateTangents : bool
Contient la valeur de l'indicateur de génération automatique des vecteurs tangents. Les vecteurs tangents sont orthogonaux aux vecteurs normaux.
Fonctions d'accès :
| bool | generateTangents() const |
| void | setGenerateTangents(bool gen) |
Signal de notification :
| void | generateTangentsChanged(bool generateTangents) |
[read-only] indexAttribute : Qt3DCore::QAttribute* const
Contient l'attribut d'index géométrique.
Fonctions d'accès :
| Qt3DCore::QAttribute * | indexAttribute() const |
[read-only] normalAttribute : Qt3DCore::QAttribute* const
Contient l'attribut « normal » de la géométrie.
Fonctions d'accès :
| Qt3DCore::QAttribute * | normalAttribute() const |
[read-only] positionAttribute : Qt3DCore::QAttribute* const
Contient l'attribut de position géométrique.
Fonctions d'accès :
| Qt3DCore::QAttribute * | positionAttribute() const |
radius : float
Contient le rayon de la sphère.
Fonctions d'accès :
| float | radius() const |
| void | setRadius(float radius) |
Signal de notification :
| void | radiusChanged(float radius) |
rings : int
Contient le nombre d'anneaux de la sphère.
Fonctions d'accès :
| int | rings() const |
| void | setRings(int rings) |
Signal de notification :
| void | ringsChanged(int rings) |
slices : int
Contient le nombre de tranches de la sphère.
Fonctions d'accès :
| int | slices() const |
| void | setSlices(int slices) |
Signal de notification :
| void | slicesChanged(int slices) |
[read-only] tangentAttribute : Qt3DCore::QAttribute* const
Contient l'attribut « tangente » de la géométrie.
Fonctions d'accès :
| Qt3DCore::QAttribute * | tangentAttribute() const |
[read-only] texCoordAttribute : Qt3DCore::QAttribute* const
Contient l'attribut de coordonnées de texture géométrique.
Fonctions d’accès :
| Qt3DCore::QAttribute * | texCoordAttribute() const |
Documentation des fonctions membres
[explicit] QSphereGeometry::QSphereGeometry(Qt3DCore::QNode *parent = nullptr)
Crée un nouvel objet `QSphereGeometry` à l'aide de ` parent`.
void QSphereGeometry::updateIndices()
Mise à jour des index en fonction des propriétés des anneaux et des tranches.
void QSphereGeometry::updateVertices()
Mise à jour des sommets en fonction des propriétés des anneaux, des tranches et du rayon
© 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.