QGeometry Class

class Qt3DCore::QGeometry

Kapselt die Geometrie. Mehr...

Kopfzeile: #include <QGeometry>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3DCore)
target_link_libraries(mytarget PRIVATE Qt6::3DCore)
qmake: QT += 3dcore
In QML: Geometry
Vererbt: Qt3DCore::QNode
Geerbt von:

Qt3DExtras::QConeGeometry, Qt3DExtras::QCuboidGeometry, Qt3DExtras::QCylinderGeometry, Qt3DExtras::QExtrudedTextGeometry, Qt3DExtras::QPlaneGeometry, Qt3DExtras::QSphereGeometry, und Qt3DExtras::QTorusGeometry

Status: Veraltet

Eigenschaften

Öffentliche Funktionen

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)

Öffentliche Slots

void setBoundingVolumePositionAttribute(Qt3DCore::QAttribute *boundingVolumePositionAttribute)

Signale

void boundingVolumePositionAttributeChanged(Qt3DCore::QAttribute *boundingVolumePositionAttribute)
void maxExtentChanged(const QVector3D &maxExtent)
void minExtentChanged(const QVector3D &minExtent)

Detaillierte Beschreibung

Eine Qt3DCore::QGeometry Klasse wird verwendet, um eine Liste von Qt3DCore::QAttribute Objekten zu gruppieren, um eine geometrische Form zu bilden, die Qt3D mit Qt3DCore::QGeometryRenderer rendern kann. Spezielle Attribute können gesetzt werden, um das Volumen der Form zu berechnen.

Dokumentation der Eigenschaft

boundingVolumePositionAttribute : Qt3DCore::QAttribute*

Enthält das Attribut, das zur Berechnung des Begrenzungsvolumens verwendet wird. Das Bounding-Volumen wird intern für das Picking und View Frustum Culling verwendet.

Wenn es nicht angegeben wird, sucht das System nach dem Attribut anhand des von QAttribute::defaultPositionAttributeName zurückgegebenen Namens.

Zugriffsfunktionen:

Qt3DCore::QAttribute *boundingVolumePositionAttribute() const
void setBoundingVolumePositionAttribute(Qt3DCore::QAttribute *boundingVolumePositionAttribute)

Benachrichtigungssignal:

void boundingVolumePositionAttributeChanged(Qt3DCore::QAttribute *boundingVolumePositionAttribute)

Siehe auch Qt3DCore::QAttribute.

[read-only] maxExtent : const QVector3D

Enthält den Scheitelpunkt mit den höchsten x-, y- und z-Positionswerten.

Zugriffsfunktionen:

QVector3D maxExtent() const

Benachrichtigungssignal:

void maxExtentChanged(const QVector3D &maxExtent)

[read-only] minExtent : const QVector3D

Enthält den Scheitelpunkt mit den niedrigsten x-, y- und z-Positionswerten.

Zugriffsfunktionen:

QVector3D minExtent() const

Benachrichtigungssignal:

void minExtentChanged(const QVector3D &minExtent)

Member Function Dokumentation

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

Konstruiert eine neue QGeometry mit parent.

[invokable] void QGeometry::addAttribute(Qt3DCore::QAttribute *attribute)

Fügt eine attribute zu dieser Geometrie hinzu.

Hinweis: Diese Funktion kann über das Meta-Objektsystem und von QML aus aufgerufen werden. Siehe Q_INVOKABLE.

QList<Qt3DCore::QAttribute *> QGeometry::attributes() const

Gibt die Liste der Attribute in dieser Geometrie zurück.

[invokable] void QGeometry::removeAttribute(Qt3DCore::QAttribute *attribute)

Entfernt die angegebene attribute aus dieser Geometrie.

Hinweis: Diese Funktion kann über das Meta-Objektsystem und von QML aus aufgerufen werden. Siehe Q_INVOKABLE.

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