Sur cette page

Qt3DExtras::QConeGeometry Class

class Qt3DExtras::QConeGeometry

La classe QConeGeometry permet de créer un cône dans l'espace 3D. En savoir plus...

En-tête : #include <Qt3DExtras/QConeGeometry>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake : QT += 3dextras
En QML : ConeGeometry
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

float bottomRadius() const
bool hasBottomEndcap() const
bool hasTopEndcap() const
Qt3DCore::QAttribute *indexAttribute() const
float length() const
Qt3DCore::QAttribute *normalAttribute() const
Qt3DCore::QAttribute *positionAttribute() const
int rings() const
int slices() const
Qt3DCore::QAttribute *texCoordAttribute() const
float topRadius() const
void updateIndices()
void updateVertices()

Emplacements publics

void setBottomRadius(float bottomRadius)
void setHasBottomEndcap(bool hasBottomEndcap)
void setHasTopEndcap(bool hasTopEndcap)
void setLength(float length)
void setRings(int rings)
void setSlices(int slices)
void setTopRadius(float topRadius)

Signaux

void bottomRadiusChanged(float bottomRadius)
void hasBottomEndcapChanged(bool hasBottomEndcap)
void hasTopEndcapChanged(bool hasTopEndcap)
void lengthChanged(float length)
void ringsChanged(int rings)
void slicesChanged(int slices)
void topRadiusChanged(float topRadius)

Description détaillée

La classe QConeGeometry est principalement utilisée en interne par l'QConeMesh, mais peut également être utilisée dans des sous-classes personnalisées d'Qt3DRender::QGeometryRenderer. Cette classe permet de créer aussi bien un cône qu'un cône tronqué.

Documentation des propriétés

bottomRadius : float

Contient le rayon de base du cône.

Fonctions d'accès :

float bottomRadius() const
void setBottomRadius(float bottomRadius)

Signal de notification :

void bottomRadiusChanged(float bottomRadius)

hasBottomEndcap : bool

Détermine si la base du cône est fermée ou ouverte.

Fonctions d'accès :

bool hasBottomEndcap() const
void setHasBottomEndcap(bool hasBottomEndcap)

Signal de notification :

void hasBottomEndcapChanged(bool hasBottomEndcap)

hasTopEndcap : bool

Détermine si le sommet du cône est fermé ou ouvert.

Fonctions d'accès :

bool hasTopEndcap() const
void setHasTopEndcap(bool hasTopEndcap)

Signal de notification :

void hasTopEndcapChanged(bool hasTopEndcap)

[read-only] indexAttribute : Qt3DCore::QAttribute* const

Contient l'attribut d'index géométrique.

Fonctions d'accès :

Qt3DCore::QAttribute *indexAttribute() const

length : float

Indique la longueur du cône.

Fonctions d'accès :

float length() const
void setLength(float length)

Signal de notification :

void lengthChanged(float length)

[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

rings : int

Contient le nombre d'anneaux de la géométrie.

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 géométrie.

Fonctions d'accès :

int slices() const
void setSlices(int slices)

Signal de notification :

void slicesChanged(int slices)

[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

topRadius : float

Définit le rayon supérieur du cône.

Fonctions d'accès :

float topRadius() const
void setTopRadius(float topRadius)

Signal de notification :

void topRadiusChanged(float topRadius)

Documentation des fonctions membres

void QConeGeometry::updateIndices()

Mise à jour des index en fonction des propriétés géométriques.

void QConeGeometry::updateVertices()

Met à jour les sommets en fonction des propriétés géométriques.

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