In questa pagina

Qt3DExtras::QCylinderGeometry Class

class Qt3DExtras::QCylinderGeometry

La classe QCylinderGeometry consente di creare un cilindro nello spazio 3D. Per saperne di più...

Intestazione: #include <Qt3DExtras/QCylinderGeometry>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
In QML: CylinderGeometry
Eredita da: Qt3DCore::QGeometry
Stato: Obsoleta

Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.

Proprietà

Funzioni pubbliche

QCylinderGeometry(Qt3DCore::QNode *parent = nullptr)
Qt3DCore::QAttribute *indexAttribute() const
float length() const
Qt3DCore::QAttribute *normalAttribute() const
Qt3DCore::QAttribute *positionAttribute() const
float radius() const
int rings() const
int slices() const
Qt3DCore::QAttribute *texCoordAttribute() const
void updateIndices()
void updateVertices()

Slot pubblici

void setLength(float length)
void setRadius(float radius)
void setRings(int rings)
void setSlices(int slices)

Segnali

void lengthChanged(float length)
void radiusChanged(float radius)
void ringsChanged(int rings)
void slicesChanged(int slices)

Descrizione dettagliata

La classe QCylinderGeometry viene utilizzata principalmente internamente dall'QCylinderMesh, ma può essere impiegata anche nelle sottoclassi personalizzate di Qt3DRender::QGeometryRenderer.

Documentazione delle proprietà

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

Contiene l'attributo dell'indice geometrico.

Funzioni di accesso:

Qt3DCore::QAttribute *indexAttribute() const

length : float

Contiene la lunghezza del cilindro.

Funzioni di accesso:

float length() const
void setLength(float length)

Segnale di notifica:

void lengthChanged(float length)

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

Contiene l'attributo "normale" della geometria.

Funzioni di accesso:

Qt3DCore::QAttribute *normalAttribute() const

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

Contiene l'attributo relativo alla posizione geometrica.

Funzioni di accesso:

Qt3DCore::QAttribute *positionAttribute() const

radius : float

Contiene il raggio del cilindro.

Funzioni di accesso:

float radius() const
void setRadius(float radius)

Segnale di notifica:

void radiusChanged(float radius)

rings : int

Contiene il numero di anelli presenti nel cilindro.

Funzioni di accesso:

int rings() const
void setRings(int rings)

Segnale di notifica:

void ringsChanged(int rings)

slices : int

Contiene il numero di sezioni del cilindro.

Funzioni di accesso:

int slices() const
void setSlices(int slices)

Segnale di notifica:

void slicesChanged(int slices)

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

Contiene l'attributo delle coordinate della texture geometrica.

Funzioni di accesso:

Qt3DCore::QAttribute *texCoordAttribute() const

Documentazione delle funzioni membro

[explicit] QCylinderGeometry::QCylinderGeometry(Qt3DCore::QNode *parent = nullptr)

Crea un nuovo oggetto QCylinderMesh con ` parent`.

void QCylinderGeometry::updateIndices()

Aggiorna gli indici in base alle proprietà relative ad anelli, sezioni e lunghezza.

void QCylinderGeometry::updateVertices()

Aggiorna i vertici in base alle proprietà relative ad anelli, sezioni e lunghezza.

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